User problem
The basic promise is that an authored route gives the browser, providers and tests current types. Today that promise depends on a prior build/dev/validate command and on correctly including .agent-bundle/routes.d.ts in the actual consuming TypeScript program. A successful unrelated project can mask a missing augmentation.
Audited 14c9822bc6c01d8ff2788454d0e1dc7861bc3816; source review, no fresh TypeScript invocation. This is a focused authoring follow-up, not a claim that generated typing is unimplemented.
Concrete evidence
- routes/typegen-program.ts returns no diagnostic if the file is absent, or if any one directly referenced program includes it. For a solution containing
tsconfig.node.json and tsconfig.app.json, the node project can include the declaration while the browser project does not; AB4834 then reports no problem even though App route IDs/results fall back to weaker types in the browser program. Nested references are not traversed.
- MCP starter package scripts expose plain
tsc as typecheck; the larger check script happens to run build first. The generated file is intentionally gitignored.
- typegen.ts already owns atomic publication. Reuse that implementation and the canonical graph; no second route parser is required.
Required simplification
Provide one documented reliable entry for generating current contracts before an isolated typecheck, using existing validation/type generation where sufficient. A lightweight explicit command or shared template script is acceptable; a second compiler is not. Do not force a full production bundle just to learn route IDs. Update the starter so the documented typecheck is correct from a clean checkout and after route changes, not merely after some other workflow warmed generated output.
Make the inclusion diagnostic correspond to the program that actually consumes the framework's augmented contracts. Do not require generated types in unrelated build-only projects. If automatic consumption detection would require invasive source analysis, allow the relevant tsconfig selections explicitly and validate those; do not claim global type safety from an existential check over references.
Acceptance
Document dev, build, typecheck and CI behavior once. Delete consumer-specific shell existence probes when the supported path is adopted. Do not silently edit all user tsconfigs, run user tool/provider code for metadata, or impose a TypeScript major upgrade to solve a generation-order problem.
User problem
The basic promise is that an authored route gives the browser, providers and tests current types. Today that promise depends on a prior build/dev/validate command and on correctly including
.agent-bundle/routes.d.tsin the actual consuming TypeScript program. A successful unrelated project can mask a missing augmentation.Audited
14c9822bc6c01d8ff2788454d0e1dc7861bc3816; source review, no fresh TypeScript invocation. This is a focused authoring follow-up, not a claim that generated typing is unimplemented.Concrete evidence
tsconfig.node.jsonandtsconfig.app.json, the node project can include the declaration while the browser project does not; AB4834 then reports no problem even though App route IDs/results fall back to weaker types in the browser program. Nested references are not traversed.tscastypecheck; the largercheckscript happens to run build first. The generated file is intentionally gitignored.Required simplification
Provide one documented reliable entry for generating current contracts before an isolated typecheck, using existing validation/type generation where sufficient. A lightweight explicit command or shared template script is acceptable; a second compiler is not. Do not force a full production bundle just to learn route IDs. Update the starter so the documented typecheck is correct from a clean checkout and after route changes, not merely after some other workflow warmed generated output.
Make the inclusion diagnostic correspond to the program that actually consumes the framework's augmented contracts. Do not require generated types in unrelated build-only projects. If automatic consumption detection would require invasive source analysis, allow the relevant tsconfig selections explicitly and validate those; do not claim global type safety from an existential check over references.
Acceptance
Document
dev,build,typecheckand CI behavior once. Delete consumer-specific shell existence probes when the supported path is adopted. Do not silently edit all user tsconfigs, run user tool/provider code for metadata, or impose a TypeScript major upgrade to solve a generation-order problem.