Peter Steinberger
b080dd1e76
refactor: consolidate coercion contracts ( #122458 )
...
* refactor: consolidate coercion contracts
Centralize exact string, record, numeric, date, Boolean, argument, and structured-error coercions while preserving call-site semantics.
Migrate canonical-name collisions and deprecated internal SDK bypasses, deleting 55 net production/tooling lines. Expand declaration ownership enforcement to 101 allowed helpers and add a narrow export-completeness audit.
* fix: preserve standalone script coercions
Keep copied Control UI tooling self-contained and retain the trusted release harness module-relative source seam when the harness runs against an old target cwd.
2026-08-11 23:26:37 -07:00
Peter Steinberger
964c8c84c1
refactor: consolidate coercion ownership ( #122299 )
...
* refactor: consolidate coercion ownership
Centralize four canonical coercion helpers, migrate exact core and plugin duplicates through narrow Plugin SDK facades, and enforce declaration and plugin-normalization ownership boundaries.
The sweep adds eight focused SDK exports while deleting more production and tooling code than it adds. User-visible behavior is unchanged except for safer equivalent object and UI parsing at existing boundaries.
* fix: guard integer option ownership
Register resolveIntegerOption with the canonical function owner and extend the declaration-guard fixture so future local duplicates fail validation.
* fix: keep integer helpers on numeric facade
Remove the unshipped duplicate string-coerce exports and route every affected plugin consumer through the existing number-runtime contract.
* fix: point numeric coercion to number runtime
Make boundary and declaration diagnostics recommend the canonical numeric facade, with failing-before coverage for both guidance paths.
2026-08-11 17:14:53 -07:00
Peter Steinberger
cad77fb39c
refactor: consolidate remaining coercion helpers ( #122020 )
2026-08-11 10:22:01 -07:00
Peter Steinberger
0f6ed10e78
docs(errors): explain formatter redaction boundary
2026-07-16 14:59:40 -07:00
Peter Steinberger
2aa4ff0825
refactor: consolidate duplicate helper exports ( #106016 )
...
* refactor(normalization): consolidate string helpers
* refactor(normalization): consolidate agent ids
* refactor(paths): consolidate user path resolution
* refactor(gateway): preserve transcript helper facade
* fix(normalization): align helper build aliases
* fix(memory): keep helper import line neutral
* chore(plugin-sdk): align consolidated helper surface
* refactor(normalization): reuse lowercase string helper
* refactor(normalization): reuse record guard
* refactor(normalization): share surrogate boundary helper
* refactor(agents): share token estimate constant
* refactor(memory): distinguish standalone helper contracts
* refactor(normalization): share error cause formatter
* refactor(config): distinguish eligibility predicates
* refactor(plugins): share registry state symbol
* refactor(cli): reuse outbound dependency adapter
* refactor(cron): distinguish positive duration parser
* fix(gateway): keep transcript helper private
* fix(paths): preserve public helper status
* refactor(channels): reuse registry normalizer
* refactor(agents): reuse agent core runtime facade
* refactor(auth): reuse locked profile upsert
* refactor(records): distinguish trap-safe guard
* refactor(migrations): distinguish sync directory helper
* test(plugins): drop stale duration alias expectations
* fix(channels): remove stale registry import
* chore(plugin-sdk): refresh helper API baseline
* fix(memory): keep renamed helpers private
* fix(plugins): keep registry state key private
* fix(plugin-sdk): tighten wildcard surface budget
* chore(plugin-sdk): refresh rebased helper API baseline
2026-07-13 03:22:00 -07:00
Peter Steinberger
a0e5c15988
refactor(errors): consolidate shared error formatting ( #105927 )
...
* refactor(errors): consolidate shared formatting
* fix(errors): preserve structured diagnostic details
* fix(errors): preserve nested cause compatibility
* chore(ci): ratchet reduced formatter files
2026-07-12 22:48:55 -07:00
Peter Steinberger
49cc59b1e8
refactor: consolidate markdown code fences, error coercion, and byte-identical helper pairs ( #99932 )
...
* refactor(shared): add markdown code span/fence helpers and migrate seven call sites
* refactor(normalization-core): add canonical toErrorObject and migrate six copies
* refactor: consolidate byte-identical helper pairs onto owner modules
* refactor: reuse canonical path and token helpers in session tools and credentials
* refactor(packages): dedupe compaction summarization tail and session dir parsing
* fix(security): keep missing extensions dir silent in shared plugin dir lister
* refactor: reuse media-core chunk reader and shared dreaming session key helper
* fix(plugins): register error-coercion subpath in sdk alias table
* chore(plugin-sdk): re-pin callable export count after rebase
* chore(plugin-sdk): re-pin callable export count after rebase
2026-07-04 08:40:41 -04:00