* refactor(scripts): deslop scripts/lib
Consolidate script lifecycle, scenario, planner, report, release and
packaging helpers while retaining CLI and publication contracts.
Keep config-boundary source caches within one scan so repeated in-process
checks observe edits. Carry extracted helpers through selective fixtures
and iOS scope routing. Leave PR tooling and its library import closure intact.
* fix(scripts): retain sanitizer fast path after helper cleanup
* fix(scripts): model watchdog shell consumer in dead-code checks
* refactor: remove TypeScript 6 from plugin runtime and tooling
Keep source plugin loading on Jiti and native module transforms, move development analysis and declaration builds to TypeScript 7, and preserve captured loader and input ownership contracts. Scaffolds compile to the same entry path without shipping a compiler in production.
* refactor: use native checker for restart preflight detection
* fix: keep test-directory docs out of native helper scans
* fix: preserve native compiler tooling across CI runtimes
Keep compiler-backed tests on the supported Node transport, preserve declared Windows aliases and partial-source analysis, and bind relocated SDK reports to their installed compiler. Retain strict package input admission and the existing fixture assertions.
* test: compare messaging guard diagnostics without sorting
* fix: bound native tooling memory and preserve bootstrap loading
* fix: bound native declaration builds with tsdown scheduling
* fix: retire compiler-only helpers from installed packages
* test: migrate routing import scan to native parser
* test(ui): wait for recovered model catalog receipt
Closes#136881
## Problem
Strict external TypeScript consumers of `openclaw/plugin-sdk/tool-plugin` failed because the published declaration graph re-exported an undeclared bundler helper.
## Fix
Normalize generated declaration imports and exports at the canonical declaration staging owner. Remove only mangled `__exportAll` helper aliases, preserve declared and directly imported bindings, and check every published declaration extension for leaks.
The packed Plugin SDK smoke now imports `tool-plugin` with `strict: true` and `skipLibCheck: false`, using the release-declared TypeScript and `@types/ws` versions. The declaration staging owner also normalizes hashed root and extension declaration chunks that are outside the staged SDK subset.
## Verification
- Current `main` red: the shipped `2026.8.2` package contains the undeclared helper export and the strict consumer reports `TS2304`.
- Repaired head: 86 focused declaration-stage and release-check tests pass, and the generated package declaration replay removes all helper imports and exports.
- Exact-head Blacksmith CI run `33726488515` passed.
- The exact-head build artifact passed a packed strict consumer compile for `tool-plugin` with `skipLibCheck: false`, plus a second public SDK import.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Restore cached groups into private staging and validate the assembled generation before publication. Keep declaration type ordering stable and exclude checkout-owned Vitest scratch from resolution discovery.
Keep local compiler declarations independent of packaged SDK output, invalidate actual inherited inputs, and preserve canonical artifact ownership through preparation and staging. Remove duplicate emit, bridge, and timestamp freshness paths.