singularity-forge/src/resources/extensions
Mikael Hugo 9f0723a7be preferences + mcp-client: resolve from main worktree and add global MCP config
Two related fixes surfaced from a real sf headless auto run in dr-repo.

1. Project preferences now resolve from the MAIN worktree, not the
   current linked worktree. SF's auto-mode creates a git worktree per
   milestone (`.sf/worktrees/M003/`). The old code called
   `projectPreferencesPath()` which used `process.cwd()` — the
   milestone worktree — so a pref change on main (service_tier,
   dynamic_routing, model config) never reached an in-flight milestone
   until the branch merged main. Observed concretely when disabling
   dynamic_routing had no effect until we merged main into the
   milestone branch.

   New `projectPrefsRoot()` detects a linked worktree by reading
   `.git` (a FILE in worktrees, pointing to
   `/main/.git/worktrees/NAME`), follows the `commondir` pointer back
   to the main `.git` dir, and walks up one level. Falls back to cwd
   silently for non-worktree setups.

2. MCP server config now also loads from global paths
   (`~/.sf/mcp.json`, `~/.sf/agent/mcp.json`) in addition to the
   existing project-level (`.mcp.json`, `.sf/mcp.json`). First-hit
   wins, so project configs can still shadow or augment a globally-
   registered server by name. This lets the user register unauth'd
   servers like the DeepWiki remote MCP once and have every SF
   project pick it up without per-project `.mcp.json`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 08:53:27 +02:00
..
async-jobs Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
aws-auth Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
bg-shell Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
browser-tools Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
claude-code-cli fix(pi-ai): wire thinking:{type} field and extend adaptive-thinking model coverage (#4392) 2026-04-18 13:38:30 +02:00
cmux Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
context7 Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
genai-proxy Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
github-sync Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
google-search Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
guardrails Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
mac-tools Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
mcp-client preferences + mcp-client: resolve from main worktree and add global MCP config 2026-04-19 08:53:27 +02:00
ollama ollama: make extension opt-in via OLLAMA_HOST 2026-04-19 05:53:45 +02:00
remote-questions Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
search-the-web Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
sf preferences + mcp-client: resolve from main worktree and add global MCP config 2026-04-19 08:53:27 +02:00
sf-notify Fix all 26 failing tests (22 rebrand artifacts + 4 RTK seam bugs) 2026-04-18 13:07:09 +02:00
sf-permissions sf-tui + sf-permissions: gate footer-indicator side-effects on ctx.hasUI 2026-04-19 07:59:36 +02:00
sf-tui sf-tui + sf-permissions: gate footer-indicator side-effects on ctx.hasUI 2026-04-19 07:59:36 +02:00
sf-usage-bar Fix all 26 failing tests (22 rebrand artifacts + 4 RTK seam bugs) 2026-04-18 13:07:09 +02:00
shared Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
slash-commands Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
subagent subagent: add per-call model override (Phase 1 of skill dispatch) 2026-04-19 05:22:07 +02:00
ttsr Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
universal-config Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
voice Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
ask-user-questions.ts Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
get-secrets-from-user.ts Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
package.json Improve startup performance with lazy extension loading (#1336) 2026-03-19 07:38:50 -06:00