Commit graph

8 commits

Author SHA1 Message Date
Peter Steinberger
37b7e78134
perf(update): reuse shared chunk scans during candidate builds (#158296) 2026-09-25 13:12:33 -07:00
Peter Steinberger
c8eab36020
refactor: run plugins and tooling without TypeScript 6 (#156829)
* 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
2026-09-23 22:34:20 -07:00
Peter Steinberger
e572c0cc40
fix(runtime): support Bun across tooling suite (#146807)
* fix(runtime): support Bun across tooling suite

* fix(security): guard Anthropic probe upstream requests

* fix(runtime): preserve native TypeScript script loading
2026-09-13 03:33:13 -07:00
Peter Steinberger
251634acac
perf(dev): defer compiler loading on clean launcher paths (#142338)
* perf(tooling): load checker TypeScript on demand

* perf(build): defer updater compatibility compiler loading
2026-09-08 14:37:33 -07:00
Peter Steinberger
87ecc61b1d
perf(packaging): remove redundant npm install payload (#135478)
* perf(packaging): shrink npm runtime and declaration payload

Retain the official Claude Agent SDK as packaged library assets while reusing the selected installed Claude executable. Remove redundant native SDK installation and all-platform filesystem helper copies; adopt fs-safe 0.7 platform packages.

Align root plugin build inputs with package exclusions and retain only public SDK and plugin-contract declaration roots. Preserve CLI bootstrap laziness and source/Docker plugin builds.

Clean Linux proof reduced installed file payload from 831.1 MB to 437.8 MB with matched Node/npm/install flags; native-required filesystem writes, bundled Anthropic inspection, and plugin doctor passed.

* test(packaging): cover explicitly selected memory plugin builds

Keep the default package exclusion while retaining native persistence and production-dependency proof for the supported Docker-selected memory plugin graph.

* fix(packaging): preserve copied SDK assets during declaration publication

Separate opaque SDK type assets from generated declaration ownership. Fresh and cached declaration publication retain the complete upstream package, while runtime cleanup still replaces obsolete SDK files and stale generated declarations are removed.

* fix(packaging): unify source-checkout build ownership

Use one canonical runtime build plan for source checkouts and Docker-selected
plugins, and share its output ownership with readiness, metadata, control-plane,
and watch guards. Restore isolated CommonJS plugin outputs during rebuilds
without losing the reduced public SDK and declaration payload.

Adapt lifecycle coverage to the selected output graph, cover raw archive path
contracts, and isolate synthetic timing fixtures without changing production CI
caps. Use tsdown's plugin type for the copied official SDK assets.

Focused build-owner, filesystem/archive, planner, package/SDK/declaration/compiler
checks, scripts/root-test types, scoped lint, and frozen install passed. The full
changed gate, standalone metadata check, and package build remain incomplete
after macOS filesystem stalls; clean Linux package/install proof and exact-head
CI are still required before merge.

* test(ui): bind composer responsiveness fixture to Enter

Playwright dispatches Meta before Enter. The capture-once fixture consumed
that modifier and could insert the second prompt before submission, so the
application correctly sent and cleared it instead of losing a draft.

Schedule the next input only for Enter and remove the listener there.
Assert the first outgoing message while retaining task-order and next-draft
coverage. No production behavior, sleeps, or timeouts change.

* test(macos): synchronize queued catalog request readiness

Use the existing FIFO rendezvous to observe the blocked request before measuring its queued successor deadline. Tie readiness to the first request lifetime rather than an unrelated two-second polling budget; preserve the 50ms queued deadline and the timeout/cancellation sibling fixtures.

* fix(packaging): detach dependency links before metadata cleanup

Detach the previous output node_modules symlink before copying metadata,
regardless of whether the new output plan is isolated. This prevents a
source-to-Docker profile transition from deleting source dependencies
through the old output link. Relinking still follows the selected plan.

Extend the existing owner fixture across isolated, unified, reverse, and
repeated profiles while preserving skill assets and shared host identity.

* fix(packaging): stage canonical plugin dependency links

Replace the whole node_modules junction with dist-owned links to canonical package roots. Windows native traversal otherwise rebases pnpm relative links into the wrong directory and loses the host package exports. Keep source dependency versions, scopes, private launchers, and host SDK identity without copying or rewriting installed dependencies.

* ci: pack tooling children within hosted job budgets

Use the existing complete-file packer for hosted tooling subdivisions instead of balanced thirds that each occupy an exclusive job. Preserve the 112-job cap, workload estimates, inventory, family isolation, and hybrid/CLI policies.

* test(packaging): preserve Windows links in staged copies

Use the installer asynchronous copy contract for the native link fixture. Node 22 synchronous copying traverses Windows junctions recursively; retain both module formats, dependency ownership, host identity, and private launcher assertions.

* fix(packaging): retain POSIX checkout relocation

Keep canonical per-package dependency staging and absolute Windows junctions,
while expressing POSIX targets relative to their output link parents so a
whole source checkout can relocate with its private dependencies intact.

Fold main's relocation coverage into the ESM/CJS profile-transition fixture.
Retain source ownership, host SDK singleton, staged copy and launcher checks;
use asynchronous copying to avoid Windows junction recursion.
2026-09-02 00:03: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
081a565cba
perf(doctor): restore telegram doctor repairs dropped on source-run hosts (#120954)
* perf(doctor): keep telegram doctor enumeration off the runtime graph

Telegram's built doctor artifact reached execa through dist chunking, so a
source-run host (pnpm dev, tsx CLI, vitest) could not require it and silently
dropped all 9 telegram legacy config rules plus its state migration. The
artifact also pulled telegram's runtime stores, making it a 674-chunk outlier
that dominated doctor enumeration.

Root cause: `src/token.ts` took the broad `plugin-sdk/provider-auth` barrel for
`resolveDefaultSecretProviderAlias`, dragging the auth-profile store, provider
runtime, and plugin install graph (execa, kysely, commander) into the closure.
The alias now has a narrow `plugin-sdk/secret-provider-alias` leaf, and
provider-auth re-exports it so its runtime surface is unchanged.

Thread-binding, sent-message, and sticker-cache row shapes, keys, and legacy
sidecar readers move to `*.legacy-state.ts` leaves. The doctor closure keeps
the rows and drops the ACP, session-binding, send, logger, and plugin-runtime
graphs the stores also load.

The postbuild control-plane verifier only required each artifact in a plain
Node child, the one host where these graphs resolve fine, so it proved nothing
about the invariant that broke. It now also walks each built doctor artifact's
static import closure and fails when it reaches the process-spawn graph, which
is the dist-level analogue of the source closure guard.

Guard rules added for provider-auth, acp-runtime, and conversation-runtime; the
telegram boundary test became a real closure assertion instead of a string grep.

* fix(doctor): drop dead export surface from the telegram legacy-state split

Knip and oxlint caught leftovers from the split: the leaves exported helpers
only they use, the store modules re-exported constants nobody imports from them
anymore, and thread-bindings kept a `testing` barrel whose last production
caller was the migration path that now reads the leaf directly. Tests import the
constants from the leaf that owns them, and the reset helper directly.

The closure gate's failure message still interpolated a `host` field left over
from a probe-host approach that was reverted before commit; the existing verifier
test caught it. The gate now has its own coverage: a transitive chunk edge to a
forbidden dependency is reported, while dynamic imports and non-doctor contract
surfaces are not.

* fix(doctor): adopt the upstream telegram thread-binding store split

`main` landed an equivalent thread-binding leaf as `thread-bindings-store.ts`
while this branch was open, so the branch-local `thread-bindings.legacy-state.ts`
is dropped rather than kept as a second path for the same rows.

`state-migrations.ts` now reaches token.js through the lazy import `main` added,
so `token.ts` is no longer in the doctor closure at all. The narrow
`secret-provider-alias` leaf still matters: telegram's contract-api closure
reaches `provider-auth` through `token.ts` on current `main`, which is the same
execa/kysely/commander graph, so the barrel is repaired at its source instead of
being deferred a second time.

* fix(scripts): type the built doctor closure gate for the TypeScript migration

The gate was authored against the `.mjs` script and landed in the `.mts` file
`main` migrated to, so its parameters were implicitly `any` and `check:test-types`
failed. Adds the explicit signatures plus the violation type.

Regenerates the plugin-sdk API baseline: `provider-auth` re-exports the default
secret-provider alias from the new leaf, so its module hash moves while its
runtime export surface stays identical.
2026-08-09 08:50:03 -07:00
Peter Steinberger
c70aee247e
refactor(scripts): migrate JavaScript tools to TypeScript (#121005)
* refactor(scripts): migrate JavaScript tools to TypeScript

* fix(ci): keep changed-scope preflight zero-install

* fix(ci): preserve zero-install script owners

* fix(ci): complete script migration follow-through

* fix(release): keep stable closeout zero-install

* fix(scripts): preserve standalone execution boundaries

* fix(scripts): repair standalone loader boundaries

* fix(scripts): normalize gateway observation ids

* fix(scripts): keep Docker packager standalone

* test(scripts): preserve rebase cleanup helpers

* test(sessions): use tracked temp directory
2026-08-09 07:21:35 -07:00
Renamed from scripts/check-built-plugin-control-plane-modules.mjs (Browse further)