Module: config
API 参考仅提供英文版本;正文与英文站点相同。
Interfaces
AgentBundleOutputConfig
Optional artifact output location config, inspired by Rsbuild's output.distPath.
Properties
distPath?
optionaldistPath?: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?
optionalrepositoryMarketplace?:boolean
Emit selected hosts' marketplace documents at the project root, pointing to distPath. These files are generated and replaced by build.
sourceMap?
optionalsourceMap?: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?
readonlyoptionalauthoredTargets?: readonlystring[]
Peeled target restriction; never emitted in host command frontmatter.
body
readonlybody:string
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
frontmatter
readonlyfrontmatter:Readonly<Record<string,unknown>>
markdown
readonlymarkdown:string
Exact authored .md bytes decoded as UTF-8.
source
readonlysource:string
DiscoveredProject
Properties
assets?
optionalassets?:DiscoveredAsset[]
commands?
optionalcommands?: readonlyCommandDocument[]
Conventional flat src/commands/*.md documents; absent when none are discovered.
payloads?
optionalpayloads?:DiscoveredPayload[]
routeGraph?
optionalrouteGraph?: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?
optionalrules?: readonlyRuleDocument[]
Conventional flat src/rules/*.mdc documents; absent when none are discovered.
shadowedConventionalSkills?
optionalshadowedConventionalSkills?: readonlystring[]
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?
optionalstate?:object
Conventional src/state.ts declaration and its parse-only diagnostics.
definition?
readonlyoptionaldefinition?:Pick<NormalizedStateDefinition,"lifetime"|"budgets"|"id">
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
source
readonlysource:string
LoadConfigOptions
Properties
command
command:
string
configPath?
optionalconfigPath?:string
mode
mode:
string
root
root:
string
targets?
optionaltargets?: readonlystring[]
LoadedConfig
Properties
config
config:
AgentBundleConfig
configPath
configPath:
string
context
context:
ConfigFactoryContext
NormalizedCommand
One conventional command prompt with peeled target selection.
Properties
body
readonlybody:string
frontmatter
readonlyfrontmatter:Readonly<Record<string,unknown>>
id
readonlyid:string
markdown
readonlymarkdown:string
Exact authored bytes decoded as UTF-8 for byte-faithful passthrough.
name
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
source
readonlysource:string
targets
readonlytargets: readonlystring[]
NormalizedHostBinFile
One file enumerated from a host-native plugin executable directory.
Properties
bytes
readonlybytes:number
executable
readonlyexecutable:boolean
relativePath
readonlyrelativePath:string
POSIX path relative to the declared host bin directory.
source
readonlysource:string
Absolute source file path.
NormalizedHostPayloadDirectory
One adapter-declared host-native plugin payload directory.
Properties
files
readonlyfiles: readonlyNormalizedHostBinFile[]
issue?
readonlyoptionalissue?:"missing"|"empty"|"not-directory"|"outside"|"source-error"|"source-invalid"
provenance
readonlyprovenance:SourceProvenance
source
readonlysource:string
Absolute source directory path.
target
readonlytarget:string
NormalizedMcpApp
Properties
_meta?
readonlyoptional_meta?:Readonly<Record<string,unknown>>
id
readonlyid:string
name
readonlyname:string
prebuilt?
readonlyoptionalprebuilt?: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
readonlyprovenance:SourceProvenance
resourceUri
readonlyresourceUri:string
serverId
readonlyserverId:string
serverName
readonlyserverName:string
source
readonlysource:string
Absolute browser entry source path.
targets
readonlytargets: readonlystring[]
template?
readonlyoptionaltemplate?:string
Absolute optional HTML shell template path.
NormalizedMcpServer
Properties
args?
readonlyoptionalargs?: readonlystring[]
command?
readonlyoptionalcommand?:string
cwd?
readonlyoptionalcwd?:string
env?
readonlyoptionalenv?:Readonly<Record<string,string>>
generatedRoutes?
readonlyoptionalgeneratedRoutes?: readonlyCompiledAgentRoute[]
Filesystem routes compiled into this framework-generated server entry.
headers?
readonlyoptionalheaders?:Readonly<Record<string,string>>
id
readonlyid:string
name
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
source?
readonlyoptionalsource?:string
Absolute local source path for compiler-owned MCP entries only.
targets
readonlytargets: readonlystring[]
transport
readonlytransport:McpTransport
url?
readonlyoptionalurl?:string
NormalizedMetadata
Properties
description?
readonlyoptionaldescription?:string
id
readonlyid:string
logo?
readonlyoptionallogo?:NormalizedPluginLogo
name
readonlyname:string
packageName?
readonlyoptionalpackageName?:string
The validated npm package name derived from the project's package.json.
packageVersion?
readonlyoptionalpackageVersion?:string
The validated semantic version derived from the project's package.json.
provenance
readonlyprovenance:SourceProvenance
shared?
readonlyoptionalshared?: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
readonlyversion:string
NormalizedRule
One conventional Cursor .mdc rule with peeled target selection.
Properties
body
readonlybody:string
emittedMarkdown
readonlyemittedMarkdown:string
Host-emitted document with authoring-only frontmatter keys stripped.
frontmatter
readonlyfrontmatter:Readonly<Record<string,unknown>>
id
readonlyid:string
markdown
readonlymarkdown:string
Exact authored bytes decoded as UTF-8; retained as an identity input.
name
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
source
readonlysource:string
targets
readonlytargets: readonlystring[]
NormalizedScript
Properties
id
readonlyid:string
mode
readonlymode:"bundle"|"copy"
name
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
rendered?
readonlyoptionalrendered?:true
True for a conventional rendered-script route (src/scripts/<name>.tsx) executed through the Agent renderer (#102 stage 3).
source
readonlysource:string
targets
readonlytargets: readonlystring[]
NormalizedSkill
Properties
body
readonlybody:string
description?
readonlyoptionaldescription?:string
dir
readonlydir:string
frontmatter
readonlyfrontmatter:Readonly<Record<string,unknown>>
hostDocuments?
readonlyoptionalhostDocuments?:Readonly<Record<string,SkillHostDocument>>
Per-host lowered Skill documents. The artifact planner emits these
instead of the authored bytes when passThrough is false.
id
readonlyid:string
markdown?
readonlyoptionalmarkdown?: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
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
resources
readonlyresources: readonlyNormalizedSkillResource[]
skillIr?
readonlyoptionalskillIr?:SkillIr
skillTreeLayout?
readonlyoptionalskillTreeLayout?:SkillTreeLayoutDecision
source
readonlysource:string
targets
readonlytargets: readonlystring[]
NormalizedSkillResource
Properties
bytes
readonlybytes:number
relativePath
readonlyrelativePath:string
source
readonlysource:string
NormalizedTarget
Properties
id
readonlyid:string
name
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
RuleDocument
Properties
authoredTargets?
readonlyoptionalauthoredTargets?: readonlystring[]
Peeled target restriction; never emitted in Cursor rule frontmatter.
body
readonlybody:string
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
emittedMarkdown
readonlyemittedMarkdown:string
Host-emitted document with authoring-only frontmatter keys stripped.
frontmatter
readonlyfrontmatter:Readonly<Record<string,unknown>>
markdown
readonlymarkdown:string
Exact authored .mdc bytes decoded as UTF-8; retained as an identity input.
source
readonlysource:string
SkillDocument
Properties
authoredTargets?
optionalauthoredTargets?: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?
optionalrendered?: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
readonlydiagnostics: readonlyDiagnostic[]
frontmatter
readonlyfrontmatter:Readonly<Record<string,unknown>>
passThrough
readonlypassThrough:boolean
sidecars
readonlysidecars: readonlySkillSidecarRef[]
skillMarkdown
readonlyskillMarkdown:string
target
readonlytarget:string
tokenLowering
readonlytokenLowering: readonlySkillTokenLoweringRecord[]
SkillResource
Properties
bytes
bytes:
number
relativePath
relativePath:
string
source
source:
string
SourceProvenance
Properties
kind
readonlykind:ProvenanceKind
sourcePath
readonlysourcePath: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
constdiscoverProject: (root,config) =>Promise<DiscoveredProject>
Parameters
root
string
config
AgentBundleConfig
Returns
Promise<DiscoveredProject>
inspectSkillProjection
constinspectSkillProjection: (ir,hosts) =>SkillProjectionInspection
Parameters
ir
hosts
readonly SkillHost[]
Returns
SkillProjectionInspection
loadConfig
constloadConfig: ({ root, configPath, command, mode, targets, }) =>Promise<LoadedConfig>
Parameters
{ root, configPath, command, mode, targets, }
Returns
Promise<LoadedConfig>
lowerSkillIr
constlowerSkillIr: (ir,host) =>SkillHostDocument
Parameters
ir
host
Returns
normalizeProject
constnormalizeProject: (loaded,discovered,registry) =>Promise<NormalizedPlugin>
Parameters
loaded
discovered
registry
Returns
Promise<NormalizedPlugin>
parseCommand
constparseCommand: (source) =>Promise<CommandDocument>
Parameters
source
string
Returns
Promise<CommandDocument>
parseRule
constparseRule: (source) =>Promise<RuleDocument>
Parameters
source
string
Returns
Promise<RuleDocument>
parseSkill
constparseSkill: (skillDir,projectRoot?,projectIgnoreRules?,options?) =>Promise<SkillDocument>
Parameters
skillDir
string
projectRoot?
string
projectIgnoreRules?
Ignore
options?
ParseSkillOptions
Returns
Promise<SkillDocument>
parseSkillIr
constparseSkillIr: (document) =>SkillIr
Parameters
document
Returns
validateModel
constvalidateModel: (model,registry) =>Diagnostic[]
Parameters
model
registry
Returns
validateSource
constvalidateSource: (loaded,discovered,registry,options?) =>Diagnostic[]
Parameters
loaded
discovered
registry
options?
ValidateSourceOptions
Returns
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