For AI agents: the complete documentation index is available at https://scriptedalchemy.github.io/agent-bundle/llms.txt, the full documentation bundle is available at https://scriptedalchemy.github.io/agent-bundle/llms-full.txt, and this page is available as Markdown at https://scriptedalchemy.github.io/agent-bundle/reference/api.md.
Skip to main content
  • English
  • Type API

    The symbol-level reference is generated from the source, not written by hand. Browse it at Type API, or reach it from the top navigation.

    What it covers

    Every public entry point is documented from its declarations, one page per entry point:

    Entry pointModule pageContents
    agent-bundleindexThe authoring and orchestration surface: defineSkill, canonicalAgentEvents, startDevServer, runEvals, compareEvals, the eval harness factories, and the artifact-manifest helpers.
    agent-bundle/apiapiThe programmatic compiler: build, validate, inspect, inspectArtifact, prepack, their option and result types, the AgentComponentKind / componentKindCapability component-kind helpers, and the artifact operations listMcp, invokeMcp, runMcp, serveApp (a built MCP App served standalone in a browser, a host-process API for scripts and tests; from an installed artifact use <plugin> web instead, see Exposing an App in the browser), listHooks, and simulateHook; plus the Rspack stats formatters rspackStatsErrors, describeRspackStatsError, and formatRspackStatsError, which render a compile error as the same <file>:<line>:<column>: <message> line the compiler's AB4770 carries, for tools that drive their own Rsbuild compile.
    agent-bundle/appappThe browser-safe MCP App client: createAppClient, the AppClient lifecycle (connect, call, request, onToolInput, onToolResult, onToolError, onToolCancelled, rebind, dispose), AppClientError and its code union for every wire and lifecycle failure (option misuse is a plain TypeError or RangeError), the AppRegister interface the generated .agent-bundle/routes.d.ts augments with the project's tool:<server>/<name> contracts, AppRouteId / AppRouteInput / AppRouteResult, the injectable AppWindow / AppMessageTarget ports, and APP_PROTOCOL_VERSION. Imports nothing from Zod, Node, or the compiler; for App views only.
    agent-bundle/configconfigdefineConfig and the configuration types.
    agent-bundle/testtestThe route-testing harness, matchers, and contract matrices.
    agent-bundle/test/browsertest/browserThe MCP App bridge harness for browser-rendered views.
    agent-bundle/evalevalEval suite definitions, assertions, and run comparison.
    agent-bundle/rstestrstestThe Rstest configuration helpers agentBundleRstest and agentBundleBrowserRstest.
    agent-bundle/metametaThe build-time project identity constant, replaced by the compiler in every compiled surface.
    agent-bundle/mcp-appsmcp-appsThe MCP App resource registry contract, replaced by the compiler in local MCP servers.
    agent-bundle/cli-entrycli-entryThe routed-CLI shell every generated CLI executable is built on.
    agent-bundle/mcp-entrymcp-entryThe stdio MCP entry shell every generated MCP server is wrapped in.
    agent-bundle/installinstallThe package-bound lifecycle CLI runInstallCli (the agent-bundle CLI's install, uninstall, and doctor commands with the bundle root pinned to the package that ships the bin), plus installBundle, uninstallBundle, runDoctor, the formatInstallResult / formatUninstallResult / formatDoctorReport renderers, and their option and result types. See A package-bound installer bin.
    agent-bundle/launch-envlaunch-envThe operator .env layer every emitted shell applies at launch, applyOperatorEnv, parseOperatorEnv, and the OPERATOR_ENV_FILE_* constants behind the AGENT_BUNDLE_ENV_FILE variable, for hand-rolled entries that want the same behavior.
    agent-bundle/web-hostweb-hostThe artifact-resident browser host: runWebCommand, WEB_HOST_TOKEN_HEADER, readWebManifest, and their types. The generated bin/<plugin>.mjs imports this entry when web is configured; authors run <plugin> web rather than importing it.
    agent-bundle/routesroutes/authoringThe inferred defineTool and events helpers, route-module authoring types (AgentEventRouteProps, ToolRouteProps, CliRouteProps, the config shapes) and appResourceUri, the static reference to a sibling MCP App the compiler resolves to its resourceUri.

    Because it is generated, it always matches the shipped types: signatures, unions, defaults, and the error classes each surface can throw. When this Reference section and the generated pages disagree, the generated pages are correct.

    How the pages are organized

    /api/ lists the modules. Each module page is named after the entry point's source path with .ts and a trailing /index dropped (agent-bundle/routes is compiled from routes/authoring.ts, so its page is routes/authoring; agent-bundle/app from app/index.ts is app; the root agent-bundle export is index, served at /api/index-1 because /api/ is the module index itself) and groups its members under Classes, Interfaces, Type Aliases, Variables, and Functions. A name an entry point re-exports from another entry point is listed under References with a link to the page that documents it, runEvals on index points to runEvals on api.

    Every member is a heading, so it has a URL: /api/<module>#<member>, the fragment being the name lowercased with () dropped, /api/eval#defineevalsuite documents defineEvalSuite. Ids are unique per page: when the same text already appears higher up, a property named build, or AgentEventPayloadFields beside agentEventPayloadFields, the later heading is suffixed, so build in agent-bundle/api is #build-2. The # link beside each heading carries its exact id.

    Generated pages are language-neutral

    The site mirrors the generated reference under both locales, so /api/ and /zh/api/ resolve for readers of either language. The content is not translated: the Chinese copy is the English Markdown with a notice under each page title saying so, and the symbol documentation stays in the language it was authored in.

    That is deliberate. A translated copy of generated output would drift from the source on the first refactor, and a symbol reference whose types are current but whose prose is stale is worse than one that is honestly monolingual. Hand-written pages, everything in the Guide and the rest of this Reference, are complete translations.

    Where to start