codegen

package
v0.0.0-...-9ec6dbe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package codegen produces a TypeScript surface for the aha MCP tools so code-mode runtimes (Cloudflare @cloudflare/codemode, Anthropic code-execution-with-MCP, custom sandbox MCP hosts) can call the tools as typed functions instead of round-tripping per-call JSON-RPC schemas.

The struct shapes are derived from Go's reflect package so that adding a field to e.g. corpus.VerifyReport reaches the TS surface as soon as the generator is re-run. The Ref discriminated union is the one special-case: it's an interface in Go (each variant has a custom MarshalJSON), so the TS shape is written by hand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() []byte

Generate returns the full TS module bytes. The output is deterministic and safe to compare against a checked-in copy.

func Warnings

func Warnings() string

Warnings returns any FIXME-emit warnings collected during the last Generate() call. Exported so cmd/aha-gen-ts can surface them to stderr.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL