pai
    Preparing search index...

    Type Alias SetupAgentSpec

    One agent pai setup knows: where to find it, where its skill goes, and what else setup can do for it.

    Compatibility export. Use planSetup, applySetup, and restoreSetup for agent setup.

    type SetupAgentSpec = {
        detect?: (env: Env, home: string) => boolean;
        home: string;
        label: string;
        mcp?: (ctx: SetupContext, add: boolean) => SetupMcp;
        provider?: (ctx: SetupContext, off: boolean) => ProviderPlan;
        shellEnv?: (ctx: SetupContext) => Record<string, string>;
        skills?: string;
    }
    Index
    detect?: (env: Env, home: string) => boolean

    Whether the agent is installed, for one found somewhere other than SetupAgentSpec.home, such as $CODEX_HOME.

    home: string

    The folder (or file) in the home directory whose presence means the agent is installed.

    label: string

    The agent's name in messages, such as Claude Code.

    mcp?: (ctx: SetupContext, add: boolean) => SetupMcp

    The MCP server for this agent: how to add it by hand, and with add the command or file edit that adds it. Left out for agents with no MCP.

    provider?: (ctx: SetupContext, off: boolean) => ProviderPlan

    Points the agent's own model calls at Phantom AI, or with off removes what pai wrote. Throws a CliError with code setup_unreadable for a config file it can't edit safely, and setup skips that agent.

    shellEnv?: (ctx: SetupContext) => Record<string, string>

    Variables the agent reads, set in the shell block next to PHANTOM_API_KEY. A value may use $PHANTOM_API_KEY. Present (even empty) for every agent that reads the key from the environment.

    skills?: string

    The folder in the home directory the skill goes in. Left out for agents without skills.