Provider catalog, local model discovery, and plan revisions#13
Merged
Conversation
Provider configuration - Add web/lib/providers/catalog.ts as the single source of truth for each provider (local/remote/cloud category, key/base-URL requirements, default base URL, API-key link). The setup UI and runtime registry both read from it. - Refactor the Providers and Agents dashboard pages around the catalog so adding a provider is a one-file change. - Update provider registry/types to consume the catalog. Local model discovery - POST /api/providers/discover-local probes locally running Ollama and LM Studio, registers any installed models not already configured, and returns what was discovered/added. Probes are best-effort with short timeouts so a missing local runtime never blocks the request. Plan revisions - POST /api/tasks/:id/replan requests a revised plan for a task awaiting approval: the reviewer's feedback is appended to the prompt as a delimited revision note and the task is re-queued for the architect stage. - Surface a replan action on the task detail page. Uninstall - Drop the Forge application database named in DATABASE_URL on --remove-data, and discover local project folders from both .forge/project-paths and the projects table so web-UI-created projects are removed too. Tests/docs - Extend API tests for the new endpoints (69 passing). - Update install/uninstall and shipping-roadmap docs. - Ignore local .env files and .claude/worktrees scratch checkouts. Verification: npm run lint, npx tsc --noEmit, npm test (69), npm run build — all pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 713c502e57
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Addresses review feedback on #13. The database-sourced project list (projects.local_path) can contain paths that were never recorded in .forge/project-paths — set via the project update API or edited by hand — so passing them straight to rm -rf risked deleting $HOME, the repo checkout, or a top-level directory during --remove-data --remove-projects. Add is_safe_project_path(), mirroring isSafeToDelete in the project DELETE route: a path must be absolute, not the filesystem root, not $HOME, not the repo root, and at least two segments deep. Both the confirmation prompt and the deletion loop now use the guarded list, and any rejected path is surfaced as a warning so the operator can remove it by hand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on the merged install-UX work with provider configuration improvements, local model auto-discovery, and a plan-revision loop.
Provider configuration
web/lib/providers/catalog.tsis the single source of truth for each provider: category (local/remote/cloud), whether it needs an API key or base URL, default base URL, and where to get a key. The setup UI and runtime registry both read from it, so adding a provider is a one-file change.Local model discovery
POST /api/providers/discover-localprobes locally running Ollama and LM Studio, registers any installed models not already configured, and returns what was discovered/added. Probes are best-effort with short timeouts, so a missing local runtime never blocks the request.Plan revisions
POST /api/tasks/:id/replanrequests a revised plan for a task awaiting approval: the reviewer's feedback is appended to the prompt as a delimited revision note and the task is re-queued for the architect stage. A replan action is surfaced on the task detail page.Uninstall
--remove-data, drops the Forge application database named inDATABASE_URL..forge/project-pathsand theprojectstable, so projects created through the web UI are removed too.Tests / docs / housekeeping
.gitignorenow excludes local.env*files and.claude/worktrees/scratch checkouts.Reviewer notes
--remove-datanow drops the DB whenever PostgreSQL is reachable, even if the DB predated Forge — see the updateddocs/install-uninstall.md.Verification
npm run lint,npx tsc --noEmit,npm test(69 passing),npm run build— all pass locally.🤖 Generated with Claude Code