type Cap = {
id: string; // This should strictly be <author DID>:<idName>
authorDID: string; // e.g. "did:rooch:0x..."
idName: string; // lowercase [a-z0-9_], 6-20 chars
core: {
prompt: {
value: string; // system prompt
suggestions?: string[]; // optional converstion opener prompt for the user to start using your cap
};
model: {
customGatewayUrl?: string; // optional override of Nuwa LLM Gateway, for setting up your own LLM Gateway
providerId: enum[...] // the providerId of the model, this is used for the Nuwa Client to determine the fomr of LLM API to use
modelId: string; // e.g. "openai/gpt-4o-mini"
parameters?: Record<string, any>; // optional parameters of the model
supportedInputs: ('text'|'image'|'file'|'audio')[]; // the input types that the model supports
contextLength: number; // the context length of the model
};
mcpServers: Record<string, string>; // name -> MCP server URL (only Streamable HTTP is supported)
artifact?: { srcUrl: string }; // optional Artifact UI url, which will be embeded as a dedicated iframe panel in the Nuwa Client
};
metadata: {
displayName: string; // the display name of the cap
description: string; // the short description of the cap
introduction: string; // the long introduction of the cap
tags: string[]; // the tags of the cap
homepage?: string; // the homepage of the cap
repository?: string; // the repository of the cap
thumbnail?: string; // the thumbnail of the cap, only support web based url for now
};
};