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/api/config.md.
Skip to main content
  • English
  • Module: config

    Interfaces

    AgentBundleOutputConfig

    Optional artifact output location config, inspired by Rsbuild's output.distPath.

    Properties

    distPath?

    optional distPath?: string

    The artifact output directory of agent-bundle build, relative to the project root. Defaults to dist. The per-invocation CLI --output flag still wins, but remains subject to the same project-root containment check; absolute and external output paths are unsupported.

    repositoryMarketplace?

    optional repositoryMarketplace?: boolean

    Emit selected hosts' marketplace documents at the project root, pointing to distPath. These files are generated and replaced by build.

    sourceMap?

    optional sourceMap?: boolean

    Opt in to source maps on generated executables. Defaults to false. When true, the compiler profile sets the bundler's output.sourceMap to an inline JS map so the artifact file set stays identical to provenance.


    AgentBundlePortableConfig

    The portable adapter currently reserves an empty extension envelope.

    Indexable

    [key: string]: unknown


    CommandDocument

    Properties

    authoredTargets?

    readonly optional authoredTargets?: readonly string[]

    Peeled target restriction; never emitted in host command frontmatter.

    body

    readonly body: string

    diagnostics

    readonly diagnostics: readonly Diagnostic[]

    frontmatter

    readonly frontmatter: Readonly<Record<string, unknown>>

    markdown

    readonly markdown: string

    Exact authored .md bytes decoded as UTF-8.

    source

    readonly source: string


    DiscoveredProject

    Properties

    assets?

    optional assets?: DiscoveredAsset[]

    commands?

    optional commands?: readonly CommandDocument[]

    Conventional flat src/commands/*.md documents; absent when none are discovered.

    payloads?

    optional payloads?: DiscoveredPayload[]

    routeGraph?

    optional routeGraph?: CompiledRouteGraph

    The compiled conventional route graph (#93). Present only when route discovery found modules or produced diagnostics, so route-free projects keep their existing discovery shape.

    rules?

    optional rules?: readonly RuleDocument[]

    Conventional flat src/rules/*.mdc documents; absent when none are discovered.

    shadowedConventionalSkills?

    optional shadowedConventionalSkills?: readonly string[]

    Conventional src/skills/<name>/SKILL.md documents that explicit skills configuration leaves uncovered — the confusable shadowed state surfaced by the AB4734 migration nudge. Absent when config is silent (the convention itself applies) or when every conventional skill is covered.

    skills

    skills: SkillDocument[]

    state?

    optional state?: object

    Conventional src/state.ts declaration and its parse-only diagnostics.

    definition?

    readonly optional definition?: Pick<NormalizedStateDefinition, "lifetime" | "budgets" | "id">

    diagnostics

    readonly diagnostics: readonly Diagnostic[]

    source

    readonly source: string


    LoadConfigOptions

    Properties

    command

    command: string

    configPath?

    optional configPath?: string

    mode

    mode: string

    root

    root: string

    targets?

    optional targets?: readonly string[]


    LoadedConfig

    Properties

    config

    config: AgentBundleConfig

    configPath

    configPath: string

    context

    context: ConfigFactoryContext


    NormalizedCommand

    One conventional command prompt with peeled target selection.

    Properties

    body

    readonly body: string

    frontmatter

    readonly frontmatter: Readonly<Record<string, unknown>>

    id

    readonly id: string

    markdown

    readonly markdown: string

    Exact authored bytes decoded as UTF-8 for byte-faithful passthrough.

    name

    readonly name: string

    provenance

    readonly provenance: SourceProvenance

    source

    readonly source: string

    targets

    readonly targets: readonly string[]


    NormalizedHostBinFile

    One file enumerated from a host-native plugin executable directory.

    Properties

    bytes

    readonly bytes: number

    executable

    readonly executable: boolean

    relativePath

    readonly relativePath: string

    POSIX path relative to the declared host bin directory.

    source

    readonly source: string

    Absolute source file path.


    NormalizedHostPayloadDirectory

    One adapter-declared host-native plugin payload directory.

    Properties

    files

    readonly files: readonly NormalizedHostBinFile[]

    issue?

    readonly optional issue?: "missing" | "empty" | "not-directory" | "outside" | "source-error" | "source-invalid"

    provenance

    readonly provenance: SourceProvenance

    source

    readonly source: string

    Absolute source directory path.

    target

    readonly target: string


    NormalizedMcpApp

    Properties

    _meta?

    readonly optional _meta?: Readonly<Record<string, unknown>>

    id

    readonly id: string

    name

    readonly name: string

    prebuilt?

    readonly optional prebuilt?: true

    True when the owning server's prebuilt payload already contains the served resource: the app stays a development surface and the compiler emits no mcp-apps/ output for it.

    provenance

    readonly provenance: SourceProvenance

    resourceUri

    readonly resourceUri: string

    serverId

    readonly serverId: string

    serverName

    readonly serverName: string

    source

    readonly source: string

    Absolute browser entry source path.

    targets

    readonly targets: readonly string[]

    template?

    readonly optional template?: string

    Absolute optional HTML shell template path.


    NormalizedMcpServer

    Properties

    args?

    readonly optional args?: readonly string[]

    command?

    readonly optional command?: string

    cwd?

    readonly optional cwd?: string

    env?

    readonly optional env?: Readonly<Record<string, string>>

    generatedRoutes?

    readonly optional generatedRoutes?: readonly CompiledAgentRoute[]

    Filesystem routes compiled into this framework-generated server entry.

    headers?

    readonly optional headers?: Readonly<Record<string, string>>

    id

    readonly id: string

    name

    readonly name: string

    provenance

    readonly provenance: SourceProvenance

    source?

    readonly optional source?: string

    Absolute local source path for compiler-owned MCP entries only.

    targets

    readonly targets: readonly string[]

    transport

    readonly transport: McpTransport

    url?

    readonly optional url?: string


    NormalizedMetadata

    Properties

    description?

    readonly optional description?: string

    id

    readonly id: string

    readonly optional logo?: NormalizedPluginLogo

    name

    readonly name: string

    packageName?

    readonly optional packageName?: string

    The validated npm package name derived from the project's package.json.

    packageVersion?

    readonly optional packageVersion?: string

    The validated semantic version derived from the project's package.json.

    provenance

    readonly provenance: SourceProvenance

    shared?

    readonly optional shared?: NormalizedSharedMetadata

    The one resolved descriptive layer every host projection reads: plugin.metadata over the project's package.json. A host block still overrides its own artifact's fields.

    version

    readonly version: string


    NormalizedRule

    One conventional Cursor .mdc rule with peeled target selection.

    Properties

    body

    readonly body: string

    emittedMarkdown

    readonly emittedMarkdown: string

    Host-emitted document with authoring-only frontmatter keys stripped.

    frontmatter

    readonly frontmatter: Readonly<Record<string, unknown>>

    id

    readonly id: string

    markdown

    readonly markdown: string

    Exact authored bytes decoded as UTF-8; retained as an identity input.

    name

    readonly name: string

    provenance

    readonly provenance: SourceProvenance

    source

    readonly source: string

    targets

    readonly targets: readonly string[]


    NormalizedScript

    Properties

    id

    readonly id: string

    mode

    readonly mode: "bundle" | "copy"

    name

    readonly name: string

    provenance

    readonly provenance: SourceProvenance

    rendered?

    readonly optional rendered?: true

    True for a conventional rendered-script route (src/scripts/<name>.tsx) executed through the Agent renderer (#102 stage 3).

    source

    readonly source: string

    targets

    readonly targets: readonly string[]


    NormalizedSkill

    Properties

    body

    readonly body: string

    description?

    readonly optional description?: string

    dir

    readonly dir: string

    frontmatter

    readonly frontmatter: Readonly<Record<string, unknown>>

    hostDocuments?

    readonly optional hostDocuments?: Readonly<Record<string, SkillHostDocument>>

    Per-host lowered Skill documents. The artifact planner emits these instead of the authored bytes when passThrough is false.

    id

    readonly id: string

    markdown?

    readonly optional markdown?: string

    The compiled SKILL.md document of a rendered skill (SKILL.tsx convention). When present, adapters emit it as a generated write entry; static skills ship their authored SKILL.md as a copied resource instead.

    name

    readonly name: string

    provenance

    readonly provenance: SourceProvenance

    resources

    readonly resources: readonly NormalizedSkillResource[]

    skillIr?

    readonly optional skillIr?: SkillIr

    skillTreeLayout?

    readonly optional skillTreeLayout?: SkillTreeLayoutDecision

    source

    readonly source: string

    targets

    readonly targets: readonly string[]


    NormalizedSkillResource

    Properties

    bytes

    readonly bytes: number

    relativePath

    readonly relativePath: string

    source

    readonly source: string


    NormalizedTarget

    Properties

    id

    readonly id: string

    name

    readonly name: string

    provenance

    readonly provenance: SourceProvenance


    RuleDocument

    Properties

    authoredTargets?

    readonly optional authoredTargets?: readonly string[]

    Peeled target restriction; never emitted in Cursor rule frontmatter.

    body

    readonly body: string

    diagnostics

    readonly diagnostics: readonly Diagnostic[]

    emittedMarkdown

    readonly emittedMarkdown: string

    Host-emitted document with authoring-only frontmatter keys stripped.

    frontmatter

    readonly frontmatter: Readonly<Record<string, unknown>>

    markdown

    readonly markdown: string

    Exact authored .mdc bytes decoded as UTF-8; retained as an identity input.

    source

    readonly source: string


    SkillDocument

    Properties

    authoredTargets?

    optional authoredTargets?: unknown

    Typed targets export from a rendered skill, or peeled targets frontmatter.

    body

    body: string

    diagnostics

    diagnostics: Diagnostic[]

    dir

    dir: string

    frontmatter

    frontmatter: Record<string, unknown>

    markdown

    markdown: string

    Exact authored/emitted Markdown; splitting remains server-owned.

    rendered?

    optional rendered?: true

    Present when the document was compiled from the rendered-skill convention (SKILL.tsx/SKILL.ts): source names the component module, and markdown holds the compiled document the build must emit as SKILL.md.

    resources

    resources: SkillResource[]

    source

    source: string


    SkillHostDocument

    Properties

    diagnostics

    readonly diagnostics: readonly Diagnostic[]

    frontmatter

    readonly frontmatter: Readonly<Record<string, unknown>>

    passThrough

    readonly passThrough: boolean

    sidecars

    readonly sidecars: readonly SkillSidecarRef[]

    skillMarkdown

    readonly skillMarkdown: string

    target

    readonly target: string

    tokenLowering

    readonly tokenLowering: readonly SkillTokenLoweringRecord[]


    SkillResource

    Properties

    bytes

    bytes: number

    relativePath

    relativePath: string

    source

    source: string


    SourceProvenance

    Properties

    kind

    readonly kind: ProvenanceKind

    sourcePath

    readonly sourcePath: string

    Type Aliases

    AgentBundleConfig

    AgentBundleConfig = CoreAgentBundleConfig & ClaudeConfigExtension & CodexConfigExtension & CursorConfigExtension & PortableConfigExtension


    NormalizationHostBinSource

    NormalizationHostBinSource = NormalizationHostBinDocument | NormalizationHostBinSourceError


    NormalizationHostPayloadSource

    NormalizationHostPayloadSource = NormalizationHostBinSource


    NormalizedHostBin

    NormalizedHostBin = NormalizedHostPayloadDirectory

    One adapter-declared host-native plugin executable directory.


    ProvenanceKind

    ProvenanceKind = "config" | "conventional" | "explicit" | "prebuilt"

    Variables

    discoverProject

    const discoverProject: (root, config) => Promise<DiscoveredProject>

    Parameters

    root

    string

    config

    AgentBundleConfig

    Returns

    Promise<DiscoveredProject>


    inspectSkillProjection

    const inspectSkillProjection: (ir, hosts) => SkillProjectionInspection

    Parameters

    ir

    SkillIr

    hosts

    readonly SkillHost[]

    Returns

    SkillProjectionInspection


    loadConfig

    const loadConfig: ({ root, configPath, command, mode, targets, }) => Promise<LoadedConfig>

    Parameters

    { root, configPath, command, mode, targets, }

    LoadConfigOptions

    Returns

    Promise<LoadedConfig>


    lowerSkillIr

    const lowerSkillIr: (ir, host) => SkillHostDocument

    Parameters

    ir

    SkillIr

    host

    SkillHost

    Returns

    SkillHostDocument


    normalizeProject

    const normalizeProject: (loaded, discovered, registry) => Promise<NormalizedPlugin>

    Parameters

    loaded

    LoadedConfig

    discovered

    DiscoveredProject

    registry

    NormalizationTargetRegistry

    Returns

    Promise<NormalizedPlugin>


    parseCommand

    const parseCommand: (source) => Promise<CommandDocument>

    Parameters

    source

    string

    Returns

    Promise<CommandDocument>


    parseRule

    const parseRule: (source) => Promise<RuleDocument>

    Parameters

    source

    string

    Returns

    Promise<RuleDocument>


    parseSkill

    const parseSkill: (skillDir, projectRoot?, projectIgnoreRules?, options?) => Promise<SkillDocument>

    Parameters

    skillDir

    string

    projectRoot?

    string

    projectIgnoreRules?

    Ignore

    options?

    ParseSkillOptions

    Returns

    Promise<SkillDocument>


    parseSkillIr

    const parseSkillIr: (document) => SkillIr

    Parameters

    document

    SkillDocument

    Returns

    SkillIr


    validateModel

    const validateModel: (model, registry) => Diagnostic[]

    Parameters

    model

    NormalizedPlugin

    registry

    NormalizationTargetRegistry

    Returns

    Diagnostic[]


    validateSource

    const validateSource: (loaded, discovered, registry, options?) => Diagnostic[]

    Parameters

    loaded

    LoadedConfig

    discovered

    DiscoveredProject

    registry

    NormalizationTargetRegistry

    options?

    ValidateSourceOptions

    Returns

    Diagnostic[]

    References

    AfterToolHookEvent

    Re-exports AfterToolHookEvent


    AgentBundleConfigExtensions

    Re-exports AgentBundleConfigExtensions


    AgentBundleDevConfig

    Re-exports AgentBundleDevConfig


    AgentBundleDevContractsConfig

    Re-exports AgentBundleDevContractsConfig


    AgentBundleDevRuntimeConfig

    Re-exports AgentBundleDevRuntimeConfig


    AgentBundleHookEntry

    Re-exports AgentBundleHookEntry


    AgentBundleHookInput

    Re-exports AgentBundleHookInput


    AgentBundleHostConfig

    Re-exports AgentBundleHostConfig


    AgentBundleMcpApp

    Re-exports AgentBundleMcpApp


    AgentBundleMcpConfig

    Re-exports AgentBundleMcpConfig


    AgentBundleMcpServer

    Re-exports AgentBundleMcpServer


    AgentBundlePayloadConfig

    Re-exports AgentBundlePayloadConfig


    AgentBundlePayloadEntry

    Re-exports AgentBundlePayloadEntry


    AgentBundlePayloadInput

    Re-exports AgentBundlePayloadInput


    AgentBundlePrebuiltEntry

    Re-exports AgentBundlePrebuiltEntry


    AgentBundleRuntimeConfig

    Re-exports AgentBundleRuntimeConfig


    AgentProviderContext

    Re-exports AgentProviderContext


    AgentProviderFactory

    Re-exports AgentProviderFactory


    AgentStartHookEvent

    Re-exports AgentStartHookEvent


    AgentStopHookEvent

    Re-exports AgentStopHookEvent


    AppRouteConfig

    Re-exports AppRouteConfig


    BeforeToolHookEvent

    Re-exports BeforeToolHookEvent


    CanonicalHookEvent

    Re-exports CanonicalHookEvent


    ConfigFactory

    Re-exports ConfigFactory


    ConfigFactoryContext

    Re-exports ConfigFactoryContext


    defineConfig

    Re-exports defineConfig


    definePrebuilt

    Re-exports definePrebuilt


    defineSkill

    Re-exports defineSkill


    HookContinueResult

    Re-exports HookContinueResult


    HookDenyResult

    Re-exports HookDenyResult


    HookEvent

    Re-exports HookEvent


    HookEventBase

    Re-exports HookEventBase


    hookEventFields

    Re-exports hookEventFields


    HookEventPayloads

    Re-exports HookEventPayloads


    HookHandler

    Re-exports HookHandler


    HookHandlerContext

    Re-exports HookHandlerContext


    HookHandlerEventName

    Re-exports HookHandlerEventName


    hookHandlerEventNames

    Re-exports hookHandlerEventNames


    HookResult

    Re-exports HookResult


    hookResultContract

    Re-exports hookResultContract


    HookResultContract

    Re-exports HookResultContract


    HookResultRule

    Re-exports HookResultRule


    McpTransport

    Re-exports McpTransport


    NormalizationConfigExtension

    Re-exports NormalizationConfigExtension


    NormalizationTargetRegistry

    Re-exports NormalizationTargetRegistry


    NormalizedConfigExtension

    Re-exports NormalizedConfigExtension


    NormalizedPayload

    Re-exports NormalizedPayload


    NormalizedPayloadFile

    Re-exports NormalizedPayloadFile


    NormalizedPlugin

    Re-exports NormalizedPlugin


    NormalizedRuntime

    Re-exports NormalizedRuntime


    PromptConfig

    Re-exports PromptConfig


    ResourceConfig

    Re-exports ResourceConfig


    RouteSchema

    Re-exports RouteSchema


    RouteSchemaOutput

    Re-exports RouteSchemaOutput


    SessionStartHookEvent

    Re-exports SessionStartHookEvent


    Skill

    Re-exports Skill


    SkillIr

    Re-exports SkillIr


    SkillTreeLayoutDecision

    Re-exports SkillTreeLayoutDecision


    StopHookEvent

    Re-exports StopHookEvent


    ToolConfig

    Re-exports ToolConfig


    ToolRouteProps

    Re-exports ToolRouteProps