diff --git a/.gitignore b/.gitignore index 35394555..41cbc3b2 100755 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ lerna-debug.log* # Build outputs dist/ +server/dist/ dist-ssr/ build/ out/ @@ -138,4 +139,4 @@ tasks/ !src/i18n/locales/de/tasks.json # Git worktrees -.worktrees/ \ No newline at end of file +.worktrees/ diff --git a/docs/backend/architecture.md b/docs/backend/architecture.md new file mode 100644 index 00000000..72aa8494 --- /dev/null +++ b/docs/backend/architecture.md @@ -0,0 +1,311 @@ +# Backend Architecture + +## Goal + +This structure keeps the Day 1 runtime stable while giving the backend a clear home for shared HTTP concerns, shared types, OpenAPI work, and feature modules. The current runtime still lives in `server/legacy-runtime.js`, but everything new should be shaped around the layout below. + +## Structure + +```text +server/ + legacy-runtime.js + src/ + app.ts + bootstrap.ts + config/ + runtime.ts + shared/ + http/ + api-response.ts + async-handler.ts + error-handler.ts + not-found-handler.ts + request-context.ts + types/ + app.ts + http.ts + docs/ + openapi.ts + utils/ + app-error.ts + logger.ts + modules/ + auth/ + cli-auth/ + user/ + settings/ + projects/ + files/ + sessions/ + git/ + taskmaster/ + agent/ + providers/ + claude/ + codex/ + cursor/ + gemini/ + mcp/ + plugins/ +``` + +## File And Folder Roles + +- `server/legacy-runtime.js` + Temporary compatibility boundary for the old monolith. Day 1 keeps behavior here so the new TypeScript layout can grow around a stable runtime. + Example: the existing websocket handlers, inline routes, and provider startup still live here until they are migrated module by module. + +- `src/bootstrap.ts` + Executable backend entrypoint used by `npm run server` and `npm run server:dev`. + Example: `bootstrap.ts` should stay thin and do nothing except start the app, so later it remains safe to call in dev, prod, tests, or worker modes. + +- `src/app.ts` + Composition root for the backend application. + Example: today it bridges into `legacy-runtime.js`; later it will create the Express app, apply shared middleware, register modules, attach websocket setup, and return the running application shape. + +- `src/config/` + Runtime configuration helpers and environment-aware path logic. + Example: `config/runtime.ts` resolves the project root, server root, legacy runtime path, and built bootstrap path without scattering path math across the app. + +- `src/shared/http/` + Shared HTTP-level behavior that every module can reuse. + Example: `api-response.ts` is where standard API response builders live. + Example: `error-handler.ts` is where thrown `AppError` instances get translated into JSON payloads. + Example: `request-context.ts` is where request IDs, timestamps, and per-request metadata are attached. + Example: `async-handler.ts` removes repeated `try/catch(next)` wrappers in controllers. + Example: `not-found-handler.ts` is the generic fallback for unknown API routes. + +- `src/shared/types/` + Global type aliases that are safe to share across modules. This layer uses `type`, not `interface`. + Example: `types/http.ts` defines `ApiMeta`, `ApiErrorShape`, `RequestContext`, `AuthenticatedRequest`, and `EndpointInventoryRecord`. + Example: `types/app.ts` defines `RuntimePaths`, `AppLocals`, and `ServerApplication`. + +- `src/shared/docs/` + Shared documentation helpers and future OpenAPI registry code. + Example: `docs/openapi.ts` is the future home for global tags like `Auth`, `Projects`, `Files`, `Git`, and `Providers`, plus reusable schema registration. +- `src/shared/utils/` + Shared non-HTTP utilities that stay generic and reusable. + Example: `utils/app-error.ts` defines `AppError`, which feature modules can throw without knowing how HTTP serialization works. + Example: `utils/logger.ts` is the centralized logger surface so modules do not ad-hoc `console.log` everywhere. + +- `src/modules/` + Feature boundaries. Every business area gets its own folder so request schemas, controllers, services, serializers, and docs stay close to the feature they belong to. + +- `src/modules/auth/` + Local authentication flows. + Example: login, register, logout, and auth-status endpoints belong here. + +- `src/modules/cli-auth/` + CLI/provider authentication status flows for Claude, Cursor, Codex, and Gemini CLIs. + Example: `/api/cli/claude/status` belongs here because it checks local CLI auth rather than app-user auth. + +- `src/modules/user/` + User-specific settings and onboarding state. + Example: git identity setup and onboarding completion endpoints belong here. + +- `src/modules/settings/` + App-level stored secrets and toggles. + Example: API keys and credential storage endpoints belong here because they configure backend access rather than user identity. + +- `src/modules/projects/` + Workspace and project registration concerns. + Example: project listing, project creation, workspace creation, and project rename/delete flows belong here. + +- `src/modules/files/` + File tree and workspace file operations only. + Example: read file, save file, upload file, create file, rename file, delete file, and image upload endpoints belong here. + Example boundary rule: this module should not decide how projects are discovered; it only operates inside an already resolved project/workspace. + +- `src/modules/sessions/` + Conversation and provider session history concerns. + Example: list sessions, fetch session messages, rename sessions, delete sessions, token-usage lookups, and conversation search belong here. + +- `src/modules/git/` + Repository operations and git intelligence. + Example: status, diff, branch listing, checkout, commit, push, publish, discard, and AI commit-message generation endpoints belong here. + +- `src/modules/taskmaster/` + TaskMaster-specific project workflows. + Example: detect installation, initialize TaskMaster, manage PRDs, add/update tasks, parse PRDs, and apply templates belong here. + +- `src/modules/agent/` + External agent execution API. + Example: `/api/agent` belongs here because it orchestrates provider selection, cloning, project reuse, branch creation, streaming, and optional PR creation. + +- `src/modules/providers/` + Provider-specific integrations that are narrower than the general `agent` API. + Example: provider session readers or provider-specific config endpoints should live here so Claude, Codex, Cursor, and Gemini logic do not bleed into unrelated modules. + +- `src/modules/providers/claude/` + Claude-specific runtime concerns. + Example: if Claude gets module-specific schemas or adapters later, they belong here rather than inside generic session code. + +- `src/modules/providers/codex/` + Codex-specific config, session, and MCP-adjacent logic. + Example: Codex MCP CLI endpoints and session history parsing can move here over time. + +- `src/modules/providers/cursor/` + Cursor-specific config, MCP, and stored session behavior. + Example: Cursor config reads, MCP server mutation, and SQLite-backed session history belong here. + +- `src/modules/providers/gemini/` + Gemini-specific config and session behavior. + Example: Gemini session message history and provider CLI lifecycle hooks belong here. + +- `src/modules/providers/mcp/` + MCP surfaces that are shared across providers or not owned by a single provider module. + Example: generic Claude MCP CLI/config endpoints and helper endpoints belong here. + +- `src/modules/providers/plugins/` + Plugin runtime and plugin asset delivery. + Example: plugin listing, installation, update, enable/disable, and asset serving can move here even though plugins are not an LLM provider; this keeps third-party integration surfaces grouped together. + +## Boundary Rules + +- `app.ts` wires modules together; it should not contain feature logic. +- `config/` resolves environment and filesystem context; it should not know HTTP payload details. +- `shared/http/` owns transport concerns; it should not know feature rules like how to rename a project. +- `shared/types/` only contains reusable type aliases; avoid feature-specific types here unless multiple modules truly share them. +- `modules//` owns its own future `routes`, `controllers`, `services`, `schemas`, and `docs`. +- `projects`, `files`, and `sessions` stay separate on purpose: + `projects` decides what a workspace/project is. + `files` operates inside a resolved workspace. + `sessions` manages chat/session history and search. +- `agent` stays separate from `providers`: + `agent` is orchestration for external callers. + `providers/*` are provider-specific adapters and APIs. + +## Day 1 Notes + +- The runtime still executes through `server/legacy-runtime.js` for safety. +- The new `src/` structure is now the required home for all new backend code. +- The generated inventory in `docs/backend/endpoint-inventory.*` is the source of truth for what must be migrated into these folders next. + +## Package Scripts + +These scripts live in `package.json`. The key distinction is: + +- `server` and `server:dev` run the backend directly from TypeScript. +- `server:start` runs the compiled backend through `server/index.js`. +- `build` only builds the frontend. +- `server:build` only builds the backend. +- `start` runs the full production-style flow. + +### Development Scripts + +- `npm run dev` + Starts the frontend and backend together. + Use this for normal full-stack development when you want Vite and the API server running at the same time. + Example: you are editing a React screen that calls `/api/projects` and also changing the backend route behavior. + +- `npm run server:dev` + Starts the backend in watch mode with `tsx watch server/src/bootstrap.ts`. + Use this for backend-only development. + Example: you are refactoring request handling, logging, module structure, or shared HTTP utilities and want automatic restarts. + +- `npm run server` + Starts the backend once from TypeScript without watch mode. + Use this when you want a stable one-shot backend process. + Example: you want to reproduce a startup bug, inspect logs without reload noise, or test one backend flow manually. + +- `npm run client` + Starts only the Vite frontend dev server. + Use this for frontend-only work when a backend is already running elsewhere. + Example: you are polishing UI layout or fixing a component state bug and do not need to restart the API server. + +### Build And Runtime Scripts + +- `npm run build` + Builds the frontend into `dist/`. + Use this to verify production frontend bundling. + Example: you changed React routing, code-splitting, or CSS and want to confirm the frontend still builds. + +- `npm run server:build` + Compiles the backend TypeScript using `server/tsconfig.json` into `server/dist/`. + Use this to verify backend build correctness. + Example: you changed `server/src/app.ts`, shared types, or future module imports and want to confirm compiled output is valid. + +- `npm run server:start` + Starts the built backend through `server/index.js`. + Use this after `npm run server:build` when you want to run compiled backend output only. + Example: dev mode works, but you want to make sure the production entrypoint and compiled files also work correctly. + +- `npm run start` + Runs `npm run build`, then `npm run server:build`, then `npm run server:start`. + Use this as the closest local equivalent to a production run. + Example: before shipping, you want to confirm the built frontend and built backend work together, not just the watch-mode setup. + +- `npm run preview` + Serves the built frontend bundle with Vite preview. + Use this when you want to inspect the built frontend output specifically. + Example: you want to check whether a client-side issue only appears in production assets. + Note: this does not replace the backend server. API routes still require the backend to be running separately. + +### Validation Scripts + +- `npm run typecheck:client` + Runs TypeScript checking for the frontend only. + Use this after frontend code changes. + Example: you changed hook types, component props, or frontend shared models. + +- `npm run typecheck:server` + Runs TypeScript checking for the backend only. + Use this after backend code changes. + Example: you changed shared HTTP helpers, backend imports, or module boundaries. + +- `npm run typecheck` + Runs both frontend and backend typechecks. + Use this as the default correctness check before commit or PR. + Example: you changed `src/` and `server/src/` in the same branch and want one command to validate both. + +- `npm run lint` + Runs ESLint on `src/` only. + Use this for frontend lint validation. + Example: you changed React files and want to catch unused imports, hook issues, or style violations. + +- `npm run lint:fix` + Runs ESLint on `src/` and auto-fixes what it can. + Use this after frontend edits when you want quick cleanup. + Example: you renamed components and want ESLint to remove stale imports and apply automatic fixes. + +### Release And Lifecycle Scripts + +- `npm run release` + Runs `release.sh`, which loads `GITHUB_TOKEN` from `.env` and then executes `release-it`. + Use this only when intentionally creating a release. + Example: you are cutting a new tagged version and want versioning/changelog automation. + +- `prepublishOnly` + Runs automatically before `npm publish`. + It builds both frontend and backend first. + Example: this prevents publishing a broken package that was never built. + +- `postinstall` + Runs automatically after `npm install`. + It executes `scripts/fix-node-pty.js`. + Example: this helps keep native terminal integration working after dependency installation. + +- `prepare` + Runs automatically during install in development contexts. + It sets up Husky hooks. + Example: this ensures local git hooks are installed without requiring a separate setup command. + +### Recommended Workflows + +- Full-stack local development: + `npm install` then `npm run dev` + +- Backend-only refactor work: + `npm run server:dev` then `npm run typecheck:server` + +- Frontend-only work: + `npm run client`, `npm run typecheck:client`, and `npm run lint` + +- Pre-PR validation: + `npm run typecheck`, `npm run lint`, `npm run build`, and `npm run server:build` + +- Production-style local verification: + `npm run start` + +- Release preparation: + `npm run typecheck`, `npm run build`, `npm run server:build`, and `npm run release` diff --git a/docs/backend/endpoint-inventory.csv b/docs/backend/endpoint-inventory.csv new file mode 100644 index 00000000..d2dedeb2 --- /dev/null +++ b/docs/backend/endpoint-inventory.csv @@ -0,0 +1,144 @@ +transport,method,path,tag,authMode,sourceFile,sourceLine,purpose,consumerFiles,pathParams,queryParams,bodyHints,successShape,errorShape,sideEffects,priority +"http","GET","/health","System","public","server/legacy-runtime.js","345","Expose server health, timestamp, and install mode for diagnostics.","src/hooks/useVersionCheck.ts","","","","Structured JSON object response.","Handler-specific error behavior.","Read-only backend query.","low" +"http","POST","/api/system/update","System","bearer_token","server/legacy-runtime.js","425","Run the application update workflow on the host machine.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.","low" +"http","GET","/api/projects","Projects","bearer_token","server/legacy-runtime.js","491","List detected projects and workspaces.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON payload returned directly from service logic.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","GET","/api/projects/:projectName/sessions","Sessions","bearer_token","server/legacy-runtime.js","500","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","offset; try { + const { limit","","JSON payload returned directly from service logic.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","GET","/api/projects/:projectName/sessions/:sessionId/messages","Sessions","bearer_token","server/legacy-runtime.js","512","Return paginated messages for a stored session.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName; sessionId","limit; offset","","Structured JSON object response.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","PUT","/api/projects/:projectName/rename","Projects","bearer_token","server/legacy-runtime.js","537","PUT /api/projects/:projectName/rename for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","try { + const { displayName","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","DELETE","/api/projects/:projectName/sessions/:sessionId","Sessions","bearer_token","server/legacy-runtime.js","548","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName; sessionId","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","PUT","/api/sessions/:sessionId/rename","Sessions","bearer_token","server/legacy-runtime.js","563","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","sessionId","","provider; summary","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.","low" +"http","DELETE","/api/projects/:projectName","Projects","bearer_token","server/legacy-runtime.js","589","DELETE /api/projects/:projectName for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","force","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","POST","/api/projects/create","Projects","bearer_token","server/legacy-runtime.js","601","Manually add a project path to the workspace list.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","try { + const { path","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"sse","GET","/api/search/conversations","Sessions","bearer_token","server/legacy-runtime.js","618","Search conversation history across stored projects and stream results.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","limit; q","","Server-sent events stream with progress/result/error events.","Streamed error event or JSON error fallback.","Read-only backend query.","high" +"http","GET","/api/browse-filesystem","Realtime","bearer_token","server/legacy-runtime.js","674","Browse local directories so the UI can suggest workspace locations.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","try { + const { path","","Structured JSON object response.","JSON object with error message and optional details.","Read-only backend query.","low" +"http","POST","/api/create-folder","Projects","bearer_token","server/legacy-runtime.js","754","Create a new directory on the local filesystem.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","try { + const { path","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.","low" +"http","GET","/api/projects/:projectName/file","Files","bearer_token","server/legacy-runtime.js","795","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","filePath","","Structured JSON object response.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","GET","/api/projects/:projectName/files/content","Files","bearer_token","server/legacy-runtime.js","835","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","path","","Mixed response shape; inspect handler during refactor.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","PUT","/api/projects/:projectName/file","Files","bearer_token","server/legacy-runtime.js","888","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","content; filePath","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","GET","/api/projects/:projectName/files","Files","bearer_token","server/legacy-runtime.js","937","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","JSON payload returned directly from service logic.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","POST","/api/projects/:projectName/files/create","Files","bearer_token","server/legacy-runtime.js","1016","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","name; path; type","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","PUT","/api/projects/:projectName/files/rename","Files","bearer_token","server/legacy-runtime.js","1093","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","newName; oldPath","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","DELETE","/api/projects/:projectName/files","Files","bearer_token","server/legacy-runtime.js","1170","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","path; relativePaths; targetPath; type","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","POST","/api/projects/:projectName/files/upload","Files","bearer_token","server/legacy-runtime.js","1396","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Mixed response shape; inspect handler during refactor.","Handler-specific error behavior.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","POST","/api/transcribe","Realtime","bearer_token","server/legacy-runtime.js","1964","Transcribe uploaded audio and optionally enhance the result for prompts or tasks.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","mode","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Processes uploaded files and external model responses.","low" +"http","POST","/api/projects/:projectName/upload-images","Files","bearer_token","server/legacy-runtime.js","2113","Upload images for chat use and return browser-safe data URLs.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"http","GET","/api/projects/:projectName/sessions/:sessionId/token-usage","Sessions","bearer_token","server/legacy-runtime.js","2198","Report token usage for a stored provider session.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName; sessionId","provider","","Structured JSON object response.","JSON object with error message and optional details.","Touches local workspace files or directories.","high" +"http","GET","*","System","public","server/legacy-runtime.js","2386","Serve the React application fallback for non-API routes.","","","","","Static file or HTML response.","JSON error response with HTTP status code.","Read-only backend query.","low" +"http","GET","/api/auth/status","Auth","public","server/routes/auth.js","9","Report whether authentication is configured.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON object with error message and optional details.","Reads or writes local authentication or credential state.","medium" +"http","POST","/api/auth/register","Auth","public","server/routes/auth.js","23","Create the first local user account.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","password; try { + const { username","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","POST","/api/auth/login","Auth","public","server/routes/auth.js","82","Authenticate a local user and issue a token.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","password; try { + const { username","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","GET","/api/auth/user","Auth","bearer_token","server/routes/auth.js","122","Return the currently authenticated user.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","Handler-specific error behavior.","Reads or writes local authentication or credential state.","medium" +"http","POST","/api/auth/logout","Auth","bearer_token","server/routes/auth.js","129","Invalidate the current authenticated session.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON object with an explicit success flag and payload.","Handler-specific error behavior.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","POST","/api/projects/create-workspace","Projects","bearer_token","server/routes/projects.js","175","Create or register a workspace and optionally clone a GitHub repository into it.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","githubTokenId; githubUrl; newGithubToken; path; try { + const { workspaceType","Structured JSON object response.","JSON validation error response.","Mutates backend or external state.; Touches local workspace files or directories.","high" +"sse","GET","/api/projects/clone-progress","Projects","bearer_token","server/routes/projects.js","335","Stream workspace cloning progress events to the frontend.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { path; githubTokenId; githubUrl; newGithubToken","","Server-sent events stream with progress/result/error events.","Streamed error event or JSON error fallback.","Touches local workspace files or directories.","high" +"http","GET","/api/git/status","Git","bearer_token","server/routes/git.js","291","Read git status information for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { project","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.","high" +"http","GET","/api/git/diff","Git","bearer_token","server/routes/git.js","354","Return git diff output for a project or file.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { project; file","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.","high" +"http","GET","/api/git/file-with-diff","Git","bearer_token","server/routes/git.js","437","Read, write, create, rename, delete, or upload project files.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { project; file","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.; Touches local workspace files or directories.","high" +"http","POST","/api/git/initial-commit","Git","bearer_token","server/routes/git.js","517","POST /api/git/initial-commit for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/commit","Git","bearer_token","server/routes/git.js","561","POST /api/git/commit for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project; files; message","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/revert-local-commit","Git","bearer_token","server/routes/git.js","592","POST /api/git/revert-local-commit for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","GET","/api/git/branches","Git","bearer_token","server/routes/git.js","639","List git branches for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { project","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.","high" +"http","POST","/api/git/checkout","Git","bearer_token","server/routes/git.js","681","POST /api/git/checkout for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","branch; const { project","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/create-branch","Git","bearer_token","server/routes/git.js","703","POST /api/git/create-branch for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","branch; const { project","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","GET","/api/git/commits","Git","bearer_token","server/routes/git.js","725","List recent commits for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { project; limit","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.","high" +"http","GET","/api/git/commit-diff","Git","bearer_token","server/routes/git.js","782","Return diff details for a specific commit.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","commit; const { project","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.","high" +"http","POST","/api/git/generate-commit-message","Git","bearer_token","server/routes/git.js","814","Generate an AI-assisted commit message from the current diff.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project; files; provider","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","GET","/api/git/remote-status","Git","bearer_token","server/routes/git.js","1019","Report remote sync status for a project repository.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","const { project","","Structured JSON object response.","JSON validation error response.","Touches git repositories or local git config.","high" +"http","POST","/api/git/fetch","Git","bearer_token","server/routes/git.js","1097","POST /api/git/fetch for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project","JSON object with an explicit success flag and payload.","JSON validation error response.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/pull","Git","bearer_token","server/routes/git.js","1138","POST /api/git/pull for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project","Structured JSON object response.","JSON validation error response.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/push","Git","bearer_token","server/routes/git.js","1206","POST /api/git/push for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project","Structured JSON object response.","JSON validation error response.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/publish","Git","bearer_token","server/routes/git.js","1277","POST /api/git/publish for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","branch; const { project","Structured JSON object response.","JSON validation error response.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/discard","Git","bearer_token","server/routes/git.js","1356","POST /api/git/discard for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project; file","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","POST","/api/git/delete-untracked","Git","bearer_token","server/routes/git.js","1410","POST /api/git/delete-untracked for backend runtime support.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","const { project; file","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","high" +"http","GET","/api/mcp/cli/list","MCP","bearer_token","server/routes/mcp.js","16","Manage Claude MCP CLI and configuration state.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Reads or writes MCP CLI configuration.","medium" +"http","POST","/api/mcp/cli/add","MCP","bearer_token","server/routes/mcp.js","59","Manage Claude MCP CLI and configuration state.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","POST","/api/mcp/cli/add-json","MCP","bearer_token","server/routes/mcp.js","142","Manage Claude MCP CLI and configuration state.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","jsonConfig; projectPath; scope; try { + const { name","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","DELETE","/api/mcp/cli/remove/:name","MCP","bearer_token","server/routes/mcp.js","235","Manage Claude MCP CLI and configuration state.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","scope","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/mcp/cli/get/:name","MCP","bearer_token","server/routes/mcp.js","305","Manage Claude MCP CLI and configuration state.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/mcp/config/read","MCP","bearer_token","server/routes/mcp.js","348","Manage Claude MCP CLI and configuration state.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/cursor/config","Providers","bearer_token","server/routes/cursor.js","15","Manage Cursor configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","POST","/api/cursor/config","Providers","bearer_token","server/routes/cursor.js","59","Manage Cursor configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","model; try { + const { permissions","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.","medium" +"http","GET","/api/cursor/mcp","Providers","bearer_token","server/routes/cursor.js","122","Manage Cursor configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes MCP CLI configuration.","medium" +"http","POST","/api/cursor/mcp/add","Providers","bearer_token","server/routes/cursor.js","183","Manage Cursor configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","DELETE","/api/cursor/mcp/:name","Providers","bearer_token","server/routes/cursor.js","245","Manage Cursor configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","POST","/api/cursor/mcp/add-json","Providers","bearer_token","server/routes/cursor.js","292","Manage Cursor configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","jsonConfig; try { + const { name","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/cursor/sessions","Providers","bearer_token","server/routes/cursor.js","348","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","try { + const { projectPath","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","GET","/api/cursor/sessions/:sessionId","Providers","bearer_token","server/routes/cursor.js","583","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","sessionId","projectPath","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","GET","/api/taskmaster/installation-status","TaskMaster","bearer_token","server/routes/taskmaster.js","243","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/detect/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","278","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","JSON payload returned directly from service logic.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/detect-all","TaskMaster","bearer_token","server/routes/taskmaster.js","350","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","POST","/api/taskmaster/initialize/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","434","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","rules","Mixed response shape; inspect handler during refactor.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/next/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","460","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/tasks/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","570","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/prd/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","685","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","POST","/api/taskmaster/prd/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","761","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","content; fileName","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/prd/:projectName/:fileName","TaskMaster","bearer_token","server/routes/taskmaster.js","846","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName; fileName","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","DELETE","/api/taskmaster/prd/:projectName/:fileName","TaskMaster","bearer_token","server/routes/taskmaster.js","911","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName; fileName","","","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","POST","/api/taskmaster/init/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","971","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","POST","/api/taskmaster/add-task/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","1060","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","dependencies; description; priority; prompt; title","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","PUT","/api/taskmaster/update-task/:projectName/:taskId","TaskMaster","bearer_token","server/routes/taskmaster.js","1164","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName; taskId","","description; details; priority; status; title","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","POST","/api/taskmaster/parse-prd/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","1291","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","append; fileName; numTasks","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","GET","/api/taskmaster/prd-templates","TaskMaster","bearer_token","server/routes/taskmaster.js","1392","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.","high" +"http","POST","/api/taskmaster/apply-template/:projectName","TaskMaster","bearer_token","server/routes/taskmaster.js","1838","Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","projectName","","","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.; Reads or writes TaskMaster project assets.","high" +"http","GET","/api/mcp-utils/taskmaster-server","MCP","bearer_token","server/routes/mcp-utils.js","18","Return MCP helper information used by setup flows.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON payload returned directly from service logic.","JSON error response with HTTP status code.","Reads or writes TaskMaster project assets.; Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/mcp-utils/all-servers","MCP","bearer_token","server/routes/mcp-utils.js","35","Return MCP helper information used by setup flows.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON payload returned directly from service logic.","JSON error response with HTTP status code.","Reads or writes MCP CLI configuration.","medium" +"http","POST","/api/commands/list","Commands","bearer_token","server/routes/commands.js","406","List, load, or execute slash commands available to the chat experience.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","try { + const { projectPath","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.","medium" +"http","POST","/api/commands/load","Commands","bearer_token","server/routes/commands.js","456","List, load, or execute slash commands available to the chat experience.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","commandPath; try { + const { commandPath","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.","medium" +"http","POST","/api/commands/execute","Commands","bearer_token","server/routes/commands.js","507","List, load, or execute slash commands available to the chat experience.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","commandPath","Structured JSON object response.","JSON error response with HTTP status code.","Mutates backend or external state.","medium" +"http","GET","/api/settings/api-keys","Settings","bearer_token","server/routes/settings.js","11","Manage local API keys used to access the backend.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON object with error message and optional details.","Reads or writes local authentication or credential state.","medium" +"http","POST","/api/settings/api-keys","Settings","bearer_token","server/routes/settings.js","27","Manage local API keys used to access the backend.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","try { + const { keyName","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","DELETE","/api/settings/api-keys/:keyId","Settings","bearer_token","server/routes/settings.js","47","Manage local API keys used to access the backend.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","keyId","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","PATCH","/api/settings/api-keys/:keyId/toggle","Settings","bearer_token","server/routes/settings.js","64","Manage local API keys used to access the backend.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","keyId","","isActive","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","GET","/api/settings/credentials","Settings","bearer_token","server/routes/settings.js","91","Manage stored provider and GitHub credentials.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","try { + const { type","","Structured JSON object response.","JSON object with error message and optional details.","Reads or writes local authentication or credential state.","medium" +"http","POST","/api/settings/credentials","Settings","bearer_token","server/routes/settings.js","104","Manage stored provider and GitHub credentials.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","credentialType; credentialValue; description; try { + const { credentialName","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","DELETE","/api/settings/credentials/:credentialId","Settings","bearer_token","server/routes/settings.js","139","Manage stored provider and GitHub credentials.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","credentialId","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","PATCH","/api/settings/credentials/:credentialId/toggle","Settings","bearer_token","server/routes/settings.js","156","Manage stored provider and GitHub credentials.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","credentialId","","isActive","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes local authentication or credential state.","medium" +"http","GET","/api/cli/claude/status","CLI Auth","bearer_token","server/routes/cli-auth.js","9","Report local authentication status for provider CLIs.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","low" +"http","GET","/api/cli/cursor/status","CLI Auth","bearer_token","server/routes/cli-auth.js","39","Report local authentication status for provider CLIs.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","low" +"http","GET","/api/cli/codex/status","CLI Auth","bearer_token","server/routes/cli-auth.js","59","Report local authentication status for provider CLIs.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","low" +"http","GET","/api/cli/gemini/status","CLI Auth","bearer_token","server/routes/cli-auth.js","79","Report local authentication status for provider CLIs.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","low" +"http","GET","/api/user/git-config","User","bearer_token","server/routes/user.js","28","Read or update stored git identity settings.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON object with error message and optional details.","Touches git repositories or local git config.","medium" +"http","POST","/api/user/git-config","User","bearer_token","server/routes/user.js","57","Read or update stored git identity settings.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","gitEmail; try { + const userId = req.user.id; + const { gitName","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.; Touches git repositories or local git config.","medium" +"http","POST","/api/user/complete-onboarding","User","bearer_token","server/routes/user.js","93","Mark onboarding as completed for the current user.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON object with error message and optional details.","Mutates backend or external state.","medium" +"http","GET","/api/user/onboarding-status","User","bearer_token","server/routes/user.js","108","Return onboarding completion status for the current user.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON object with error message and optional details.","Read-only backend query.","medium" +"http","GET","/api/codex/config","Providers","bearer_token","server/routes/codex.js","23","Manage Codex configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","GET","/api/codex/sessions","Providers","bearer_token","server/routes/codex.js","54","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","try { + const { projectPath","","JSON object with an explicit success flag and payload.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","GET","/api/codex/sessions/:sessionId/messages","Providers","bearer_token","server/routes/codex.js","71","Return paginated messages for a stored session.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","sessionId","limit; offset","","JSON object with an explicit success flag and payload.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","DELETE","/api/codex/sessions/:sessionId","Providers","bearer_token","server/routes/codex.js","89","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","sessionId","","","JSON object with an explicit success flag and payload.","JSON error response with HTTP status code.","Mutates backend or external state.","medium" +"http","GET","/api/codex/mcp/cli/list","Providers","bearer_token","server/routes/codex.js","103","Manage Codex configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Mixed response shape; inspect handler during refactor.","JSON object with error message and optional details.","Reads or writes MCP CLI configuration.","medium" +"http","POST","/api/codex/mcp/cli/add","Providers","bearer_token","server/routes/codex.js","135","Manage Codex configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Mixed response shape; inspect handler during refactor.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","DELETE","/api/codex/mcp/cli/remove/:name","Providers","bearer_token","server/routes/codex.js","186","Manage Codex configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","Mixed response shape; inspect handler during refactor.","JSON object with error message and optional details.","Mutates backend or external state.; Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/codex/mcp/cli/get/:name","Providers","bearer_token","server/routes/codex.js","220","Manage Codex configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","Mixed response shape; inspect handler during refactor.","JSON object with error message and optional details.","Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/codex/mcp/config/read","Providers","bearer_token","server/routes/codex.js","254","Manage Codex configuration, MCP settings, and stored sessions.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Reads or writes MCP CLI configuration.","medium" +"http","GET","/api/gemini/sessions/:sessionId/messages","Providers","bearer_token","server/routes/gemini.js","8","Return paginated messages for a stored session.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","sessionId","","","Structured JSON object response.","JSON error response with HTTP status code.","Read-only backend query.","medium" +"http","DELETE","/api/gemini/sessions/:sessionId","Providers","bearer_token","server/routes/gemini.js","37","List or manage sessions associated with a project or provider.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","sessionId","","","JSON object with an explicit success flag and payload.","JSON error response with HTTP status code.","Mutates backend or external state.","medium" +"http","GET","/api/plugins","Plugins","bearer_token","server/routes/plugins.js","27","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","","Structured JSON object response.","JSON object with error message and optional details.","Installs, updates, or serves plugin assets/processes.","medium" +"http","GET","/api/plugins/:name/manifest","Plugins","bearer_token","server/routes/plugins.js","40","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","JSON payload returned directly from service logic.","JSON object with error message and optional details.","Installs, updates, or serves plugin assets/processes.","medium" +"http","GET","/api/plugins/:name/assets/*","Plugins","bearer_token","server/routes/plugins.js","57","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","Mixed response shape; inspect handler during refactor.","JSON object with error message and optional details.","Installs, updates, or serves plugin assets/processes.","medium" +"http","PUT","/api/plugins/:name/enable","Plugins","bearer_token","server/routes/plugins.js","96","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","try { + const { enabled","JSON object with an explicit success flag and payload.","JSON object with error message and optional details.","Mutates backend or external state.; Installs, updates, or serves plugin assets/processes.","medium" +"http","POST","/api/plugins/install","Plugins","bearer_token","server/routes/plugins.js","136","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","try { + const { url","JSON object with an explicit success flag and payload.","JSON validation error response.","Mutates backend or external state.; Installs, updates, or serves plugin assets/processes.","medium" +"http","POST","/api/plugins/:name/update","Plugins","bearer_token","server/routes/plugins.js","169","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","JSON object with an explicit success flag and payload.","JSON validation error response.","Mutates backend or external state.; Installs, updates, or serves plugin assets/processes.","medium" +"http","DELETE","/api/plugins/:name","Plugins","bearer_token","server/routes/plugins.js","282","List, install, update, serve, enable, or remove plugins.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","name","","","JSON object with an explicit success flag and payload.","JSON validation error response.","Mutates backend or external state.; Installs, updates, or serves plugin assets/processes.","medium" +"sse","POST","/api/agent","Agent","api_key_or_platform","server/routes/agent.js","839","Accept external agent jobs that run a provider against a local or cloned project.","src/components/chat/hooks/useChatComposerState.ts; src/components/chat/hooks/useChatProviderState.ts; src/components/chat/hooks/useChatSessionState.ts; src/components/chat/hooks/useSlashCommands.ts; src/components/file-tree/view/ImageViewer.tsx; src/components/git-panel/hooks/useGitPanelController.ts; src/components/git-panel/hooks/useRevertLocalCommit.ts; src/components/onboarding/view/Onboarding.tsx; src/components/plugins/view/PluginIcon.tsx; src/components/plugins/view/PluginTabContent.tsx; src/components/prd-editor/hooks/usePrdSave.ts; src/components/project-creation-wizard/data/workspaceApi.ts; src/components/settings/constants/constants.ts; src/components/settings/hooks/useCredentialsSettings.ts; src/components/settings/hooks/useGitSettings.ts; src/components/settings/hooks/useSettingsController.ts; src/components/version-upgrade/view/VersionUpgradeModal.tsx; src/contexts/PluginsContext.tsx; src/utils/api.js","","","branchName; cleanup; const { githubUrl; createBranch; createPR; githubToken; message; model; projectPath; provider; stream","Server-sent events stream with progress/result/error events.","Streamed error event or JSON error fallback.","Mutates backend or external state.; Invokes external AI providers and may modify project files.","high" diff --git a/docs/backend/endpoint-inventory.json b/docs/backend/endpoint-inventory.json new file mode 100644 index 00000000..ea05c8ae --- /dev/null +++ b/docs/backend/endpoint-inventory.json @@ -0,0 +1,5437 @@ +{ + "summary": { + "generatedAt": "2026-03-11T17:31:18.119Z", + "httpRoutes": 118, + "sseRoutes": 3, + "modularRoutes": 96, + "inlineRoutes": 25, + "routeFilesScanned": 16 + }, + "realtimeContracts": { + "incomingMessageTypes": [ + "abort-session", + "check-session-status", + "claude-command", + "claude-permission-response", + "codex-command", + "cursor-abort", + "cursor-command", + "cursor-resume", + "gemini-command", + "get-active-sessions", + "get-pending-permissions", + "init", + "input", + "resize" + ], + "outgoingMessageTypes": [ + "active-sessions", + "auth_url", + "error", + "output", + "pending-permissions-response", + "session-aborted", + "session-status" + ] + }, + "records": [ + { + "transport": "http", + "method": "GET", + "path": "/health", + "tag": "System", + "authMode": "public", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 345, + "purpose": "Expose server health, timestamp, and install mode for diagnostics.", + "consumerFiles": [ + "src/hooks/useVersionCheck.ts" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "Handler-specific error behavior.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/system/update", + "tag": "System", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 425, + "purpose": "Run the application update workflow on the host machine.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 491, + "purpose": "List detected projects and workspaces.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects/:projectName/sessions", + "tag": "Sessions", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 500, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [ + "offset", + "try {\r\n const { limit" + ], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects/:projectName/sessions/:sessionId/messages", + "tag": "Sessions", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 512, + "purpose": "Return paginated messages for a stored session.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName", + "sessionId" + ], + "queryParams": [ + "limit", + "offset" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "PUT", + "path": "/api/projects/:projectName/rename", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 537, + "purpose": "PUT /api/projects/:projectName/rename for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { displayName" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/projects/:projectName/sessions/:sessionId", + "tag": "Sessions", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 548, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName", + "sessionId" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "PUT", + "path": "/api/sessions/:sessionId/rename", + "tag": "Sessions", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 563, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "sessionId" + ], + "queryParams": [], + "bodyHints": [ + "provider", + "summary" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/projects/:projectName", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 589, + "purpose": "DELETE /api/projects/:projectName for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [ + "force" + ], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/projects/create", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 601, + "purpose": "Manually add a project path to the workspace list.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { path" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "sse", + "method": "GET", + "path": "/api/search/conversations", + "tag": "Sessions", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 618, + "purpose": "Search conversation history across stored projects and stream results.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "limit", + "q" + ], + "bodyHints": [] + }, + "successShape": "Server-sent events stream with progress/result/error events.", + "errorShape": "Streamed error event or JSON error fallback.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/browse-filesystem", + "tag": "Realtime", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 674, + "purpose": "Browse local directories so the UI can suggest workspace locations.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "try {\r\n const { path" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/create-folder", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 754, + "purpose": "Create a new directory on the local filesystem.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { path" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects/:projectName/file", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 795, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [ + "filePath" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects/:projectName/files/content", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 835, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [ + "path" + ], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "PUT", + "path": "/api/projects/:projectName/file", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 888, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "content", + "filePath" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects/:projectName/files", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 937, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/projects/:projectName/files/create", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 1016, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "name", + "path", + "type" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "PUT", + "path": "/api/projects/:projectName/files/rename", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 1093, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "newName", + "oldPath" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/projects/:projectName/files", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 1170, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "path", + "relativePaths", + "targetPath", + "type" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/projects/:projectName/files/upload", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 1396, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "Handler-specific error behavior.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/transcribe", + "tag": "Realtime", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 1964, + "purpose": "Transcribe uploaded audio and optionally enhance the result for prompts or tasks.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "mode" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Processes uploaded files and external model responses." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/projects/:projectName/upload-images", + "tag": "Files", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 2113, + "purpose": "Upload images for chat use and return browser-safe data URLs.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/projects/:projectName/sessions/:sessionId/token-usage", + "tag": "Sessions", + "authMode": "bearer_token", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 2198, + "purpose": "Report token usage for a stored provider session.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName", + "sessionId" + ], + "queryParams": [ + "provider" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "*", + "tag": "System", + "authMode": "public", + "sourceFile": "server/legacy-runtime.js", + "sourceLine": 2386, + "purpose": "Serve the React application fallback for non-API routes.", + "consumerFiles": [], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Static file or HTML response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/auth/status", + "tag": "Auth", + "authMode": "public", + "sourceFile": "server/routes/auth.js", + "sourceLine": 9, + "purpose": "Report whether authentication is configured.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/auth/register", + "tag": "Auth", + "authMode": "public", + "sourceFile": "server/routes/auth.js", + "sourceLine": 23, + "purpose": "Create the first local user account.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "password", + "try {\r\n const { username" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/auth/login", + "tag": "Auth", + "authMode": "public", + "sourceFile": "server/routes/auth.js", + "sourceLine": 82, + "purpose": "Authenticate a local user and issue a token.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "password", + "try {\r\n const { username" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/auth/user", + "tag": "Auth", + "authMode": "bearer_token", + "sourceFile": "server/routes/auth.js", + "sourceLine": 122, + "purpose": "Return the currently authenticated user.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "Handler-specific error behavior.", + "sideEffects": [ + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/auth/logout", + "tag": "Auth", + "authMode": "bearer_token", + "sourceFile": "server/routes/auth.js", + "sourceLine": 129, + "purpose": "Invalidate the current authenticated session.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "Handler-specific error behavior.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/projects/create-workspace", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/routes/projects.js", + "sourceLine": 175, + "purpose": "Create or register a workspace and optionally clone a GitHub repository into it.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "githubTokenId", + "githubUrl", + "newGithubToken", + "path", + "try {\r\n const { workspaceType" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "sse", + "method": "GET", + "path": "/api/projects/clone-progress", + "tag": "Projects", + "authMode": "bearer_token", + "sourceFile": "server/routes/projects.js", + "sourceLine": 335, + "purpose": "Stream workspace cloning progress events to the frontend.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { path", + "githubTokenId", + "githubUrl", + "newGithubToken" + ], + "bodyHints": [] + }, + "successShape": "Server-sent events stream with progress/result/error events.", + "errorShape": "Streamed error event or JSON error fallback.", + "sideEffects": [ + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/status", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 291, + "purpose": "Read git status information for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { project" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/diff", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 354, + "purpose": "Return git diff output for a project or file.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { project", + "file" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/file-with-diff", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 437, + "purpose": "Read, write, create, rename, delete, or upload project files.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { project", + "file" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config.", + "Touches local workspace files or directories." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/initial-commit", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 517, + "purpose": "POST /api/git/initial-commit for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/commit", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 561, + "purpose": "POST /api/git/commit for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project", + "files", + "message" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/revert-local-commit", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 592, + "purpose": "POST /api/git/revert-local-commit for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/branches", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 639, + "purpose": "List git branches for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { project" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/checkout", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 681, + "purpose": "POST /api/git/checkout for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "branch", + "const { project" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/create-branch", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 703, + "purpose": "POST /api/git/create-branch for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "branch", + "const { project" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/commits", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 725, + "purpose": "List recent commits for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { project", + "limit" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/commit-diff", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 782, + "purpose": "Return diff details for a specific commit.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "commit", + "const { project" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/generate-commit-message", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 814, + "purpose": "Generate an AI-assisted commit message from the current diff.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project", + "files", + "provider" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/git/remote-status", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1019, + "purpose": "Report remote sync status for a project repository.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "const { project" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/fetch", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1097, + "purpose": "POST /api/git/fetch for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/pull", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1138, + "purpose": "POST /api/git/pull for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/push", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1206, + "purpose": "POST /api/git/push for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/publish", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1277, + "purpose": "POST /api/git/publish for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "branch", + "const { project" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/discard", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1356, + "purpose": "POST /api/git/discard for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project", + "file" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/git/delete-untracked", + "tag": "Git", + "authMode": "bearer_token", + "sourceFile": "server/routes/git.js", + "sourceLine": 1410, + "purpose": "POST /api/git/delete-untracked for backend runtime support.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "const { project", + "file" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/mcp/cli/list", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp.js", + "sourceLine": 16, + "purpose": "Manage Claude MCP CLI and configuration state.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/mcp/cli/add", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp.js", + "sourceLine": 59, + "purpose": "Manage Claude MCP CLI and configuration state.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/mcp/cli/add-json", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp.js", + "sourceLine": 142, + "purpose": "Manage Claude MCP CLI and configuration state.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "jsonConfig", + "projectPath", + "scope", + "try {\r\n const { name" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/mcp/cli/remove/:name", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp.js", + "sourceLine": 235, + "purpose": "Manage Claude MCP CLI and configuration state.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [ + "scope" + ], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/mcp/cli/get/:name", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp.js", + "sourceLine": 305, + "purpose": "Manage Claude MCP CLI and configuration state.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/mcp/config/read", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp.js", + "sourceLine": 348, + "purpose": "Manage Claude MCP CLI and configuration state.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cursor/config", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 15, + "purpose": "Manage Cursor configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/cursor/config", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 59, + "purpose": "Manage Cursor configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "model", + "try {\r\n const { permissions" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cursor/mcp", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 122, + "purpose": "Manage Cursor configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/cursor/mcp/add", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 183, + "purpose": "Manage Cursor configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/cursor/mcp/:name", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 245, + "purpose": "Manage Cursor configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/cursor/mcp/add-json", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 292, + "purpose": "Manage Cursor configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "jsonConfig", + "try {\r\n const { name" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cursor/sessions", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 348, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "try {\r\n const { projectPath" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cursor/sessions/:sessionId", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/cursor.js", + "sourceLine": 583, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "sessionId" + ], + "queryParams": [ + "projectPath" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/installation-status", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 243, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/detect/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 278, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/detect-all", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 350, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/taskmaster/initialize/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 434, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "rules" + ] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/next/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 460, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/tasks/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 570, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/prd/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 685, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/taskmaster/prd/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 761, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "content", + "fileName" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/prd/:projectName/:fileName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 846, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName", + "fileName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/taskmaster/prd/:projectName/:fileName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 911, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName", + "fileName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/taskmaster/init/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 971, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/taskmaster/add-task/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 1060, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "dependencies", + "description", + "priority", + "prompt", + "title" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "PUT", + "path": "/api/taskmaster/update-task/:projectName/:taskId", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 1164, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName", + "taskId" + ], + "queryParams": [], + "bodyHints": [ + "description", + "details", + "priority", + "status", + "title" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/taskmaster/parse-prd/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 1291, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [ + "append", + "fileName", + "numTasks" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/taskmaster/prd-templates", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 1392, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/taskmaster/apply-template/:projectName", + "tag": "TaskMaster", + "authMode": "bearer_token", + "sourceFile": "server/routes/taskmaster.js", + "sourceLine": 1838, + "purpose": "Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "projectName" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes TaskMaster project assets." + ], + "priority": "high" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/mcp-utils/taskmaster-server", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp-utils.js", + "sourceLine": 18, + "purpose": "Return MCP helper information used by setup flows.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes TaskMaster project assets.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/mcp-utils/all-servers", + "tag": "MCP", + "authMode": "bearer_token", + "sourceFile": "server/routes/mcp-utils.js", + "sourceLine": 35, + "purpose": "Return MCP helper information used by setup flows.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/commands/list", + "tag": "Commands", + "authMode": "bearer_token", + "sourceFile": "server/routes/commands.js", + "sourceLine": 406, + "purpose": "List, load, or execute slash commands available to the chat experience.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { projectPath" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/commands/load", + "tag": "Commands", + "authMode": "bearer_token", + "sourceFile": "server/routes/commands.js", + "sourceLine": 456, + "purpose": "List, load, or execute slash commands available to the chat experience.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "commandPath", + "try {\r\n const { commandPath" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/commands/execute", + "tag": "Commands", + "authMode": "bearer_token", + "sourceFile": "server/routes/commands.js", + "sourceLine": 507, + "purpose": "List, load, or execute slash commands available to the chat experience.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "commandPath" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/settings/api-keys", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 11, + "purpose": "Manage local API keys used to access the backend.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/settings/api-keys", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 27, + "purpose": "Manage local API keys used to access the backend.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { keyName" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/settings/api-keys/:keyId", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 47, + "purpose": "Manage local API keys used to access the backend.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "keyId" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "PATCH", + "path": "/api/settings/api-keys/:keyId/toggle", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 64, + "purpose": "Manage local API keys used to access the backend.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "keyId" + ], + "queryParams": [], + "bodyHints": [ + "isActive" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/settings/credentials", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 91, + "purpose": "Manage stored provider and GitHub credentials.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "try {\r\n const { type" + ], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/settings/credentials", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 104, + "purpose": "Manage stored provider and GitHub credentials.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "credentialType", + "credentialValue", + "description", + "try {\r\n const { credentialName" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/settings/credentials/:credentialId", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 139, + "purpose": "Manage stored provider and GitHub credentials.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "credentialId" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "PATCH", + "path": "/api/settings/credentials/:credentialId/toggle", + "tag": "Settings", + "authMode": "bearer_token", + "sourceFile": "server/routes/settings.js", + "sourceLine": 156, + "purpose": "Manage stored provider and GitHub credentials.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "credentialId" + ], + "queryParams": [], + "bodyHints": [ + "isActive" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes local authentication or credential state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cli/claude/status", + "tag": "CLI Auth", + "authMode": "bearer_token", + "sourceFile": "server/routes/cli-auth.js", + "sourceLine": 9, + "purpose": "Report local authentication status for provider CLIs.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cli/cursor/status", + "tag": "CLI Auth", + "authMode": "bearer_token", + "sourceFile": "server/routes/cli-auth.js", + "sourceLine": 39, + "purpose": "Report local authentication status for provider CLIs.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cli/codex/status", + "tag": "CLI Auth", + "authMode": "bearer_token", + "sourceFile": "server/routes/cli-auth.js", + "sourceLine": 59, + "purpose": "Report local authentication status for provider CLIs.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/cli/gemini/status", + "tag": "CLI Auth", + "authMode": "bearer_token", + "sourceFile": "server/routes/cli-auth.js", + "sourceLine": 79, + "purpose": "Report local authentication status for provider CLIs.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "low" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/user/git-config", + "tag": "User", + "authMode": "bearer_token", + "sourceFile": "server/routes/user.js", + "sourceLine": 28, + "purpose": "Read or update stored git identity settings.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Touches git repositories or local git config." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/user/git-config", + "tag": "User", + "authMode": "bearer_token", + "sourceFile": "server/routes/user.js", + "sourceLine": 57, + "purpose": "Read or update stored git identity settings.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "gitEmail", + "try {\r\n const userId = req.user.id;\r\n const { gitName" + ] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Touches git repositories or local git config." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/user/complete-onboarding", + "tag": "User", + "authMode": "bearer_token", + "sourceFile": "server/routes/user.js", + "sourceLine": 93, + "purpose": "Mark onboarding as completed for the current user.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/user/onboarding-status", + "tag": "User", + "authMode": "bearer_token", + "sourceFile": "server/routes/user.js", + "sourceLine": 108, + "purpose": "Return onboarding completion status for the current user.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/codex/config", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 23, + "purpose": "Manage Codex configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/codex/sessions", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 54, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [ + "try {\r\n const { projectPath" + ], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/codex/sessions/:sessionId/messages", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 71, + "purpose": "Return paginated messages for a stored session.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "sessionId" + ], + "queryParams": [ + "limit", + "offset" + ], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/codex/sessions/:sessionId", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 89, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "sessionId" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/codex/mcp/cli/list", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 103, + "purpose": "Manage Codex configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/codex/mcp/cli/add", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 135, + "purpose": "Manage Codex configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/codex/mcp/cli/remove/:name", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 186, + "purpose": "Manage Codex configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/codex/mcp/cli/get/:name", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 220, + "purpose": "Manage Codex configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/codex/mcp/config/read", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/codex.js", + "sourceLine": 254, + "purpose": "Manage Codex configuration, MCP settings, and stored sessions.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Reads or writes MCP CLI configuration." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/gemini/sessions/:sessionId/messages", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/gemini.js", + "sourceLine": 8, + "purpose": "Return paginated messages for a stored session.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "sessionId" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Read-only backend query." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/gemini/sessions/:sessionId", + "tag": "Providers", + "authMode": "bearer_token", + "sourceFile": "server/routes/gemini.js", + "sourceLine": 37, + "purpose": "List or manage sessions associated with a project or provider.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "sessionId" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON error response with HTTP status code.", + "sideEffects": [ + "Mutates backend or external state." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/plugins", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 27, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Structured JSON object response.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/plugins/:name/manifest", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 40, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON payload returned directly from service logic.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "GET", + "path": "/api/plugins/:name/assets/*", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 57, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "Mixed response shape; inspect handler during refactor.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "PUT", + "path": "/api/plugins/:name/enable", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 96, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { enabled" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON object with error message and optional details.", + "sideEffects": [ + "Mutates backend or external state.", + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/plugins/install", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 136, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "try {\r\n const { url" + ] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "POST", + "path": "/api/plugins/:name/update", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 169, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "http", + "method": "DELETE", + "path": "/api/plugins/:name", + "tag": "Plugins", + "authMode": "bearer_token", + "sourceFile": "server/routes/plugins.js", + "sourceLine": 282, + "purpose": "List, install, update, serve, enable, or remove plugins.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [ + "name" + ], + "queryParams": [], + "bodyHints": [] + }, + "successShape": "JSON object with an explicit success flag and payload.", + "errorShape": "JSON validation error response.", + "sideEffects": [ + "Mutates backend or external state.", + "Installs, updates, or serves plugin assets/processes." + ], + "priority": "medium" + }, + { + "transport": "sse", + "method": "POST", + "path": "/api/agent", + "tag": "Agent", + "authMode": "api_key_or_platform", + "sourceFile": "server/routes/agent.js", + "sourceLine": 839, + "purpose": "Accept external agent jobs that run a provider against a local or cloned project.", + "consumerFiles": [ + "src/components/chat/hooks/useChatComposerState.ts", + "src/components/chat/hooks/useChatProviderState.ts", + "src/components/chat/hooks/useChatSessionState.ts", + "src/components/chat/hooks/useSlashCommands.ts", + "src/components/file-tree/view/ImageViewer.tsx", + "src/components/git-panel/hooks/useGitPanelController.ts", + "src/components/git-panel/hooks/useRevertLocalCommit.ts", + "src/components/onboarding/view/Onboarding.tsx", + "src/components/plugins/view/PluginIcon.tsx", + "src/components/plugins/view/PluginTabContent.tsx", + "src/components/prd-editor/hooks/usePrdSave.ts", + "src/components/project-creation-wizard/data/workspaceApi.ts", + "src/components/settings/constants/constants.ts", + "src/components/settings/hooks/useCredentialsSettings.ts", + "src/components/settings/hooks/useGitSettings.ts", + "src/components/settings/hooks/useSettingsController.ts", + "src/components/version-upgrade/view/VersionUpgradeModal.tsx", + "src/contexts/PluginsContext.tsx", + "src/utils/api.js" + ], + "inputs": { + "pathParams": [], + "queryParams": [], + "bodyHints": [ + "branchName", + "cleanup", + "const { githubUrl", + "createBranch", + "createPR", + "githubToken", + "message", + "model", + "projectPath", + "provider", + "stream" + ] + }, + "successShape": "Server-sent events stream with progress/result/error events.", + "errorShape": "Streamed error event or JSON error fallback.", + "sideEffects": [ + "Mutates backend or external state.", + "Invokes external AI providers and may modify project files." + ], + "priority": "high" + } + ] +} \ No newline at end of file diff --git a/docs/backend/endpoint-inventory.md b/docs/backend/endpoint-inventory.md new file mode 100644 index 00000000..330a1476 --- /dev/null +++ b/docs/backend/endpoint-inventory.md @@ -0,0 +1,218 @@ +# Backend Inventory + +Generated on 2026-03-11T17:31:18.119Z. + +## Summary + +- HTTP routes: 118 +- SSE routes: 3 +- Modular routes: 96 +- Inline routes: 25 +- Route files scanned: 16 + +## Realtime Contracts + +- Incoming websocket message types (14): abort-session, check-session-status, claude-command, claude-permission-response, codex-command, cursor-abort, cursor-command, cursor-resume, gemini-command, get-active-sessions, get-pending-permissions, init, input, resize +- Outgoing websocket message types (7): active-sessions, auth_url, error, output, pending-permissions-response, session-aborted, session-status + +## Agent + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| POST | `/api/agent` | api_key_or_platform | Accept external agent jobs that run a provider against a local or cloned project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/agent.js:839 | + +## Auth + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| POST | `/api/auth/login` | public | Authenticate a local user and issue a token. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/auth.js:82 | +| POST | `/api/auth/logout` | bearer_token | Invalidate the current authenticated session. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/auth.js:129 | +| POST | `/api/auth/register` | public | Create the first local user account. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/auth.js:23 | +| GET | `/api/auth/status` | public | Report whether authentication is configured. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/auth.js:9 | +| GET | `/api/auth/user` | bearer_token | Return the currently authenticated user. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/auth.js:122 | + +## CLI Auth + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/cli/claude/status` | bearer_token | Report local authentication status for provider CLIs. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cli-auth.js:9 | +| GET | `/api/cli/codex/status` | bearer_token | Report local authentication status for provider CLIs. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cli-auth.js:59 | +| GET | `/api/cli/cursor/status` | bearer_token | Report local authentication status for provider CLIs. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cli-auth.js:39 | +| GET | `/api/cli/gemini/status` | bearer_token | Report local authentication status for provider CLIs. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cli-auth.js:79 | + +## Commands + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| POST | `/api/commands/execute` | bearer_token | List, load, or execute slash commands available to the chat experience. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/commands.js:507 | +| POST | `/api/commands/list` | bearer_token | List, load, or execute slash commands available to the chat experience. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/commands.js:406 | +| POST | `/api/commands/load` | bearer_token | List, load, or execute slash commands available to the chat experience. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/commands.js:456 | + +## Files + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/projects/:projectName/file` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:795 | +| PUT | `/api/projects/:projectName/file` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:888 | +| GET | `/api/projects/:projectName/files` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:937 | +| DELETE | `/api/projects/:projectName/files` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:1170 | +| GET | `/api/projects/:projectName/files/content` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:835 | +| POST | `/api/projects/:projectName/files/create` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:1016 | +| PUT | `/api/projects/:projectName/files/rename` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:1093 | +| POST | `/api/projects/:projectName/files/upload` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:1396 | +| POST | `/api/projects/:projectName/upload-images` | bearer_token | Upload images for chat use and return browser-safe data URLs. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:2113 | + +## Git + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/git/branches` | bearer_token | List git branches for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:639 | +| POST | `/api/git/checkout` | bearer_token | POST /api/git/checkout for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:681 | +| POST | `/api/git/commit` | bearer_token | POST /api/git/commit for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:561 | +| GET | `/api/git/commit-diff` | bearer_token | Return diff details for a specific commit. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:782 | +| GET | `/api/git/commits` | bearer_token | List recent commits for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:725 | +| POST | `/api/git/create-branch` | bearer_token | POST /api/git/create-branch for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:703 | +| POST | `/api/git/delete-untracked` | bearer_token | POST /api/git/delete-untracked for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1410 | +| GET | `/api/git/diff` | bearer_token | Return git diff output for a project or file. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:354 | +| POST | `/api/git/discard` | bearer_token | POST /api/git/discard for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1356 | +| POST | `/api/git/fetch` | bearer_token | POST /api/git/fetch for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1097 | +| GET | `/api/git/file-with-diff` | bearer_token | Read, write, create, rename, delete, or upload project files. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:437 | +| POST | `/api/git/generate-commit-message` | bearer_token | Generate an AI-assisted commit message from the current diff. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:814 | +| POST | `/api/git/initial-commit` | bearer_token | POST /api/git/initial-commit for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:517 | +| POST | `/api/git/publish` | bearer_token | POST /api/git/publish for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1277 | +| POST | `/api/git/pull` | bearer_token | POST /api/git/pull for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1138 | +| POST | `/api/git/push` | bearer_token | POST /api/git/push for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1206 | +| GET | `/api/git/remote-status` | bearer_token | Report remote sync status for a project repository. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:1019 | +| POST | `/api/git/revert-local-commit` | bearer_token | POST /api/git/revert-local-commit for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:592 | +| GET | `/api/git/status` | bearer_token | Read git status information for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/git.js:291 | + +## MCP + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/mcp-utils/all-servers` | bearer_token | Return MCP helper information used by setup flows. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp-utils.js:35 | +| GET | `/api/mcp-utils/taskmaster-server` | bearer_token | Return MCP helper information used by setup flows. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp-utils.js:18 | +| POST | `/api/mcp/cli/add` | bearer_token | Manage Claude MCP CLI and configuration state. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp.js:59 | +| POST | `/api/mcp/cli/add-json` | bearer_token | Manage Claude MCP CLI and configuration state. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp.js:142 | +| GET | `/api/mcp/cli/get/:name` | bearer_token | Manage Claude MCP CLI and configuration state. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp.js:305 | +| GET | `/api/mcp/cli/list` | bearer_token | Manage Claude MCP CLI and configuration state. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp.js:16 | +| DELETE | `/api/mcp/cli/remove/:name` | bearer_token | Manage Claude MCP CLI and configuration state. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp.js:235 | +| GET | `/api/mcp/config/read` | bearer_token | Manage Claude MCP CLI and configuration state. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/mcp.js:348 | + +## Plugins + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/plugins` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:27 | +| DELETE | `/api/plugins/:name` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:282 | +| GET | `/api/plugins/:name/assets/*` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:57 | +| PUT | `/api/plugins/:name/enable` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:96 | +| GET | `/api/plugins/:name/manifest` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:40 | +| POST | `/api/plugins/:name/update` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:169 | +| POST | `/api/plugins/install` | bearer_token | List, install, update, serve, enable, or remove plugins. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/plugins.js:136 | + +## Projects + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| POST | `/api/create-folder` | bearer_token | Create a new directory on the local filesystem. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:754 | +| GET | `/api/projects` | bearer_token | List detected projects and workspaces. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:491 | +| DELETE | `/api/projects/:projectName` | bearer_token | DELETE /api/projects/:projectName for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:589 | +| PUT | `/api/projects/:projectName/rename` | bearer_token | PUT /api/projects/:projectName/rename for backend runtime support. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:537 | +| GET | `/api/projects/clone-progress` | bearer_token | Stream workspace cloning progress events to the frontend. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/projects.js:335 | +| POST | `/api/projects/create` | bearer_token | Manually add a project path to the workspace list. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:601 | +| POST | `/api/projects/create-workspace` | bearer_token | Create or register a workspace and optionally clone a GitHub repository into it. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/projects.js:175 | + +## Providers + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/codex/config` | bearer_token | Manage Codex configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:23 | +| POST | `/api/codex/mcp/cli/add` | bearer_token | Manage Codex configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:135 | +| GET | `/api/codex/mcp/cli/get/:name` | bearer_token | Manage Codex configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:220 | +| GET | `/api/codex/mcp/cli/list` | bearer_token | Manage Codex configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:103 | +| DELETE | `/api/codex/mcp/cli/remove/:name` | bearer_token | Manage Codex configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:186 | +| GET | `/api/codex/mcp/config/read` | bearer_token | Manage Codex configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:254 | +| GET | `/api/codex/sessions` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:54 | +| DELETE | `/api/codex/sessions/:sessionId` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:89 | +| GET | `/api/codex/sessions/:sessionId/messages` | bearer_token | Return paginated messages for a stored session. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/codex.js:71 | +| GET | `/api/cursor/config` | bearer_token | Manage Cursor configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:15 | +| POST | `/api/cursor/config` | bearer_token | Manage Cursor configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:59 | +| GET | `/api/cursor/mcp` | bearer_token | Manage Cursor configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:122 | +| DELETE | `/api/cursor/mcp/:name` | bearer_token | Manage Cursor configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:245 | +| POST | `/api/cursor/mcp/add` | bearer_token | Manage Cursor configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:183 | +| POST | `/api/cursor/mcp/add-json` | bearer_token | Manage Cursor configuration, MCP settings, and stored sessions. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:292 | +| GET | `/api/cursor/sessions` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:348 | +| GET | `/api/cursor/sessions/:sessionId` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/cursor.js:583 | +| DELETE | `/api/gemini/sessions/:sessionId` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/gemini.js:37 | +| GET | `/api/gemini/sessions/:sessionId/messages` | bearer_token | Return paginated messages for a stored session. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/gemini.js:8 | + +## Realtime + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/browse-filesystem` | bearer_token | Browse local directories so the UI can suggest workspace locations. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:674 | +| POST | `/api/transcribe` | bearer_token | Transcribe uploaded audio and optionally enhance the result for prompts or tasks. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:1964 | + +## Sessions + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/projects/:projectName/sessions` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:500 | +| DELETE | `/api/projects/:projectName/sessions/:sessionId` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:548 | +| GET | `/api/projects/:projectName/sessions/:sessionId/messages` | bearer_token | Return paginated messages for a stored session. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:512 | +| GET | `/api/projects/:projectName/sessions/:sessionId/token-usage` | bearer_token | Report token usage for a stored provider session. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:2198 | +| GET | `/api/search/conversations` | bearer_token | Search conversation history across stored projects and stream results. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:618 | +| PUT | `/api/sessions/:sessionId/rename` | bearer_token | List or manage sessions associated with a project or provider. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:563 | + +## Settings + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `/api/settings/api-keys` | bearer_token | Manage local API keys used to access the backend. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:11 | +| POST | `/api/settings/api-keys` | bearer_token | Manage local API keys used to access the backend. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:27 | +| DELETE | `/api/settings/api-keys/:keyId` | bearer_token | Manage local API keys used to access the backend. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:47 | +| PATCH | `/api/settings/api-keys/:keyId/toggle` | bearer_token | Manage local API keys used to access the backend. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:64 | +| GET | `/api/settings/credentials` | bearer_token | Manage stored provider and GitHub credentials. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:91 | +| POST | `/api/settings/credentials` | bearer_token | Manage stored provider and GitHub credentials. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:104 | +| DELETE | `/api/settings/credentials/:credentialId` | bearer_token | Manage stored provider and GitHub credentials. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:139 | +| PATCH | `/api/settings/credentials/:credentialId/toggle` | bearer_token | Manage stored provider and GitHub credentials. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/settings.js:156 | + +## System + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| GET | `*` | public | Serve the React application fallback for non-API routes. | - | server/legacy-runtime.js:2386 | +| POST | `/api/system/update` | bearer_token | Run the application update workflow on the host machine. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/legacy-runtime.js:425 | +| GET | `/health` | public | Expose server health, timestamp, and install mode for diagnostics. | src/hooks/useVersionCheck.ts | server/legacy-runtime.js:345 | + +## TaskMaster + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| POST | `/api/taskmaster/add-task/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:1060 | +| POST | `/api/taskmaster/apply-template/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:1838 | +| GET | `/api/taskmaster/detect-all` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:350 | +| GET | `/api/taskmaster/detect/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:278 | +| POST | `/api/taskmaster/init/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:971 | +| POST | `/api/taskmaster/initialize/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:434 | +| GET | `/api/taskmaster/installation-status` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:243 | +| GET | `/api/taskmaster/next/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:460 | +| POST | `/api/taskmaster/parse-prd/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:1291 | +| GET | `/api/taskmaster/prd-templates` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:1392 | +| GET | `/api/taskmaster/prd/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:685 | +| POST | `/api/taskmaster/prd/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:761 | +| GET | `/api/taskmaster/prd/:projectName/:fileName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:846 | +| DELETE | `/api/taskmaster/prd/:projectName/:fileName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:911 | +| GET | `/api/taskmaster/tasks/:projectName` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:570 | +| PUT | `/api/taskmaster/update-task/:projectName/:taskId` | bearer_token | Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/taskmaster.js:1164 | + +## User + +| Method | Path | Auth | Purpose | Consumers | Source | +| --- | --- | --- | --- | --- | --- | +| POST | `/api/user/complete-onboarding` | bearer_token | Mark onboarding as completed for the current user. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/user.js:93 | +| GET | `/api/user/git-config` | bearer_token | Read or update stored git identity settings. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/user.js:28 | +| POST | `/api/user/git-config` | bearer_token | Read or update stored git identity settings. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/user.js:57 | +| GET | `/api/user/onboarding-status` | bearer_token | Return onboarding completion status for the current user. | src/components/chat/hooks/useChatComposerState.ts
src/components/chat/hooks/useChatProviderState.ts
src/components/chat/hooks/useChatSessionState.ts
src/components/chat/hooks/useSlashCommands.ts
src/components/file-tree/view/ImageViewer.tsx
src/components/git-panel/hooks/useGitPanelController.ts
src/components/git-panel/hooks/useRevertLocalCommit.ts
src/components/onboarding/view/Onboarding.tsx
src/components/plugins/view/PluginIcon.tsx
src/components/plugins/view/PluginTabContent.tsx
src/components/prd-editor/hooks/usePrdSave.ts
src/components/project-creation-wizard/data/workspaceApi.ts
src/components/settings/constants/constants.ts
src/components/settings/hooks/useCredentialsSettings.ts
src/components/settings/hooks/useGitSettings.ts
src/components/settings/hooks/useSettingsController.ts
src/components/version-upgrade/view/VersionUpgradeModal.tsx
src/contexts/PluginsContext.tsx
src/utils/api.js | server/routes/user.js:108 | + diff --git a/package-lock.json b/package-lock.json index 440745ff..6a7eb70c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,9 +77,12 @@ "@commitlint/config-conventional": "^20.4.3", "@eslint/js": "^9.39.3", "@release-it/conventional-changelog": "^10.0.5", + "@types/cors": "^2.8.19", + "@types/express": "^5.0.3", "@types/node": "^22.19.7", "@types/react": "^18.2.43", "@types/react-dom": "^18.2.17", + "@types/ws": "^8.18.1", "@vitejs/plugin-react": "^4.6.0", "auto-changelog": "^2.5.0", "autoprefixer": "^10.4.16", @@ -99,6 +102,7 @@ "release-it": "^19.0.5", "sharp": "^0.34.2", "tailwindcss": "^3.4.0", + "tsx": "^4.20.6", "typescript": "^5.9.3", "typescript-eslint": "^8.56.1", "vite": "^7.0.4" @@ -3732,6 +3736,37 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", + "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", @@ -3756,6 +3791,31 @@ "@types/estree": "*" } }, + "node_modules/@types/express": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.6.tgz", + "integrity": "sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/serve-static": "^2" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.1.tgz", + "integrity": "sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, "node_modules/@types/hast": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", @@ -3765,6 +3825,13 @@ "@types/unist": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -3823,6 +3890,20 @@ "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", "license": "MIT" }, + "node_modules/@types/qs": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-JawvT8iBVWpzTrz3EGw9BTQFg3BQNmwERdKE22vlTxawwtbyUSlMppvZYKLZzB5zgACXdXxbD3m1bXaMqP/9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/react": { "version": "18.3.23", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.23.tgz", @@ -3843,12 +3924,43 @@ "@types/react": "^18.0.0" } }, + "node_modules/@types/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*" + } + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "license": "MIT" }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.56.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz", @@ -16486,6 +16598,510 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/package.json b/package.json index ca91800d..5659cc77 100644 --- a/package.json +++ b/package.json @@ -25,16 +25,21 @@ }, "scripts": { "dev": "concurrently --kill-others \"npm run server\" \"npm run client\"", - "server": "node server/index.js", + "server:dev": "tsx watch server/src/bootstrap.ts", + "server": "tsx server/src/bootstrap.ts", + "server:build": "tsc -p server/tsconfig.json", + "server:start": "node server/index.js", "client": "vite", "build": "vite build", "preview": "vite preview", - "typecheck": "tsc --noEmit -p tsconfig.json", + "typecheck:client": "tsc --noEmit -p tsconfig.json", + "typecheck:server": "tsc --noEmit -p server/tsconfig.json", + "typecheck": "npm run typecheck:client && npm run typecheck:server", "lint": "eslint src/", "lint:fix": "eslint src/ --fix", - "start": "npm run build && npm run server", + "start": "npm run build && npm run server:build && npm run server:start", "release": "./release.sh", - "prepublishOnly": "npm run build", + "prepublishOnly": "npm run build && npm run server:build", "postinstall": "node scripts/fix-node-pty.js", "prepare": "husky" }, @@ -111,9 +116,12 @@ "@commitlint/config-conventional": "^20.4.3", "@eslint/js": "^9.39.3", "@release-it/conventional-changelog": "^10.0.5", + "@types/cors": "^2.8.19", + "@types/express": "^5.0.3", "@types/node": "^22.19.7", "@types/react": "^18.2.43", "@types/react-dom": "^18.2.17", + "@types/ws": "^8.18.1", "@vitejs/plugin-react": "^4.6.0", "auto-changelog": "^2.5.0", "autoprefixer": "^10.4.16", @@ -133,6 +141,7 @@ "release-it": "^19.0.5", "sharp": "^0.34.2", "tailwindcss": "^3.4.0", + "tsx": "^4.20.6", "typescript": "^5.9.3", "typescript-eslint": "^8.56.1", "vite": "^7.0.4" diff --git a/scripts/generate-backend-inventory.mjs b/scripts/generate-backend-inventory.mjs new file mode 100644 index 00000000..47b985ba --- /dev/null +++ b/scripts/generate-backend-inventory.mjs @@ -0,0 +1,657 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const projectRoot = path.resolve(__dirname, '..'); +const serverRoot = path.join(projectRoot, 'server'); +const clientRoot = path.join(projectRoot, 'src'); +const docsRoot = path.join(projectRoot, 'docs', 'backend'); + +const HTTP_METHODS = ['get', 'post', 'put', 'delete', 'patch']; +const routeDefinitionPattern = /\b(app|router)\.(get|post|put|delete|patch)\(\s*(['"`])(.+?)\3/g; +const defaultImportPattern = + /^import\s+([A-Za-z0-9_$]+)(?:\s*,\s*\{[^}]+\})?\s+from\s+['"](.+?)['"];$/gm; +const incomingRealtimePattern = /data\.type === '([^']+)'/g; +const outgoingRealtimePattern = /type:\s*'([^']+)'/g; + +fs.mkdirSync(docsRoot, { recursive: true }); + +function toPosix(value) { + return value.split(path.sep).join('/'); +} + +function readText(filePath) { + return fs.readFileSync(filePath, 'utf8'); +} + +function walkFiles(dirPath, files = []) { + for (const entry of fs.readdirSync(dirPath, { withFileTypes: true })) { + if (entry.name === 'dist' || entry.name === 'node_modules') { + continue; + } + + const fullPath = path.join(dirPath, entry.name); + if (entry.isDirectory()) { + walkFiles(fullPath, files); + continue; + } + + files.push(fullPath); + } + + return files; +} + +function getLineNumber(content, index) { + return content.slice(0, index).split(/\r?\n/).length; +} + +function splitArgs(argumentSource) { + return argumentSource + .split(',') + .map(part => part.trim()) + .filter(Boolean); +} + +function sanitizeObjectKey(key) { + return key + .replace(/^[\s{]+|[\s}]+$/g, '') + .replace(/=.*$/, '') + .replace(/:.+$/, '') + .replace(/\?/g, '') + .trim(); +} + +function collectObjectKeys(block, accessor) { + const keys = new Set(); + const directPattern = new RegExp(`req\\.${accessor}\\.([A-Za-z0-9_]+)`, 'g'); + const destructuringPattern = new RegExp(`\\{([^}]*)\\}\\s*=\\s*req\\.${accessor}`, 'gs'); + + for (const match of block.matchAll(directPattern)) { + keys.add(match[1]); + } + + for (const match of block.matchAll(destructuringPattern)) { + for (const rawKey of match[1].split(',')) { + const key = sanitizeObjectKey(rawKey); + if (key) { + keys.add(key); + } + } + } + + return [...keys].sort(); +} + +function normalizeJoinedPath(basePath, routePath) { + const safeBase = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath; + if (!routePath || routePath === '/') { + return safeBase || '/'; + } + + if (routePath === '*') { + return routePath; + } + + const safeRoute = routePath.startsWith('/') ? routePath : `/${routePath}`; + return `${safeBase}${safeRoute}` || '/'; +} + +function getStaticSearchTokens(routePath) { + const cleaned = routePath.replace(/:[A-Za-z0-9_]+/g, '').replace(/\*/g, ''); + const segments = cleaned.split('/').filter(Boolean); + const tokens = new Set(); + + if (cleaned && cleaned !== '/') { + tokens.add(cleaned.endsWith('/') ? cleaned : `${cleaned}`); + } + + for (let index = segments.length; index >= 2; index -= 1) { + tokens.add(`/${segments.slice(0, index).join('/')}/`); + } + + if (segments.length > 0) { + tokens.add(`/${segments.slice(0, 1).join('/')}/`); + } + + return [...tokens].filter(Boolean); +} + +function classifyTag(routePath) { + if (routePath === '*' || routePath === '/health' || routePath.startsWith('/api/system')) { + return 'System'; + } + + if (routePath.startsWith('/api/auth')) return 'Auth'; + if (routePath.startsWith('/api/user')) return 'User'; + if (routePath.startsWith('/api/settings')) return 'Settings'; + if (routePath.startsWith('/api/git')) return 'Git'; + if (routePath.startsWith('/api/taskmaster')) return 'TaskMaster'; + if (routePath.startsWith('/api/plugins')) return 'Plugins'; + if (routePath.startsWith('/api/agent')) return 'Agent'; + if (routePath.startsWith('/api/commands')) return 'Commands'; + if (routePath.startsWith('/api/mcp')) return 'MCP'; + if (routePath.startsWith('/api/cli')) return 'CLI Auth'; + if ( + routePath.startsWith('/api/cursor') || + routePath.startsWith('/api/codex') || + routePath.startsWith('/api/gemini') + ) { + return 'Providers'; + } + + if (routePath.startsWith('/api/search') || routePath.includes('/sessions')) { + return 'Sessions'; + } + + if (routePath.includes('/files') || routePath.includes('/file') || routePath.includes('/upload')) { + return 'Files'; + } + + if (routePath.startsWith('/api/projects') || routePath.startsWith('/api/create-folder')) { + return 'Projects'; + } + + return 'Realtime'; +} + +function classifyPriority(tag, routePath) { + if ( + tag === 'Agent' || + tag === 'TaskMaster' || + tag === 'Git' || + routePath.startsWith('/api/projects') || + routePath.startsWith('/api/search') + ) { + return 'high'; + } + + if ( + tag === 'Providers' || + tag === 'Commands' || + tag === 'MCP' || + tag === 'Plugins' || + tag === 'Settings' || + tag === 'Auth' || + tag === 'User' + ) { + return 'medium'; + } + + return 'low'; +} + +function describePurpose(method, routePath) { + const verb = method.toUpperCase(); + + if (routePath === '/health') { + return 'Expose server health, timestamp, and install mode for diagnostics.'; + } + + if (routePath === '*') { + return 'Serve the React application fallback for non-API routes.'; + } + + if (routePath.startsWith('/api/system/update')) { + return 'Run the application update workflow on the host machine.'; + } + + if (routePath.startsWith('/api/auth/status')) return 'Report whether authentication is configured.'; + if (routePath.startsWith('/api/auth/register')) return 'Create the first local user account.'; + if (routePath.startsWith('/api/auth/login')) return 'Authenticate a local user and issue a token.'; + if (routePath.startsWith('/api/auth/user')) return 'Return the currently authenticated user.'; + if (routePath.startsWith('/api/auth/logout')) return 'Invalidate the current authenticated session.'; + + if (routePath.startsWith('/api/user/git-config')) return 'Read or update stored git identity settings.'; + if (routePath.startsWith('/api/user/complete-onboarding')) return 'Mark onboarding as completed for the current user.'; + if (routePath.startsWith('/api/user/onboarding-status')) return 'Return onboarding completion status for the current user.'; + + if (routePath.startsWith('/api/settings/api-keys')) return 'Manage local API keys used to access the backend.'; + if (routePath.startsWith('/api/settings/credentials')) return 'Manage stored provider and GitHub credentials.'; + + if (routePath.startsWith('/api/projects/create-workspace')) { + return 'Create or register a workspace and optionally clone a GitHub repository into it.'; + } + + if (routePath.startsWith('/api/projects/clone-progress')) { + return 'Stream workspace cloning progress events to the frontend.'; + } + + if (routePath === '/api/projects') return 'List detected projects and workspaces.'; + if (routePath.startsWith('/api/projects/create')) return 'Manually add a project path to the workspace list.'; + if (routePath.startsWith('/api/projects/:projectName/sessions/:sessionId/token-usage')) { + return 'Report token usage for a stored provider session.'; + } + + if (routePath.includes('/sessions/:sessionId/messages')) { + return 'Return paginated messages for a stored session.'; + } + + if (routePath.includes('/sessions')) { + return 'List or manage sessions associated with a project or provider.'; + } + + if (routePath.includes('/files') || routePath.includes('/file')) { + return 'Read, write, create, rename, delete, or upload project files.'; + } + + if (routePath.startsWith('/api/search/conversations')) { + return 'Search conversation history across stored projects and stream results.'; + } + + if (routePath.startsWith('/api/browse-filesystem')) { + return 'Browse local directories so the UI can suggest workspace locations.'; + } + + if (routePath.startsWith('/api/create-folder')) { + return 'Create a new directory on the local filesystem.'; + } + + if (routePath.startsWith('/api/transcribe')) { + return 'Transcribe uploaded audio and optionally enhance the result for prompts or tasks.'; + } + + if (routePath.includes('/upload-images')) { + return 'Upload images for chat use and return browser-safe data URLs.'; + } + + if (routePath.startsWith('/api/git/status')) return 'Read git status information for a project.'; + if (routePath.startsWith('/api/git/diff')) return 'Return git diff output for a project or file.'; + if (routePath.startsWith('/api/git/file-with-diff')) return 'Return file content together with diff context.'; + if (routePath.startsWith('/api/git/branches')) return 'List git branches for a project.'; + if (routePath.startsWith('/api/git/commits')) return 'List recent commits for a project.'; + if (routePath.startsWith('/api/git/commit-diff')) return 'Return diff details for a specific commit.'; + if (routePath.startsWith('/api/git/remote-status')) return 'Report remote sync status for a project repository.'; + if (routePath.startsWith('/api/git/generate-commit-message')) return 'Generate an AI-assisted commit message from the current diff.'; + + if (routePath.startsWith('/api/taskmaster')) { + return 'Manage TaskMaster detection, PRDs, tasks, templates, and automation for a project.'; + } + + if (routePath.startsWith('/api/commands')) { + return 'List, load, or execute slash commands available to the chat experience.'; + } + + if (routePath.startsWith('/api/mcp-utils')) { + return 'Return MCP helper information used by setup flows.'; + } + + if (routePath.startsWith('/api/mcp')) { + return 'Manage Claude MCP CLI and configuration state.'; + } + + if (routePath.startsWith('/api/cursor')) { + return 'Manage Cursor configuration, MCP settings, and stored sessions.'; + } + + if (routePath.startsWith('/api/codex')) { + return 'Manage Codex configuration, MCP settings, and stored sessions.'; + } + + if (routePath.startsWith('/api/gemini')) { + return 'Manage Gemini session history for the UI.'; + } + + if (routePath.startsWith('/api/cli')) { + return 'Report local authentication status for provider CLIs.'; + } + + if (routePath.startsWith('/api/plugins')) { + return 'List, install, update, serve, enable, or remove plugins.'; + } + + if (routePath.startsWith('/api/agent')) { + return 'Accept external agent jobs that run a provider against a local or cloned project.'; + } + + return `${verb} ${routePath} for backend runtime support.`; +} + +function describeSuccessShape(block, transport) { + if (transport === 'sse' || block.includes('text/event-stream')) { + return 'Server-sent events stream with progress/result/error events.'; + } + + if (block.includes('res.sendFile')) { + return 'Static file or HTML response.'; + } + + if (block.includes('res.redirect')) { + return 'HTTP redirect response.'; + } + + if (block.includes('res.json({ success: true')) { + return 'JSON object with an explicit success flag and payload.'; + } + + if (block.includes('res.json({')) { + return 'Structured JSON object response.'; + } + + if (block.includes('res.json(')) { + return 'JSON payload returned directly from service logic.'; + } + + return 'Mixed response shape; inspect handler during refactor.'; +} + +function describeErrorShape(block, transport) { + if (transport === 'sse' || block.includes('text/event-stream')) { + return 'Streamed error event or JSON error fallback.'; + } + + if (block.includes("res.status(500).json({ error:")) { + return 'JSON object with error message and optional details.'; + } + + if (block.includes("res.status(400).json({ error:")) { + return 'JSON validation error response.'; + } + + if (block.includes('res.status(')) { + return 'JSON error response with HTTP status code.'; + } + + return 'Handler-specific error behavior.'; +} + +function describeSideEffects(method, routePath) { + const effects = []; + + if (method !== 'get') { + effects.push('Mutates backend or external state.'); + } + + if (routePath.includes('/git')) effects.push('Touches git repositories or local git config.'); + if (routePath.includes('/projects') || routePath.includes('/file') || routePath.includes('/files')) { + effects.push('Touches local workspace files or directories.'); + } + if (routePath.includes('/agent')) effects.push('Invokes external AI providers and may modify project files.'); + if (routePath.includes('/taskmaster')) effects.push('Reads or writes TaskMaster project assets.'); + if (routePath.includes('/plugins')) effects.push('Installs, updates, or serves plugin assets/processes.'); + if (routePath.includes('/settings') || routePath.includes('/auth') || routePath.includes('/credentials')) { + effects.push('Reads or writes local authentication or credential state.'); + } + if (routePath.includes('/mcp')) effects.push('Reads or writes MCP CLI configuration.'); + if (routePath.includes('/transcribe')) effects.push('Processes uploaded files and external model responses.'); + + return effects.length > 0 ? effects : ['Read-only backend query.']; +} + +function collectFrontendConsumers(routePath, clientFiles) { + const tokens = getStaticSearchTokens(routePath); + const consumers = new Set(); + + for (const file of clientFiles) { + const content = readText(file); + if (tokens.some(token => token && content.includes(token))) { + consumers.add(toPosix(path.relative(projectRoot, file))); + } + } + + return [...consumers].sort(); +} + +function detectTransport(block) { + if (block.includes('text/event-stream')) { + return 'sse'; + } + + return 'http'; +} + +function parseMounts(runtimeContent) { + const routeImports = new Map(); + + for (const match of runtimeContent.matchAll(defaultImportPattern)) { + if (match[2].includes('/routes/')) { + routeImports.set(match[1], match[2]); + } + } + + const mounts = new Map(); + const mountPattern = /app\.use\(\s*(['"`])([^'"`]+)\1\s*,\s*([^)]+?)\);/g; + + for (const match of runtimeContent.matchAll(mountPattern)) { + const basePath = match[2]; + const args = splitArgs(match[3]); + const routeVariable = args.at(-1); + if (!routeVariable || !routeImports.has(routeVariable)) { + continue; + } + + mounts.set(routeVariable, { + basePath, + routeImport: routeImports.get(routeVariable), + authMode: args.includes('authenticateToken') + ? 'bearer_token' + : args.includes('validateExternalApiKey') + ? 'api_key_or_platform' + : 'public_or_optional_api_key', + }); + } + + return mounts; +} + +function parseRoutes(filePath, fullPathPrefix, authMode, clientFiles) { + const content = readText(filePath); + const matches = [...content.matchAll(routeDefinitionPattern)]; + const routes = []; + + for (let index = 0; index < matches.length; index += 1) { + const match = matches[index]; + const nextMatch = matches[index + 1]; + const routeMethod = match[2].toUpperCase(); + const routePath = match[4]; + const startIndex = match.index ?? 0; + const endIndex = nextMatch?.index ?? content.length; + const block = content.slice(startIndex, endIndex); + const declarationEnd = block.indexOf('=>'); + const declarationSnippet = declarationEnd === -1 ? block : block.slice(0, declarationEnd); + const fullPath = fullPathPrefix + ? normalizeJoinedPath(fullPathPrefix, routePath) + : routePath; + const transport = detectTransport(block); + const tag = classifyTag(fullPath); + const pathParams = [...fullPath.matchAll(/:([A-Za-z0-9_]+)/g)].map(token => token[1]); + const queryParams = collectObjectKeys(block, 'query'); + const bodyHints = collectObjectKeys(block, 'body'); + const localAuthMode = + fullPath === '/health' || + fullPath === '/api/auth/status' || + fullPath === '/api/auth/register' || + fullPath === '/api/auth/login' || + fullPath === '*' + ? 'public' + : declarationSnippet.includes('authenticateToken') + ? 'bearer_token' + : declarationSnippet.includes('validateExternalApiKey') + ? 'api_key_or_platform' + : authMode; + + routes.push({ + transport, + method: routeMethod, + path: fullPath, + tag, + authMode: localAuthMode, + sourceFile: toPosix(path.relative(projectRoot, filePath)), + sourceLine: getLineNumber(content, startIndex), + purpose: describePurpose(routeMethod, fullPath), + consumerFiles: collectFrontendConsumers(fullPath, clientFiles), + inputs: { + pathParams, + queryParams, + bodyHints, + }, + successShape: describeSuccessShape(block, transport), + errorShape: describeErrorShape(block, transport), + sideEffects: describeSideEffects(routeMethod.toLowerCase(), fullPath), + priority: classifyPriority(tag, fullPath), + }); + } + + return routes; +} + +function parseRealtimeContracts(runtimeFile) { + const content = readText(runtimeFile); + const incoming = new Set(); + const outgoing = new Set(); + + for (const match of content.matchAll(incomingRealtimePattern)) { + incoming.add(match[1]); + } + + const websocketSectionIndex = content.indexOf("wss.on('connection'"); + const websocketSection = websocketSectionIndex === -1 ? content : content.slice(websocketSectionIndex); + + for (const match of websocketSection.matchAll(outgoingRealtimePattern)) { + outgoing.add(match[1]); + } + + return { + incomingMessageTypes: [...incoming].sort(), + outgoingMessageTypes: [...outgoing].sort(), + }; +} + +function escapeCsv(value) { + const stringValue = Array.isArray(value) ? value.join('; ') : String(value ?? ''); + const escaped = stringValue.replace(/"/g, '""'); + return `"${escaped}"`; +} + +function writeCsv(filePath, records) { + const header = [ + 'transport', + 'method', + 'path', + 'tag', + 'authMode', + 'sourceFile', + 'sourceLine', + 'purpose', + 'consumerFiles', + 'pathParams', + 'queryParams', + 'bodyHints', + 'successShape', + 'errorShape', + 'sideEffects', + 'priority', + ]; + + const rows = [ + header.join(','), + ...records.map(record => [ + record.transport, + record.method, + record.path, + record.tag, + record.authMode, + record.sourceFile, + record.sourceLine, + record.purpose, + record.consumerFiles, + record.inputs.pathParams, + record.inputs.queryParams, + record.inputs.bodyHints, + record.successShape, + record.errorShape, + record.sideEffects, + record.priority, + ].map(escapeCsv).join(',')), + ]; + + fs.writeFileSync(filePath, `${rows.join('\n')}\n`); +} + +function writeMarkdown(filePath, summary, records, realtimeContracts) { + const grouped = new Map(); + + for (const record of records) { + if (!grouped.has(record.tag)) { + grouped.set(record.tag, []); + } + + grouped.get(record.tag).push(record); + } + + const lines = [ + '# Backend Inventory', + '', + `Generated on ${summary.generatedAt}.`, + '', + '## Summary', + '', + `- HTTP routes: ${summary.httpRoutes}`, + `- SSE routes: ${summary.sseRoutes}`, + `- Modular routes: ${summary.modularRoutes}`, + `- Inline routes: ${summary.inlineRoutes}`, + `- Route files scanned: ${summary.routeFilesScanned}`, + '', + '## Realtime Contracts', + '', + `- Incoming websocket message types (${realtimeContracts.incomingMessageTypes.length}): ${realtimeContracts.incomingMessageTypes.join(', ')}`, + `- Outgoing websocket message types (${realtimeContracts.outgoingMessageTypes.length}): ${realtimeContracts.outgoingMessageTypes.join(', ')}`, + '', + ]; + + for (const [tag, tagRecords] of [...grouped.entries()].sort(([left], [right]) => left.localeCompare(right))) { + lines.push(`## ${tag}`); + lines.push(''); + lines.push('| Method | Path | Auth | Purpose | Consumers | Source |'); + lines.push('| --- | --- | --- | --- | --- | --- |'); + + for (const record of tagRecords.sort((left, right) => left.path.localeCompare(right.path))) { + lines.push( + `| ${record.method} | \`${record.path}\` | ${record.authMode} | ${record.purpose} | ${record.consumerFiles.join('
') || '-'} | ${record.sourceFile}:${record.sourceLine} |` + ); + } + + lines.push(''); + } + + fs.writeFileSync(filePath, `${lines.join('\n')}\n`); +} + +const clientFiles = walkFiles(clientRoot).filter(filePath => /\.(js|jsx|ts|tsx)$/.test(filePath)); +const legacyRuntimePath = path.join(serverRoot, 'legacy-runtime.js'); +const runtimeContent = readText(legacyRuntimePath); +const mounts = parseMounts(runtimeContent); +const records = []; + +records.push(...parseRoutes(legacyRuntimePath, '', 'mixed_or_inline', clientFiles)); + +for (const [routeVariable, mount] of mounts.entries()) { + const relativeImport = mount.routeImport.replace('./', ''); + const routeFilePath = path.join(serverRoot, relativeImport); + records.push(...parseRoutes(routeFilePath, mount.basePath, mount.authMode, clientFiles)); +} + +const realtimeContracts = parseRealtimeContracts(legacyRuntimePath); +const summary = { + generatedAt: new Date().toISOString(), + httpRoutes: records.filter(record => record.transport === 'http').length, + sseRoutes: records.filter(record => record.transport === 'sse').length, + modularRoutes: records.filter(record => record.sourceFile.includes('/routes/')).length, + inlineRoutes: records.filter(record => record.sourceFile === 'server/legacy-runtime.js').length, + routeFilesScanned: new Set(records.map(record => record.sourceFile)).size, +}; + +fs.writeFileSync( + path.join(docsRoot, 'endpoint-inventory.json'), + JSON.stringify({ summary, realtimeContracts, records }, null, 2) +); + +writeCsv(path.join(docsRoot, 'endpoint-inventory.csv'), records); +writeMarkdown(path.join(docsRoot, 'endpoint-inventory.md'), summary, records, realtimeContracts); + +console.log('[inventory] Generated docs/backend/endpoint-inventory.{json,csv,md}'); +console.log( + `[inventory] HTTP=${summary.httpRoutes} SSE=${summary.sseRoutes} Modular=${summary.modularRoutes} Inline=${summary.inlineRoutes}` +); diff --git a/server/index.js b/server/index.js index 5318fb35..f46e87f5 100755 --- a/server/index.js +++ b/server/index.js @@ -1,13 +1,11 @@ #!/usr/bin/env node -// Load environment variables before other imports execute -import './load-env.js'; import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; -import { dirname } from 'path'; const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); +const __dirname = path.dirname(__filename); +const distEntrypoint = path.join(__dirname, 'dist', 'bootstrap.js'); const installMode = fs.existsSync(path.join(__dirname, '..', '.git')) ? 'git' : 'npm'; diff --git a/server/legacy-runtime.js b/server/legacy-runtime.js new file mode 100644 index 00000000..770575a2 --- /dev/null +++ b/server/legacy-runtime.js @@ -0,0 +1,2554 @@ +#!/usr/bin/env node +// Load environment variables before other imports execute +import './load-env.js'; +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const installMode = fs.existsSync(path.join(__dirname, '..', '.git')) ? 'git' : 'npm'; + +// ANSI color codes for terminal output +const colors = { + reset: '\x1b[0m', + bright: '\x1b[1m', + cyan: '\x1b[36m', + green: '\x1b[32m', + yellow: '\x1b[33m', + blue: '\x1b[34m', + dim: '\x1b[2m', +}; + +const c = { + info: (text) => `${colors.cyan}${text}${colors.reset}`, + ok: (text) => `${colors.green}${text}${colors.reset}`, + warn: (text) => `${colors.yellow}${text}${colors.reset}`, + tip: (text) => `${colors.blue}${text}${colors.reset}`, + bright: (text) => `${colors.bright}${text}${colors.reset}`, + dim: (text) => `${colors.dim}${text}${colors.reset}`, +}; + +console.log('SERVER_PORT from env:', process.env.SERVER_PORT); + +import express from 'express'; +import { WebSocketServer, WebSocket } from 'ws'; +import os from 'os'; +import http from 'http'; +import cors from 'cors'; +import { promises as fsPromises } from 'fs'; +import { spawn } from 'child_process'; +import pty from 'node-pty'; +import fetch from 'node-fetch'; +import mime from 'mime-types'; + +import { getProjects, getSessions, getSessionMessages, renameProject, deleteSession, deleteProject, addProjectManually, extractProjectDirectory, clearProjectDirectoryCache, searchConversations } from './projects.js'; +import { queryClaudeSDK, abortClaudeSDKSession, isClaudeSDKSessionActive, getActiveClaudeSDKSessions, resolveToolApproval, getPendingApprovalsForSession, reconnectSessionWriter } from './claude-sdk.js'; +import { spawnCursor, abortCursorSession, isCursorSessionActive, getActiveCursorSessions } from './cursor-cli.js'; +import { queryCodex, abortCodexSession, isCodexSessionActive, getActiveCodexSessions } from './openai-codex.js'; +import { spawnGemini, abortGeminiSession, isGeminiSessionActive, getActiveGeminiSessions } from './gemini-cli.js'; +import sessionManager from './sessionManager.js'; +import gitRoutes from './routes/git.js'; +import authRoutes from './routes/auth.js'; +import mcpRoutes from './routes/mcp.js'; +import cursorRoutes from './routes/cursor.js'; +import taskmasterRoutes from './routes/taskmaster.js'; +import mcpUtilsRoutes from './routes/mcp-utils.js'; +import commandsRoutes from './routes/commands.js'; +import settingsRoutes from './routes/settings.js'; +import agentRoutes from './routes/agent.js'; +import projectsRoutes, { WORKSPACES_ROOT, validateWorkspacePath } from './routes/projects.js'; +import cliAuthRoutes from './routes/cli-auth.js'; +import userRoutes from './routes/user.js'; +import codexRoutes from './routes/codex.js'; +import geminiRoutes from './routes/gemini.js'; +import pluginsRoutes from './routes/plugins.js'; +import { startEnabledPluginServers, stopAllPlugins } from './utils/plugin-process-manager.js'; +import { initializeDatabase, sessionNamesDb, applyCustomSessionNames } from './database/db.js'; +import { validateApiKey, authenticateToken, authenticateWebSocket } from './middleware/auth.js'; +import { IS_PLATFORM } from './constants/config.js'; +import { getConnectableHost } from '../shared/networkHosts.js'; + +const VALID_PROVIDERS = ['claude', 'codex', 'cursor', 'gemini']; + +// File system watchers for provider project/session folders +const PROVIDER_WATCH_PATHS = [ + { provider: 'claude', rootPath: path.join(os.homedir(), '.claude', 'projects') }, + { provider: 'cursor', rootPath: path.join(os.homedir(), '.cursor', 'chats') }, + { provider: 'codex', rootPath: path.join(os.homedir(), '.codex', 'sessions') }, + { provider: 'gemini', rootPath: path.join(os.homedir(), '.gemini', 'projects') }, + { provider: 'gemini_sessions', rootPath: path.join(os.homedir(), '.gemini', 'sessions') } +]; +const WATCHER_IGNORED_PATTERNS = [ + '**/node_modules/**', + '**/.git/**', + '**/dist/**', + '**/build/**', + '**/*.tmp', + '**/*.swp', + '**/.DS_Store' +]; +const WATCHER_DEBOUNCE_MS = 300; +let projectsWatchers = []; +let projectsWatcherDebounceTimer = null; +const connectedClients = new Set(); +let isGetProjectsRunning = false; // Flag to prevent reentrant calls + +// Broadcast progress to all connected WebSocket clients +function broadcastProgress(progress) { + const message = JSON.stringify({ + type: 'loading_progress', + ...progress + }); + connectedClients.forEach(client => { + if (client.readyState === WebSocket.OPEN) { + client.send(message); + } + }); +} + +// Setup file system watchers for Claude, Cursor, and Codex project/session folders +async function setupProjectsWatcher() { + const chokidar = (await import('chokidar')).default; + + if (projectsWatcherDebounceTimer) { + clearTimeout(projectsWatcherDebounceTimer); + projectsWatcherDebounceTimer = null; + } + + await Promise.all( + projectsWatchers.map(async (watcher) => { + try { + await watcher.close(); + } catch (error) { + console.error('[WARN] Failed to close watcher:', error); + } + }) + ); + projectsWatchers = []; + + const debouncedUpdate = (eventType, filePath, provider, rootPath) => { + if (projectsWatcherDebounceTimer) { + clearTimeout(projectsWatcherDebounceTimer); + } + + projectsWatcherDebounceTimer = setTimeout(async () => { + // Prevent reentrant calls + if (isGetProjectsRunning) { + return; + } + + try { + isGetProjectsRunning = true; + + // Clear project directory cache when files change + clearProjectDirectoryCache(); + + // Get updated projects list + const updatedProjects = await getProjects(broadcastProgress); + + // Notify all connected clients about the project changes + const updateMessage = JSON.stringify({ + type: 'projects_updated', + projects: updatedProjects, + timestamp: new Date().toISOString(), + changeType: eventType, + changedFile: path.relative(rootPath, filePath), + watchProvider: provider + }); + + connectedClients.forEach(client => { + if (client.readyState === WebSocket.OPEN) { + client.send(updateMessage); + } + }); + + } catch (error) { + console.error('[ERROR] Error handling project changes:', error); + } finally { + isGetProjectsRunning = false; + } + }, WATCHER_DEBOUNCE_MS); + }; + + for (const { provider, rootPath } of PROVIDER_WATCH_PATHS) { + try { + // chokidar v4 emits ENOENT via the "error" event for missing roots and will not auto-recover. + // Ensure provider folders exist before creating the watcher so watching stays active. + await fsPromises.mkdir(rootPath, { recursive: true }); + + // Initialize chokidar watcher with optimized settings + const watcher = chokidar.watch(rootPath, { + ignored: WATCHER_IGNORED_PATTERNS, + persistent: true, + ignoreInitial: true, // Don't fire events for existing files on startup + followSymlinks: false, + depth: 10, // Reasonable depth limit + awaitWriteFinish: { + stabilityThreshold: 100, // Wait 100ms for file to stabilize + pollInterval: 50 + } + }); + + // Set up event listeners + watcher + .on('add', (filePath) => debouncedUpdate('add', filePath, provider, rootPath)) + .on('change', (filePath) => debouncedUpdate('change', filePath, provider, rootPath)) + .on('unlink', (filePath) => debouncedUpdate('unlink', filePath, provider, rootPath)) + .on('addDir', (dirPath) => debouncedUpdate('addDir', dirPath, provider, rootPath)) + .on('unlinkDir', (dirPath) => debouncedUpdate('unlinkDir', dirPath, provider, rootPath)) + .on('error', (error) => { + console.error(`[ERROR] ${provider} watcher error:`, error); + }) + .on('ready', () => { + }); + + projectsWatchers.push(watcher); + } catch (error) { + console.error(`[ERROR] Failed to setup ${provider} watcher for ${rootPath}:`, error); + } + } + + if (projectsWatchers.length === 0) { + console.error('[ERROR] Failed to setup any provider watchers'); + } +} + + +const app = express(); +const server = http.createServer(app); + +const ptySessionsMap = new Map(); +const PTY_SESSION_TIMEOUT = 30 * 60 * 1000; +const SHELL_URL_PARSE_BUFFER_LIMIT = 32768; +const ANSI_ESCAPE_SEQUENCE_REGEX = /\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x07]*(?:\x07|\x1B\\))/g; +const TRAILING_URL_PUNCTUATION_REGEX = /[)\]}>.,;:!?]+$/; + +function stripAnsiSequences(value = '') { + return value.replace(ANSI_ESCAPE_SEQUENCE_REGEX, ''); +} + +function normalizeDetectedUrl(url) { + if (!url || typeof url !== 'string') return null; + + const cleaned = url.trim().replace(TRAILING_URL_PUNCTUATION_REGEX, ''); + if (!cleaned) return null; + + try { + const parsed = new URL(cleaned); + if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') { + return null; + } + return parsed.toString(); + } catch { + return null; + } +} + +function extractUrlsFromText(value = '') { + const directMatches = value.match(/https?:\/\/[^\s<>"'`\\\x1b\x07]+/gi) || []; + + // Handle wrapped terminal URLs split across lines by terminal width. + const wrappedMatches = []; + const continuationRegex = /^[A-Za-z0-9\-._~:/?#\[\]@!$&'()*+,;=%]+$/; + const lines = value.split(/\r?\n/); + for (let i = 0; i < lines.length; i++) { + const line = lines[i].trim(); + const startMatch = line.match(/https?:\/\/[^\s<>"'`\\\x1b\x07]+/i); + if (!startMatch) continue; + + let combined = startMatch[0]; + let j = i + 1; + while (j < lines.length) { + const continuation = lines[j].trim(); + if (!continuation) break; + if (!continuationRegex.test(continuation)) break; + combined += continuation; + j++; + } + + wrappedMatches.push(combined.replace(/\r?\n\s*/g, '')); + } + + return Array.from(new Set([...directMatches, ...wrappedMatches])); +} + +function shouldAutoOpenUrlFromOutput(value = '') { + const normalized = value.toLowerCase(); + return ( + normalized.includes('browser didn\'t open') || + normalized.includes('open this url') || + normalized.includes('continue in your browser') || + normalized.includes('press enter to open') || + normalized.includes('open_url:') + ); +} + +// Single WebSocket server that handles both paths +const wss = new WebSocketServer({ + server, + verifyClient: (info) => { + console.log('WebSocket connection attempt to:', info.req.url); + + // Platform mode: always allow connection + if (IS_PLATFORM) { + const user = authenticateWebSocket(null); // Will return first user + if (!user) { + console.log('[WARN] Platform mode: No user found in database'); + return false; + } + info.req.user = user; + console.log('[OK] Platform mode WebSocket authenticated for user:', user.username); + return true; + } + + // Normal mode: verify token + // Extract token from query parameters or headers + const url = new URL(info.req.url, 'http://localhost'); + const token = url.searchParams.get('token') || + info.req.headers.authorization?.split(' ')[1]; + + // Verify token + const user = authenticateWebSocket(token); + if (!user) { + console.log('[WARN] WebSocket authentication failed'); + return false; + } + + // Store user info in the request for later use + info.req.user = user; + console.log('[OK] WebSocket authenticated for user:', user.username); + return true; + } +}); + +// Make WebSocket server available to routes +app.locals.wss = wss; + +app.use(cors({ exposedHeaders: ['X-Refreshed-Token'] })); +app.use(express.json({ + limit: '50mb', + type: (req) => { + // Skip multipart/form-data requests (for file uploads like images) + const contentType = req.headers['content-type'] || ''; + if (contentType.includes('multipart/form-data')) { + return false; + } + return contentType.includes('json'); + } +})); +app.use(express.urlencoded({ limit: '50mb', extended: true })); + +// Public health check endpoint (no authentication required) +app.get('/health', (req, res) => { + res.json({ + status: 'ok', + timestamp: new Date().toISOString(), + installMode + }); +}); + +// Optional API key validation (if configured) +app.use('/api', validateApiKey); + +// Authentication routes (public) +app.use('/api/auth', authRoutes); + +// Projects API Routes (protected) +app.use('/api/projects', authenticateToken, projectsRoutes); + +// Git API Routes (protected) +app.use('/api/git', authenticateToken, gitRoutes); + +// MCP API Routes (protected) +app.use('/api/mcp', authenticateToken, mcpRoutes); + +// Cursor API Routes (protected) +app.use('/api/cursor', authenticateToken, cursorRoutes); + +// TaskMaster API Routes (protected) +app.use('/api/taskmaster', authenticateToken, taskmasterRoutes); + +// MCP utilities +app.use('/api/mcp-utils', authenticateToken, mcpUtilsRoutes); + +// Commands API Routes (protected) +app.use('/api/commands', authenticateToken, commandsRoutes); + +// Settings API Routes (protected) +app.use('/api/settings', authenticateToken, settingsRoutes); + +// CLI Authentication API Routes (protected) +app.use('/api/cli', authenticateToken, cliAuthRoutes); + +// User API Routes (protected) +app.use('/api/user', authenticateToken, userRoutes); + +// Codex API Routes (protected) +app.use('/api/codex', authenticateToken, codexRoutes); + +// Gemini API Routes (protected) +app.use('/api/gemini', authenticateToken, geminiRoutes); + +// Plugins API Routes (protected) +app.use('/api/plugins', authenticateToken, pluginsRoutes); + +// Agent API Routes (uses API key authentication) +app.use('/api/agent', agentRoutes); + +// Serve public files (like api-docs.html) +app.use(express.static(path.join(__dirname, '../public'))); + +// Static files served after API routes +// Add cache control: HTML files should not be cached, but assets can be cached +app.use(express.static(path.join(__dirname, '../dist'), { + setHeaders: (res, filePath) => { + if (filePath.endsWith('.html')) { + // Prevent HTML caching to avoid service worker issues after builds + res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate'); + res.setHeader('Pragma', 'no-cache'); + res.setHeader('Expires', '0'); + } else if (filePath.match(/\.(js|css|woff2?|ttf|eot|svg|png|jpg|jpeg|gif|ico)$/)) { + // Cache static assets for 1 year (they have hashed names) + res.setHeader('Cache-Control', 'public, max-age=31536000, immutable'); + } + } +})); + +// API Routes (protected) +// /api/config endpoint removed - no longer needed +// Frontend now uses window.location for WebSocket URLs + +// System update endpoint +app.post('/api/system/update', authenticateToken, async (req, res) => { + try { + // Get the project root directory (parent of server directory) + const projectRoot = path.join(__dirname, '..'); + + console.log('Starting system update from directory:', projectRoot); + + // Run the update command based on install mode + const updateCommand = installMode === 'git' + ? 'git checkout main && git pull && npm install' + : 'npm install -g @siteboon/claude-code-ui@latest'; + + const child = spawn('sh', ['-c', updateCommand], { + cwd: installMode === 'git' ? projectRoot : os.homedir(), + env: process.env + }); + + let output = ''; + let errorOutput = ''; + + child.stdout.on('data', (data) => { + const text = data.toString(); + output += text; + console.log('Update output:', text); + }); + + child.stderr.on('data', (data) => { + const text = data.toString(); + errorOutput += text; + console.error('Update error:', text); + }); + + child.on('close', (code) => { + if (code === 0) { + res.json({ + success: true, + output: output || 'Update completed successfully', + message: 'Update completed. Please restart the server to apply changes.' + }); + } else { + res.status(500).json({ + success: false, + error: 'Update command failed', + output: output, + errorOutput: errorOutput + }); + } + }); + + child.on('error', (error) => { + console.error('Update process error:', error); + res.status(500).json({ + success: false, + error: error.message + }); + }); + + } catch (error) { + console.error('System update error:', error); + res.status(500).json({ + success: false, + error: error.message + }); + } +}); + +app.get('/api/projects', authenticateToken, async (req, res) => { + try { + const projects = await getProjects(broadcastProgress); + res.json(projects); + } catch (error) { + res.status(500).json({ error: error.message }); + } +}); + +app.get('/api/projects/:projectName/sessions', authenticateToken, async (req, res) => { + try { + const { limit = 5, offset = 0 } = req.query; + const result = await getSessions(req.params.projectName, parseInt(limit), parseInt(offset)); + applyCustomSessionNames(result.sessions, 'claude'); + res.json(result); + } catch (error) { + res.status(500).json({ error: error.message }); + } +}); + +// Get messages for a specific session +app.get('/api/projects/:projectName/sessions/:sessionId/messages', authenticateToken, async (req, res) => { + try { + const { projectName, sessionId } = req.params; + const { limit, offset } = req.query; + + // Parse limit and offset if provided + const parsedLimit = limit ? parseInt(limit, 10) : null; + const parsedOffset = offset ? parseInt(offset, 10) : 0; + + const result = await getSessionMessages(projectName, sessionId, parsedLimit, parsedOffset); + + // Handle both old and new response formats + if (Array.isArray(result)) { + // Backward compatibility: no pagination parameters were provided + res.json({ messages: result }); + } else { + // New format with pagination info + res.json(result); + } + } catch (error) { + res.status(500).json({ error: error.message }); + } +}); + +// Rename project endpoint +app.put('/api/projects/:projectName/rename', authenticateToken, async (req, res) => { + try { + const { displayName } = req.body; + await renameProject(req.params.projectName, displayName); + res.json({ success: true }); + } catch (error) { + res.status(500).json({ error: error.message }); + } +}); + +// Delete session endpoint +app.delete('/api/projects/:projectName/sessions/:sessionId', authenticateToken, async (req, res) => { + try { + const { projectName, sessionId } = req.params; + console.log(`[API] Deleting session: ${sessionId} from project: ${projectName}`); + await deleteSession(projectName, sessionId); + sessionNamesDb.deleteName(sessionId, 'claude'); + console.log(`[API] Session ${sessionId} deleted successfully`); + res.json({ success: true }); + } catch (error) { + console.error(`[API] Error deleting session ${req.params.sessionId}:`, error); + res.status(500).json({ error: error.message }); + } +}); + +// Rename session endpoint +app.put('/api/sessions/:sessionId/rename', authenticateToken, async (req, res) => { + try { + const { sessionId } = req.params; + const safeSessionId = String(sessionId).replace(/[^a-zA-Z0-9._-]/g, ''); + if (!safeSessionId || safeSessionId !== String(sessionId)) { + return res.status(400).json({ error: 'Invalid sessionId' }); + } + const { summary, provider } = req.body; + if (!summary || typeof summary !== 'string' || summary.trim() === '') { + return res.status(400).json({ error: 'Summary is required' }); + } + if (summary.trim().length > 500) { + return res.status(400).json({ error: 'Summary must not exceed 500 characters' }); + } + if (!provider || !VALID_PROVIDERS.includes(provider)) { + return res.status(400).json({ error: `Provider must be one of: ${VALID_PROVIDERS.join(', ')}` }); + } + sessionNamesDb.setName(safeSessionId, provider, summary.trim()); + res.json({ success: true }); + } catch (error) { + console.error(`[API] Error renaming session ${req.params.sessionId}:`, error); + res.status(500).json({ error: error.message }); + } +}); + +// Delete project endpoint (force=true to delete with sessions) +app.delete('/api/projects/:projectName', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const force = req.query.force === 'true'; + await deleteProject(projectName, force); + res.json({ success: true }); + } catch (error) { + res.status(500).json({ error: error.message }); + } +}); + +// Create project endpoint +app.post('/api/projects/create', authenticateToken, async (req, res) => { + try { + const { path: projectPath } = req.body; + + if (!projectPath || !projectPath.trim()) { + return res.status(400).json({ error: 'Project path is required' }); + } + + const project = await addProjectManually(projectPath.trim()); + res.json({ success: true, project }); + } catch (error) { + console.error('Error creating project:', error); + res.status(500).json({ error: error.message }); + } +}); + +// Search conversations content (SSE streaming) +app.get('/api/search/conversations', authenticateToken, async (req, res) => { + const query = typeof req.query.q === 'string' ? req.query.q.trim() : ''; + const parsedLimit = Number.parseInt(String(req.query.limit), 10); + const limit = Number.isNaN(parsedLimit) ? 50 : Math.max(1, Math.min(parsedLimit, 100)); + + if (query.length < 2) { + return res.status(400).json({ error: 'Query must be at least 2 characters' }); + } + + res.writeHead(200, { + 'Content-Type': 'text/event-stream', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'X-Accel-Buffering': 'no', + }); + + let closed = false; + const abortController = new AbortController(); + req.on('close', () => { closed = true; abortController.abort(); }); + + try { + await searchConversations(query, limit, ({ projectResult, totalMatches, scannedProjects, totalProjects }) => { + if (closed) return; + if (projectResult) { + res.write(`event: result\ndata: ${JSON.stringify({ projectResult, totalMatches, scannedProjects, totalProjects })}\n\n`); + } else { + res.write(`event: progress\ndata: ${JSON.stringify({ totalMatches, scannedProjects, totalProjects })}\n\n`); + } + }, abortController.signal); + if (!closed) { + res.write(`event: done\ndata: {}\n\n`); + } + } catch (error) { + console.error('Error searching conversations:', error); + if (!closed) { + res.write(`event: error\ndata: ${JSON.stringify({ error: 'Search failed' })}\n\n`); + } + } finally { + if (!closed) { + res.end(); + } + } +}); + +const expandWorkspacePath = (inputPath) => { + if (!inputPath) return inputPath; + if (inputPath === '~') { + return WORKSPACES_ROOT; + } + if (inputPath.startsWith('~/') || inputPath.startsWith('~\\')) { + return path.join(WORKSPACES_ROOT, inputPath.slice(2)); + } + return inputPath; +}; + +// Browse filesystem endpoint for project suggestions - uses existing getFileTree +app.get('/api/browse-filesystem', authenticateToken, async (req, res) => { + try { + const { path: dirPath } = req.query; + + console.log('[API] Browse filesystem request for path:', dirPath); + console.log('[API] WORKSPACES_ROOT is:', WORKSPACES_ROOT); + // Default to home directory if no path provided + const defaultRoot = WORKSPACES_ROOT; + let targetPath = dirPath ? expandWorkspacePath(dirPath) : defaultRoot; + + // Resolve and normalize the path + targetPath = path.resolve(targetPath); + + // Security check - ensure path is within allowed workspace root + const validation = await validateWorkspacePath(targetPath); + if (!validation.valid) { + return res.status(403).json({ error: validation.error }); + } + const resolvedPath = validation.resolvedPath || targetPath; + + // Security check - ensure path is accessible + try { + await fs.promises.access(resolvedPath); + const stats = await fs.promises.stat(resolvedPath); + + if (!stats.isDirectory()) { + return res.status(400).json({ error: 'Path is not a directory' }); + } + } catch (err) { + return res.status(404).json({ error: 'Directory not accessible' }); + } + + // Use existing getFileTree function with shallow depth (only direct children) + const fileTree = await getFileTree(resolvedPath, 1, 0, false); // maxDepth=1, showHidden=false + + // Filter only directories and format for suggestions + const directories = fileTree + .filter(item => item.type === 'directory') + .map(item => ({ + path: item.path, + name: item.name, + type: 'directory' + })) + .sort((a, b) => { + const aHidden = a.name.startsWith('.'); + const bHidden = b.name.startsWith('.'); + if (aHidden && !bHidden) return 1; + if (!aHidden && bHidden) return -1; + return a.name.localeCompare(b.name); + }); + + // Add common directories if browsing home directory + const suggestions = []; + let resolvedWorkspaceRoot = defaultRoot; + try { + resolvedWorkspaceRoot = await fsPromises.realpath(defaultRoot); + } catch (error) { + // Use default root as-is if realpath fails + } + if (resolvedPath === resolvedWorkspaceRoot) { + const commonDirs = ['Desktop', 'Documents', 'Projects', 'Development', 'Dev', 'Code', 'workspace']; + const existingCommon = directories.filter(dir => commonDirs.includes(dir.name)); + const otherDirs = directories.filter(dir => !commonDirs.includes(dir.name)); + + suggestions.push(...existingCommon, ...otherDirs); + } else { + suggestions.push(...directories); + } + + res.json({ + path: resolvedPath, + suggestions: suggestions + }); + + } catch (error) { + console.error('Error browsing filesystem:', error); + res.status(500).json({ error: 'Failed to browse filesystem' }); + } +}); + +app.post('/api/create-folder', authenticateToken, async (req, res) => { + try { + const { path: folderPath } = req.body; + if (!folderPath) { + return res.status(400).json({ error: 'Path is required' }); + } + const expandedPath = expandWorkspacePath(folderPath); + const resolvedInput = path.resolve(expandedPath); + const validation = await validateWorkspacePath(resolvedInput); + if (!validation.valid) { + return res.status(403).json({ error: validation.error }); + } + const targetPath = validation.resolvedPath || resolvedInput; + const parentDir = path.dirname(targetPath); + try { + await fs.promises.access(parentDir); + } catch (err) { + return res.status(404).json({ error: 'Parent directory does not exist' }); + } + try { + await fs.promises.access(targetPath); + return res.status(409).json({ error: 'Folder already exists' }); + } catch (err) { + // Folder doesn't exist, which is what we want + } + try { + await fs.promises.mkdir(targetPath, { recursive: false }); + res.json({ success: true, path: targetPath }); + } catch (mkdirError) { + if (mkdirError.code === 'EEXIST') { + return res.status(409).json({ error: 'Folder already exists' }); + } + throw mkdirError; + } + } catch (error) { + console.error('Error creating folder:', error); + res.status(500).json({ error: 'Failed to create folder' }); + } +}); + +// Read file content endpoint +app.get('/api/projects/:projectName/file', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const { filePath } = req.query; + + + // Security: ensure the requested path is inside the project root + if (!filePath) { + return res.status(400).json({ error: 'Invalid file path' }); + } + + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + // Handle both absolute and relative paths + const resolved = path.isAbsolute(filePath) + ? path.resolve(filePath) + : path.resolve(projectRoot, filePath); + const normalizedRoot = path.resolve(projectRoot) + path.sep; + if (!resolved.startsWith(normalizedRoot)) { + return res.status(403).json({ error: 'Path must be under project root' }); + } + + const content = await fsPromises.readFile(resolved, 'utf8'); + res.json({ content, path: resolved }); + } catch (error) { + console.error('Error reading file:', error); + if (error.code === 'ENOENT') { + res.status(404).json({ error: 'File not found' }); + } else if (error.code === 'EACCES') { + res.status(403).json({ error: 'Permission denied' }); + } else { + res.status(500).json({ error: error.message }); + } + } +}); + +// Serve binary file content endpoint (for images, etc.) +app.get('/api/projects/:projectName/files/content', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const { path: filePath } = req.query; + + + // Security: ensure the requested path is inside the project root + if (!filePath) { + return res.status(400).json({ error: 'Invalid file path' }); + } + + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + const resolved = path.resolve(filePath); + const normalizedRoot = path.resolve(projectRoot) + path.sep; + if (!resolved.startsWith(normalizedRoot)) { + return res.status(403).json({ error: 'Path must be under project root' }); + } + + // Check if file exists + try { + await fsPromises.access(resolved); + } catch (error) { + return res.status(404).json({ error: 'File not found' }); + } + + // Get file extension and set appropriate content type + const mimeType = mime.lookup(resolved) || 'application/octet-stream'; + res.setHeader('Content-Type', mimeType); + + // Stream the file + const fileStream = fs.createReadStream(resolved); + fileStream.pipe(res); + + fileStream.on('error', (error) => { + console.error('Error streaming file:', error); + if (!res.headersSent) { + res.status(500).json({ error: 'Error reading file' }); + } + }); + + } catch (error) { + console.error('Error serving binary file:', error); + if (!res.headersSent) { + res.status(500).json({ error: error.message }); + } + } +}); + +// Save file content endpoint +app.put('/api/projects/:projectName/file', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const { filePath, content } = req.body; + + + // Security: ensure the requested path is inside the project root + if (!filePath) { + return res.status(400).json({ error: 'Invalid file path' }); + } + + if (content === undefined) { + return res.status(400).json({ error: 'Content is required' }); + } + + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + // Handle both absolute and relative paths + const resolved = path.isAbsolute(filePath) + ? path.resolve(filePath) + : path.resolve(projectRoot, filePath); + const normalizedRoot = path.resolve(projectRoot) + path.sep; + if (!resolved.startsWith(normalizedRoot)) { + return res.status(403).json({ error: 'Path must be under project root' }); + } + + // Write the new content + await fsPromises.writeFile(resolved, content, 'utf8'); + + res.json({ + success: true, + path: resolved, + message: 'File saved successfully' + }); + } catch (error) { + console.error('Error saving file:', error); + if (error.code === 'ENOENT') { + res.status(404).json({ error: 'File or directory not found' }); + } else if (error.code === 'EACCES') { + res.status(403).json({ error: 'Permission denied' }); + } else { + res.status(500).json({ error: error.message }); + } + } +}); + +app.get('/api/projects/:projectName/files', authenticateToken, async (req, res) => { + try { + + // Using fsPromises from import + + // Use extractProjectDirectory to get the actual project path + let actualPath; + try { + actualPath = await extractProjectDirectory(req.params.projectName); + } catch (error) { + console.error('Error extracting project directory:', error); + // Fallback to simple dash replacement + actualPath = req.params.projectName.replace(/-/g, '/'); + } + + // Check if path exists + try { + await fsPromises.access(actualPath); + } catch (e) { + return res.status(404).json({ error: `Project path not found: ${actualPath}` }); + } + + const files = await getFileTree(actualPath, 10, 0, true); + const hiddenFiles = files.filter(f => f.name.startsWith('.')); + res.json(files); + } catch (error) { + console.error('[ERROR] File tree error:', error.message); + res.status(500).json({ error: error.message }); + } +}); + +// ============================================================================ +// FILE OPERATIONS API ENDPOINTS +// ============================================================================ + +/** + * Validate that a path is within the project root + * @param {string} projectRoot - The project root path + * @param {string} targetPath - The path to validate + * @returns {{ valid: boolean, resolved?: string, error?: string }} + */ +function validatePathInProject(projectRoot, targetPath) { + const resolved = path.isAbsolute(targetPath) + ? path.resolve(targetPath) + : path.resolve(projectRoot, targetPath); + const normalizedRoot = path.resolve(projectRoot) + path.sep; + if (!resolved.startsWith(normalizedRoot)) { + return { valid: false, error: 'Path must be under project root' }; + } + return { valid: true, resolved }; +} + +/** + * Validate filename - check for invalid characters + * @param {string} name - The filename to validate + * @returns {{ valid: boolean, error?: string }} + */ +function validateFilename(name) { + if (!name || !name.trim()) { + return { valid: false, error: 'Filename cannot be empty' }; + } + // Check for invalid characters (Windows + Unix) + const invalidChars = /[<>:"/\\|?*\x00-\x1f]/; + if (invalidChars.test(name)) { + return { valid: false, error: 'Filename contains invalid characters' }; + } + // Check for reserved names (Windows) + const reserved = /^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/i; + if (reserved.test(name)) { + return { valid: false, error: 'Filename is a reserved name' }; + } + // Check for dots only + if (/^\.+$/.test(name)) { + return { valid: false, error: 'Filename cannot be only dots' }; + } + return { valid: true }; +} + +// POST /api/projects/:projectName/files/create - Create new file or directory +app.post('/api/projects/:projectName/files/create', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const { path: parentPath, type, name } = req.body; + + // Validate input + if (!name || !type) { + return res.status(400).json({ error: 'Name and type are required' }); + } + + if (!['file', 'directory'].includes(type)) { + return res.status(400).json({ error: 'Type must be "file" or "directory"' }); + } + + const nameValidation = validateFilename(name); + if (!nameValidation.valid) { + return res.status(400).json({ error: nameValidation.error }); + } + + // Get project root + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + // Build and validate target path + const targetDir = parentPath || ''; + const targetPath = targetDir ? path.join(targetDir, name) : name; + const validation = validatePathInProject(projectRoot, targetPath); + if (!validation.valid) { + return res.status(403).json({ error: validation.error }); + } + + const resolvedPath = validation.resolved; + + // Check if already exists + try { + await fsPromises.access(resolvedPath); + return res.status(409).json({ error: `${type === 'file' ? 'File' : 'Directory'} already exists` }); + } catch { + // Doesn't exist, which is what we want + } + + // Create file or directory + if (type === 'directory') { + await fsPromises.mkdir(resolvedPath, { recursive: false }); + } else { + // Ensure parent directory exists + const parentDir = path.dirname(resolvedPath); + try { + await fsPromises.access(parentDir); + } catch { + await fsPromises.mkdir(parentDir, { recursive: true }); + } + await fsPromises.writeFile(resolvedPath, '', 'utf8'); + } + + res.json({ + success: true, + path: resolvedPath, + name, + type, + message: `${type === 'file' ? 'File' : 'Directory'} created successfully` + }); + } catch (error) { + console.error('Error creating file/directory:', error); + if (error.code === 'EACCES') { + res.status(403).json({ error: 'Permission denied' }); + } else if (error.code === 'ENOENT') { + res.status(404).json({ error: 'Parent directory not found' }); + } else { + res.status(500).json({ error: error.message }); + } + } +}); + +// PUT /api/projects/:projectName/files/rename - Rename file or directory +app.put('/api/projects/:projectName/files/rename', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const { oldPath, newName } = req.body; + + // Validate input + if (!oldPath || !newName) { + return res.status(400).json({ error: 'oldPath and newName are required' }); + } + + const nameValidation = validateFilename(newName); + if (!nameValidation.valid) { + return res.status(400).json({ error: nameValidation.error }); + } + + // Get project root + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + // Validate old path + const oldValidation = validatePathInProject(projectRoot, oldPath); + if (!oldValidation.valid) { + return res.status(403).json({ error: oldValidation.error }); + } + + const resolvedOldPath = oldValidation.resolved; + + // Check if old path exists + try { + await fsPromises.access(resolvedOldPath); + } catch { + return res.status(404).json({ error: 'File or directory not found' }); + } + + // Build and validate new path + const parentDir = path.dirname(resolvedOldPath); + const resolvedNewPath = path.join(parentDir, newName); + const newValidation = validatePathInProject(projectRoot, resolvedNewPath); + if (!newValidation.valid) { + return res.status(403).json({ error: newValidation.error }); + } + + // Check if new path already exists + try { + await fsPromises.access(resolvedNewPath); + return res.status(409).json({ error: 'A file or directory with this name already exists' }); + } catch { + // Doesn't exist, which is what we want + } + + // Rename + await fsPromises.rename(resolvedOldPath, resolvedNewPath); + + res.json({ + success: true, + oldPath: resolvedOldPath, + newPath: resolvedNewPath, + newName, + message: 'Renamed successfully' + }); + } catch (error) { + console.error('Error renaming file/directory:', error); + if (error.code === 'EACCES') { + res.status(403).json({ error: 'Permission denied' }); + } else if (error.code === 'ENOENT') { + res.status(404).json({ error: 'File or directory not found' }); + } else if (error.code === 'EXDEV') { + res.status(400).json({ error: 'Cannot move across different filesystems' }); + } else { + res.status(500).json({ error: error.message }); + } + } +}); + +// DELETE /api/projects/:projectName/files - Delete file or directory +app.delete('/api/projects/:projectName/files', authenticateToken, async (req, res) => { + try { + const { projectName } = req.params; + const { path: targetPath, type } = req.body; + + // Validate input + if (!targetPath) { + return res.status(400).json({ error: 'Path is required' }); + } + + // Get project root + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + // Validate path + const validation = validatePathInProject(projectRoot, targetPath); + if (!validation.valid) { + return res.status(403).json({ error: validation.error }); + } + + const resolvedPath = validation.resolved; + + // Check if path exists and get stats + let stats; + try { + stats = await fsPromises.stat(resolvedPath); + } catch { + return res.status(404).json({ error: 'File or directory not found' }); + } + + // Prevent deleting the project root itself + if (resolvedPath === path.resolve(projectRoot)) { + return res.status(403).json({ error: 'Cannot delete project root directory' }); + } + + // Delete based on type + if (stats.isDirectory()) { + await fsPromises.rm(resolvedPath, { recursive: true, force: true }); + } else { + await fsPromises.unlink(resolvedPath); + } + + res.json({ + success: true, + path: resolvedPath, + type: stats.isDirectory() ? 'directory' : 'file', + message: 'Deleted successfully' + }); + } catch (error) { + console.error('Error deleting file/directory:', error); + if (error.code === 'EACCES') { + res.status(403).json({ error: 'Permission denied' }); + } else if (error.code === 'ENOENT') { + res.status(404).json({ error: 'File or directory not found' }); + } else if (error.code === 'ENOTEMPTY') { + res.status(400).json({ error: 'Directory is not empty' }); + } else { + res.status(500).json({ error: error.message }); + } + } +}); + +// POST /api/projects/:projectName/files/upload - Upload files +// Dynamic import of multer for file uploads +const uploadFilesHandler = async (req, res) => { + // Dynamic import of multer + const multer = (await import('multer')).default; + + const uploadMiddleware = multer({ + storage: multer.diskStorage({ + destination: (req, file, cb) => { + cb(null, os.tmpdir()); + }, + filename: (req, file, cb) => { + // Use a unique temp name, but preserve original name in file.originalname + // Note: file.originalname may contain path separators for folder uploads + const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9); + // For temp file, just use a safe unique name without the path + cb(null, `upload-${uniqueSuffix}`); + } + }), + limits: { + fileSize: 50 * 1024 * 1024, // 50MB limit + files: 20 // Max 20 files at once + } + }); + + // Use multer middleware + uploadMiddleware.array('files', 20)(req, res, async (err) => { + if (err) { + console.error('Multer error:', err); + if (err.code === 'LIMIT_FILE_SIZE') { + return res.status(400).json({ error: 'File too large. Maximum size is 50MB.' }); + } + if (err.code === 'LIMIT_FILE_COUNT') { + return res.status(400).json({ error: 'Too many files. Maximum is 20 files.' }); + } + return res.status(500).json({ error: err.message }); + } + + try { + const { projectName } = req.params; + const { targetPath, relativePaths } = req.body; + + // Parse relative paths if provided (for folder uploads) + let filePaths = []; + if (relativePaths) { + try { + filePaths = JSON.parse(relativePaths); + } catch (e) { + console.log('[DEBUG] Failed to parse relativePaths:', relativePaths); + } + } + + console.log('[DEBUG] File upload request:', { + projectName, + targetPath: JSON.stringify(targetPath), + targetPathType: typeof targetPath, + filesCount: req.files?.length, + relativePaths: filePaths + }); + + if (!req.files || req.files.length === 0) { + return res.status(400).json({ error: 'No files provided' }); + } + + // Get project root + const projectRoot = await extractProjectDirectory(projectName).catch(() => null); + if (!projectRoot) { + return res.status(404).json({ error: 'Project not found' }); + } + + console.log('[DEBUG] Project root:', projectRoot); + + // Validate and resolve target path + // If targetPath is empty or '.', use project root directly + const targetDir = targetPath || ''; + let resolvedTargetDir; + + console.log('[DEBUG] Target dir:', JSON.stringify(targetDir)); + + if (!targetDir || targetDir === '.' || targetDir === './') { + // Empty path means upload to project root + resolvedTargetDir = path.resolve(projectRoot); + console.log('[DEBUG] Using project root as target:', resolvedTargetDir); + } else { + const validation = validatePathInProject(projectRoot, targetDir); + if (!validation.valid) { + console.log('[DEBUG] Path validation failed:', validation.error); + return res.status(403).json({ error: validation.error }); + } + resolvedTargetDir = validation.resolved; + console.log('[DEBUG] Resolved target dir:', resolvedTargetDir); + } + + // Ensure target directory exists + try { + await fsPromises.access(resolvedTargetDir); + } catch { + await fsPromises.mkdir(resolvedTargetDir, { recursive: true }); + } + + // Move uploaded files from temp to target directory + const uploadedFiles = []; + console.log('[DEBUG] Processing files:', req.files.map(f => ({ originalname: f.originalname, path: f.path }))); + for (let i = 0; i < req.files.length; i++) { + const file = req.files[i]; + // Use relative path if provided (for folder uploads), otherwise use originalname + const fileName = (filePaths && filePaths[i]) ? filePaths[i] : file.originalname; + console.log('[DEBUG] Processing file:', fileName, '(originalname:', file.originalname + ')'); + const destPath = path.join(resolvedTargetDir, fileName); + + // Validate destination path + const destValidation = validatePathInProject(projectRoot, destPath); + if (!destValidation.valid) { + console.log('[DEBUG] Destination validation failed for:', destPath); + // Clean up temp file + await fsPromises.unlink(file.path).catch(() => {}); + continue; + } + + // Ensure parent directory exists (for nested files from folder upload) + const parentDir = path.dirname(destPath); + try { + await fsPromises.access(parentDir); + } catch { + await fsPromises.mkdir(parentDir, { recursive: true }); + } + + // Move file (copy + unlink to handle cross-device scenarios) + await fsPromises.copyFile(file.path, destPath); + await fsPromises.unlink(file.path); + + uploadedFiles.push({ + name: fileName, + path: destPath, + size: file.size, + mimeType: file.mimetype + }); + } + + res.json({ + success: true, + files: uploadedFiles, + targetPath: resolvedTargetDir, + message: `Uploaded ${uploadedFiles.length} file(s) successfully` + }); + } catch (error) { + console.error('Error uploading files:', error); + // Clean up any remaining temp files + if (req.files) { + for (const file of req.files) { + await fsPromises.unlink(file.path).catch(() => {}); + } + } + if (error.code === 'EACCES') { + res.status(403).json({ error: 'Permission denied' }); + } else { + res.status(500).json({ error: error.message }); + } + } + }); +}; + +app.post('/api/projects/:projectName/files/upload', authenticateToken, uploadFilesHandler); + +// WebSocket connection handler that routes based on URL path +wss.on('connection', (ws, request) => { + const url = request.url; + console.log('[INFO] Client connected to:', url); + + // Parse URL to get pathname without query parameters + const urlObj = new URL(url, 'http://localhost'); + const pathname = urlObj.pathname; + + if (pathname === '/shell') { + handleShellConnection(ws); + } else if (pathname === '/ws') { + handleChatConnection(ws); + } else { + console.log('[WARN] Unknown WebSocket path:', pathname); + ws.close(); + } +}); + +/** + * WebSocket Writer - Wrapper for WebSocket to match SSEStreamWriter interface + */ +class WebSocketWriter { + constructor(ws) { + this.ws = ws; + this.sessionId = null; + this.isWebSocketWriter = true; // Marker for transport detection + } + + send(data) { + if (this.ws.readyState === 1) { // WebSocket.OPEN + // Providers send raw objects, we stringify for WebSocket + this.ws.send(JSON.stringify(data)); + } + } + + updateWebSocket(newRawWs) { + this.ws = newRawWs; + } + + setSessionId(sessionId) { + this.sessionId = sessionId; + } + + getSessionId() { + return this.sessionId; + } +} + +// Handle chat WebSocket connections +function handleChatConnection(ws) { + console.log('[INFO] Chat WebSocket connected'); + + // Add to connected clients for project updates + connectedClients.add(ws); + + // Wrap WebSocket with writer for consistent interface with SSEStreamWriter + const writer = new WebSocketWriter(ws); + + ws.on('message', async (message) => { + try { + const data = JSON.parse(message); + + if (data.type === 'claude-command') { + console.log('[DEBUG] User message:', data.command || '[Continue/Resume]'); + console.log('๐Ÿ“ Project:', data.options?.projectPath || 'Unknown'); + console.log('๐Ÿ”„ Session:', data.options?.sessionId ? 'Resume' : 'New'); + + // Use Claude Agents SDK + await queryClaudeSDK(data.command, data.options, writer); + } else if (data.type === 'cursor-command') { + console.log('[DEBUG] Cursor message:', data.command || '[Continue/Resume]'); + console.log('๐Ÿ“ Project:', data.options?.cwd || 'Unknown'); + console.log('๐Ÿ”„ Session:', data.options?.sessionId ? 'Resume' : 'New'); + console.log('๐Ÿค– Model:', data.options?.model || 'default'); + await spawnCursor(data.command, data.options, writer); + } else if (data.type === 'codex-command') { + console.log('[DEBUG] Codex message:', data.command || '[Continue/Resume]'); + console.log('๐Ÿ“ Project:', data.options?.projectPath || data.options?.cwd || 'Unknown'); + console.log('๐Ÿ”„ Session:', data.options?.sessionId ? 'Resume' : 'New'); + console.log('๐Ÿค– Model:', data.options?.model || 'default'); + await queryCodex(data.command, data.options, writer); + } else if (data.type === 'gemini-command') { + console.log('[DEBUG] Gemini message:', data.command || '[Continue/Resume]'); + console.log('๐Ÿ“ Project:', data.options?.projectPath || data.options?.cwd || 'Unknown'); + console.log('๐Ÿ”„ Session:', data.options?.sessionId ? 'Resume' : 'New'); + console.log('๐Ÿค– Model:', data.options?.model || 'default'); + await spawnGemini(data.command, data.options, writer); + } else if (data.type === 'cursor-resume') { + // Backward compatibility: treat as cursor-command with resume and no prompt + console.log('[DEBUG] Cursor resume session (compat):', data.sessionId); + await spawnCursor('', { + sessionId: data.sessionId, + resume: true, + cwd: data.options?.cwd + }, writer); + } else if (data.type === 'abort-session') { + console.log('[DEBUG] Abort session request:', data.sessionId); + const provider = data.provider || 'claude'; + let success; + + if (provider === 'cursor') { + success = abortCursorSession(data.sessionId); + } else if (provider === 'codex') { + success = abortCodexSession(data.sessionId); + } else if (provider === 'gemini') { + success = abortGeminiSession(data.sessionId); + } else { + // Use Claude Agents SDK + success = await abortClaudeSDKSession(data.sessionId); + } + + writer.send({ + type: 'session-aborted', + sessionId: data.sessionId, + provider, + success + }); + } else if (data.type === 'claude-permission-response') { + // Relay UI approval decisions back into the SDK control flow. + // This does not persist permissions; it only resolves the in-flight request, + // introduced so the SDK can resume once the user clicks Allow/Deny. + if (data.requestId) { + resolveToolApproval(data.requestId, { + allow: Boolean(data.allow), + updatedInput: data.updatedInput, + message: data.message, + rememberEntry: data.rememberEntry + }); + } + } else if (data.type === 'cursor-abort') { + console.log('[DEBUG] Abort Cursor session:', data.sessionId); + const success = abortCursorSession(data.sessionId); + writer.send({ + type: 'session-aborted', + sessionId: data.sessionId, + provider: 'cursor', + success + }); + } else if (data.type === 'check-session-status') { + // Check if a specific session is currently processing + const provider = data.provider || 'claude'; + const sessionId = data.sessionId; + let isActive; + + if (provider === 'cursor') { + isActive = isCursorSessionActive(sessionId); + } else if (provider === 'codex') { + isActive = isCodexSessionActive(sessionId); + } else if (provider === 'gemini') { + isActive = isGeminiSessionActive(sessionId); + } else { + // Use Claude Agents SDK + isActive = isClaudeSDKSessionActive(sessionId); + if (isActive) { + // Reconnect the session's writer to the new WebSocket so + // subsequent SDK output flows to the refreshed client. + reconnectSessionWriter(sessionId, ws); + } + } + + writer.send({ + type: 'session-status', + sessionId, + provider, + isProcessing: isActive + }); + } else if (data.type === 'get-pending-permissions') { + // Return pending permission requests for a session + const sessionId = data.sessionId; + if (sessionId && isClaudeSDKSessionActive(sessionId)) { + const pending = getPendingApprovalsForSession(sessionId); + writer.send({ + type: 'pending-permissions-response', + sessionId, + data: pending + }); + } + } else if (data.type === 'get-active-sessions') { + // Get all currently active sessions + const activeSessions = { + claude: getActiveClaudeSDKSessions(), + cursor: getActiveCursorSessions(), + codex: getActiveCodexSessions(), + gemini: getActiveGeminiSessions() + }; + writer.send({ + type: 'active-sessions', + sessions: activeSessions + }); + } + } catch (error) { + console.error('[ERROR] Chat WebSocket error:', error.message); + writer.send({ + type: 'error', + error: error.message + }); + } + }); + + ws.on('close', () => { + console.log('๐Ÿ”Œ Chat client disconnected'); + // Remove from connected clients + connectedClients.delete(ws); + }); +} + +// Handle shell WebSocket connections +function handleShellConnection(ws) { + console.log('๐Ÿš Shell client connected'); + let shellProcess = null; + let ptySessionKey = null; + let urlDetectionBuffer = ''; + const announcedAuthUrls = new Set(); + + ws.on('message', async (message) => { + try { + const data = JSON.parse(message); + console.log('๐Ÿ“จ Shell message received:', data.type); + + if (data.type === 'init') { + const projectPath = data.projectPath || process.cwd(); + const sessionId = data.sessionId; + const hasSession = data.hasSession; + const provider = data.provider || 'claude'; + const initialCommand = data.initialCommand; + const isPlainShell = data.isPlainShell || (!!initialCommand && !hasSession) || provider === 'plain-shell'; + urlDetectionBuffer = ''; + announcedAuthUrls.clear(); + + // Login commands (Claude/Cursor auth) should never reuse cached sessions + const isLoginCommand = initialCommand && ( + initialCommand.includes('setup-token') || + initialCommand.includes('cursor-agent login') || + initialCommand.includes('auth login') + ); + + // Include command hash in session key so different commands get separate sessions + const commandSuffix = isPlainShell && initialCommand + ? `_cmd_${Buffer.from(initialCommand).toString('base64').slice(0, 16)}` + : ''; + ptySessionKey = `${projectPath}_${sessionId || 'default'}${commandSuffix}`; + + // Kill any existing login session before starting fresh + if (isLoginCommand) { + const oldSession = ptySessionsMap.get(ptySessionKey); + if (oldSession) { + console.log('๐Ÿงน Cleaning up existing login session:', ptySessionKey); + if (oldSession.timeoutId) clearTimeout(oldSession.timeoutId); + if (oldSession.pty && oldSession.pty.kill) oldSession.pty.kill(); + ptySessionsMap.delete(ptySessionKey); + } + } + + const existingSession = isLoginCommand ? null : ptySessionsMap.get(ptySessionKey); + if (existingSession) { + console.log('โ™ป๏ธ Reconnecting to existing PTY session:', ptySessionKey); + shellProcess = existingSession.pty; + + clearTimeout(existingSession.timeoutId); + + ws.send(JSON.stringify({ + type: 'output', + data: `\x1b[36m[Reconnected to existing session]\x1b[0m\r\n` + })); + + if (existingSession.buffer && existingSession.buffer.length > 0) { + console.log(`๐Ÿ“œ Sending ${existingSession.buffer.length} buffered messages`); + existingSession.buffer.forEach(bufferedData => { + ws.send(JSON.stringify({ + type: 'output', + data: bufferedData + })); + }); + } + + existingSession.ws = ws; + + return; + } + + console.log('[INFO] Starting shell in:', projectPath); + console.log('๐Ÿ“‹ Session info:', hasSession ? `Resume session ${sessionId}` : (isPlainShell ? 'Plain shell mode' : 'New session')); + console.log('๐Ÿค– Provider:', isPlainShell ? 'plain-shell' : provider); + if (initialCommand) { + console.log('โšก Initial command:', initialCommand); + } + + // First send a welcome message + let welcomeMsg; + if (isPlainShell) { + welcomeMsg = `\x1b[36mStarting terminal in: ${projectPath}\x1b[0m\r\n`; + } else { + const providerName = provider === 'cursor' ? 'Cursor' : (provider === 'codex' ? 'Codex' : (provider === 'gemini' ? 'Gemini' : 'Claude')); + welcomeMsg = hasSession ? + `\x1b[36mResuming ${providerName} session ${sessionId} in: ${projectPath}\x1b[0m\r\n` : + `\x1b[36mStarting new ${providerName} session in: ${projectPath}\x1b[0m\r\n`; + } + + ws.send(JSON.stringify({ + type: 'output', + data: welcomeMsg + })); + + try { + // Validate projectPath โ€” resolve to absolute and verify it exists + const resolvedProjectPath = path.resolve(projectPath); + try { + const stats = fs.statSync(resolvedProjectPath); + if (!stats.isDirectory()) { + throw new Error('Not a directory'); + } + } catch (pathErr) { + ws.send(JSON.stringify({ type: 'error', message: 'Invalid project path' })); + return; + } + + // Validate sessionId โ€” only allow safe characters + const safeSessionIdPattern = /^[a-zA-Z0-9_.\-:]+$/; + if (sessionId && !safeSessionIdPattern.test(sessionId)) { + ws.send(JSON.stringify({ type: 'error', message: 'Invalid session ID' })); + return; + } + + // Build shell command โ€” use cwd for project path (never interpolate into shell string) + let shellCommand; + if (isPlainShell) { + // Plain shell mode - run the initial command in the project directory + shellCommand = initialCommand; + } else if (provider === 'cursor') { + if (hasSession && sessionId) { + shellCommand = `cursor-agent --resume="${sessionId}"`; + } else { + shellCommand = 'cursor-agent'; + } + } else if (provider === 'codex') { + // Use codex command; attempt to resume and fall back to a new session when the resume fails. + if (hasSession && sessionId) { + if (os.platform() === 'win32') { + // PowerShell syntax for fallback + shellCommand = `codex resume "${sessionId}"; if ($LASTEXITCODE -ne 0) { codex }`; + } else { + shellCommand = `codex resume "${sessionId}" || codex`; + } + } else { + shellCommand = 'codex'; + } + } else if (provider === 'gemini') { + const command = initialCommand || 'gemini'; + let resumeId = sessionId; + if (hasSession && sessionId) { + try { + // Gemini CLI enforces its own native session IDs, unlike other agents that accept arbitrary string names. + // The UI only knows about its internal generated `sessionId` (e.g. gemini_1234). + // We must fetch the mapping from the backend session manager to pass the native `cliSessionId` to the shell. + const sess = sessionManager.getSession(sessionId); + if (sess && sess.cliSessionId) { + resumeId = sess.cliSessionId; + // Validate the looked-up CLI session ID too + if (!safeSessionIdPattern.test(resumeId)) { + resumeId = null; + } + } + } catch (err) { + console.error('Failed to get Gemini CLI session ID:', err); + } + } + + if (hasSession && resumeId) { + shellCommand = `${command} --resume "${resumeId}"`; + } else { + shellCommand = command; + } + } else { + // Claude (default provider) + const command = initialCommand || 'claude'; + if (hasSession && sessionId) { + if (os.platform() === 'win32') { + shellCommand = `claude --resume "${sessionId}"; if ($LASTEXITCODE -ne 0) { claude }`; + } else { + shellCommand = `claude --resume "${sessionId}" || claude`; + } + } else { + shellCommand = command; + } + } + + console.log('๐Ÿ”ง Executing shell command:', shellCommand); + + // Use appropriate shell based on platform + const shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash'; + const shellArgs = os.platform() === 'win32' ? ['-Command', shellCommand] : ['-c', shellCommand]; + + // Use terminal dimensions from client if provided, otherwise use defaults + const termCols = data.cols || 80; + const termRows = data.rows || 24; + console.log('๐Ÿ“ Using terminal dimensions:', termCols, 'x', termRows); + + shellProcess = pty.spawn(shell, shellArgs, { + name: 'xterm-256color', + cols: termCols, + rows: termRows, + cwd: resolvedProjectPath, + env: { + ...process.env, + TERM: 'xterm-256color', + COLORTERM: 'truecolor', + FORCE_COLOR: '3' + } + }); + + console.log('๐ŸŸข Shell process started with PTY, PID:', shellProcess.pid); + + ptySessionsMap.set(ptySessionKey, { + pty: shellProcess, + ws: ws, + buffer: [], + timeoutId: null, + projectPath, + sessionId + }); + + // Handle data output + shellProcess.onData((data) => { + const session = ptySessionsMap.get(ptySessionKey); + if (!session) return; + + if (session.buffer.length < 5000) { + session.buffer.push(data); + } else { + session.buffer.shift(); + session.buffer.push(data); + } + + if (session.ws && session.ws.readyState === WebSocket.OPEN) { + let outputData = data; + + const cleanChunk = stripAnsiSequences(data); + urlDetectionBuffer = `${urlDetectionBuffer}${cleanChunk}`.slice(-SHELL_URL_PARSE_BUFFER_LIMIT); + + outputData = outputData.replace( + /OPEN_URL:\s*(https?:\/\/[^\s\x1b\x07]+)/g, + '[INFO] Opening in browser: $1' + ); + + const emitAuthUrl = (detectedUrl, autoOpen = false) => { + const normalizedUrl = normalizeDetectedUrl(detectedUrl); + if (!normalizedUrl) return; + + const isNewUrl = !announcedAuthUrls.has(normalizedUrl); + if (isNewUrl) { + announcedAuthUrls.add(normalizedUrl); + session.ws.send(JSON.stringify({ + type: 'auth_url', + url: normalizedUrl, + autoOpen + })); + } + + }; + + const normalizedDetectedUrls = extractUrlsFromText(urlDetectionBuffer) + .map((url) => normalizeDetectedUrl(url)) + .filter(Boolean); + + // Prefer the most complete URL if shorter prefix variants are also present. + const dedupedDetectedUrls = Array.from(new Set(normalizedDetectedUrls)).filter((url, _, urls) => + !urls.some((otherUrl) => otherUrl !== url && otherUrl.startsWith(url)) + ); + + dedupedDetectedUrls.forEach((url) => emitAuthUrl(url, false)); + + if (shouldAutoOpenUrlFromOutput(cleanChunk) && dedupedDetectedUrls.length > 0) { + const bestUrl = dedupedDetectedUrls.reduce((longest, current) => + current.length > longest.length ? current : longest + ); + emitAuthUrl(bestUrl, true); + } + + // Send regular output + session.ws.send(JSON.stringify({ + type: 'output', + data: outputData + })); + } + }); + + // Handle process exit + shellProcess.onExit((exitCode) => { + console.log('๐Ÿ”š Shell process exited with code:', exitCode.exitCode, 'signal:', exitCode.signal); + const session = ptySessionsMap.get(ptySessionKey); + if (session && session.ws && session.ws.readyState === WebSocket.OPEN) { + session.ws.send(JSON.stringify({ + type: 'output', + data: `\r\n\x1b[33mProcess exited with code ${exitCode.exitCode}${exitCode.signal ? ` (${exitCode.signal})` : ''}\x1b[0m\r\n` + })); + } + if (session && session.timeoutId) { + clearTimeout(session.timeoutId); + } + ptySessionsMap.delete(ptySessionKey); + shellProcess = null; + }); + + } catch (spawnError) { + console.error('[ERROR] Error spawning process:', spawnError); + ws.send(JSON.stringify({ + type: 'output', + data: `\r\n\x1b[31mError: ${spawnError.message}\x1b[0m\r\n` + })); + } + + } else if (data.type === 'input') { + // Send input to shell process + if (shellProcess && shellProcess.write) { + try { + shellProcess.write(data.data); + } catch (error) { + console.error('Error writing to shell:', error); + } + } else { + console.warn('No active shell process to send input to'); + } + } else if (data.type === 'resize') { + // Handle terminal resize + if (shellProcess && shellProcess.resize) { + console.log('Terminal resize requested:', data.cols, 'x', data.rows); + shellProcess.resize(data.cols, data.rows); + } + } + } catch (error) { + console.error('[ERROR] Shell WebSocket error:', error.message); + if (ws.readyState === WebSocket.OPEN) { + ws.send(JSON.stringify({ + type: 'output', + data: `\r\n\x1b[31mError: ${error.message}\x1b[0m\r\n` + })); + } + } + }); + + ws.on('close', () => { + console.log('๐Ÿ”Œ Shell client disconnected'); + + if (ptySessionKey) { + const session = ptySessionsMap.get(ptySessionKey); + if (session) { + console.log('โณ PTY session kept alive, will timeout in 30 minutes:', ptySessionKey); + session.ws = null; + + session.timeoutId = setTimeout(() => { + console.log('โฐ PTY session timeout, killing process:', ptySessionKey); + if (session.pty && session.pty.kill) { + session.pty.kill(); + } + ptySessionsMap.delete(ptySessionKey); + }, PTY_SESSION_TIMEOUT); + } + } + }); + + ws.on('error', (error) => { + console.error('[ERROR] Shell WebSocket error:', error); + }); +} +// Audio transcription endpoint +app.post('/api/transcribe', authenticateToken, async (req, res) => { + try { + const multer = (await import('multer')).default; + const upload = multer({ storage: multer.memoryStorage() }); + + // Handle multipart form data + upload.single('audio')(req, res, async (err) => { + if (err) { + return res.status(400).json({ error: 'Failed to process audio file' }); + } + + if (!req.file) { + return res.status(400).json({ error: 'No audio file provided' }); + } + + const apiKey = process.env.OPENAI_API_KEY; + if (!apiKey) { + return res.status(500).json({ error: 'OpenAI API key not configured. Please set OPENAI_API_KEY in server environment.' }); + } + + try { + // Create form data for OpenAI + const FormData = (await import('form-data')).default; + const formData = new FormData(); + formData.append('file', req.file.buffer, { + filename: req.file.originalname, + contentType: req.file.mimetype + }); + formData.append('model', 'whisper-1'); + formData.append('response_format', 'json'); + formData.append('language', 'en'); + + // Make request to OpenAI + const response = await fetch('https://api.openai.com/v1/audio/transcriptions', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${apiKey}`, + ...formData.getHeaders() + }, + body: formData + }); + + if (!response.ok) { + const errorData = await response.json().catch(() => ({})); + throw new Error(errorData.error?.message || `Whisper API error: ${response.status}`); + } + + const data = await response.json(); + let transcribedText = data.text || ''; + + // Check if enhancement mode is enabled + const mode = req.body.mode || 'default'; + + // If no transcribed text, return empty + if (!transcribedText) { + return res.json({ text: '' }); + } + + // If default mode, return transcribed text without enhancement + if (mode === 'default') { + return res.json({ text: transcribedText }); + } + + // Handle different enhancement modes + try { + const OpenAI = (await import('openai')).default; + const openai = new OpenAI({ apiKey }); + + let prompt, systemMessage, temperature = 0.7, maxTokens = 800; + + switch (mode) { + case 'prompt': + systemMessage = 'You are an expert prompt engineer who creates clear, detailed, and effective prompts.'; + prompt = `You are an expert prompt engineer. Transform the following rough instruction into a clear, detailed, and context-aware AI prompt. + +Your enhanced prompt should: +1. Be specific and unambiguous +2. Include relevant context and constraints +3. Specify the desired output format +4. Use clear, actionable language +5. Include examples where helpful +6. Consider edge cases and potential ambiguities + +Transform this rough instruction into a well-crafted prompt: +"${transcribedText}" + +Enhanced prompt:`; + break; + + case 'vibe': + case 'instructions': + case 'architect': + systemMessage = 'You are a helpful assistant that formats ideas into clear, actionable instructions for AI agents.'; + temperature = 0.5; // Lower temperature for more controlled output + prompt = `Transform the following idea into clear, well-structured instructions that an AI agent can easily understand and execute. + +IMPORTANT RULES: +- Format as clear, step-by-step instructions +- Add reasonable implementation details based on common patterns +- Only include details directly related to what was asked +- Do NOT add features or functionality not mentioned +- Keep the original intent and scope intact +- Use clear, actionable language an agent can follow + +Transform this idea into agent-friendly instructions: +"${transcribedText}" + +Agent instructions:`; + break; + + default: + // No enhancement needed + break; + } + + // Only make GPT call if we have a prompt + if (prompt) { + const completion = await openai.chat.completions.create({ + model: 'gpt-4o-mini', + messages: [ + { role: 'system', content: systemMessage }, + { role: 'user', content: prompt } + ], + temperature: temperature, + max_tokens: maxTokens + }); + + transcribedText = completion.choices[0].message.content || transcribedText; + } + + } catch (gptError) { + console.error('GPT processing error:', gptError); + // Fall back to original transcription if GPT fails + } + + res.json({ text: transcribedText }); + + } catch (error) { + console.error('Transcription error:', error); + res.status(500).json({ error: error.message }); + } + }); + } catch (error) { + console.error('Endpoint error:', error); + res.status(500).json({ error: 'Internal server error' }); + } +}); + +// Image upload endpoint +app.post('/api/projects/:projectName/upload-images', authenticateToken, async (req, res) => { + try { + const multer = (await import('multer')).default; + const path = (await import('path')).default; + const fs = (await import('fs')).promises; + const os = (await import('os')).default; + + // Configure multer for image uploads + const storage = multer.diskStorage({ + destination: async (req, file, cb) => { + const uploadDir = path.join(os.tmpdir(), 'claude-ui-uploads', String(req.user.id)); + await fs.mkdir(uploadDir, { recursive: true }); + cb(null, uploadDir); + }, + filename: (req, file, cb) => { + const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9); + const sanitizedName = file.originalname.replace(/[^a-zA-Z0-9.-]/g, '_'); + cb(null, uniqueSuffix + '-' + sanitizedName); + } + }); + + const fileFilter = (req, file, cb) => { + const allowedMimes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/svg+xml']; + if (allowedMimes.includes(file.mimetype)) { + cb(null, true); + } else { + cb(new Error('Invalid file type. Only JPEG, PNG, GIF, WebP, and SVG are allowed.')); + } + }; + + const upload = multer({ + storage, + fileFilter, + limits: { + fileSize: 5 * 1024 * 1024, // 5MB + files: 5 + } + }); + + // Handle multipart form data + upload.array('images', 5)(req, res, async (err) => { + if (err) { + return res.status(400).json({ error: err.message }); + } + + if (!req.files || req.files.length === 0) { + return res.status(400).json({ error: 'No image files provided' }); + } + + try { + // Process uploaded images + const processedImages = await Promise.all( + req.files.map(async (file) => { + // Read file and convert to base64 + const buffer = await fs.readFile(file.path); + const base64 = buffer.toString('base64'); + const mimeType = file.mimetype; + + // Clean up temp file immediately + await fs.unlink(file.path); + + return { + name: file.originalname, + data: `data:${mimeType};base64,${base64}`, + size: file.size, + mimeType: mimeType + }; + }) + ); + + res.json({ images: processedImages }); + } catch (error) { + console.error('Error processing images:', error); + // Clean up any remaining files + await Promise.all(req.files.map(f => fs.unlink(f.path).catch(() => { }))); + res.status(500).json({ error: 'Failed to process images' }); + } + }); + } catch (error) { + console.error('Error in image upload endpoint:', error); + res.status(500).json({ error: 'Internal server error' }); + } +}); + +// Get token usage for a specific session +app.get('/api/projects/:projectName/sessions/:sessionId/token-usage', authenticateToken, async (req, res) => { + try { + const { projectName, sessionId } = req.params; + const { provider = 'claude' } = req.query; + const homeDir = os.homedir(); + + // Allow only safe characters in sessionId + const safeSessionId = String(sessionId).replace(/[^a-zA-Z0-9._-]/g, ''); + if (!safeSessionId || safeSessionId !== String(sessionId)) { + return res.status(400).json({ error: 'Invalid sessionId' }); + } + + // Handle Cursor sessions - they use SQLite and don't have token usage info + if (provider === 'cursor') { + return res.json({ + used: 0, + total: 0, + breakdown: { input: 0, cacheCreation: 0, cacheRead: 0 }, + unsupported: true, + message: 'Token usage tracking not available for Cursor sessions' + }); + } + + // Handle Gemini sessions - they are raw logs in our current setup + if (provider === 'gemini') { + return res.json({ + used: 0, + total: 0, + breakdown: { input: 0, cacheCreation: 0, cacheRead: 0 }, + unsupported: true, + message: 'Token usage tracking not available for Gemini sessions' + }); + } + + // Handle Codex sessions + if (provider === 'codex') { + const codexSessionsDir = path.join(homeDir, '.codex', 'sessions'); + + // Find the session file by searching for the session ID + const findSessionFile = async (dir) => { + try { + const entries = await fsPromises.readdir(dir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + const found = await findSessionFile(fullPath); + if (found) return found; + } else if (entry.name.includes(safeSessionId) && entry.name.endsWith('.jsonl')) { + return fullPath; + } + } + } catch (error) { + // Skip directories we can't read + } + return null; + }; + + const sessionFilePath = await findSessionFile(codexSessionsDir); + + if (!sessionFilePath) { + return res.status(404).json({ error: 'Codex session file not found', sessionId: safeSessionId }); + } + + // Read and parse the Codex JSONL file + let fileContent; + try { + fileContent = await fsPromises.readFile(sessionFilePath, 'utf8'); + } catch (error) { + if (error.code === 'ENOENT') { + return res.status(404).json({ error: 'Session file not found', path: sessionFilePath }); + } + throw error; + } + const lines = fileContent.trim().split('\n'); + let totalTokens = 0; + let contextWindow = 200000; // Default for Codex/OpenAI + + // Find the latest token_count event with info (scan from end) + for (let i = lines.length - 1; i >= 0; i--) { + try { + const entry = JSON.parse(lines[i]); + + // Codex stores token info in event_msg with type: "token_count" + if (entry.type === 'event_msg' && entry.payload?.type === 'token_count' && entry.payload?.info) { + const tokenInfo = entry.payload.info; + if (tokenInfo.total_token_usage) { + totalTokens = tokenInfo.total_token_usage.total_tokens || 0; + } + if (tokenInfo.model_context_window) { + contextWindow = tokenInfo.model_context_window; + } + break; // Stop after finding the latest token count + } + } catch (parseError) { + // Skip lines that can't be parsed + continue; + } + } + + return res.json({ + used: totalTokens, + total: contextWindow + }); + } + + // Handle Claude sessions (default) + // Extract actual project path + let projectPath; + try { + projectPath = await extractProjectDirectory(projectName); + } catch (error) { + console.error('Error extracting project directory:', error); + return res.status(500).json({ error: 'Failed to determine project path' }); + } + + // Construct the JSONL file path + // Claude stores session files in ~/.claude/projects/[encoded-project-path]/[session-id].jsonl + // The encoding replaces any non-alphanumeric character (except -) with - + const encodedPath = projectPath.replace(/[^a-zA-Z0-9-]/g, '-'); + const projectDir = path.join(homeDir, '.claude', 'projects', encodedPath); + + const jsonlPath = path.join(projectDir, `${safeSessionId}.jsonl`); + + // Constrain to projectDir + const rel = path.relative(path.resolve(projectDir), path.resolve(jsonlPath)); + if (rel.startsWith('..') || path.isAbsolute(rel)) { + return res.status(400).json({ error: 'Invalid path' }); + } + + // Read and parse the JSONL file + let fileContent; + try { + fileContent = await fsPromises.readFile(jsonlPath, 'utf8'); + } catch (error) { + if (error.code === 'ENOENT') { + return res.status(404).json({ error: 'Session file not found', path: jsonlPath }); + } + throw error; // Re-throw other errors to be caught by outer try-catch + } + const lines = fileContent.trim().split('\n'); + + const parsedContextWindow = parseInt(process.env.CONTEXT_WINDOW, 10); + const contextWindow = Number.isFinite(parsedContextWindow) ? parsedContextWindow : 160000; + let inputTokens = 0; + let cacheCreationTokens = 0; + let cacheReadTokens = 0; + + // Find the latest assistant message with usage data (scan from end) + for (let i = lines.length - 1; i >= 0; i--) { + try { + const entry = JSON.parse(lines[i]); + + // Only count assistant messages which have usage data + if (entry.type === 'assistant' && entry.message?.usage) { + const usage = entry.message.usage; + + // Use token counts from latest assistant message only + inputTokens = usage.input_tokens || 0; + cacheCreationTokens = usage.cache_creation_input_tokens || 0; + cacheReadTokens = usage.cache_read_input_tokens || 0; + + break; // Stop after finding the latest assistant message + } + } catch (parseError) { + // Skip lines that can't be parsed + continue; + } + } + + // Calculate total context usage (excluding output_tokens, as per ccusage) + const totalUsed = inputTokens + cacheCreationTokens + cacheReadTokens; + + res.json({ + used: totalUsed, + total: contextWindow, + breakdown: { + input: inputTokens, + cacheCreation: cacheCreationTokens, + cacheRead: cacheReadTokens + } + }); + } catch (error) { + console.error('Error reading session token usage:', error); + res.status(500).json({ error: 'Failed to read session token usage' }); + } +}); + +// Serve React app for all other routes (excluding static files) +app.get('*', (req, res) => { + // Skip requests for static assets (files with extensions) + if (path.extname(req.path)) { + return res.status(404).send('Not found'); + } + + // Only serve index.html for HTML routes, not for static assets + // Static assets should already be handled by express.static middleware above + const indexPath = path.join(__dirname, '../dist/index.html'); + + // Check if dist/index.html exists (production build available) + if (fs.existsSync(indexPath)) { + // Set no-cache headers for HTML to prevent service worker issues + res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate'); + res.setHeader('Pragma', 'no-cache'); + res.setHeader('Expires', '0'); + res.sendFile(indexPath); + } else { + // In development, redirect to Vite dev server only if dist doesn't exist + const redirectHost = getConnectableHost(req.hostname); + res.redirect(`${req.protocol}://${redirectHost}:${VITE_PORT}`); + } +}); + +// Helper function to convert permissions to rwx format +function permToRwx(perm) { + const r = perm & 4 ? 'r' : '-'; + const w = perm & 2 ? 'w' : '-'; + const x = perm & 1 ? 'x' : '-'; + return r + w + x; +} + +async function getFileTree(dirPath, maxDepth = 3, currentDepth = 0, showHidden = true) { + // Using fsPromises from import + const items = []; + + try { + const entries = await fsPromises.readdir(dirPath, { withFileTypes: true }); + + for (const entry of entries) { + // Debug: log all entries including hidden files + + + // Skip heavy build directories and VCS directories + if (entry.name === 'node_modules' || + entry.name === 'dist' || + entry.name === 'build' || + entry.name === '.git' || + entry.name === '.svn' || + entry.name === '.hg') continue; + + const itemPath = path.join(dirPath, entry.name); + const item = { + name: entry.name, + path: itemPath, + type: entry.isDirectory() ? 'directory' : 'file' + }; + + // Get file stats for additional metadata + try { + const stats = await fsPromises.stat(itemPath); + item.size = stats.size; + item.modified = stats.mtime.toISOString(); + + // Convert permissions to rwx format + const mode = stats.mode; + const ownerPerm = (mode >> 6) & 7; + const groupPerm = (mode >> 3) & 7; + const otherPerm = mode & 7; + item.permissions = ((mode >> 6) & 7).toString() + ((mode >> 3) & 7).toString() + (mode & 7).toString(); + item.permissionsRwx = permToRwx(ownerPerm) + permToRwx(groupPerm) + permToRwx(otherPerm); + } catch (statError) { + // If stat fails, provide default values + item.size = 0; + item.modified = null; + item.permissions = '000'; + item.permissionsRwx = '---------'; + } + + if (entry.isDirectory() && currentDepth < maxDepth) { + // Recursively get subdirectories but limit depth + try { + // Check if we can access the directory before trying to read it + await fsPromises.access(item.path, fs.constants.R_OK); + item.children = await getFileTree(item.path, maxDepth, currentDepth + 1, showHidden); + } catch (e) { + // Silently skip directories we can't access (permission denied, etc.) + item.children = []; + } + } + + items.push(item); + } + } catch (error) { + // Only log non-permission errors to avoid spam + if (error.code !== 'EACCES' && error.code !== 'EPERM') { + console.error('Error reading directory:', error); + } + } + + return items.sort((a, b) => { + if (a.type !== b.type) { + return a.type === 'directory' ? -1 : 1; + } + return a.name.localeCompare(b.name); + }); +} + +const SERVER_PORT = process.env.SERVER_PORT || 3001; +const HOST = process.env.HOST || '0.0.0.0'; +const DISPLAY_HOST = getConnectableHost(HOST); +const VITE_PORT = process.env.VITE_PORT || 5173; + +// Initialize database and start server +async function startServer() { + try { + // Initialize authentication database + await initializeDatabase(); + + // Check if running in production mode (dist folder exists) + const distIndexPath = path.join(__dirname, '../dist/index.html'); + const isProduction = fs.existsSync(distIndexPath); + + // Log Claude implementation mode + console.log(`${c.info('[INFO]')} Using Claude Agents SDK for Claude integration`); + console.log(''); + + if (isProduction) { + console.log(`${c.info('[INFO]')} To run in production mode, go to http://${DISPLAY_HOST}:${SERVER_PORT}`); + } + + console.log(`${c.info('[INFO]')} To run in development mode with hot-module replacement, go to http://${DISPLAY_HOST}:${VITE_PORT}`); + + server.listen(SERVER_PORT, HOST, async () => { + const appInstallPath = path.join(__dirname, '..'); + + console.log(''); + console.log(c.dim('โ•'.repeat(63))); + console.log(` ${c.bright('Claude Code UI Server - Ready')}`); + console.log(c.dim('โ•'.repeat(63))); + console.log(''); + console.log(`${c.info('[INFO]')} Server URL: ${c.bright('http://' + DISPLAY_HOST + ':' + SERVER_PORT)}`); + console.log(`${c.info('[INFO]')} Installed at: ${c.dim(appInstallPath)}`); + console.log(`${c.tip('[TIP]')} Run "cloudcli status" for full configuration details`); + console.log(''); + + // Start watching the projects folder for changes + await setupProjectsWatcher(); + + // Start server-side plugin processes for enabled plugins + startEnabledPluginServers().catch(err => { + console.error('[Plugins] Error during startup:', err.message); + }); + }); + + // Clean up plugin processes on shutdown + const shutdownPlugins = async () => { + await stopAllPlugins(); + process.exit(0); + }; + process.on('SIGTERM', () => void shutdownPlugins()); + process.on('SIGINT', () => void shutdownPlugins()); + } catch (error) { + console.error('[ERROR] Failed to start server:', error); + process.exit(1); + } +} + +startServer(); diff --git a/server/src/app.ts b/server/src/app.ts new file mode 100644 index 00000000..8d9ec379 --- /dev/null +++ b/server/src/app.ts @@ -0,0 +1,19 @@ +import { pathToFileURL } from 'url'; + +import { getRuntimePaths } from './config/runtime.js'; +import type { ServerApplication } from './shared/types/app.js'; +import { logger } from './shared/utils/logger.js'; + +export function createServerApplication(): ServerApplication { + const runtimePaths = getRuntimePaths(); + + return { + runtimePaths, + start: async () => { + logger.info('Bootstrapping backend via legacy runtime bridge', { + legacyRuntime: runtimePaths.legacyRuntimePath, + }); + await import(pathToFileURL(runtimePaths.legacyRuntimePath).href); + }, + }; +} diff --git a/server/src/bootstrap.ts b/server/src/bootstrap.ts new file mode 100644 index 00000000..e5e9719b --- /dev/null +++ b/server/src/bootstrap.ts @@ -0,0 +1,8 @@ +import { createServerApplication } from './app.js'; + +async function startServerApplication(): Promise { + const application = createServerApplication(); + await application.start(); +} + +await startServerApplication(); diff --git a/server/src/config/runtime.ts b/server/src/config/runtime.ts new file mode 100644 index 00000000..bb11f63d --- /dev/null +++ b/server/src/config/runtime.ts @@ -0,0 +1,20 @@ +import path from 'path'; +import { fileURLToPath } from 'url'; + +import type { RuntimePaths } from '../shared/types/app.js'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +export function getRuntimePaths(): RuntimePaths { + const serverSrcDir = path.resolve(__dirname, '..'); + const serverDir = path.resolve(serverSrcDir, '..'); + + return { + serverSrcDir, + serverDir, + projectRoot: path.resolve(serverDir, '..'), + legacyRuntimePath: path.join(serverDir, 'legacy-runtime.js'), + bootstrapEntrypointPath: path.join(serverDir, 'dist', 'bootstrap.js'), + }; +} diff --git a/server/src/modules/agent/.gitkeep b/server/src/modules/agent/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/agent/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/auth/.gitkeep b/server/src/modules/auth/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/auth/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/cli-auth/.gitkeep b/server/src/modules/cli-auth/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/cli-auth/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/files/.gitkeep b/server/src/modules/files/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/files/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/git/.gitkeep b/server/src/modules/git/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/git/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/projects/.gitkeep b/server/src/modules/projects/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/projects/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/providers/claude/.gitkeep b/server/src/modules/providers/claude/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/providers/claude/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/providers/codex/.gitkeep b/server/src/modules/providers/codex/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/providers/codex/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/providers/cursor/.gitkeep b/server/src/modules/providers/cursor/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/providers/cursor/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/providers/gemini/.gitkeep b/server/src/modules/providers/gemini/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/providers/gemini/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/providers/mcp/.gitkeep b/server/src/modules/providers/mcp/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/providers/mcp/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/providers/plugins/.gitkeep b/server/src/modules/providers/plugins/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/providers/plugins/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/sessions/.gitkeep b/server/src/modules/sessions/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/sessions/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/settings/.gitkeep b/server/src/modules/settings/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/settings/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/taskmaster/.gitkeep b/server/src/modules/taskmaster/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/taskmaster/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/modules/user/.gitkeep b/server/src/modules/user/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/server/src/modules/user/.gitkeep @@ -0,0 +1 @@ + diff --git a/server/src/shared/docs/openapi.ts b/server/src/shared/docs/openapi.ts new file mode 100644 index 00000000..91991b58 --- /dev/null +++ b/server/src/shared/docs/openapi.ts @@ -0,0 +1,21 @@ +export type OpenApiPlan = { + status: 'planned'; + description: string; + nextSteps: string[]; + examples: Record; +}; + +export const openApiPlan: OpenApiPlan = { + status: 'planned', + description: 'Day 1 placeholder for the shared OpenAPI registry and document builder.', + nextSteps: [ + 'Register global tags for auth, projects, files, git, taskmaster, agent, and providers.', + 'Promote the endpoint inventory into explicit request and response schemas.', + 'Publish /api/openapi.json and Swagger UI once schemas are in place.', + ], + examples: { + authTag: 'Auth', + projectsTag: 'Projects', + providerTag: 'Providers', + }, +}; diff --git a/server/src/shared/http/api-response.ts b/server/src/shared/http/api-response.ts new file mode 100644 index 00000000..c9c40f35 --- /dev/null +++ b/server/src/shared/http/api-response.ts @@ -0,0 +1,36 @@ +import type { ApiErrorShape, ApiMeta, ApiSuccessShape } from '../types/http.js'; + +export function createApiMeta(requestId?: string, startedAt?: string): ApiMeta { + return { + requestId, + startedAt, + }; +} + +export function createApiSuccessResponse( + data: TData, + meta?: ApiMeta +): ApiSuccessShape { + return { + success: true, + data, + meta, + }; +} + +export function createApiErrorResponse( + code: string, + message: string, + meta?: ApiMeta, + details?: unknown +): ApiErrorShape { + return { + success: false, + error: { + code, + message, + details, + }, + meta, + }; +} diff --git a/server/src/shared/http/async-handler.ts b/server/src/shared/http/async-handler.ts new file mode 100644 index 00000000..934e1775 --- /dev/null +++ b/server/src/shared/http/async-handler.ts @@ -0,0 +1,9 @@ +import type { NextFunction, Request, RequestHandler, Response } from 'express'; + +export function asyncHandler( + handler: (req: Request, res: Response, next: NextFunction) => Promise +): RequestHandler { + return (req, res, next) => { + void Promise.resolve(handler(req, res, next)).catch(next); + }; +} diff --git a/server/src/shared/http/error-handler.ts b/server/src/shared/http/error-handler.ts new file mode 100644 index 00000000..9c50fe93 --- /dev/null +++ b/server/src/shared/http/error-handler.ts @@ -0,0 +1,30 @@ +import type { NextFunction, Request, Response } from 'express'; + +import { AppError } from '../utils/app-error.js'; +import { logger } from '../utils/logger.js'; +import { createApiErrorResponse, createApiMeta } from './api-response.js'; +import { getRequestContext } from './request-context.js'; + +export function errorHandler( + error: Error, + req: Request, + res: Response, + _next: NextFunction +): void { + const appError = error instanceof AppError ? error : new AppError(error.message); + const context = getRequestContext(req); + const payload = createApiErrorResponse( + appError.code, + appError.message, + createApiMeta(context?.requestId, context?.startedAt), + appError.details + ); + + logger.error(appError.message, { + code: appError.code, + statusCode: appError.statusCode, + requestId: context?.requestId, + }); + + res.status(appError.statusCode).json(payload); +} diff --git a/server/src/shared/http/not-found-handler.ts b/server/src/shared/http/not-found-handler.ts new file mode 100644 index 00000000..dfa19834 --- /dev/null +++ b/server/src/shared/http/not-found-handler.ts @@ -0,0 +1,15 @@ +import type { Request, Response } from 'express'; + +import { createApiErrorResponse, createApiMeta } from './api-response.js'; +import { getRequestContext } from './request-context.js'; + +export function notFoundHandler(req: Request, res: Response): void { + const context = getRequestContext(req); + const payload = createApiErrorResponse( + 'NOT_FOUND', + `Route not found: ${req.originalUrl}`, + createApiMeta(context?.requestId, context?.startedAt) + ); + + res.status(404).json(payload); +} diff --git a/server/src/shared/http/request-context.ts b/server/src/shared/http/request-context.ts new file mode 100644 index 00000000..2f1dfe69 --- /dev/null +++ b/server/src/shared/http/request-context.ts @@ -0,0 +1,27 @@ +import { randomUUID } from 'crypto'; +import type { NextFunction, Request, Response } from 'express'; + +import type { RequestContext } from '../types/http.js'; + +type RequestWithContext = Request & { + context?: RequestContext; +}; + +export function getRequestContext(req: Request): RequestContext | undefined { + return (req as RequestWithContext).context; +} + +// give every request a context with a unique ID and timestamp for tracking purposes +export function requestContextMiddleware(req: Request, res: Response, next: NextFunction): void { + const requestId = randomUUID(); + const startedAt = new Date().toISOString(); + const context: RequestContext = { + requestId, + startedAt, + }; + + (req as RequestWithContext).context = context; + (res.locals as Record).requestId = requestId; + + next(); +} diff --git a/server/src/shared/types/app.ts b/server/src/shared/types/app.ts new file mode 100644 index 00000000..68d70320 --- /dev/null +++ b/server/src/shared/types/app.ts @@ -0,0 +1,19 @@ +import { WebSocketServer } from 'ws'; + +export type RuntimePaths = { + serverSrcDir: string; + serverDir: string; + projectRoot: string; + legacyRuntimePath: string; + bootstrapEntrypointPath: string; +}; + +export type AppLocals = { + requestId?: string; + wss?: WebSocketServer; +}; + +export type ServerApplication = { + runtimePaths: RuntimePaths; + start: () => Promise; +}; diff --git a/server/src/shared/types/http.ts b/server/src/shared/types/http.ts new file mode 100644 index 00000000..73030f30 --- /dev/null +++ b/server/src/shared/types/http.ts @@ -0,0 +1,71 @@ +import type { Request } from 'express'; + +export type TransportKind = 'http' | 'sse' | 'ws'; + +/** + * Meta information about an API response, such as request ID and timing details. + * Different from RequestContext which is the internal server-side context for an + * incoming request. + */ +export type ApiMeta = { + requestId?: string; + startedAt?: string; +}; + +export type ApiSuccessShape = { + success: true; + data: TData; + meta?: ApiMeta; +}; + +export type ApiErrorShape = { + success: false; + error: { + code: string; + message: string; + details?: unknown; + }; + meta?: ApiMeta; +}; + +/** + * Internal server-side context for an incoming request. + * It's the source object. It's different from ApiMeta which is + * meant for API responses. + */ +export type RequestContext = { + requestId: string; + startedAt: string; +}; + +export type AuthenticatedUser = { + id: number | string; + username?: string; + [key: string]: unknown; +}; + +export type AuthenticatedRequest = Request & { + context?: RequestContext; + user?: AuthenticatedUser; +}; + +export type EndpointInventoryRecord = { + transport: TransportKind; + method: string; + path: string; + tag: string; + authMode: string; + sourceFile: string; + sourceLine: number; + purpose: string; + consumerFiles: string[]; + inputs: { + pathParams: string[]; + queryParams: string[]; + bodyHints: string[]; + }; + successShape: string; + errorShape: string; + sideEffects: string[]; + priority: 'high' | 'medium' | 'low'; +}; diff --git a/server/src/shared/utils/app-error.ts b/server/src/shared/utils/app-error.ts new file mode 100644 index 00000000..36b0da92 --- /dev/null +++ b/server/src/shared/utils/app-error.ts @@ -0,0 +1,19 @@ +export type AppErrorOptions = { + code?: string; + statusCode?: number; + details?: unknown; +}; + +export class AppError extends Error { + readonly code: string; + readonly statusCode: number; + readonly details?: unknown; + + constructor(message: string, options: AppErrorOptions = {}) { + super(message); + this.name = 'AppError'; + this.code = options.code ?? 'INTERNAL_ERROR'; + this.statusCode = options.statusCode ?? 500; + this.details = options.details; + } +} diff --git a/server/src/shared/utils/logger.ts b/server/src/shared/utils/logger.ts new file mode 100644 index 00000000..f8a5d16c --- /dev/null +++ b/server/src/shared/utils/logger.ts @@ -0,0 +1,32 @@ +type LoggerLevel = 'info' | 'warn' | 'error'; + +function formatMetadata(metadata?: Record): string { + if (!metadata || Object.keys(metadata).length === 0) { + return ''; + } + + return ` ${JSON.stringify(metadata)}`; +} + +function write(level: LoggerLevel, message: string, metadata?: Record): void { + const prefix = `[server:${level}]`; + const formatted = `${prefix} ${message}${formatMetadata(metadata)}`; + + if (level === 'error') { + console.error(formatted); + return; + } + + if (level === 'warn') { + console.warn(formatted); + return; + } + + console.log(formatted); +} + +export const logger = { + info: (message: string, metadata?: Record) => write('info', message, metadata), + warn: (message: string, metadata?: Record) => write('warn', message, metadata), + error: (message: string, metadata?: Record) => write('error', message, metadata), +}; diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 00000000..afb85ecc --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": "./src", + "outDir": "./dist", + "strict": true, + "noEmit": false, + "sourceMap": true, + "skipLibCheck": true, + "allowJs": true, + "checkJs": false, + "resolveJsonModule": true, + "esModuleInterop": true, + "types": ["node"] + }, + "include": ["src/**/*.ts", "src/**/*.d.ts"], + "exclude": ["dist", "../dist", "../node_modules"] +}