What It Is
@nuwa-ai/cap-kit helps you register, discover, and manage Caps (Agent Capability Packages). It integrates DID auth, IPFS storage, Rooch contracts, and MCP.
Examples
Register a CapInstall
CapKit (Constructor)
Create a CapKit client. InputsConfigured CapKit instance
Methods
getTools
Fetch and cache MCP tool registry. InputsNo input parameters
Server-exposed tools keyed by name
mcpClose
Close the underlying MCP client. InputsNo input parameters
No return value
queryByID
Query Cap metadata by id or cid. InputsCap id (e.g., did:…:name)
IPFS CID
Result wrapper with code, data?, error?
queryByName
Search Caps by name/tags with pagination/sort. InputsOptional partial name
Filter by tags
Page index
Page size
Sort field
Sort order
Paged results
queryMyFavorite
List favorite Caps of the current DID. InputsPage index
Page size
Paged favorites
favorite
Add/remove/check favorite for a Cap. InputsCap identifier
Operation to perform
True on success
queryCapStats
Fetch downloads/ratings/favorites. InputsCap identifier
Stats including downloads, averages, favorites
rateCap
Rate a Cap (1..5). InputsCap identifier
Integer 1..5
True on success
queryCapRatingDistribution
Get rating histogram for a Cap. InputsCap identifier
Distribution list
updateEnableCap
Enable/disable a Cap. InputsCap identifier
Toggle action
True on success
downloadByID / downloadByCID
Download Cap YAML via id/cid and parse into Cap. InputsCap id or IPFS CID
Optional format
Parsed Cap object
registerCap
Upload Cap YAML to IPFS and register on-chain. InputsCap content to register
IPFS CID

