singularity-forge/packages/mcp-server/src
Mikael Hugo d38e5ea092 fix(schema): auto-coerce string → [string] for sf_* list fields + provider_model_allow tests
Two codex-rescue tasks landed together:

1. Auto-coerce JSON-schema validator: when a tool field declares
   {type:"array", items:{type:"string"}} and the model sends a single
   string, wrap it in [string] before validation instead of hard-rejecting.
   Fixes the recurring "keyDecisions: must be array" rejection on
   sf_complete_task that wasted retries.

2. Provider_model_allow filter (proper implementation with helpers):
   - resolveProviderModelAllowList / isProviderModelAllowed /
     filterModelsByProviderModelAllow helpers in preferences-models
   - Wired into model-registry and auto-model-selection
   - New tests/provider-model-allow.test.ts

Tools coerced: sf_complete_task, sf_complete_milestone, sf_plan_milestone,
sf_plan_slice, sf_replan_slice, sf_reassess_roadmap (key list fields).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-04-28 12:30:55 +02:00
..
readers Rename GSD→SF: complete rebrand from fork origin 2026-04-15 18:33:47 +02:00
cli.ts refactor: update log prefixes and string values from gsd- to sf- namespace 2026-04-15 15:37:12 +02:00
coerce-string-arrays.test.ts fix(schema): auto-coerce string → [string] for sf_* list fields + provider_model_allow tests 2026-04-28 12:30:55 +02:00
env-writer.test.ts cherry-pick(security): harden project-controlled surfaces (PR #4755 partial) 2026-04-28 05:37:07 +02:00
env-writer.ts cherry-pick(security): harden project-controlled surfaces (PR #4755 partial) 2026-04-28 05:37:07 +02:00
import-candidates.test.ts chore: sync workspace state after rebrand 2026-04-15 14:54:20 +02:00
index.ts Rename GSD→SF: complete rebrand from fork origin 2026-04-15 18:33:47 +02:00
mcp-server.test.ts refactor: rebrand gsd_ tool names and references to sf_ namespace 2026-04-15 15:51:38 +02:00
secure-env-collect.test.ts chore: checkpoint workspace changes 2026-04-15 13:38:15 +02:00
server.ts Rename GSD→SF: complete rebrand from fork origin 2026-04-15 18:33:47 +02:00
session-manager.ts Rename GSD→SF: complete rebrand from fork origin 2026-04-15 18:33:47 +02:00
tool-credentials.test.ts sf snapshot: pre-dispatch, uncommitted changes after 4703m inactivity 2026-04-25 05:51:29 +02:00
tool-credentials.ts sf snapshot: pre-dispatch, uncommitted changes after 4703m inactivity 2026-04-25 05:51:29 +02:00
types.ts refactor: update log prefixes and string values from gsd- to sf- namespace 2026-04-15 15:37:12 +02:00
workflow-tools.test.ts batch: codex-rescue session output (multiple in-flight tasks) 2026-04-28 11:52:42 +02:00
workflow-tools.ts batch: codex-rescue session output (multiple in-flight tasks) 2026-04-28 11:52:42 +02:00