Module: index
Interfaces
AfterToolHookEvent
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extends
Properties
cwd?
readonlyoptionalcwd?:string
Inherited from
effort?
readonlyoptionaleffort?:string
Inherited from
hookEventName?
readonlyoptionalhookEventName?:string
Inherited from
BeforeToolHookEvent.hookEventName
model?
readonlyoptionalmodel?:string
Inherited from
permissionMode?
readonlyoptionalpermissionMode?:string
Inherited from
BeforeToolHookEvent.permissionMode
promptId?
readonlyoptionalpromptId?:string
Inherited from
sessionId
readonlysessionId:string
Inherited from
toolInput
readonlytoolInput:JsonValue
The pending call's input; an object on Claude and Cursor, any JSON value on Codex.
Inherited from
toolName
readonlytoolName:string
Inherited from
toolResponse
readonlytoolResponse:JsonValue
The completed call's response; Claude delivers an MCP tool's response as a plain string.
toolUseId
readonlytoolUseId:string
Inherited from
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
Inherited from
BeforeToolHookEvent.transcriptPath
turnId?
readonlyoptionalturnId?:string
Inherited from
AgentBundleConfigExtensions
Adapter-owned config is contributed by declaration merging, not compiler core.
Properties
claude?
optionalclaude?:ClaudeHostConfig
codex?
optionalcodex?:CodexHostConfig
cursor?
optionalcursor?:CursorHostConfig
portable?
optionalportable?:AgentBundlePortableConfig&PortableManifestConfig
AgentBundleDevConfig
Development-only settings that never become part of a built artifact.
Properties
agentApi?
optionalagentApi?:boolean
Exposes the authenticated, loopback-only Agent API from agent-bundle dev.
contracts?
readonlyoptionalcontracts?:AgentBundleDevContractsConfig
runtime?
readonlyoptionalruntime?:AgentBundleDevRuntimeConfig
AgentBundleDevContractsConfig
Development-only generated-server contract checks run before host adoption.
Properties
fixtures
readonlyfixtures:string
Project-relative module default-exporting route-id keyed contract fixtures.
server?
readonlyoptionalserver?:string
MCP server to check; optional only when the project compiles exactly one server.
AgentBundleHookEntry
Properties
args?
optionalargs?: readonlystring[]
Extra command arguments. Only prebuilt handlers accept arguments.
handler
handler:
string|AgentBundlePrebuiltEntry
targets?
optionaltargets?: readonlystring[]
timeout?
optionaltimeout?:number
Native hook timeout in seconds. Omit it to use the selected host's default.
tools?
optionaltools?: readonlystring[]
AgentBundleHostConfig
Properties
nativeHooks?
optionalnativeHooks?:string
AgentBundleMcpApp
Properties
_meta?
optional_meta?:Readonly<Record<string,unknown>>
entry
entry:
string
resourceUri
resourceUri:
string
targets?
optionaltargets?: readonlystring[]
template?
optionaltemplate?:string
AgentBundleMcpConfig
Properties
servers
servers:
Readonly<Record<string,AgentBundleMcpServer>>
AgentBundleMcpServer
Properties
apps?
optionalapps?:Readonly<Record<string,AgentBundleMcpApp>>
args?
optionalargs?: readonlystring[]
command?
optionalcommand?:string
cwd?
optionalcwd?:string
entry?
optionalentry?:string|AgentBundlePrebuiltEntry
env?
optionalenv?:Readonly<Record<string,string>>
Extra environment for stdio servers. Adapters inject the well-known plugin-root anchor (see pluginRootEnvAnchor) beneath these entries, so a declared key with that name wins over the injected value.
headers?
optionalheaders?:Readonly<Record<string,string>>
targets?
optionaltargets?: readonlystring[]
transport?
optionaltransport?:McpTransport
url?
optionalurl?:string
AgentBundleNoticeRetentionConfig
Retention policy of the notice ledger a stateful project co-mounts beside
src/state.ts (#99). Omitted fields keep the runtime defaults: seven days,
500 terminal notices, a 16 MiB journal.
Properties
maxJournalBytes?
readonlyoptionalmaxJournalBytes?:number
Retained journal bytes above which the ledger compacts its store onto the head.
maxTerminal?
readonlyoptionalmaxTerminal?:number
Most terminal notices kept regardless of age.
terminalTtl?
readonlyoptionalterminalTtl?:string|number
How long a terminal notice is kept after it settled: milliseconds, or a duration such as '7d', '12h', '30m', '90s'.
AgentBundleNoticesConfig
Properties
retention?
readonlyoptionalretention?:AgentBundleNoticeRetentionConfig
AgentBundlePayloadEntry
One declared prebuilt payload directory with an optional target restriction.
Properties
runtimeDependencies?
optionalruntimeDependencies?: readonlystring[]
Bare package names the payload's files load at run time. The compiler
never opens a payload file, so this declaration is the only evidence
that a package.json dependency is used by the payload (AB7014);
each name must be one a consumer's npm installs — dependencies,
optionalDependencies, or a peer not marked optional (AB4751).
source
source:
string
targets?
optionaltargets?: readonlystring[]
AgentBundlePrebuiltEntry
The prebuilt marker: names an already-built file the framework packages
as-is instead of compiling. The file must live inside a directory declared
in the top-level payload block; its artifact path is the payload
destination plus the file's payload-relative path, so consumer-pinned
stable paths survive packaging.
Properties
prebuilt
prebuilt:
string
AgentBundleRuntimeConfig
Runtime requirements for generated executable artifacts.
Properties
node
node:
string
Minimum supported Node.js version in major.minor[.patch] form.
AgentEventPayloadField
One canonical payload field as a route receives it: the decoded value plus the host's own key it was read from, so a consumer can tell a mapped field from a missing one and still name the native spelling in its own output.
Type Parameters
Value
Value
Properties
nativeKey
readonlynativeKey:string
value
readonlyvalue:Value
AgentEventPayloadFieldTypes
The canonical payload vocabulary of event routes (#466): every field a
route may read from canonical.payload, with the JSON shape it carries on
every host. A field is admitted only when at least two hosts report it for
the same family (or the family exists on one host only, in which case its
defining fields are admitted); everything else stays host-specific and is
read from native. The per-host spelling of each field lives in
agentEventPayloadNativeKeys, and the generated events reference
renders the same table per host from the pinned capability JSON.
Properties
agentId
readonlyagentId:string
The subagent the event belongs to (Claude and Codex name it on every hook fired inside one).
agentTranscriptPath
readonlyagentTranscriptPath:string|null
The subagent's own transcript, null before the host has written it.
agentType
readonlyagentType:string
cwd
readonlycwd:string
error
readonlyerror:string
The failed tool's error text (tool/failure) or the API error string (stop/failure).
filePath
readonlyfilePath:string
fromModel
readonlyfromModel:string
The model in use before a switch (model-switch/*, Claude from_model).
isInterrupt
readonlyisInterrupt:boolean
lastAssistantMessage
readonlylastAssistantMessage:string|null
The turn's final assistant text; null when the host reports none.
model
readonlymodel:string
permissionMode
readonlypermissionMode:string
prompt
readonlyprompt:string
reason
readonlyreason:string
reason on session/end: the host's own vocabulary (clear, other, completed, …).
reentry
readonlyreentry:boolean
Whether this stop hook is already running for the turn — Claude and Codex
stop_hook_active, Cursor loop_count > 0. Check it before returning
deny from a stop route, or the continuation loops until the host caps it.
requestedModel
readonlyrequestedModel:string|null
The model name as the user typed it (model-switch/*, Claude requested_model); null when the switch was not user-initiated.
sessionId
readonlysessionId:string
The conversation id: session_id on Claude and Codex, conversation_id on Cursor.
source
readonlysource:string
How the session began (session/start), which settings layer changed (config/change), or what triggered a model switch (model-switch/*).
taskDescription
readonlytaskDescription:string
taskId
readonlytaskId:string
taskSubject
readonlytaskSubject:string
teammateName
readonlyteammateName:string
teamName
readonlyteamName:string
toModel
readonlytoModel:string
The canonical name of the model being switched to (model-switch/*, Claude to_model).
toolInput
readonlytoolInput:JsonValue
The pending call's input; an object on Claude and Cursor, any JSON value on Codex.
toolName
readonlytoolName:string
toolResponse
readonlytoolResponse:JsonValue
The completed call's response. Claude and Codex deliver tool_response
as JSON (a plain string for MCP tools on Claude); Cursor's tool_output
JSON string is parsed when it is valid JSON and kept as the string otherwise.
toolUseId
readonlytoolUseId:string
transcriptPath
readonlytranscriptPath:string|null
trigger
readonlytrigger:"manual"|"auto"
workspaceRoots
readonlyworkspaceRoots: readonlystring[]
AgentEventPayloadNativeKey
How a host spells one canonical field. decode names a transformation
beyond reading the key: json-string parses a JSON-encoded string
(Cursor tool_output), positive-count reads a counter as a boolean
(Cursor loop_count → reentry). Absent means the value is taken as is.
Properties
decode?
readonlyoptionaldecode?:"json-string"|"positive-count"
nativeKey
readonlynativeKey:string
AgentStartHookEvent
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extends
Properties
agentId
readonlyagentId:string
agentType
readonlyagentType:string
cwd?
readonlyoptionalcwd?:string
Inherited from
effort?
readonlyoptionaleffort?:string
Inherited from
hookEventName?
readonlyoptionalhookEventName?:string
Inherited from
model?
readonlyoptionalmodel?:string
Inherited from
permissionMode?
readonlyoptionalpermissionMode?:string
Inherited from
promptId?
readonlyoptionalpromptId?:string
Inherited from
sessionId
readonlysessionId:string
Inherited from
toolUseId?
readonlyoptionaltoolUseId?:string
The spawning tool call on Cursor.
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
Inherited from
turnId?
readonlyoptionalturnId?:string
Inherited from
AgentStopHookEvent
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extends
Properties
agentId?
readonlyoptionalagentId?:string
Absent on Cursor, whose subagentStop names no agent id.
agentTranscriptPath?
readonlyoptionalagentTranscriptPath?:string|null
agentType
readonlyagentType:string
cwd?
readonlyoptionalcwd?:string
Inherited from
effort?
readonlyoptionaleffort?:string
Inherited from
hookEventName?
readonlyoptionalhookEventName?:string
Inherited from
lastAssistantMessage?
readonlyoptionallastAssistantMessage?:string|null
model?
readonlyoptionalmodel?:string
Inherited from
permissionMode?
readonlyoptionalpermissionMode?:string
Inherited from
promptId?
readonlyoptionalpromptId?:string
Inherited from
sessionId
readonlysessionId:string
Inherited from
stopHookActive
readonlystopHookActive:boolean
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
Inherited from
turnId?
readonlyoptionalturnId?:string
Inherited from
AgentTerminal
What a route or script may assume about the process's output streams.
Information only, never a writer: under the routed CLI and rendered
scripts machine output owns stdout, so stdout describes where the
rendered document lands and stderr the channel a route may write to
itself; a plain main script owns both.
Properties
hostSurface
readonlyhostSurface:AgentTerminalSurface
sharesTarget
readonlysharesTarget:boolean
Whether stdout and stderr name the same open file (2>&1, one shared terminal).
stderr
readonlystderr:AgentTerminalStream
stdout
readonlystdout:AgentTerminalStream
AgentTerminalStream
Properties
color
readonlycolor:AgentTerminalColor
columns?
readonlyoptionalcolumns?:number
Present when the stream is a terminal or COLUMNS overrides it.
kind
readonlykind:AgentTerminalStreamKind
rows?
readonlyoptionalrows?:number
Present when the stream is a terminal or LINES overrides it.
AmpSkillExtension
Properties
builtinTools?
readonlyoptionalbuiltinTools?: readonlystring[]
mcpServers?
readonlyoptionalmcpServers?:Readonly<Record<string,unknown>>
ArtifactEpoch
A fully emitted and validated immutable artifact publication.
Properties
configDigest
readonlyconfigDigest:string
createdAt
readonlycreatedAt:string
diagnostics
readonlydiagnostics:DiagnosticSummary
id
readonlyid:string
manifestPath
readonlymanifestPath:string
modelDigest
readonlymodelDigest:string
packageName?
readonlyoptionalpackageName?:string
The npm package name axis of the published project, when packaged.
packageVersion?
readonlyoptionalpackageVersion?:string
The semantic release-version axis of the published project, when packaged.
projectRevision
readonlyprojectRevision:string
targetDigests
readonlytargetDigests:Readonly<Record<string,string>>
ArtifactManifest
Properties
application
readonlyapplication:ArtifactManifestApplication
compiler
readonlycompiler:ArtifactManifestCompiler
distribution
readonlydistribution:ArtifactManifestDistribution
executables
readonlyexecutables:ArtifactManifestExecutables
files
readonlyfiles: readonlyArtifactManifestFile[]
manifestVersion
readonlymanifestVersion:6
projections
readonlyprojections: readonlyArtifactManifestProjection[]
routes
readonlyroutes:ArtifactManifestRoutes
runtime
readonlyruntime:ArtifactManifestRuntime
web?
readonlyoptionalweb?:WebManifest
ArtifactManifestAgentSkills
Properties
schemaSha256
readonlyschemaSha256:string
sourceRevision
readonlysourceRevision:string
specification
readonlyspecification:string
ArtifactManifestApplication
The application identity, once and host-independent: what install,
doctor, and uninstall act on. Host documents and this manifest are
serialized from the same compiled model in one build.
Properties
description?
readonlyoptionaldescription?:string
id
readonlyid:string
name
readonlyname:string
version
readonlyversion:string
ArtifactManifestBin
The routed CLI executable (bin/<name>.mjs) and its Flight worker.
Properties
hosts
readonlyhosts: readonlystring[]
name
readonlyname:string
path
readonlypath:string
worker?
readonlyoptionalworker?:string
ArtifactManifestCli
Properties
commands?
readonlyoptionalcommands?: readonlyArtifactManifestCliCommand[]
Present only in generated mode, matching the compiler surface.
mode
readonlymode:CompiledCliMode
routes
readonlyroutes: readonlyArtifactManifestRoute[]
The custom cli routes plus every MCP tool route routes.mcpCommands projects into the executable.
ArtifactManifestCliCommand
One executable command compiled from a custom CLI route or projected MCP tool.
Properties
aliases
readonlyaliases: readonlystring[]
description?
readonlyoptionaldescription?:string
exitCode
readonlyexitCode:"result"|"zero"
input?
readonlyoptionalinput?:"json"
mcp?
readonlyoptionalmcp?:ArtifactManifestCliCommandMcp
options
readonlyoptions: readonlyArtifactManifestCliOption[]
path
readonlypath: readonlystring[]
projection?
readonlyoptionalprojection?:ArtifactManifestCliProjection
Present for a command compiled from a tool's CLI projection module.
routeId
readonlyrouteId:string
ArtifactManifestCliCommandMcp
Properties
confirm
readonlyconfirm:boolean
server
readonlyserver:string
tool
readonlytool:string
ArtifactManifestCliOption
One argv projection of a CLI route's input schema, without editor defaults.
Properties
aliases?
readonlyoptionalaliases?: readonlystring[]
Extra long-form --spellings a CLI projection declared (flags.<key>.aliases); sorted, unique.
choices?
readonlyoptionalchoices?: readonlystring[]
description?
readonlyoptionaldescription?:string
key
readonlykey:string
kind
readonlykind:"string"|"number"|"boolean"|"enum"
option
readonlyoption:string
positional?
readonlyoptionalpositional?:number
repeated
readonlyrepeated:boolean
required
readonlyrequired:boolean
ArtifactManifestCliProjection
Mirrors CompiledCliProjection: what a tool's <tool>.cli.{ts,tsx}
module (#596) contributes beyond the argv grammar options already spell.
Properties
defaults?
readonlyoptionaldefaults?:Readonly<Record<string,CliProjectionFlagDefault>>
Canonical key → the projection's flags.<key>.default literal.
input?
readonlyoptionalinput?:"json"
'json' when the command takes the tool's canonical input as one JSON object through --input (manifestVersion 5).
mapInput
readonlymapInput:boolean
True when the module exports mapInput.
module
readonlymodule:string
Project-relative POSIX path of the projection module.
relaxed?
readonlyoptionalrelaxed?: readonlystring[]
Canonical-required keys the projection made optional on the CLI; sorted, unique.
ArtifactManifestCompiler
Operational record of the compiler run. Versioned by recordVersion
independently of manifestVersion: a change here is not a change to the
artifact contract consumers read.
Properties
adapters
readonlyadapters: readonlyArtifactManifestCompilerAdapter[]
agentSkills
readonlyagentSkills:ArtifactManifestAgentSkills
producer
readonlyproducer:ArtifactManifestProducer
project
readonlyproject:ArtifactManifestProject
provenance
readonlyprovenance: readonlyArtifactManifestProvenance[]
recordVersion
readonlyrecordVersion:1
validation
readonlyvalidation:ArtifactManifestValidation
ArtifactManifestCompilerAdapter
Operational adapter facts for one projection; lives on compiler.adapters.
Properties
adapterRevision
readonlyadapterRevision:string
host
readonlyhost:string
observedVersion
readonlyobservedVersion:string
schemas
readonlyschemas: readonlyArtifactManifestProjectionSchema[]
ArtifactManifestDistribution
How the artifact reaches a host (gap 7 of #592 step 3).
Properties
channels
readonlychannels: readonlyArtifactManifestDistributionChannel[]
local always; npm when the project carries a package identity.
install?
readonlyoptionalinstall?:ArtifactManifestDistributionInstall
payloads
readonlypayloads: readonlyArtifactManifestPayload[]
Prebuilt payload directories, sorted by name.
ArtifactManifestDistributionInstall
Root-relative pointers at the install surface (#555 W2/S5 owns the contents).
Properties
instructions?
readonlyoptionalinstructions?:string
script?
readonlyoptionalscript?:string
ArtifactManifestEventExecution
Properties
fallback
readonlyfallback:"none"|"standalone"
handler?
readonlyoptionalhandler?:string
Project-relative POSIX path of the event route's handler module.
runtime
readonlyruntime:"standalone"|"shared"
ArtifactManifestExecutables
Every process the artifact can start (gap 6 of #592 step 3).
Properties
bins
readonlybins: readonlyArtifactManifestBin[]
hooks
readonlyhooks: readonlyArtifactManifestHook[]
mcpServers
readonlymcpServers: readonlyArtifactManifestMcpServer[]
scripts
readonlyscripts: readonlyArtifactManifestScript[]
ArtifactManifestFile
Properties
bytes
readonlybytes:number
kind
readonlykind:"bundle"|"prebuilt"|"copy"|"generated"
mode?
readonlyoptionalmode?:number
path
readonlypath:string
sha256
readonlysha256:string
ArtifactManifestHook
One compiler wrapper a host's hooks document runs: event-route wrappers
dispatch a conventional src/hooks/** route, config wrappers run a hook
declared in the configuration. Native commands an author writes directly
into a host document and prebuilt-payload commands are Projection IR and
are not rows here; the validator proves every wrapper a host document names
is exactly one row (AB6018).
Properties
event
readonlyevent:string
host
readonlyhost:string
id
readonlyid:string
kind
readonlykind:"event-route"|"config"
name
readonlyname:string
path
readonlypath:string
routeId?
readonlyoptionalrouteId?:string
The routes.events[] row an event-route wrapper dispatches; present exactly for that kind.
timeout?
readonlyoptionaltimeout?:number
Native hook timeout in seconds. Omit it to use the host default.
ArtifactManifestLaunch
The one launch record of a compiled or prebuilt MCP server
(executables.mcpServers[] with kind: 'compiled' or 'prebuilt'): what
<plugin> web starts and what every host MCP document projects. Tokens in
args and env are expanded by the launcher, never by the manifest.
Properties
args
readonlyargs: readonlyArtifactManifestLaunchArgument[]
Arguments after the entry, in order.
entry
readonlyentry:string
Root-relative POSIX path of the entry (a files[] row).
env
readonlyenv:Readonly<Record<string,string>>
Declared environment; values may carry agent-bundle:path:* tokens.
worker?
readonlyoptionalworker?:string
Root-relative POSIX path of the Flight worker the entry spawns (a files[] row).
ArtifactManifestLayout
Properties
id
readonlyid:string
layout:root or layout:mcp:<server>.
scope
readonlyscope:CompiledLayoutScope
serverId?
readonlyoptionalserverId?:string
The owning MCP server id; server scope only.
source
readonlysource:string
Project-relative POSIX module path.
ArtifactManifestMcpApp
Properties
id
readonlyid:string
name
readonlyname:string
path?
readonlyoptionalpath?:string
The emitted self-contained HTML; absent for a prebuilt app whose payload already serves it.
prebuilt?
readonlyoptionalprebuilt?:true
resourceUri
readonlyresourceUri:string
ArtifactManifestMcpServer
One MCP server the artifact declares: compiled and prebuilt servers
carry the one launch record the artifact starts them from, command
servers name a host-run command, remote servers a URL — the last two live
only in the host MCP documents.
Properties
apps
readonlyapps: readonlyArtifactManifestMcpApp[]
hosts
readonlyhosts: readonlystring[]
id
readonlyid:string
kind
readonlykind:"command"|"compiled"|"prebuilt"|"remote"
launch?
readonlyoptionallaunch?:ArtifactManifestLaunch
Present exactly for compiled and prebuilt servers.
name
readonlyname:string
transport
readonlytransport:string
ArtifactManifestPayload
One prebuilt payload directory the artifact packages byte-for-byte
(definePrebuilt, #630). The compiler never opens its files, so the
author's runtimeDependencies declaration is the only record of what the
tree loads from a consumer's install; files[] rows under <name>/ carry
kind prebuilt.
Properties
hosts
readonlyhosts: readonlystring[]
Declared projections the payload is packaged for; sorted.
name
readonlyname:string
Artifact-root directory name.
runtimeDependencies
readonlyruntimeDependencies: readonlystring[]
Bare package names the payload loads at run time; sorted, unique.
ArtifactManifestProducer
Properties
name
readonlyname:"agent-bundle"
version
readonlyversion:string
ArtifactManifestProject
Properties
configDigest
readonlyconfigDigest:string
configPath
readonlyconfigPath:string
modelDigest
readonlymodelDigest:string
packageName?
readonlyoptionalpackageName?:string
The validated npm package name axis; absent for unpackaged development projects.
packageVersion?
readonlyoptionalpackageVersion?:string
The validated semantic release-version axis; absent for unpackaged development projects.
revision
readonlyrevision:string
sourceInputs
readonlysourceInputs: readonlyArtifactManifestSourceInput[]
ArtifactManifestProjection
Properties
builtInHost?
readonlyoptionalbuiltInHost?:ArtifactManifestBuiltInHost
The shipped adapter that planned this projection; absent for an advanced-registry adapter.
documents
readonlydocuments:ArtifactManifestProjectionDocuments
host
readonlyhost:string
The target name the project selected the projection under (its directory key in targets).
marketplace?
readonlyoptionalmarketplace?:ArtifactManifestProjectionMarketplace
The marketplace the projection's marketplace document registers; absent when none was emitted.
ArtifactManifestProjectionDocuments
Root-relative paths of the host entry/documents one projection derived:
an executable plugin entry or the host's plugin, marketplace, MCP, and hooks
documents when emitted. Every path is a files[] entry.
Properties
entry?
readonlyoptionalentry?:string
The host's executable plugin entry when it has no JSON plugin manifest.
hooks?
readonlyoptionalhooks?:string
marketplace?
readonlyoptionalmarketplace?:string
mcp?
readonlyoptionalmcp?:string
plugin?
readonlyoptionalplugin?:string
The host plugin manifest; absent when the projection emits none (install/doctor then fail AB7001).
ArtifactManifestProjectionMarketplace
Properties
name
readonlyname:string
ArtifactManifestProjectionSchema
Properties
name
readonlyname:string
revision
readonlyrevision:string
sha256
readonlysha256:string
ArtifactManifestProjectionValidation
Extends
Properties
host
readonlyhost:string
status
readonlystatus:"passed"
Inherited from
ArtifactManifestValidationRecord.status
ArtifactManifestProvenance
One files[] row's source-input provenance; lives on compiler.provenance.
Properties
path
readonlypath:string
sourceInputs
readonlysourceInputs: readonlystring[]
ArtifactManifestProvider
Properties
id
readonlyid:string
name
readonlyname:string
source
readonlysource:string
Project-relative POSIX module path.
ArtifactManifestRoute
One compiled route of the Application IR, host-independent.
Properties
contract?
readonlyoptionalcontract?:string
Id of the routes.contracts[] row this route binds (#593); absent when no static contract was extracted.
description?
readonlyoptionaldescription?:string
config.description when it is a string.
event?
readonlyoptionalevent?:string
Canonical event identity; event-route routes only.
execution?
readonlyoptionalexecution?:ArtifactManifestEventExecution
Event execution metadata; present exactly for event-route routes.
id
readonlyid:string
inputSchema?
readonlyoptionalinputSchema?:RouteInputSchema
Bounded JSON Schema projection; absent when the route schema is richer than the static grammar.
kind
readonlykind:CompiledRouteKind
provenance
readonlyprovenance:ArtifactManifestRouteProvenance
serverId?
readonlyoptionalserverId?:string
The owning MCP server id (mcp:<name>); MCP route kinds only.
source
readonlysource:string
Project-relative POSIX module path: the route's portable identity.
ArtifactManifestRouteContract
Frozen input metadata identified by contract:
Properties
id
readonlyid:string
input
readonlyinput:RouteInputSchema
origin
readonlyorigin:ArtifactManifestRouteContractOrigin
routes
readonlyroutes: readonlystring[]
ArtifactManifestRouteContractOrigin
Location of literal inputJsonSchema metadata in the route module.
Properties
binding
readonlybinding:string
module
readonlymodule:string
ArtifactManifestRouteProvenance
How a route entered the graph. Only conventional filesystem discovery exists today; the discriminant is where a projected route (#596) attaches later.
Properties
kind
readonlykind:"conventional"
ArtifactManifestRoutes
Properties
cli?
readonlyoptionalcli?:ArtifactManifestCli
contracts?
readonlyoptionalcontracts?: readonlyArtifactManifestRouteContract[]
Sorted by id; present exactly when some route binds a contract.
digest
readonlydigest:string
sha256 over the graph's project-relative identity.
events
readonlyevents: readonlyArtifactManifestRoute[]
layouts
readonlylayouts: readonlyArtifactManifestLayout[]
providers
readonlyproviders: readonlyArtifactManifestProvider[]
scripts
readonlyscripts: readonlyArtifactManifestRoute[]
servers
readonlyservers: readonlyArtifactManifestServer[]
ArtifactManifestRuntime
The selected generated-executable runtime floor recorded with the artifact.
Properties
node
readonlynode:string
ArtifactManifestScript
Properties
hosts
readonlyhosts: readonlystring[]
id
readonlyid:string
mode
readonlymode:"bundle"|"copy"
name
readonlyname:string
path
readonlypath:string
rendered?
readonlyoptionalrendered?:ArtifactManifestScriptRendered
The conventional rendered-script route this entry renders.
worker?
readonlyoptionalworker?:string
ArtifactManifestScriptRendered
Properties
routeId
readonlyrouteId:string
ArtifactManifestServer
Properties
id
readonlyid:string
mode
readonlymode:CompiledServerMode
name
readonlyname:string
routes
readonlyroutes: readonlyArtifactManifestRoute[]
ArtifactManifestSourceInput
Properties
executable?
readonlyoptionalexecutable?:boolean
path
readonlypath:string
sha256
readonlysha256:string
ArtifactManifestValidation
Properties
artifact
readonlyartifact:ArtifactManifestValidationRecord
projections
readonlyprojections: readonlyArtifactManifestProjectionValidation[]
source
readonlysource:ArtifactManifestValidationRecord
ArtifactManifestValidationRecord
Extended by
Properties
status
readonlystatus:"passed"
ArtifactOutputProvenance
Properties
kind
readonlykind:ArtifactOutputKind
path
readonlypath:string
POSIX path relative to the published artifact root, including its target.
sourceInputs
readonlysourceInputs: readonlystring[]
Sorted, unique POSIX paths relative to the project root.
AssembledArtifactManifest
Properties
bytes
readonlybytes:string
manifest
readonlymanifest:ArtifactManifest
BeforeToolHookEvent
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extends
Extended by
Properties
cwd?
readonlyoptionalcwd?:string
Inherited from
effort?
readonlyoptionaleffort?:string
Inherited from
hookEventName?
readonlyoptionalhookEventName?:string
Inherited from
model?
readonlyoptionalmodel?:string
Inherited from
permissionMode?
readonlyoptionalpermissionMode?:string
Inherited from
promptId?
readonlyoptionalpromptId?:string
Inherited from
sessionId
readonlysessionId:string
Inherited from
toolInput
readonlytoolInput:JsonValue
The pending call's input; an object on Claude and Cursor, any JSON value on Codex.
toolName
readonlytoolName:string
toolUseId
readonlytoolUseId:string
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
Inherited from
turnId?
readonlyoptionalturnId?:string
Inherited from
BuildResult
Properties
compiledCliBins
readonlycompiledCliBins: readonlyCompiledCliBin[]
The routed-CLI executables emitted into host artifacts (#387), one per hosting target.
compiledEntries
readonlycompiledEntries: readonlyCompiledEntry[]
compiledHooks
readonlycompiledHooks: readonlyCompiledHookEntry[]
compiledMcpApps
readonlycompiledMcpApps: readonlyCompiledMcpApp[]
compiledMcpEntries
readonlycompiledMcpEntries: readonlyCompiledMcpEntry[]
compileEvidence
readonlycompileEvidence:CompileEvidenceRecord
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
Non-fatal compiler findings the artifact survived — MCP App view compile
warnings and size advisories. Errors never reach here: a failing compile
throws a DiagnosticError carrying them.
manifest
readonlymanifest:ArtifactManifest
outputProvenance
readonlyoutputProvenance: readonlyArtifactOutputProvenance[]
outputRoot
readonlyoutputRoot:string
CapabilityRow
A row from a pinned host capability table.
Properties
availability?
readonlyoptionalavailability?:Readonly<Record<string, {reason?:string;state?:string; }>>
evidence?
readonlyoptionalevidence?: readonlystring[]
nativeEvent?
readonlyoptionalnativeEvent?:string
payload?
readonlyoptionalpayload?:JsonObject
reason?
readonlyoptionalreason?:string
state?
readonlyoptionalstate?:string
ClaudeSkillExtension
Properties
agent?
readonlyoptionalagent?:string
allowedTools?
readonlyoptionalallowedTools?:string| readonlystring[]
argumentHint?
readonlyoptionalargumentHint?:string
arguments?
readonlyoptionalarguments?: readonlystring[]
background?
readonlyoptionalbackground?:boolean
context?
readonlyoptionalcontext?:"fork"
disableModelInvocation?
readonlyoptionaldisableModelInvocation?:boolean
disallowedTools?
readonlyoptionaldisallowedTools?:string| readonlystring[]
effort?
readonlyoptionaleffort?:"low"|"high"|"max"|"medium"|"xhigh"
hooks?
readonlyoptionalhooks?:Readonly<Record<string,unknown>>
model?
readonlyoptionalmodel?:string
paths?
readonlyoptionalpaths?: readonlystring[]
shell?
readonlyoptionalshell?:"bash"|"powershell"
userInvocable?
readonlyoptionaluserInvocable?:boolean
whenToUse?
readonlyoptionalwhenToUse?:string
CodexCommandInput
Properties
args
readonlyargs: readonlystring[]
cwd
readonlycwd:string
environment
readonlyenvironment:ProcessEnv
signal?
readonlyoptionalsignal?:AbortSignal
timeoutMs
readonlytimeoutMs:number
CodexCommandResult
Properties
exitCode
readonlyexitCode:number
failure?
readonlyoptionalfailure?:"timeout"|"output-limit"|"cancelled"
stderr
readonlystderr:string
stdout
readonlystdout:string
CodexEvalHarness
Properties
host
readonlyhost:"codex"
kind
readonlykind:"native-codex"
name
readonlyname:string
runTrial
readonlyrunTrial: (options) =>Promise<EvalTrialRecord>
Parameters
options
Returns
Promise<EvalTrialRecord>
CodexSkillExtension
Properties
dependencies?
readonlyoptionaldependencies?:object
tools?
readonlyoptionaltools?: readonlyCodexSkillToolDependency[]
interface?
readonlyoptionalinterface?:object
brandColor?
readonlyoptionalbrandColor?:string
defaultPrompt?
readonlyoptionaldefaultPrompt?:string
displayName?
readonlyoptionaldisplayName?:string
iconLarge?
readonlyoptionaliconLarge?:string
iconSmall?
readonlyoptionaliconSmall?:string
shortDescription?
readonlyoptionalshortDescription?:string
policy?
readonlyoptionalpolicy?:object
allowImplicitInvocation?
readonlyoptionalallowImplicitInvocation?:boolean
ConfigFactoryContext
Properties
command
command:
string
mode
mode:
string
projectRoot
projectRoot:
string
selectedTargets
selectedTargets: readonly
string[]
CreateEventTracerOptions
Properties
execution
readonlyexecution:EventTraceExecution
now?
readonlyoptionalnow?: () =>number
Monotonic clock in milliseconds; performance.now when absent.
Returns
number
observer?
readonlyoptionalobserver?:EventTraceObserver
When absent, each emission reads the process-local observer.
CursorSkillExtension
Properties
color?
readonlyoptionalcolor?:string
disableModelInvocation?
readonlyoptionaldisableModelInvocation?:boolean
globs?
readonlyoptionalglobs?:string| readonlystring[]
icon?
readonlyoptionalicon?:string
paths?
readonlyoptionalpaths?: readonlystring[]
DefinedSkill
Properties
description
readonlydescription:string
name
readonlyname:string
targets?
readonlyoptionaltargets?:DefinedSkillTargets
DevServerSession
Properties
url
readonlyurl:string
Methods
close()
close():
Promise<void>
Returns
Promise<void>
status()
status():
ProjectStatus
Returns
DiagnosticSummary
Properties
errors
readonlyerrors:number
infos
readonlyinfos:number
warnings
readonlywarnings:number
EvalAssertionSummary
Properties
id
readonlyid:string
kind
readonlykind:EvalAssertionKind
skill?
readonlyoptionalskill?:string
The Skill an activation assertion references; absent for blanket and non-Skill assertions.
EvalCaseSummary
Properties
assertions
readonlyassertions: readonlyEvalAssertionSummary[]
digest
readonlydigest:string
hosts
readonlyhosts: readonlystring[]
id
readonlyid:string
invocation
readonlyinvocation:EvalInvocation
prompt
readonlyprompt:string
trials
readonlytrials:number
EvalComparison
Properties
baselineRunId
readonlybaselineRunId:string
candidateRunId
readonlycandidateRunId:string
rows
readonlyrows: readonlyEvalComparisonRow[]
sampleSize
readonlysampleSize:number
summary
readonlysummary:EvalComparisonSummary
EvalHarness
Properties
kind
readonlykind:"native-codex"|"deterministic"|"native-claude"
name
readonlyname:string
EvalRunResult
Properties
aggregates
readonlyaggregates: readonlyEvalCaseAggregate[]
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
run
readonlyrun:EvalRunRecord
trials
readonlytrials: readonlyEvalTrialRecord[]
EvalRunSelection
Extended by
Properties
caseIds?
readonlyoptionalcaseIds?: readonlystring[]
suites?
readonlyoptionalsuites?: readonlystring[]
EvalSemanticGraderContext
The grader sees the task, its assertions, the response, the trace, and the workspace: never a condition label.
Properties
assertions
readonlyassertions: readonlyEvalAssertion[]
finalResponse
readonlyfinalResponse:string
prompt
readonlyprompt:string
trace
readonlytrace: readonlyClaudeTraceEvent[]
workspacePath
readonlyworkspacePath:string
EvalSemanticGraderSpec
Properties
grade
readonlygrade:EvalSemanticGrader
id
readonlyid:string
EvalServiceNativeOptions
Properties
claudeRun?
readonlyoptionalclaudeRun?:NativeClaudeProcessRunner
codexRun?
readonlyoptionalcodexRun?:CodexCommandRunner
environment?
readonlyoptionalenvironment?:Readonly<ProcessEnv>
EvalSuiteListing
Properties
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
suites
readonlysuites: readonlyEvalSuiteSummary[]
EvalSuiteSummary
Properties
cases
readonlycases: readonlyEvalCaseSummary[]
digest
readonlydigest:string
name
readonlyname:string
sourcePath
readonlysourcePath:string
Project-relative so no caller, browser included, learns an absolute location.
EventTraceErrorSummary
What an observer learns about a thrown value: name, message, string code. Never the value itself.
Properties
code?
readonlyoptionalcode?:string
message
readonlymessage:string
name
readonlyname:string
EventTraceExecuteStart
The gate returned render: the kernel now loads the rendered route runtime.
Extends
EventTraceEventBase<"execute.start","execute">
Properties
at
readonlyat:number
Monotonic milliseconds from the tracer's clock (performance.now() by default).
Inherited from
execution
readonlyexecution:EventTraceExecution
Inherited from
kind
readonlykind:"execute.start"
Inherited from
EventTraceEventBase.kind
phase
readonlyphase:"execute"
Inherited from
EventTraceEventBase.phase
runtime
readonlyruntime:EventTraceRuntime
sequence
readonlysequence:number
Inherited from
EventTraceExecution
Identity shared by every event of one execution. executionId is unique
per hook execution; host is the compiled target name, nativeEvent the
host's own event name for the canonical event.
Properties
event
readonlyevent:"session/start"|"tool/before"|"tool/after"|"stop"|"agent/start"|"agent/stop"|"workspace/open"|"session/end"|"prompt/submit"|"tool/failure"|"compact/before"|"compact/after"|"permission/request"|"permission/denied"|"stop/failure"|"file/change"|"config/change"|"task/create"|"task/complete"|"agent/idle"|"model-switch/before"|"model-switch/after"
executionId
readonlyexecutionId:string
host
readonlyhost:string
nativeEvent
readonlynativeEvent:string
EventTraceFailure
Terminal: the execution failed in phase. Nothing follows this event.
Extends
EventTraceEventBase<"failure",EventTracePhase>
Properties
at
readonlyat:number
Monotonic milliseconds from the tracer's clock (performance.now() by default).
Inherited from
EventTraceEventBase.at
durationMs?
readonlyoptionaldurationMs?:number
Elapsed since the first event of this trace; absent when the failure is the first event.
error
readonlyerror:EventTraceErrorSummary
execution
readonlyexecution:EventTraceExecution
Inherited from
EventTraceEventBase.execution
kind
readonlykind:"failure"
Inherited from
EventTraceEventBase.kind
phase
readonlyphase:"handler"|"execute"|"providers"|"render"
Inherited from
EventTraceEventBase.phase
sequence
readonlysequence:number
Inherited from
EventTraceEventBase.sequence
EventTraceHandlerOutcomeEvent
Extends
EventTraceEventBase<"handler.outcome","handler">
Properties
at
readonlyat:number
Monotonic milliseconds from the tracer's clock (performance.now() by default).
Inherited from
EventTraceEventBase.at
durationMs?
readonlyoptionaldurationMs?:number
Present when handler.start was observed on this tracer.
execution
readonlyexecution:EventTraceExecution
Inherited from
EventTraceEventBase.execution
kind
readonlykind:"handler.outcome"
Inherited from
EventTraceEventBase.kind
outcome
readonlyoutcome:EventTraceHandlerOutcome
phase
readonlyphase:"handler"
Inherited from
EventTraceEventBase.phase
sequence
readonlysequence:number
Inherited from
EventTraceEventBase.sequence
EventTraceProvidersFinish
Extends
EventTraceEventBase<"providers.finish","providers">
Properties
at
readonlyat:number
Monotonic milliseconds from the tracer's clock (performance.now() by default).
Inherited from
EventTraceEventBase.at
count
readonlycount:number
durationMs?
readonlyoptionaldurationMs?:number
Present when providers.start was observed on this tracer.
execution
readonlyexecution:EventTraceExecution
Inherited from
EventTraceEventBase.execution
kind
readonlykind:"providers.finish"
Inherited from
EventTraceEventBase.kind
phase
readonlyphase:"providers"
Inherited from
EventTraceEventBase.phase
sequence
readonlysequence:number
Inherited from
EventTraceEventBase.sequence
EventTracer
The framework-owned emitter the kernel calls at each phase boundary. Every method is safe to call at any time and never throws.
Properties
closed
readonlyclosed:boolean
True once failure was recorded; later calls are dropped.
enabled
readonlyenabled:boolean
Whether an explicit or process-local observer is currently available.
execution
readonlyexecution:EventTraceExecution
Methods
executeStart()
executeStart(
runtime):void
Parameters
runtime
Returns
void
failure()
failure(
phase,error):void
Parameters
phase
"handler" | "execute" | "providers" | "render"
error
unknown
Returns
void
handlerOutcome()
handlerOutcome(
result):void
Parameters
result
EventHandlerResult
Returns
void
handlerStart()
handlerStart():
void
Returns
void
providersFinish()
providersFinish(
count):void
Parameters
count
number
Returns
void
providersStart()
providersStart():
void
Returns
void
renderFinish()
renderFinish():
void
Returns
void
renderStart()
renderStart():
void
Returns
void
EventTraceRenderFinish
Extends
EventTraceEventBase<"render.finish","render">
Properties
at
readonlyat:number
Monotonic milliseconds from the tracer's clock (performance.now() by default).
Inherited from
EventTraceEventBase.at
durationMs?
readonlyoptionaldurationMs?:number
Present when render.start was observed on this tracer.
execution
readonlyexecution:EventTraceExecution
Inherited from
EventTraceEventBase.execution
kind
readonlykind:"render.finish"
Inherited from
EventTraceEventBase.kind
phase
readonlyphase:"render"
Inherited from
EventTraceEventBase.phase
sequence
readonlysequence:number
Inherited from
EventTraceEventBase.sequence
FailedBuildAttempt
Properties
completedAt
readonlycompletedAt:string
diagnostics
readonlydiagnostics: readonly [Diagnostic,Diagnostic]
id
readonlyid:string
outcome
readonlyoutcome:"failed"
result?
readonlyoptionalresult?:undefined
sourceRevision
readonlysourceRevision:string
startedAt
readonlystartedAt:string
HookEventBase
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extended by
Properties
cwd?
readonlyoptionalcwd?:string
effort?
readonlyoptionaleffort?:string
hookEventName?
readonlyoptionalhookEventName?:string
model?
readonlyoptionalmodel?:string
permissionMode?
readonlyoptionalpermissionMode?:string
promptId?
readonlyoptionalpromptId?:string
sessionId
readonlysessionId:string
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
turnId?
readonlyoptionalturnId?:string
HookEventPayloads
The per-event payload a config hook handler receives, keyed by handler event.
Properties
afterTool
readonlyafterTool:AfterToolHookEvent
agentStart
readonlyagentStart:AgentStartHookEvent
agentStop
readonlyagentStop:AgentStopHookEvent
beforeTool
readonlybeforeTool:BeforeToolHookEvent
sessionStart
readonlysessionStart:SessionStartHookEvent
stop
readonlystop:StopHookEvent
HookHandlerContext
What the generated wrapper hands a handler beside the decoded event: the host that invoked it, that host's native event name, and the validated native input verbatim, for a handler that needs a host-specific field.
Properties
nativeEvent
readonlynativeEvent:string
nativeInput
readonlynativeInput:Readonly<Record<string,unknown>>
target
readonlytarget:"claude"|"amp"|"codex"|"cursor"
HookResultRule
What a hook result may carry for one handler event, on every host.
Properties
additionalContext
readonlyadditionalContext:boolean
additionalContext is accepted and projected into the agent's context on every host.
deny
readonlydeny:boolean
{ outcome: 'deny', reason } is a legal result (a denial always needs a
non-empty reason). Cursor consumes an agentStop denial only for a
subagent that completed (nativeInput.status === "completed"); denying an
errored or aborted one fails the hook there, so a handler targeting Cursor
checks context.nativeInput.status first.
updatedInput
readonlyupdatedInput:boolean
A continuing result may replace the pending call's input with updatedInput.
HostCapabilityTable
A loaded pinned host capability table and its source identity.
Properties
data
readonlydata:JsonObject
fileName
readonlyfileName:string
host
readonlyhost:string
version
readonlyversion:string
Invalidation
A debounced batch of source paths which requires project work to be reconsidered.
Properties
occurredAt
readonlyoccurredAt:string
paths
readonlypaths: readonlystring[]
reason
readonlyreason:InvalidationReason
NormalizationConfigExtension
Properties
key
readonlykey:string
target
readonlytarget:string
NormalizationTargetRegistry
Methods
binSources()?
optionalbinSources(config,targetNames): readonlyNormalizationHostBinSource[]
Parameters
config
Readonly<AgentBundleConfig>
targetNames
readonly string[]
Returns
readonly NormalizationHostBinSource[]
builtInHost()?
optionalbuiltInHost(name):string|undefined
The built-in host the adapter registered under name is, judged by
adapter identity rather than name (TargetRegistry.builtInHost); a
registry that cannot tell judges by name. undefined for a custom
adapter or an unknown name.
Parameters
name
string
Returns
string | undefined
capabilityState()?
optionalcapabilityState(name,capability):CapabilityState|undefined
Parameters
name
string
capability
string
Returns
CapabilityState | undefined
componentCapabilityState()?
optionalcomponentCapabilityState(name,capability):CapabilityState|undefined
The judgment that decides component emission for one target: the
adapter's componentCapabilities override when it publishes one (a key
it omits reads as no row), otherwise its capabilities. Emission and
inspect accounting must consult the same judgment.
Parameters
name
string
capability
string
Returns
CapabilityState | undefined
configExtensions()
configExtensions(): readonly
NormalizationConfigExtension[]
Returns
readonly NormalizationConfigExtension[]
defaultTargetNames()
defaultTargetNames(): readonly
string[]
Returns
readonly string[]
has()
has(
name):boolean
Parameters
name
string
Returns
boolean
nativeHookSources()?
optionalnativeHookSources(config,targetNames): readonlyNormalizationNativeHookSource[]
Parameters
config
Readonly<AgentBundleConfig>
targetNames
readonly string[]
Returns
readonly NormalizationNativeHookSource[]
outputStyleSources()?
optionaloutputStyleSources(config,targetNames): readonlyNormalizationHostBinSource[]
Parameters
config
Readonly<AgentBundleConfig>
targetNames
readonly string[]
Returns
readonly NormalizationHostBinSource[]
supports()
supports(
name,capability):boolean
Parameters
name
string
capability
string
Returns
boolean
workflowSources()?
optionalworkflowSources(config,targetNames): readonlyNormalizationHostBinSource[]
Parameters
config
Readonly<AgentBundleConfig>
targetNames
readonly string[]
Returns
readonly NormalizationHostBinSource[]
NormalizedAsset
One project-level static file copied byte-for-byte into selected target artifacts.
Properties
bytes
readonlybytes:number
id
readonlyid:string
name
readonlyname:string
provenance
readonlyprovenance:SourceProvenance
relativePath
readonlyrelativePath:string
The POSIX destination path under the artifact's assets/ directory.
source
readonlysource:string
The absolute source file path.
targets
readonlytargets: readonlystring[]
NormalizedConfigExtension
Properties
id
readonlyid:string
key
readonlykey:string
provenance
readonlyprovenance:SourceProvenance
target
readonlytarget:string
value
readonlyvalue:unknown
NormalizedPayload
One declared prebuilt payload directory packaged verbatim into target artifacts.
Properties
files
readonlyfiles: readonlyNormalizedPayloadFile[]
id
readonlyid:string
name
readonlyname:string
The artifact-root destination directory name.
provenance
readonlyprovenance:SourceProvenance
runtimeDependencies
readonlyruntimeDependencies: readonlystring[]
Declared bare package names the payload loads at run time, sorted and unique.
source
readonlysource:string
Absolute payload source directory.
targets
readonlytargets: readonlystring[]
NormalizedPayloadFile
One file of a prebuilt payload directory, copied byte-for-byte.
Properties
bytes
readonlybytes:number
relativePath
readonlyrelativePath:string
POSIX path relative to the payload source directory (and its artifact destination).
source
readonlysource:string
Absolute source file path.
NormalizedPlugin
Properties
assets?
readonlyoptionalassets?: readonlyNormalizedAsset[]
Project-level copied assets. Normalizers always provide this collection; it remains optional so hand-constructed models stay valid without assets.
commands?
readonlyoptionalcommands?: readonlyNormalizedCommand[]
Conventional src/commands/*.md documents. Present only when commands are
discovered; optional so hand-constructed models predating commands remain valid.
extensions
readonlyextensions:Readonly<Record<string,NormalizedConfigExtension>>
hooks
readonlyhooks: readonlyNormalizedHook[]
hostBins?
readonlyoptionalhostBins?: readonlyNormalizedHostPayloadDirectory[]
Adapter-declared host-native executable directories, enumerated during normalization.
hostOutputStyles?
readonlyoptionalhostOutputStyles?: readonlyNormalizedHostPayloadDirectory[]
Adapter-declared host-native output-style directories, enumerated during normalization.
hostWorkflows?
readonlyoptionalhostWorkflows?: readonlyNormalizedHostPayloadDirectory[]
Adapter-declared host-native workflow directories, enumerated during normalization.
layouts?
readonlyoptionallayouts?: readonlyCompiledLayout[]
Conventional layout modules composed around every rendered route (root first, then the owning server's).
lspServers?
readonlyoptionallspServers?: readonlyNormalizedLspServer[]
Language-server components declared through host config extensions.
Present only when a selected host extension declares lspServers;
optional so hand-constructed models predating the kind remain valid.
marketplace?
readonlyoptionalmarketplace?:true
mcpApps?
readonlyoptionalmcpApps?: readonlyNormalizedMcpApp[]
Compiler-owned local MCP Apps. Normalizers always provide this collection; it remains optional so pre-Apps consumers can continue to provide a hand-constructed normalized model.
mcpServers
readonlymcpServers: readonlyNormalizedMcpServer[]
metadata
readonlymetadata:NormalizedMetadata
nativeHooks?
readonlyoptionalnativeHooks?: readonlyNormalizedNativeHook[]
notices?
readonlyoptionalnotices?:NormalizedNotices
Notice ledger policy declared by notices config; absent means runtime defaults.
packageBuild?
readonlyoptionalpackageBuild?:NormalizedPackageBuild
The framework-owned npm package build (bin + lib outputs). Present only when configured or discovered by convention; optional so hand-constructed models predating the package build stay valid.
payloads?
readonlyoptionalpayloads?: readonlyNormalizedPayload[]
Declared prebuilt payload directories packaged verbatim. Present only
when the config declares a payload block; optional so hand-constructed
models predating prebuilt payloads stay valid.
projectRoot
readonlyprojectRoot:string
The absolute project root the model's absolute paths lie under; excluded from model identity.
providers?
readonlyoptionalproviders?: readonlyCompiledProvider[]
Conventional context providers executed for every generated render request.
repositoryMarketplace?
readonlyoptionalrepositoryMarketplace?:true
rules?
readonlyoptionalrules?: readonlyNormalizedRule[]
Conventional src/rules/*.mdc documents. Present only when rules are
discovered; optional so hand-constructed models predating rules remain valid.
runtime
readonlyruntime:NormalizedRuntime
The generated-executable runtime floor selected during normalization.
scripts
readonlyscripts: readonlyNormalizedScript[]
skills
readonlyskills: readonlyNormalizedSkill[]
sourceMap?
readonlyoptionalsourceMap?:true
True when output.sourceMap opted the generated-executable compiler
profile in. Absent means source maps stay off.
state?
readonlyoptionalstate?:NormalizedStateDefinition
targets
readonlytargets: readonlyNormalizedTarget[]
web?
readonlyoptionalweb?:NormalizedWeb
NormalizedRuntime
The selected runtime floor for generated executables, written to artifact metadata.
Properties
node
readonlynode:string
PortableAuthorConfig
Agent Plugins 1.0.0 §5.4 author object: optional name, email, and url strings.
Properties
email?
readonlyoptionalemail?:string
name?
readonlyoptionalname?:string
url?
readonlyoptionalurl?:string
PortableManifestConfig
Portable-only manifest metadata layered onto the emitted root plugin.json
(Agent Plugins 1.0.0 §5.4 metadata fields and §5.6/§8.1 extensions).
Every field is optional; omitted fields are omitted from the manifest.
Properties
author?
readonlyoptionalauthor?:PortableAuthorConfig|null
Descriptive fields default to the shared plugin.metadata layer; null opts this manifest out.
extensions?
readonlyoptionalextensions?:Readonly<Record<string,Readonly<Record<string,unknown>>>>
Client extension namespaces (reverse-domain, §8) mapped to their opaque object payloads.
homepage?
readonlyoptionalhomepage?:string|null
keywords?
readonlyoptionalkeywords?: readonlystring[] |null
license?
readonlyoptionallicense?:string|null
repository?
readonlyoptionalrepository?:string|null
ProjectEventPayloadMap
Properties
artifact.available
readonlyartifact.available:ActiveArtifactStatus
artifact.status
readonlyartifact.status:ArtifactStatus
build.failed
readonlybuild.failed:FailedBuildAttempt
build.started
readonlybuild.started:RunningBuildAttempt
dev.contract.status
readonlydev.contract.status:DevContractStatusEvent
dev.host.sync
readonlydev.host.sync:DevHostSyncEvent
invalidation
readonlyinvalidation:Invalidation
route.invocation
readonlyroute.invocation:RouteInvocationEventPayload
runtime.event
readonlyruntime.event:RuntimeEvent
source.changed
readonlysource.changed:Invalidation
source.status
readonlysource.status:SourceStatus
ProjectReplayGap
Properties
earliestAvailableSequence
readonlyearliestAvailableSequence:number
latestDroppedSequence
readonlylatestDroppedSequence:number
requestedAfterSequence
readonlyrequestedAfterSequence:number
type
readonlytype:"replay.gap"
ProjectStatus
Properties
artifact
readonlyartifact:ArtifactStatus
build
readonlybuild:BuildStatus
hostAdoption?
readonlyoptionalhostAdoption?:HostAdoptionStatus
runtime?
readonlyoptionalruntime?:ProjectRuntimeTopology
source
readonlysource:SourceStatus
RunClaudeTrialOptions
Extends
ClaudeProcessOptions
Properties
artifact
readonlyartifact:PreparedEvalArtifact
configuredSemanticGrader?
readonlyoptionalconfiguredSemanticGrader?:NormalizedEvalSemanticGrader
Server-normalized configuration; callers cannot provide an id, command, environment, or cwd.
environment?
readonlyoptionalenvironment?:Readonly<ProcessEnv>
evalCase
readonlyevalCase:EvalCase
fixturePlan
readonlyfixturePlan:EvalFixturePlan
gracePeriodMs?
readonlyoptionalgracePeriodMs?:number
Inherited from
ClaudeProcessOptions.gracePeriodMs
graders?
readonlyoptionalgraders?: readonlyEvalGraderSpec[]
host?
readonlyoptionalhost?:string
maxOutputBytes?
readonlyoptionalmaxOutputBytes?:number
Inherited from
ClaudeProcessOptions.maxOutputBytes
now?
readonlyoptionalnow?: () =>Date
Returns
Date
onCompleted?
readonlyoptionalonCompleted?: (result) =>void|Promise<void>
Narrow server-owned native Playground seam; no raw process output crosses it.
Parameters
result
Readonly<{ hookEvents?: readonly string[]; response?: string; workspacePath?: string; }>
Returns
void | Promise<void>
onProgress?
readonlyoptionalonProgress?: (phase) =>void|Promise<void>
Parameters
phase
"fixture.materialized" | "host.started" | "preflight"
Returns
void | Promise<void>
run?
readonlyoptionalrun?:NativeClaudeProcessRunner
Injected for tests; production always spawns the installed CLI.
Inherited from
ClaudeProcessOptions.run
semanticGrader?
readonlyoptionalsemanticGrader?:EvalSemanticGraderSpec
signal?
readonlyoptionalsignal?:AbortSignal
Inherited from
ClaudeProcessOptions.signal
suiteDir
readonlysuiteDir:string
target?
readonlyoptionaltarget?:string
timeoutMs?
readonlyoptionaltimeoutMs?:number
Inherited from
ClaudeProcessOptions.timeoutMs
trialIndex
readonlytrialIndex:number
workspaceRoot
readonlyworkspaceRoot:string
writer
readonlywriter:EvalTrialWriter
RunCodexEvalTrialOptions
Properties
artifact
readonlyartifact:Pick<PreparedEvalArtifact,"binding"|"root">
environment?
readonlyoptionalenvironment?:Readonly<ProcessEnv>
evalCase
readonlyevalCase:EvalCase
fixturePlan
readonlyfixturePlan:EvalFixturePlan
graders?
readonlyoptionalgraders?: readonlyEvalGraderSpec[]
host?
readonlyoptionalhost?:string
normalCodexHome?
readonlyoptionalnormalCodexHome?:string
now?
readonlyoptionalnow?: () =>Date
Returns
Date
onCompleted?
readonlyoptionalonCompleted?: (result) =>void|Promise<void>
Narrow server-owned native Playground seam; no raw process output crosses it.
Parameters
result
Readonly<{ response?: string; workspacePath: string; }>
Returns
void | Promise<void>
onProgress?
readonlyoptionalonProgress?: (phase) =>void|Promise<void>
Parameters
phase
"fixture.materialized" | "host.started" | "preflight" | "codex.setup"
Returns
void | Promise<void>
run?
readonlyoptionalrun?:CodexCommandRunner
signal?
readonlyoptionalsignal?:AbortSignal
suiteDir
readonlysuiteDir:string
target?
readonlyoptionaltarget?:string
timeoutMs?
readonlyoptionaltimeoutMs?:number
trialIndex
readonlytrialIndex:number
workspaceRoot
readonlyworkspaceRoot:string
writer
readonlywriter:EvalTrialWriter
RunningBuildAttempt
Properties
completedAt?
readonlyoptionalcompletedAt?:undefined
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
id
readonlyid:string
outcome
readonlyoutcome:"running"
result?
readonlyoptionalresult?:undefined
sourceRevision
readonlysourceRevision:string
startedAt
readonlystartedAt:string
RuntimeEvent
Properties
correlationId?
readonlyoptionalcorrelationId?:string
details?
readonlyoptionaldetails?:Readonly<{[key:string]:JsonValue; }>
providerSessionId
readonlyproviderSessionId:string
runId?
readonlyoptionalrunId?:string
runtimeGenerationId?
readonlyoptionalruntimeGenerationId?:string
type
readonlytype:"runtime.status"|"runtime.generation.compiling"|"runtime.generation.activated"|"runtime.generation.failed"|"runtime.run.started"|"runtime.run.completed"|"runtime.run.failed"
SessionStartHookEvent
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extends
Properties
cwd?
readonlyoptionalcwd?:string
Inherited from
effort?
readonlyoptionaleffort?:string
Inherited from
hookEventName?
readonlyoptionalhookEventName?:string
Inherited from
model?
readonlyoptionalmodel?:string
Inherited from
permissionMode?
readonlyoptionalpermissionMode?:string
Inherited from
promptId?
readonlyoptionalpromptId?:string
Inherited from
sessionId
readonlysessionId:string
Inherited from
source?
readonlyoptionalsource?:string
How the session began (startup, resume, …); absent on Cursor.
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
Inherited from
turnId?
readonlyoptionalturnId?:string
Inherited from
SkillIr
Properties
authoredTargets?
readonlyoptionalauthoredTargets?:unknown
body
readonlybody:string
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
extensions
readonlyextensions:SkillIrExtensions
markdown
readonlymarkdown:string
passThrough
readonlypassThrough:boolean
placeholders
readonlyplaceholders: readonlySkillIrPlaceholder[]
portable
readonlyportable:PortableSkillMetadata
resources
readonlyresources: readonlySkillResourceRef[]
sidecars
readonlysidecars: readonlySkillSidecarRef[]
source
readonlysource:string
SkillTreeLayoutDecision
Properties
decision
readonlydecision:"shared"|"per-host-required"
evidence
readonlyevidence:string
feeds
readonlyfeeds:"#101"
reason
readonlyreason:string
SourceStatus
Properties
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
packageName?
readonlyoptionalpackageName?:string
The npm package name axis derived from package.json, when valid.
packageVersion?
readonlyoptionalpackageVersion?:string
The semantic release-version axis derived from package.json, when valid.
revision?
readonlyoptionalrevision?:string
state
readonlystate:SourceState
StartDevServerOptions
Properties
agentApi?
readonlyoptionalagentApi?:boolean
Enables the optional agent-facing MCP endpoint for this foreground session.
agentApiToken?
readonlyoptionalagentApiToken?:string
Internal
Trusted test seam for the fixed Agent API bearer secret.
assets?
readonlyoptionalassets?:WorkbenchAssetSource
Supplied by integration tests; published callers use the packaged assets.
installHosts?
readonlyoptionalinstallHosts?: readonlyDevInstallHost[]
Hosts whose installed development variant follows successful artifact epochs.
open?
readonlyoptionalopen?:boolean
Launch the foreground URL after it has started. Defaults to false.
openBrowser?
readonlyoptionalopenBrowser?:OpenBrowser
Injectable browser launcher for embedding and deterministic tests.
port?
readonlyoptionalport?:number
registry?
readonlyoptionalregistry?:TargetRegistry
Advanced adapter registry shared by all development project and runtime services.
root
readonlyroot:string
testing?
readonlyoptionaltesting?:DevServerTesting
Test-only listener and sandbox factories; production always uses the built-in loopback services.
workbenchDevOrigins?
readonlyoptionalworkbenchDevOrigins?: readonlystring[]
Contributor HMR only: loopback origins of a Workbench Rsbuild dev server that proxies /api to this foreground server; never set by default.
StopHookEvent
The payload fields every handler event carries. Fields are required
only when every host's wrapper guarantees them; sessionId is the one
identity every host names. transcriptPath is null on Codex when no
rollout exists yet.
Extends
Properties
cwd?
readonlyoptionalcwd?:string
Inherited from
effort?
readonlyoptionaleffort?:string
Inherited from
hookEventName?
readonlyoptionalhookEventName?:string
Inherited from
lastAssistantMessage?
readonlyoptionallastAssistantMessage?:string|null
model?
readonlyoptionalmodel?:string
Inherited from
permissionMode?
readonlyoptionalpermissionMode?:string
Inherited from
promptId?
readonlyoptionalpromptId?:string
Inherited from
sessionId
readonlysessionId:string
Inherited from
stopHookActive
readonlystopHookActive:boolean
Whether this stop hook is already running for the turn (loop guard).
transcriptPath?
readonlyoptionaltranscriptPath?:string|null
Inherited from
turnId?
readonlyoptionalturnId?:string
Inherited from
SucceededBuildAttempt
Properties
completedAt
readonlycompletedAt:string
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
id
readonlyid:string
outcome
readonlyoutcome:"succeeded"
result
readonlyresult:Readonly<{epoch:ArtifactEpoch; }>
sourceRevision
readonlysourceRevision:string
startedAt
readonlystartedAt:string
Type Aliases
ActiveArtifactStatus
ActiveArtifactStatus =
Extract<ArtifactStatus, {state:"active"; }>
AgentBundleConfig
AgentBundleConfig =
CoreAgentBundleConfig&ClaudeConfigExtension&CodexConfigExtension&CursorConfigExtension&PortableConfigExtension
AgentBundleHookInput
AgentBundleHookInput =
string|AgentBundleHookEntry| readonly (string|AgentBundleHookEntry)[]
AgentBundlePayloadConfig
AgentBundlePayloadConfig =
Readonly<Record<string,AgentBundlePayloadInput>>
Prebuilt payload trees packaged byte-for-byte into selected target artifacts. Key = artifact-root destination directory (a safe single path segment outside the compiler-owned namespaces), value = the already-built source directory. Every file keeps its exact relative path — payload trees are opaque to the compiler, which cannot rewrite their internal sibling references, so stable names are the correctness contract; integrity stays content-addressed through the artifact manifest and project source inputs.
AgentBundlePayloadInput
AgentBundlePayloadInput =
string|AgentBundlePayloadEntry
AgentEventPayload
AgentEventPayload<
E> ={ readonly [Field in AgentEventPayloadFields[E][number]]?: AgentEventPayloadField<AgentEventPayloadFieldTypes[Field]> }
The canonical payload of event family E: each admitted field is present
with its provenance when the host sent it and absent (undefined) when the
host did not — never fabricated. For the wide CanonicalAgentEvent the
payload admits every field of every family, all optional.
Type Parameters
E
E extends CanonicalAgentEvent = CanonicalAgentEvent
AgentEventPayloadFieldKind
AgentEventPayloadFieldKind =
"boolean"|"json"|"nullable-string"|"string"|"string-array"|"trigger"
The JSON shape each canonical payload field is decoded as; the runtime twin of AgentEventPayloadFieldTypes.
AgentEventPayloadFieldName
AgentEventPayloadFieldName = keyof
AgentEventPayloadFieldTypes
AgentEventPayloadFields
AgentEventPayloadFields = typeof
agentEventPayloadFields
AgentEventPayloadHost
AgentEventPayloadHost =
"amp"|"claude"|"codex"|"cursor"
The hosts whose native envelopes the framework maps into canonical payloads.
AgentTerminalColor
AgentTerminalColor =
"none"|"basic"|"256"|"truecolor"
basic is 16 colors, 256 the xterm palette, truecolor 24-bit.
AgentTerminalStreamKind
AgentTerminalStreamKind =
"tty"|"pipe"|"none"
tty is an interactive terminal; pipe any other open descriptor (a pipe,
a file, a socket, /dev/null); none means no human-facing stream exists
for the route on this surface — an MCP server's stdout is the protocol wire
and a hook's is its host envelope.
AgentTerminalSurface
AgentTerminalSurface =
"cli"|"mcp"|"hook"|"script"|"workbench"
The projection a request runs under. cli, script, and workbench own
a probed process; mcp and hook never have a terminal and always report
none.
ArtifactManifestBuiltInHost
ArtifactManifestBuiltInHost =
"amp"|"claude"|"codex"|"cursor"|"portable"
The shipped adapters, by identity. A projection planned by one of them records which, so a consumer holding only the manifest judges "is this the Claude projection" the way the build did — by adapter, never by the name the project selected it under (#578 audit: names are selection, not identity).
ArtifactManifestDistributionChannel
ArtifactManifestDistributionChannel =
"local"|"npm"
ArtifactManifestFileKind
ArtifactManifestFileKind = typeof
artifactManifestFileKinds[number]
ArtifactManifestLaunchArgument
ArtifactManifestLaunchArgument = {
kind:"artifact";path:string; } | {kind:"literal";value:string; }
One argument of a server launch record, after the entry. An author
argument written as agent-bundle:path:plugin-root/<path> is an
artifact reference — a root-relative POSIX path inside the composite root
(a files[] row, or a path under a declared payload directory). Every other
argument is a literal the launcher passes through with its remaining
agent-bundle:path:* tokens expanded; a literal that merely looks like a
path stays a literal, because the manifest records the author's declaration
and cwd-relative normalization is a projection concern (#633).
ArtifactManifestReadResult
ArtifactManifestReadResult =
Readonly<{manifest:ArtifactManifest;path:string;root:string;status:"ok"; }> |Readonly<{path:string;root:string;status:"missing"; }> |Readonly<{detail:string;path:string;root:string;status:"invalid"; }>
The one way a consumer opens a built artifact: agent-bundle.manifest.json
at the root it was handed. install, doctor, uninstall, eval,
serve-app, and the test harness all read the root through this result
and map it to their own diagnostic; none probes a host document to learn
what the root contains (#592 step 3, #555 W2/S3).
ArtifactManifestRouteKind
ArtifactManifestRouteKind =
CompiledRouteKind
Mirrors CompiledRouteKind: the manifest groups by the compiler's own kinds.
ArtifactManifestValidationStatus
ArtifactManifestValidationStatus =
"passed"
ArtifactOutputKind
ArtifactOutputKind =
"bundle"|"copy"|"generated"|"prebuilt"
ArtifactState
ArtifactState =
ArtifactStatus["state"]
ArtifactStatus
ArtifactStatus =
Readonly<{activeEpoch?:never;currentSourceRevision?:string;state:"missing"; }> |Readonly<{activeEpoch:ArtifactEpoch;currentSourceRevision:string;state:"active"; }> |Readonly<{activeEpoch:ArtifactEpoch;currentSourceRevision:string;state:"stale"; }>
BuildAttempt
BuildAttempt =
RunningBuildAttempt|SucceededBuildAttempt|FailedBuildAttempt
BuildAttemptOutcome
BuildAttemptOutcome =
BuildAttempt["outcome"]
BuildState
BuildState =
BuildStatus["state"]
BuildStatus
BuildStatus =
Readonly<{lastAttempt?:CompletedBuildAttempt;state:"idle"; }> |Readonly<{activeAttempt:RunningBuildAttempt;lastAttempt?:CompletedBuildAttempt;state:"building"; }> |Readonly<{lastAttempt:FailedBuildAttempt;state:"failed"; }>
CanonicalAgentEvent
CanonicalAgentEvent = typeof
canonicalAgentEvents[number]
CanonicalHookEvent
CanonicalHookEvent = typeof
canonicalHookEvents[number]
CodexCommandRunner
CodexCommandRunner = (
command) =>Promise<CodexCommandResult>
Parameters
command
Returns
Promise<CodexCommandResult>
CompletedBuildAttempt
CompletedBuildAttempt =
Exclude<BuildAttempt,RunningBuildAttempt>
ConfigFactory
ConfigFactory = (
context) =>AgentBundleConfig|Promise<AgentBundleConfig>
Parameters
context
Returns
AgentBundleConfig | Promise<AgentBundleConfig>
EvalSemanticGrader
EvalSemanticGrader = (
context) =>EvalScriptOutcome|Promise<EvalScriptOutcome>
Parameters
context
Returns
EvalScriptOutcome | Promise<EvalScriptOutcome>
EventTraceEvent
EventTraceEvent =
EventTraceHandlerStart|EventTraceHandlerOutcomeEvent|EventTraceExecuteStart|EventTraceProvidersStart|EventTraceProvidersFinish|EventTraceRenderStart|EventTraceRenderFinish|EventTraceFailure
EventTraceEventKind
EventTraceEventKind = typeof
eventTraceEventKinds[number]
EventTraceHandlerOutcome
EventTraceHandlerOutcome =
"render"|"continue"|"deny"
The gate decision without its reason text: deny is enough for a trace.
EventTraceHandlerStart
EventTraceHandlerStart =
EventTraceEventBase<"handler.start","handler">
EventTraceObserver
EventTraceObserver = (
event) =>void
A consumer's sink. Called synchronously with a frozen event; exceptions are swallowed.
Parameters
event
Returns
void
EventTracePhase
EventTracePhase = typeof
eventTracePhases[number]
EventTraceProvidersStart
EventTraceProvidersStart =
EventTraceEventBase<"providers.start","providers">
EventTraceRenderStart
EventTraceRenderStart =
EventTraceEventBase<"render.start","render">
EventTraceRuntime
EventTraceRuntime =
"shared"|"standalone"
Which runtime the deferred execute step loads the route in.
HookContinueResult
HookContinueResult<
E> =object&WithAdditionalContext<E> &WithUpdatedInput<E>
A continuing result: outcome may be omitted, and reason is never legal here.
Type Declaration
outcome?
readonlyoptionaloutcome?:"continue"
reason?
readonlyoptionalreason?:never
Type Parameters
E
E extends HookHandlerEventName
HookDenyResult
HookDenyResult<
E> =HookResultContract[E]["deny"] extendstrue?object&WithAdditionalContext<E> :never
A denying result, for the events whose hosts honour a denial; updatedInput is never legal while denying.
Type Parameters
E
E extends HookHandlerEventName
HookEvent
HookEvent<
E> =HookEventPayloads[E]
The event payload a handler for event E receives.
Type Parameters
E
E extends HookHandlerEventName
HookHandler
HookHandler<
E> = (event,context) =>HookResult<E> |undefined|void|Promise<HookResult<E> |undefined|void>
A config-declared hook handler module's default export for event E. Author it as
export default ((event) => ({ ... })) satisfies HookHandler<'sessionStart'>;
and an illegal result — a denying sessionStart, a reason beside
continue, updatedInput on a stop hook — is rejected by tsc instead
of by the wrapper at hook time. The wrapper's runtime validation is
unchanged, so a JavaScript or prebuilt handler is held to the same contract.
Type Parameters
E
E extends HookHandlerEventName
Parameters
event
HookEvent<E>
context
Returns
HookResult<E> | undefined | void | Promise<HookResult<E> | undefined | void>
HookHandlerEventName
HookHandlerEventName = typeof
hookHandlerEventNames[number]
HookResult
HookResult<
E> =HookContinueResult<E> |HookDenyResult<E>
The result a handler for event E may return. Returning nothing
(void) continues; the generated wrapper still validates every returned
object at hook time, so JavaScript and prebuilt handlers keep the same
runtime contract.
Type Parameters
E
E extends HookHandlerEventName
HookResultContract
HookResultContract = typeof
hookResultContract
InspectArtifactResult
InspectArtifactResult =
Readonly<{application:ApplicationExplorer;manifest:InspectManifestSummary; }>
InvalidationReason
InvalidationReason =
"initial"|"manual"|"source-change"
JsonArray
JsonArray = readonly
JsonValue[]
JsonObject
JsonObject =
Readonly<{[key:string]:JsonValue; }>
JsonPrimitive
JsonPrimitive =
boolean|null|number|string
JsonValue
JsonValue =
JsonArray|JsonObject|JsonPrimitive
McpTransport
McpTransport =
"stdio"|"streamable-http"
ProjectEvent
ProjectEvent =
{ readonly [TType in ProjectEventType]: ProjectEventFor<TType> }[ProjectEventType]
Stable envelope for each published project event.
ProjectEventMessage
ProjectEventMessage =
ProjectEvent|ProjectReplayGap
ProjectEventOf
ProjectEventOf<
TType> =ProjectEventFor<TType>
Type Parameters
TType
TType extends ProjectEventType
ProjectEventType
ProjectEventType = keyof
ProjectEventPayloadMap
SkillHost
SkillHost =
"amp"|"claude"|"codex"|"cursor"|"portable"
SkillTokenId
SkillTokenId = keyof typeof
skillTokenSpellings
SourceState
SourceState =
"unknown"|"ready"|"invalid"
StaleArtifactStatus
StaleArtifactStatus =
Extract<ArtifactStatus, {state:"stale"; }>
Variables
agentEventPayloadFieldKinds
constagentEventPayloadFieldKinds:object
Type Declaration
agentId
readonlyagentId:"string"
agentTranscriptPath
readonlyagentTranscriptPath:"nullable-string"
agentType
readonlyagentType:"string"
cwd
readonlycwd:"string"
error
readonlyerror:"string"
filePath
readonlyfilePath:"string"
fromModel
readonlyfromModel:"string"
isInterrupt
readonlyisInterrupt:"boolean"
lastAssistantMessage
readonlylastAssistantMessage:"nullable-string"
model
readonlymodel:"string"
permissionMode
readonlypermissionMode:"string"
prompt
readonlyprompt:"string"
reason
readonlyreason:"string"
reentry
readonlyreentry:"boolean"
requestedModel
readonlyrequestedModel:"nullable-string"
sessionId
readonlysessionId:"string"
source
readonlysource:"string"
taskDescription
readonlytaskDescription:"string"
taskId
readonlytaskId:"string"
taskSubject
readonlytaskSubject:"string"
teammateName
readonlyteammateName:"string"
teamName
readonlyteamName:"string"
toModel
readonlytoModel:"string"
toolInput
readonlytoolInput:"json"
toolName
readonlytoolName:"string"
toolResponse
readonlytoolResponse:"json"
toolUseId
readonlytoolUseId:"string"
transcriptPath
readonlytranscriptPath:"nullable-string"
trigger
readonlytrigger:"trigger"
workspaceRoots
readonlyworkspaceRoots:"string-array"
agentEventPayloadFields
constagentEventPayloadFields:object
The canonical payload fields of every event-route family, in the order the payload object carries them. This is the one per-family table; the types (AgentEventPayload) and the runtime projection derive from it. Frozen through (the family arrays share instances), so a consumer holding the export cannot change what later invocations project.
Type Declaration
agent/idle
readonlyagent/idle: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","teammateName","teamName"]
agent/start
readonlyagent/start: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model"]
agent/stop
readonlyagent/stop: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","agentTranscriptPath","reentry","lastAssistantMessage"]
compact/after
readonlycompact/after: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","trigger"]
compact/before
readonlycompact/before: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","trigger"]
config/change
readonlyconfig/change: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","source","filePath"]
file/change
readonlyfile/change: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","filePath"]
model-switch/after
readonlymodel-switch/after: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","fromModel","toModel","requestedModel","source"]
model-switch/before
readonlymodel-switch/before: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","fromModel","toModel","requestedModel","source"]
permission/denied
readonlypermission/denied: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","toolName","toolInput"]
permission/request
readonlypermission/request: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","toolName","toolInput"]
prompt/submit
readonlyprompt/submit: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","prompt"]
session/end
readonlysession/end: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","reason"]
session/start
readonlysession/start: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","source"]
stop
readonlystop: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","reentry","lastAssistantMessage"]
stop/failure
readonlystop/failure: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","error","reentry","lastAssistantMessage"]
task/complete
readonlytask/complete: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","taskId","taskSubject","taskDescription","teammateName","teamName"]
task/create
readonlytask/create: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","taskId","taskSubject","taskDescription","teammateName","teamName"]
tool/after
readonlytool/after: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","toolName","toolInput","toolUseId","toolResponse"]
tool/before
readonlytool/before: readonly ["sessionId","cwd","transcriptPath","permissionMode","agentId","agentType","model","toolName","toolInput","toolUseId"]
tool/failure
readonlytool/failure: readonly ["sessionId","cwd","transcriptPath","toolName","toolInput","toolUseId","error","isInterrupt"]
workspace/open
readonlyworkspace/open: readonly ["workspaceRoots"]
agentEventPayloadNativeKeys
constagentEventPayloadNativeKeys:Readonly<Record<AgentEventPayloadHost,Readonly<Partial<Record<CanonicalAgentEvent,NativeKeyTable>>>>>
The per-host native spelling of each canonical payload field, per family:
the one mapping table the runtime projection reads. A family a host does
not support has no entry; a field a host never sends for a family is
absent from its entry, so the table doubles as the coverage matrix the
generated events reference renders. The pinned capability tables mirror
it under hooks.eventRoutes.<event>.payload, held equal by
tests/event-payload.test.ts.
artifactCompilerRecordVersion
constartifactCompilerRecordVersion:1=1
artifactManifestName
constartifactManifestName:"agent-bundle.manifest.json"="agent-bundle.manifest.json"
artifactManifestSchema
constartifactManifestSchema:JsonObject
The published JSON Schema (draft 2020-12) for agent-bundle.manifest.json,
also shipped verbatim as agent-bundle/schemas/agent-bundle.manifest.schema.json.
It mirrors the structural rules of parseArtifactManifest — closed keys at
every level, required keys, literal unions, SHA-256 and relative-path shapes,
and the "present exactly when" conditionals. The parser remains the
authority for what a schema cannot state: canonical bytes, sorted arrays,
cross-references between sections, digests, and the runtime floor.
artifactManifestVersion
constartifactManifestVersion:6=6
The manifestVersion every reader of agent-bundle.manifest.json requires,
declared here so the lean web reader bundled into generated bins and the
full parser in build/manifest.ts refuse the same set of documents.
assembleArtifactManifest
constassembleArtifactManifest: (manifest) =>AssembledArtifactManifest
Parameters
manifest
Returns
canonicalAgentEvents
constcanonicalAgentEvents: readonly ["session/start","tool/before","tool/after","stop","agent/start","agent/stop","workspace/open","session/end","prompt/submit","tool/failure","compact/before","compact/after","permission/request","permission/denied","stop/failure","file/change","config/change","task/create","task/complete","agent/idle","model-switch/before","model-switch/after"]
The event-route families admitted by the recorded #97 v1/G10 decision.
classifySkillToken
constclassifySkillToken: (token,host,document) =>SkillTokenClassification
Parameters
token
host
document
SkillDocumentKind
Returns
SkillTokenClassification
createCodexEvalHarness
constcreateCodexEvalHarness: (name?) =>CodexEvalHarness
The native Codex harness; its trials are model-backed, so it never claims a deterministic kind.
Parameters
name?
string
Returns
createEvalHarness
constcreateEvalHarness: (name) =>EvalHarness
An unknown harness is rejected explicitly rather than falling back to a stub.
Parameters
name
string
Returns
createEventTracer
constcreateEventTracer: (options) =>EventTracer
Creates the emitter for one execution. An explicit observer is fixed for
the tracer's lifetime; otherwise every emission reads the process slot so
a framework-created tracer can outlive observer installation. With an
observer, each method builds a frozen event, assigns the next sequence,
stamps at from now, and hands it to the observer inside a try/catch: a
throwing observer, clock, or re-entry never changes what the caller sees.
Parameters
options
Returns
defineConfig
constdefineConfig: (config) =>AgentBundleConfig|ConfigFactory
Parameters
config
AgentBundleConfig | ConfigFactory
Returns
AgentBundleConfig | ConfigFactory
definePrebuilt
constdefinePrebuilt: (entry) =>AgentBundlePayloadEntry
Declares one prebuilt payload directory for the payload block: a tree the
project compiled itself, packaged byte-for-byte, with the package names its
files load at run time. The compiler treats the tree as opaque, so
runtimeDependencies is what keeps those packages out of AB7014.
Parameters
entry
Returns
defineSkill
constdefineSkill: <Skill>(skill) =>Skill
Identity helper so authors can type a Skill definition next to a rendered source.
Type Parameters
Skill
Skill extends DefinedSkill
Parameters
skill
Skill
Returns
Skill
eventTraceEventKinds
consteventTraceEventKinds: readonly ["handler.start","handler.outcome","execute.start","providers.start","providers.finish","render.start","render.finish","failure"]
Every discriminant of EventTraceEvent, for consumers that switch or filter.
eventTraceExecution
consteventTraceExecution: (input) =>EventTraceExecution
Builds the frozen per-execution identity, minting a UUID executionId when none is given.
Parameters
input
Readonly<{ event: CanonicalAgentEvent; executionId?: string; host: string; nativeEvent: string; }>
Returns
eventTraceObserver
consteventTraceObserver: () =>EventTraceObserver|undefined
Returns the process-local observer currently installed for kernel traces.
Returns
EventTraceObserver | undefined
eventTracePhases
consteventTracePhases: readonly ["handler","execute","providers","render"]
The kernel phases a trace can attribute time or a failure to.
hookEventFields
consthookEventFields:object
The payload fields per canonical event, as the wrappers decode them: the
runtime twin of HookEventPayloads, so a test can hold a generated
wrapper's decoder to the same field set the types declare. required
fields are present on every host; optional ones are host-dependent.
Type Declaration
afterTool
readonlyafterTool:object
afterTool.optional
readonlyoptional: readonly ["cwd","effort","hookEventName","model","permissionMode","promptId","transcriptPath","turnId"]
afterTool.required
readonlyrequired: readonly ["sessionId","toolInput","toolName","toolResponse","toolUseId"]
agentStart
readonlyagentStart:object
agentStart.optional
readonlyoptional: readonly ["cwd","effort","hookEventName","model","permissionMode","promptId","toolUseId","transcriptPath","turnId"]
agentStart.required
readonlyrequired: readonly ["agentId","agentType","sessionId"]
agentStop
readonlyagentStop:object
agentStop.optional
readonlyoptional: readonly ["agentId","agentTranscriptPath","cwd","effort","hookEventName","lastAssistantMessage","model","permissionMode","promptId","transcriptPath","turnId"]
agentStop.required
readonlyrequired: readonly ["agentType","sessionId","stopHookActive"]
beforeTool
readonlybeforeTool:object
beforeTool.optional
readonlyoptional: readonly ["cwd","effort","hookEventName","model","permissionMode","promptId","transcriptPath","turnId"]
beforeTool.required
readonlyrequired: readonly ["sessionId","toolInput","toolName","toolUseId"]
sessionStart
readonlysessionStart:object
sessionStart.optional
readonlyoptional: readonly ["cwd","effort","hookEventName","model","permissionMode","promptId","source","transcriptPath","turnId"]
sessionStart.required
readonlyrequired: readonly ["sessionId"]
stop
readonlystop:object
stop.optional
readonlyoptional: readonly ["cwd","effort","hookEventName","lastAssistantMessage","model","permissionMode","promptId","transcriptPath","turnId"]
stop.required
readonlyrequired: readonly ["sessionId","stopHookActive"]
hookHandlerEventNames
consthookHandlerEventNames: readonly ["sessionStart","beforeTool","afterTool","stop","agentStart","agentStop"]
The canonical events a config hook (hooks.<event>.handler) can be declared
for: the events every production host maps to a native plain hook.
workspaceOpen is a CanonicalHookEvent but no host maps it as a plain
hook — it is served by an event route — so it has no handler contract.
hookResultContract
consthookResultContract:object
The per-event result contract the generated wrappers enforce, as the
portable intersection across hosts. No event admits outcome: 'stop';
reason is legal only beside outcome: 'deny'; updatedInput is never
legal while denying.
Type Declaration
afterTool
readonlyafterTool:object
afterTool.additionalContext
readonlyadditionalContext:true
afterTool.deny
readonlydeny:false
afterTool.updatedInput
readonlyupdatedInput:false
agentStart
readonlyagentStart:object
agentStart.additionalContext
readonlyadditionalContext:false
agentStart.deny
readonlydeny:false
agentStart.updatedInput
readonlyupdatedInput:false
agentStop
readonlyagentStop:object
agentStop.additionalContext
readonlyadditionalContext:false
agentStop.deny
readonlydeny:true
agentStop.updatedInput
readonlyupdatedInput:false
beforeTool
readonlybeforeTool:object
beforeTool.additionalContext
readonlyadditionalContext:false
beforeTool.deny
readonlydeny:true
beforeTool.updatedInput
readonlyupdatedInput:true
sessionStart
readonlysessionStart:object
sessionStart.additionalContext
readonlyadditionalContext:true
sessionStart.deny
readonlydeny:false
sessionStart.updatedInput
readonlyupdatedInput:false
stop
readonlystop:object
stop.additionalContext
readonlyadditionalContext:false
stop.deny
readonlydeny:true
stop.updatedInput
readonlyupdatedInput:false
inspectArtifact
constinspectArtifact: (root) =>Promise<InspectArtifactResult>
Inspects a copied built composite root through agent-bundle.manifest.json
alone — the same application projection the Workbench renders. The only
filesystem touch under root is that one file.
Parameters
root
string
Returns
Promise<InspectArtifactResult>
installEventTraceObserver
constinstallEventTraceObserver: (observer) => () =>void
Installs the process-local observer used by framework-created tracers. The disposer restores the previous observer without disturbing a newer one.
Parameters
observer
Returns
() => void
parseArtifactManifest
constparseArtifactManifest: (bytes) =>ArtifactManifest
Parameters
bytes
string
Returns
pathTokens
constpathTokens:Readonly<{pluginData:"agent-bundle:path:plugin-data";pluginRoot:"agent-bundle:path:plugin-root";workspaceRoot:"agent-bundle:path:workspace-root"; }>
pluginRootEnvAnchor
constpluginRootEnvAnchor:"AGENT_BUNDLE_PLUGIN_ROOT"="AGENT_BUNDLE_PLUGIN_ROOT"
Well-known environment variable every adapter injects into emitted stdio
MCP server entries, holding the plugin install root in the target's native
representation (${CLAUDE_PLUGIN_ROOT}, ${PLUGIN_ROOT},
${CURSOR_PLUGIN_ROOT}, or Codex's ./ resolved against the entry's
plugin-root cwd). Server runtime code should resolve bundled assets against
it instead of the process working directory, which not every host anchors
to the plugin root. A user-declared env entry with this key always wins
over the injected value.
pluginStateRootEnvAnchor
constpluginStateRootEnvAnchor:"AGENT_BUNDLE_STATE_ROOT"="AGENT_BUNDLE_STATE_ROOT"
Explicit override of the framework state root; the runtime exports the same name as PLUGIN_STATE_ROOT_ENV_ANCHOR.
readArtifactManifest
constreadArtifactManifest: (from) =>Promise<ArtifactManifestReadResult>
Parameters
from
string
Returns
Promise<ArtifactManifestReadResult>
runClaudeTrial
construnClaudeTrial: (options) =>Promise<EvalTrialRecord>
Runs one model-backed trial through the installed, signed-in Claude Code CLI with an
explicit generated plugin directory. No provider API key is ever accepted or injected,
and --bare is never passed, so the CLI can only use its existing session state.
Parameters
options
Returns
Promise<EvalTrialRecord>
runCodexEvalTrial
construnCodexEvalTrial: (options) =>Promise<EvalTrialRecord>
Runs one Codex trial in a throwaway CODEX_HOME: the candidate is installed from a local
marketplace, verified through plugin state, and exercised with codex exec --ephemeral --json.
No provider API key is accepted, requested, or forwarded; the CLI's own session is the only auth.
Parameters
options
Returns
Promise<EvalTrialRecord>
serializeArtifactManifest
constserializeArtifactManifest: (manifest) =>string
Serializes a valid manifest. Caller arrays must already be sorted and unique; this function validates rather than reordering them.
Parameters
manifest
Returns
string
Skill
constSkill:Readonly<{Arguments: () =>string;PluginData: () =>string;PluginRoot: () =>string;ProjectRoot: () =>string;Resource: ({ path }) =>string;SessionIdentity: () =>string;SkillRoot: () =>string; }>
Rendered-skill components that emit canonical tokens. The Markdown renderer resolves function components to strings; host syntax is applied only during lowering, never here.
skillTokenSpellings
constskillTokenSpellings:Readonly<{arguments:"agent-bundle:token:arguments";pluginData:"agent-bundle:path:plugin-data";pluginRoot:"agent-bundle:path:plugin-root";projectRoot:"agent-bundle:path:workspace-root";sessionIdentity:"agent-bundle:token:session-identity";skillRoot:"agent-bundle:token:skill-root"; }>
Canonical Skill / plugin-surface tokens. Build-time lowering substitutes host syntax only; runtime values are never resolved here.
Plugin/project-root spellings are the same bytes as pathTokens in
core/types.ts so MCP, hooks, and skills share one registry (#108 / #107 R12).
This module must not import core/types.ts — NormalizedSkill lives there
and imports the Skill IR types.
startDevServer
conststartDevServer: (options) =>Promise<DevServerSession>
Starts one loopback foreground session over the current project services.
Parameters
options
Returns
Promise<DevServerSession>
summarizeEventTraceError
constsummarizeEventTraceError: (error) =>EventTraceErrorSummary
Projects any thrown value into a frozen, JSON-safe EventTraceErrorSummary. Never throws, never returns the error object, its stack, or its cause.
Parameters
error
unknown
Returns
validateArtifactManifestSchema
constvalidateArtifactManifestSchema: (value) => readonlystring[]
Validates a parsed JSON value against artifactManifestSchema. Returns no
issues when the value conforms, otherwise one formatted line per issue in
deterministic order (/routes must NOT have additional properties: zzz).
Conformance here is necessary but not sufficient: parseArtifactManifest
still decides whether a document is a manifest.
Parameters
value
unknown
Returns
readonly string[]
References
AgentEventCanonicalIdentity
Re-exports AgentEventCanonicalIdentity
AgentEventDelivery
Re-exports AgentEventDelivery
AgentEventFallbackMode
Re-exports AgentEventFallbackMode
AgentEventNativePayload
Re-exports AgentEventNativePayload
AgentEventProvenance
Re-exports AgentEventProvenance
AgentEventRouteConfig
Re-exports AgentEventRouteConfig
AgentEventRouteProps
Re-exports AgentEventRouteProps
AgentEventRuntimeMode
Re-exports AgentEventRuntimeMode
AgentLayoutRoute
Re-exports AgentLayoutRoute
AgentLayoutRouteKind
Re-exports AgentLayoutRouteKind
AgentProviderContext
Re-exports AgentProviderContext
AgentProviderFactory
Re-exports AgentProviderFactory
AgentProviderHostIdentity
Re-exports AgentProviderHostIdentity
AgentProviderLineage
Re-exports AgentProviderLineage
AgentProviderLineagePeer
Re-exports AgentProviderLineagePeer
AgentProviderLineageResolution
Re-exports AgentProviderLineageResolution
AgentProviderLineageSubagent
Re-exports AgentProviderLineageSubagent
AgentProviderLineageTree
Re-exports AgentProviderLineageTree
AgentProviderNotice
Re-exports AgentProviderNotice
AgentProviderNoticeAttempt
Re-exports AgentProviderNoticeAttempt
AgentProviderNoticePublisher
Re-exports AgentProviderNoticePublisher
AgentProviderNoticeRecipient
Re-exports AgentProviderNoticeRecipient
AgentProviderNoticesHandle
Re-exports AgentProviderNoticesHandle
AgentProviderNoticeState
Re-exports AgentProviderNoticeState
AgentProviderNoticeWithholding
Re-exports AgentProviderNoticeWithholding
AgentProviderObserved
Re-exports AgentProviderObserved
AgentProviderObservedPluginRoot
Re-exports AgentProviderObservedPluginRoot
AgentProviderPluginRoot
Re-exports AgentProviderPluginRoot
AgentProviderSessionIdentity
Re-exports AgentProviderSessionIdentity
AgentProviderStateHandle
Re-exports AgentProviderStateHandle
AgentProviderStateSnapshot
Re-exports AgentProviderStateSnapshot
AgentProviderWorkspaceIdentity
Re-exports AgentProviderWorkspaceIdentity
AppRouteConfig
Re-exports AppRouteConfig
CliRouteConfig
Re-exports CliRouteConfig
CliRouteProps
Re-exports CliRouteProps
compareEvals
Re-exports compareEvals
CompareEvalsOptions
Re-exports CompareEvalsOptions
ExecutableMainContext
Re-exports ExecutableMainContext
MAX_ROUTE_RENDER_ELAPSED_MS
Re-exports MAX_ROUTE_RENDER_ELAPSED_MS
PromptConfig
Re-exports PromptConfig
ResourceConfig
Re-exports ResourceConfig
RouteMeta
Re-exports RouteMeta
RouteRenderConfig
Re-exports RouteRenderConfig
RouteSchema
Re-exports RouteSchema
RouteSchemaOutput
Re-exports RouteSchemaOutput
RouteUiMeta
Re-exports RouteUiMeta
runEvals
Re-exports runEvals
RunEvalsOptions
Re-exports RunEvalsOptions
ScriptRouteProps
Re-exports ScriptRouteProps
ToolConfig
Re-exports ToolConfig
ToolExecutionConfig
Re-exports ToolExecutionConfig
ToolRouteProps
Re-exports ToolRouteProps
ToolTaskSupport
Re-exports ToolTaskSupport