singularity-forge/packages/pi-coding-agent/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
..
cli rip out antigravity from SF + pi-coding-agent UI/config layer 2026-04-19 10:39:36 +02:00
core fix(schema): auto-coerce string → [string] for sf_* list fields + provider_model_allow tests 2026-04-28 12:30:55 +02:00
modes batch: codex-rescue session output (multiple in-flight tasks) 2026-04-28 11:52:42 +02:00
resources/extensions/memory Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
tests sf snapshot: pre-dispatch, uncommitted changes after 43m inactivity 2026-04-25 06:34:49 +02:00
types fix(gsd): align ADR-009 integration with type-safe builds 2026-04-14 20:46:46 -05:00
utils rip out antigravity from SF + pi-coding-agent UI/config layer 2026-04-19 10:39:36 +02:00
cli.ts Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
config.ts refactor: remove dead code (unused exports) (#1486) 2026-03-19 15:33:32 -06:00
index.ts Rename GSD→SF: complete rebrand from fork origin 2026-04-15 18:33:47 +02:00
main.ts Rename @sf-run/* → @singularity-forge/* package scope 2026-04-15 22:56:33 +02:00
migrations.ts fix(migrations): drop press-any-key block to avoid stdin wedge 2026-04-21 00:56:18 +02:00