Module: install
Interfaces
DoctorDurableStateReport
Properties
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
directory
readonlydirectory:string
exists
readonlyexists:boolean
findings
readonlyfindings: readonlyDoctorDurableStateStore[]
ownership
readonlyownership:"derived"|"marker"|"unowned"|"unrecorded"
ownershipReason?
readonlyoptionalownershipReason?:string
purgeable
readonlypurgeable:boolean
servers
readonlyservers: readonlystring[]
stateSource
readonlystateSource:"native"|"derived"
status
readonlystatus:"warnings"|"known"
summary
readonlysummary:object
bytes
readonlybytes:number
stores
readonlystores:number
writable
readonlywritable:boolean
DoctorDurableStateStore
Properties
bytes
readonlybytes:number
Main database plus any present -wal and -shm sidecars.
file
readonlyfile:string
mtime
readonlymtime:string
path
readonlypath:string
DoctorEndpointReport
Properties
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
directory
readonlydirectory:string
findings
readonlyfindings: readonlyDoctorFinding[]
status
readonlystatus:"failed"|"skipped"|"warnings"|"healthy"
summary
readonlysummary:object
live
readonlylive:number
staleLocks
readonlystaleLocks:number
staleSockets
readonlystaleSockets:number
DoctorFinding
Properties
commit?
readonlyoptionalcommit?:string
Git commit of a staged Cursor marketplace repository.
durableState?
readonlyoptionaldurableState?:DoctorDurableStateReport
durableStates?
readonlyoptionaldurableStates?: readonlyDoctorDurableStateReport[]
Every current per-server state root, deduplicated by directory.
enabled?
readonlyoptionalenabled?:boolean
Claude only: the row's enabled flag from claude plugin list --json.
false sets state: 'disabled' — the copy is installed but switched off,
so none of it reaches a session until claude plugin enable runs.
entry?
readonlyoptionalentry?:string
errors?
readonlyoptionalerrors?: readonlystring[]
The host's own load errors, verbatim (claude plugin list --json errors);
present only when the host refused to load this plugin, which also sets
state: 'failed'.
hooks?
readonlyoptionalhooks?:CursorHooksRegistration
Cursor plugin hook registration proof (.cursor-plugin/plugin.json installs only).
launch?
readonlyoptionallaunch?:CursorAgentPluginsLaunch
Agent Plugins stdio launch proof for Cursor (root plugin.json installs with stdio servers only).
manifest?
readonlyoptionalmanifest?:string
marketplace?
readonlyoptionalmarketplace?:string
name?
readonlyoptionalname?:string
operatorEnv?
readonlyoptionaloperatorEnv?:DoctorOperatorEnvReport
The operator .env layer the installed pack's shells read at launch (#469); names and counts only, never values.
path?
readonlyoptionalpath?:string
pluginId?
readonlyoptionalpluginId?:string
Grok Bot only: the server-assigned plugin id from Grok Bot's skill index.
receipt?
readonlyoptionalreceipt?:DoctorReceiptSummary
The in-tree install receipt of a Cursor local copy, when it carries one.
runtime?
readonlyoptionalruntime?:DoctorRuntimeStatus
state
readonlystate:DoctorFindingState
version?
readonlyoptionalversion?:string
DoctorGrokBotSideload
grokbot receipts: what install grokbot sideloaded and which parts Grok Bot still has (AB7335).
Extends
GrokBotSideloadInspection
Properties
cacheCopy
readonlycacheCopy:boolean
Inherited from
GrokBotSideloadInspection.cacheCopy
cachePath
readonlycachePath:string
cloneActive
readonlycloneActive:boolean
Inherited from
GrokBotSideloadInspection.cloneActive
commit
readonlycommit:string
listed
readonlylisted:boolean
Inherited from
GrokBotSideloadInspection.listed
loaded
readonlyloaded:boolean
Grok Bot's plugin index names the cache copy: the account lists the plugin and Grok Bot loaded this copy.
Inherited from
GrokBotSideloadInspection.loaded
manifest
readonlymanifest:string
pluginFolder
readonlypluginFolder:boolean
Inherited from
GrokBotSideloadInspection.pluginFolder
pluginPath
readonlypluginPath:string
repo
readonlyrepo:string
slug
readonlyslug:string
DoctorHostProbe
Properties
evidence?
readonlyoptionalevidence?:"directory"
status
readonlystatus:DoctorHostProbeStatus
version?
readonlyoptionalversion?:string
DoctorHostReport
Properties
bundle?
readonlyoptionalbundle?:DoctorFinding&object
Type Declaration
bundleRoot?
readonlyoptionalbundleRoot?:string
comparison?
readonlyoptionalcomparison?:DoctorInstallComparison
hostValidation?
readonlyoptionalhostValidation?: readonlyDoctorHostValidation[]
Claude only: host validator reports for the bundle and every installed copy, when claude is available.
lifecycle?
readonlyoptionallifecycle?:DoctorLifecycle
marketplace?
readonlyoptionalmarketplace?:string
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
host
readonlyhost:"grokbot"|DoctorHost
inventory
readonlyinventory:DoctorInventory
probe
readonlyprobe:DoctorHostProbe
receipts
readonlyreceipts: readonlyDoctorReceiptFinding[]
Agent Bundle store receipts under the host root, cross-checked against the host's inventory.
DoctorHostValidation
One claude plugin validate pass (the same runner validate --artifact
uses: plugin.json then marketplace.json, --strict, --json on
2.1.259+) over the built bundle or one installed copy of it.
Extends
Properties
copy
readonlycopy:"installed"|"bundle"
bundle: the --from bundle root; installed: a copy the host lists for this plugin.
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
Inherited from
ClaudePluginValidationReport.diagnostics
host
readonlyhost:"claude"
Inherited from
ClaudePluginValidationReport.host
load?
readonlyoptionalload?:ClaudePluginLoadCheck
The load check that follows the validation runs. Absent when the CLI was
unavailable, a validation run itself failed (AB6022), the caller opted
out, or the bundle has no readable .claude-plugin/plugin.json name to
look for in the listing.
Inherited from
ClaudePluginValidationReport.load
pluginDirectory
readonlypluginDirectory:string
scope?
readonlyoptionalscope?:string
Claude install scope of an installed copy.
status
readonlystatus:ClaudePluginValidationStatus
Inherited from
ClaudePluginValidationReport.status
target
readonlytarget:string
Inherited from
ClaudePluginValidationReport.target
version?
readonlyoptionalversion?:string
Inherited from
ClaudePluginValidationReport.version
DoctorInstallComparison
Installed copy versus the built artifact: current (same content),
stale (same version, different content), version-mismatch, foreign
(a directory at the install path that is not an agent-bundle install of
this plugin), load-failed (the host lists the copy but refused to load
it; errors carries its message), not-installed, or unknown when the
host inventory could not be read.
Properties
artifactContentHash
readonlyartifactContentHash:string
enabled?
readonlyoptionalenabled?:boolean
Claude only: false when the host lists the compared copy as disabled (AB7327).
errors?
readonlyoptionalerrors?: readonlystring[]
Host load errors for a load-failed copy, verbatim from claude plugin list --json.
installedContentHash?
readonlyoptionalinstalledContentHash?:string
installedPath?
readonlyoptionalinstalledPath?:string
installedVersion?
readonlyoptionalinstalledVersion?:string
ownership?
readonlyoptionalownership?:InstalledTreeOwnership|"host"
Who owns the installed copy: an agent-bundle receipt, a foreign directory, or the host's own cache.
status
readonlystatus:DoctorInstallComparisonStatus
DoctorInventory
Properties
findings
readonlyfindings: readonlyDoctorFinding[]
status
readonlystatus:DoctorInventoryStatus
DoctorLifecycle
placed (bytes at the host's install location) → registered (the host's registry names the plugin) → enabled (the host reports it enabled/trusted) → active (loaded by a live host process), each observed or typed unavailable per host (#101).
Properties
active
readonlyactive:DoctorLifecycleObservation
enabled
readonlyenabled:DoctorLifecycleObservation
placed
readonlyplaced:DoctorLifecycleObservation
registered
readonlyregistered:DoctorLifecycleObservation
stage
readonlystage:DoctorLifecycleStage
DoctorOperatorEnvFile
One operator env file of an installed pack: present (with its variable count) or absent.
Properties
path
readonlypath:string
state
readonlystate:"absent"|"unreadable"|"present"
variables?
readonlyoptionalvariables?:number
The number of variables the file declares; never their names or values.
DoctorOperatorEnvReport
Properties
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
files
readonlyfiles: readonlyDoctorOperatorEnvFile[]
status
readonlystatus:"absent"|"present"|"warnings"
DoctorOptions
Properties
commandRunner?
readonlyoptionalcommandRunner?:DoctorCommandRunner
endpointDirectory?
readonlyoptionalendpointDirectory?:string
environment?
readonlyoptionalenvironment?:Readonly<ProcessEnv>
Process environment consulted for host cache roots (CODEX_HOME); defaults to process.env.
from?
readonlyoptionalfrom?:string
home?
readonlyoptionalhome?:string
hosts?
readonlyoptionalhosts?: readonly ("grokbot"|DoctorHost)[]
platform?
readonlyoptionalplatform?:Platform
DoctorReceiptFinding
Properties
contentHash
readonlycontentHash:string
format
readonlyformat:string
installedAt
readonlyinstalledAt:string
mode
readonlymode:InstallReceiptMode
path
readonlypath:string
plugin
readonlyplugin:string
registrations
readonlyregistrations: readonlyInstallRegistration[]
scope
readonlyscope:InstallReceiptScope
sideload?
readonlyoptionalsideload?:DoctorGrokBotSideload
state
readonlystate:"unknown"|"consistent"|"orphaned"
updatedAt
readonlyupdatedAt:string
version
readonlyversion:string
DoctorReceiptSummary
The install receipt an inventoried Cursor local copy carries, as read.
Properties
contentHash
readonlycontentHash:string
format
readonlyformat:string
installedAt
readonlyinstalledAt:string
mode
readonlymode:InstallReceiptMode
scope
readonlyscope:InstallReceiptScope
updatedAt
readonlyupdatedAt:string
DoctorReport
Properties
diagnostics
readonlydiagnostics: readonlyDiagnostic[]
endpoints
readonlyendpoints:DoctorEndpointReport
hosts
readonlyhosts: readonlyDoctorHostReport[]
summary
readonlysummary:object
errors
readonlyerrors:number
infos
readonlyinfos:number
warnings
readonlywarnings:number
web?
readonlyoptionalweb?:DoctorWebSurface
Present when --from points at a bundle whose agent-bundle.manifest.json
has a web section.
DoctorWebSurface
Properties
apps
readonlyapps:number
line
readonlyline:string
web: <n> App(s) exposed — run <plugin> web
plugin
readonlyplugin:string
InstallBundleOptions
sideload, sideloadRepo, and sideloadSlug apply to the grokbot host only (install/grokbot-sideload.ts).
Extends
GrokBotSideloadOptions
Properties
commandRunner?
readonlyoptionalcommandRunner?:InstallCommandRunner
environment?
readonlyoptionalenvironment?:Readonly<ProcessEnv>
Process environment consulted for host cache roots (CODEX_HOME); defaults to process.env.
from
readonlyfrom:string
home?
readonlyoptionalhome?:string
host
readonlyhost:InstallHost
mode?
readonlyoptionalmode?:InstallMode
Cursor only; defaults to local. Other hosts reject an explicit mode.
projectRoot?
readonlyoptionalprojectRoot?:string
Amp project-scope destination; defaults to the calling process cwd.
replace?
readonlyoptionalreplace?:boolean
Replace an existing agent-bundle install of this plugin even when its
version differs (--replace). Same-version content drift is
replaced automatically; foreign directories are always refused.
scope?
readonlyoptionalscope?:InstallScope
sideload?
readonlyoptionalsideload?:boolean
false skips the sideload (--no-sideload); defaults to on unless GROK_BOT_SIDELOAD=0.
Inherited from
GrokBotSideloadOptions.sideload
sideloadRepo?
readonlyoptionalsideloadRepo?:string
<owner>/<repo> of the marketplace clone (--sideload-repo, GROK_BOT_SIDELOAD_REPO).
Inherited from
GrokBotSideloadOptions.sideloadRepo
sideloadSlug?
readonlyoptionalsideloadSlug?:string
Grok Bot's cache partition for it (--sideload-slug, GROK_BOT_SIDELOAD_SLUG); defaults to <owner>-<repo>.
Inherited from
GrokBotSideloadOptions.sideloadSlug
InstallCliOptions
A package-bound lifecycle CLI (#724): the agent-bundle CLI's own
install, uninstall, and doctor commands with the bundle root pinned
to the package that ships the bin, so a published plugin can offer
<name> install <host> without bundling the framework's installer source
or parsing argv itself.
Properties
from
readonlyfrom:string
The bundle root the bin binds: the package root of an npm-root layout (new URL('..', import.meta.url) from bin/).
name?
readonlyoptionalname?:string
The bin name shown in --help; defaults to install.
stderr?
readonlyoptionalstderr?: (text) =>void
Parameters
text
string
Returns
void
stdout?
readonlyoptionalstdout?: (text) =>void
Parameters
text
string
Returns
void
version?
readonlyoptionalversion?:string
The version --version prints; omitted when absent.
InstallCommandResult
Properties
code
readonlycode:number
stderr
readonlystderr:string
stdout
readonlystdout:string
InstallCommandRunner
Methods
run()
run(
command,args,options):Promise<InstallCommandResult>
Parameters
command
string
args
readonly string[]
options
cwd
string
environment?
Readonly<ProcessEnv>
Returns
Promise<InstallCommandResult>
InstallResult
Properties
bundleRoot
readonlybundleRoot:string
commit?
readonlyoptionalcommit?:string
Git commit of the staged marketplace repository (mode: 'marketplace').
contentHash?
readonlyoptionalcontentHash?:string
sha256 over the artifact tree that was installed or found already installed.
destination?
readonlyoptionaldestination?:string
host
readonlyhost:InstallHost
marketplace?
readonlyoptionalmarketplace?:string
mode?
readonlyoptionalmode?:InstallMode
nextSteps?
readonlyoptionalnextSteps?: readonlystring[]
Remaining host-owned steps the installer cannot perform non-interactively.
plugin
readonlyplugin:string
previousContentHash?
readonlyoptionalpreviousContentHash?:string
Content hash of the copy a replaced install superseded.
receipt?
readonlyoptionalreceipt?:string
The install receipt this run wrote or confirmed: inside the plugin root for Cursor/Amp local copies,
in the host root's agent-bundle/receipts store for host-CLI and marketplace deliveries (#101).
sideload?
readonlyoptionalsideload?:GrokBotSideloadResult
grokbot only: what was sideloaded into Grok Bot's marketplace clone and plugin cache, or why it was skipped.
state
readonlystate:InstallResultState
staged means the marketplace repository is ready and Cursor's import step is still pending
(mode: 'marketplace').
version
readonlyversion:string
PublicHostInstalledEntry
Properties
enabled?
readonlyoptionalenabled?:boolean
The row's enabled flag (Claude and Codex both carry one). false means
the copy is installed but switched off (claude plugin disable), so none
of it reaches a session until claude plugin enable runs; absent when the
row carries no boolean.
errors?
readonlyoptionalerrors?: readonlystring[]
Claude only: the host's own load errors for this copy, verbatim from the
row's errors array (present and nonempty only when Claude Code refused
the plugin, e.g. "Hook load failed: Duplicate hooks file detected ...").
A refused copy is installed but contributes no hooks, MCP servers, or
skills to a session, so callers must not report it as healthy.
installPath
readonlyinstallPath:string
scope?
readonlyoptionalscope?:string
Claude only: the scope this copy is installed at.
version
readonlyversion:string
PublicHostMarketplaceEntry
Properties
name
readonlyname:string
root?
readonlyoptionalroot?:string
UninstallBundleOptions
Properties
commandRunner?
readonlyoptionalcommandRunner?:InstallCommandRunner
confirmPurge?
readonlyoptionalconfirmPurge?:boolean
Required with purgeData: the explicit confirmation that durable state may be deleted.
environment?
readonlyoptionalenvironment?:Readonly<ProcessEnv>
force?
readonlyoptionalforce?:boolean
Proceed when a host-registered copy has no store receipt, or when owned
content no longer matches the receipt. Directories without a receipt
naming this plugin are foreign and refused regardless, and a copy without
a store receipt is never purged: purgeData is refused (AB7009).
from
readonlyfrom:string
home?
readonlyoptionalhome?:string
host
readonlyhost:InstallHost
keepData?
readonlyoptionalkeepData?:boolean
Explicitly keep durable runtime state (the default).
mode?
readonlyoptionalmode?:InstallMode
Cursor only; defaults to local.
plan?
readonlyoptionalplan?:boolean
Compute and report the exact plan without changing anything.
projectRoot?
readonlyoptionalprojectRoot?:string
Amp project-scope destination; defaults to the calling process cwd.
purgeData?
readonlyoptionalpurgeData?:boolean
Remove durable runtime state too; refused without confirmPurge.
scope?
readonlyoptionalscope?:InstallScope
UninstallDataReport
Properties
detail
readonlydetail:string
outcome
readonlyoutcome:UninstallDataOutcome
paths
readonlypaths: readonlystring[]
The durable-state paths the decision applied to (absolute).
policy
readonlypolicy:UninstallDataPolicy
retained?
readonlyoptionalretained?: readonlyobject[]
Recorded state roots retained because this installation lacks valid deletion authority.
UninstallReceiptReport
Properties
contentHash?
readonlyoptionalcontentHash?:string
format?
readonlyoptionalformat?:string
installedAt?
readonlyoptionalinstalledAt?:string
path
readonlypath:string
status
readonlystatus:UninstallReceiptStatus
version?
readonlyoptionalversion?:string
UninstallRegistrationReport
Extends
InstallRegistration
Properties
action
readonlyaction:UninstallRegistrationAction
commit?
readonlyoptionalcommit?:string
Staged marketplace HEAD commit (cursor-marketplace-staging, grokbot-marketplace-staging), or the Grok Bot
marketplace clone commit the plugin was sideloaded under (grokbot-sideload).
Inherited from
InstallRegistration.commit
detail?
readonlyoptionaldetail?:string
id?
readonlyoptionalid?:string
<plugin>@<marketplace> for plugin registrations.
Inherited from
InstallRegistration.id
kind
readonlykind:InstallRegistrationKind
Inherited from
InstallRegistration.kind
name?
readonlyoptionalname?:string
Marketplace name for marketplace registrations.
Inherited from
InstallRegistration.name
scope?
readonlyoptionalscope?:InstallReceiptScope
Claude only: the scope the registration was made at.
Inherited from
InstallRegistration.scope
UninstallResult
Properties
bundleRoot
readonlybundleRoot:string
data
readonlydata:UninstallDataReport
destination?
readonlyoptionaldestination?:string
The installed plugin root the run acted on (cache copy, local directory, or staged repository).
forced
readonlyforced:boolean
host
readonlyhost:InstallHost
marketplace?
readonlyoptionalmarketplace?:string
mode
readonlymode:InstallReceiptMode
nextSteps?
readonlyoptionalnextSteps?: readonlystring[]
Host-owned steps the uninstaller cannot perform non-interactively.
plugin
readonlyplugin:string
receipt
readonlyreceipt:UninstallReceiptReport
registrations
readonlyregistrations: readonlyUninstallRegistrationReport[]
remnantReceipt?
readonlyoptionalremnantReceipt?:string
Cursor local only: the plugin root survived (retained runtime state or unowned entries), so a remnant receipt owning no files was written there to keep the created host directories receipt-owned.
removed
readonlyremoved:object
Exact absolute paths removed (or, under --plan, that would be removed; directories only when empty).
directories
readonlydirectories: readonlystring[]
files
readonlyfiles: readonlystring[]
retained
readonlyretained: readonlystring[]
Unowned entries left in place under the destination (relative to it); surviving unowned directories end in /.
scope
readonlyscope:InstallScope
state
readonlystate:UninstallResultState
version
readonlyversion:string
Type Aliases
DevInstallHost
DevInstallHost =
Exclude<InstallHost,"amp"|"grokbot">
DoctorCommandResult
DoctorCommandResult =
BoundedChildProcessResult<DoctorCommandTermination>
DoctorCommandRunner
DoctorCommandRunner = (
request) =>Promise<DoctorCommandResult>
Parameters
request
BoundedChildProcessRequest
Returns
Promise<DoctorCommandResult>
DoctorCommandTermination
DoctorCommandTermination =
"output-limit"|"timed-out"
DoctorFindingState
DoctorFindingState =
"conflicted"|"corrupt"|"disabled"|"drifted"|"failed"|"installed"|"interrupted-install"|"live"|"missing"|"registered"|"skipped"|"stale-lock"|"stale-socket"|"unknown"|"unregistered"
DoctorHost
DoctorHost =
Exclude<InstallHost,"amp"|"grokbot">
Hosts with a full Doctor report; grokbot has its own read-only report (install/grokbot.ts).
DoctorHostProbeStatus
DoctorHostProbeStatus =
"available"|"failed"|"unavailable"
DoctorInstallComparisonStatus
DoctorInstallComparisonStatus =
"current"|"foreign"|"load-failed"|"not-installed"|"stale"|"unknown"|"version-mismatch"
DoctorInventoryStatus
DoctorInventoryStatus =
"known"|"skipped"|"unknown"
DoctorLifecycleObservation
DoctorLifecycleObservation =
Readonly<{evidence:string;status:"observed";value:boolean; }> |Readonly<{reason:string;status:"unavailable"; }>
One lifecycle observation. observed carries the host evidence that made it
true or false; unavailable names why no pinned read-only surface exposes it
— Doctor never guesses an activation state.
DoctorLifecycleStage
DoctorLifecycleStage =
"absent"|"active"|"enabled"|"placed"|"registered"|"unknown"
The furthest lifecycle stage observed true (unknown when placement itself is unobservable).
DoctorRuntimeStatus
DoctorRuntimeStatus =
Readonly<{artifactEpoch:string;availability:"available"|"runtime-restarted"|"runtime-unavailable";instanceId:string;pid:number;startedAt?:string;status:"available"; }> |Readonly<{status:"failed"|"unavailable"; }>
InstallHost
InstallHost =
BundleIdentityHost|"grokbot"
grokbot installs the Cursor projection through a Grok Bot marketplace; see install/grokbot.ts.
InstallMode
InstallMode =
"local"|"marketplace"
Cursor delivery mode: local copies into ~/.cursor/plugins/local/<name>
(loads on reload, shown as a local plugin); marketplace stages a committed
local marketplace repository that Cursor's Customize import registers as a
marketplace-installed plugin. See install/cursor-marketplace.ts.
InstallResultState
InstallResultState =
"already-installed"|"installed"|"replaced"|"staged"
InstallScope
InstallScope =
"local"|"project"|"user"
PublicHostInventory
PublicHostInventory = {
entries: readonlyPublicHostInstalledEntry[];status:"available"; } | {detail:string;status:"unavailable"; }
The host's own answer to "is this plugin installed, and where": usable, or not, never guessed. Claude can hold one copy per scope, so an unscoped read returns every matching copy; a scoped read returns at most one.
PublicInstallHost
PublicInstallHost =
Exclude<InstallHost,"amp"|"cursor"|"grokbot">
UninstallDataOutcome
UninstallDataOutcome =
"absent"|"kept"|"purged"|"removed-by-host"|"retained-by-host"|"unavailable"
What happened to the plugin's durable runtime state. kept/purged/absent
are Agent Bundle's own doing; retained-by-host (Claude keeps the orphaned
cache copy for its ~14-day grace period) and removed-by-host (Codex
deletes the cached tree on plugin remove) name the host behaviour that
decided instead; unavailable
means the delivery has no Agent Bundle-owned runtime state (an Amp directory
plugin or a staged marketplace repository).
UninstallDataPolicy
UninstallDataPolicy =
"keep"|"purge"
agent-bundle uninstall <host> (#101): the receipt-owned reverse of
install. Every mutation is opt-in, fail-closed, and bounded by what the
install receipt records — owned files and directories, the host
registrations the installer performed, and the host directories it created.
Nothing outside that set is ever removed; durable runtime state (the roots
the receipt's state block records with ownership evidence) is kept unless
--purge-data is confirmed explicitly. --plan computes the same result without opening a
writer, and a second run after a successful uninstall is a not-installed
no-op.
UninstallReceiptStatus
UninstallReceiptStatus =
"consumed"|"forced-mismatch"|"forced-missing"|"missing"|"remnant"
How the receipt drove this run: consumed (read, honoured, removed),
forced-missing/forced-mismatch (--force overrode a host-registered
copy with no store receipt, or an owned-content hash mismatch), missing
(nothing installed; no receipt to consume), remnant (a remnant receipt
from an earlier --keep-data uninstall was found and left in place because
only retained entries remain and they are being kept).
UninstallRegistrationAction
UninstallRegistrationAction =
"already-absent"|"manual"|"planned"|"removed"|"retained"
removed: reversed by this run; already-absent: the host no longer held it
(idempotent rerun, or the host pruned it); retained: deliberately left in
place (another installed plugin still uses the marketplace); manual: the
host exposes no non-interactive verb, nextSteps names the UI step;
planned: --plan would remove it.
UninstallResultState
UninstallResultState =
"not-installed"|"planned"|"uninstalled"
Variables
ampInstallLocation
constampInstallLocation: (options,identity,scope) =>object
Parameters
options
identity
PluginIdentity
scope
Returns
object
destination
readonlydestination:string
hostDirectories
readonlyhostDirectories: readonlystring[]
hostRoot
readonlyhostRoot:string
installRoot
readonlyinstallRoot:string
registration
readonlyregistration:"amp-project-plugin"|"amp-system-plugin"
relativeDestination
readonlyrelativeDestination:string
claudePluginRowErrors
constclaudePluginRowErrors: (row) => readonlystring[]
Reads a Claude plugin list --json row's errors array. Healthy rows omit
the key (Claude Code 2.1.259); a refused row carries nonempty strings.
Anything else is treated as "no readable errors" rather than a failure, so
an unexpected shape cannot mask the row as uninstalled.
Parameters
row
Readonly<Record<string, unknown>>
Returns
readonly string[]
cursorMarketplaceReceiptPath
constcursorMarketplaceReceiptPath: (cursorRoot,plugin) =>string
Where the store receipt for a Cursor marketplace-mode install lives.
Parameters
cursorRoot
string
plugin
string
Returns
string
cursorPluginDataDirectory
constcursorPluginDataDirectory: (cursorRoot,plugin) =>string
The PLUGIN_DATA directory the emitted installer creates for an Agent Plugins pack copied into Cursor (spec §9.1).
Parameters
cursorRoot
string
plugin
string
Returns
string
defaultCommandRunner
constdefaultCommandRunner:InstallCommandRunner
doctorEndpointDirectory
constdoctorEndpointDirectory: () =>string
Returns
string
doctorEndpointProbeConcurrency
constdoctorEndpointProbeConcurrency:8=8
Endpoints are probed concurrently, this many at a time, so a directory of listeners that accept connections but never answer (the silent-runtime failure Doctor exists to diagnose) costs roughly one status-probe timeout per batch rather than one per endpoint (#324 review).
formatDoctorReport
constformatDoctorReport: (result) =>string
Human-readable doctor report shared by the agent-bundle CLI and package-bound installer bins.
Parameters
result
Returns
string
formatInstallResult
constformatInstallResult: (result) =>string
Human-readable install summary shared by the CLI and standalone artifact installer.
Parameters
result
Returns
string
formatUninstallResult
constformatUninstallResult: (result) =>string
Human-readable uninstall summary shared by the CLI and standalone artifact
installer. --plan output lists every exact path the run would remove, so an
operator can audit the mutation before allowing it.
Parameters
result
Returns
string
installBundle
constinstallBundle: (options) =>Promise<InstallResult>
Parameters
options
Returns
Promise<InstallResult>
parsePublicHostInventory
constparsePublicHostInventory: (host,stdout,options) =>PublicHostInventory
Parses <host> plugin list --json for one plugin. Claude rows carry the
cache path (installPath) and scope; Codex rows confirm installation and
version only, so the pinned cache layout supplies the path. Shared by
install (before replacing) and doctor (when comparing), so both read the
host's inventory identically.
Parameters
host
stdout
string
options
cacheRoot
string
marketplace
string
plugin
string
scope?
Claude only: restrict to rows installed at this scope.
Returns
parsePublicHostMarketplaces
constparsePublicHostMarketplaces: (host,stdout) => readonlyPublicHostMarketplaceEntry[] |undefined
Parameters
host
stdout
string
Returns
readonly PublicHostMarketplaceEntry[] | undefined
publicHostCacheRoot
constpublicHostCacheRoot: (host,environment,home) =>string
Where a public host CLI caches an installed marketplace plugin; pinned by the real-host install proofs and shared with the development install sync.
Parameters
host
environment
Readonly<NodeJS.ProcessEnv>
home
string
Returns
string
publicHostMarketplaceRemoveArguments
constpublicHostMarketplaceRemoveArguments: (marketplace) => readonlystring[]
The host verb that removes a configured marketplace (identical spelling on Claude 2.1.257 and Codex 0.147.0).
Parameters
marketplace
string
Returns
readonly string[]
publicHostProjectRoot
constpublicHostProjectRoot: (host,scope,identity) =>string|undefined
The project root a Claude project / local registration belongs to: the cwd the host verbs run in.
Parameters
host
scope
identity
PluginIdentity
Returns
string | undefined
publicHostReceiptPath
constpublicHostReceiptPath: (host,plugin,marketplace,scope,environment,home,projectRoot?) =>string
Where the store receipt for a host-CLI install lives:
<host root>/agent-bundle/receipts/<plugin>.<marketplace>.<scope>[.<project digest>].json.
The host identifies a registration as <plugin>@<marketplace>, so the same
plugin installed from two marketplaces is two installs with two receipts.
Claude project / local registrations belong to the working directory the
host verbs ran in (the bundle root), so each project keeps its own receipt.
Parameters
host
plugin
string
marketplace
string
scope
environment
Readonly<NodeJS.ProcessEnv>
home
string
projectRoot?
string
Returns
string
publicHostRegistrations
constpublicHostRegistrations: (host,id,marketplace,scope) => readonlyInstallRegistration[]
The registrations install <host> performs for a public host CLI, in order.
Parameters
host
id
string
marketplace
string
scope
Returns
readonly InstallRegistration[]
publicHostRoot
constpublicHostRoot: (host,environment,home) =>string
A public host CLI's configuration root (CLAUDE_CONFIG_DIR or ~/.claude;
CODEX_HOME or ~/.codex): where the host caches installed plugins and
where Agent Bundle keeps its own agent-bundle/receipts store for them.
Parameters
host
environment
Readonly<NodeJS.ProcessEnv>
home
string
Returns
string
publicHostUninstallArguments
constpublicHostUninstallArguments: (host,id,scope) => readonlystring[]
The host verb that removes an installed plugin. Claude's --keep-data
always rides along: the installer and uninstall manage the plugin's
durable data explicitly (--purge-data) instead of letting the host decide.
Parameters
host
id
string
scope
Returns
readonly string[]
readCodexMarketplaceSource
constreadCodexMarketplaceSource: (codexRoot,marketplace) =>Promise<string|undefined>
Parameters
codexRoot
string
marketplace
string
Returns
Promise<string | undefined>
readInstalledManifest
constreadInstalledManifest: (destination) =>Promise<InstalledManifestIdentity|undefined>
The loader manifest identity of an installed Cursor copy (.cursor-plugin/plugin.json, then root plugin.json).
Parameters
destination
string
Returns
Promise<InstalledManifestIdentity | undefined>
readPublicHostInventory
constreadPublicHostInventory: (runner,identity,host,scope,environment,home) =>Promise<PublicHostInventory>
Runs the host's inventory verb so replacement only uninstalls what the host reports as installed.
Parameters
runner
identity
PluginIdentity
host
scope
environment
Readonly<NodeJS.ProcessEnv>
home
string
Returns
Promise<PublicHostInventory>
readPublicHostMarketplaceState
constreadPublicHostMarketplaceState: (runner,identity,host,marketplace) =>Promise<"absent"|"present"|"unknown">
<host> plugin marketplace list --json: whether a marketplace of this name is configured; unknown when unusable.
Parameters
runner
identity
PluginIdentity
host
marketplace
string
Returns
Promise<"absent" | "present" | "unknown">
resolveCursorRoot
constresolveCursorRoot: (options) =>Promise<string>
~/.cursor, which must already exist as a directory: installers never create a Cursor home.
Parameters
options
home?
string
Returns
Promise<string>
runDoctor
construnDoctor: (options?) =>Promise<DoctorReport>
Parameters
options?
Returns
Promise<DoctorReport>
runHostCommand
construnHostCommand: (runner,identity,host,args,operation?) =>Promise<InstallCommandResult>
Parameters
runner
identity
PluginIdentity
host
args
readonly string[]
operation?
"installation" | "removal"
Returns
Promise<InstallCommandResult>
runInstallCli
construnInstallCli: (argv,options) =>Promise<number>
Runs install <host>, uninstall <host>, or doctor against the pinned
bundle root and returns the process exit code, exactly like the
agent-bundle CLI: 0 on success; 1 when the command threw (its
diagnostics as one JSON line on stderr) or when doctor's report, written
to stdout, carries an error diagnostic; 2 on a usage error.
Parameters
argv
readonly string[]
options
Returns
Promise<number>
treeHash
consttreeHash: (root) =>Promise<string>
sha256 over a plugin tree in installer order; the install receipt is never part of it.
Parameters
root
string
Returns
Promise<string>
uninstallBundle
constuninstallBundle: (options) =>Promise<UninstallResult>
Uninstalls a plugin from a host, bounded by its install receipt. See the
module comment for the policy; --plan (options.plan) returns the same
report without changing anything.
Parameters
options
Returns
Promise<UninstallResult>