eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 1.75 kB
JavaScript
import{parseSetupAnswer}from"./setup-answers.js";import{InvalidArgumentError}from"#compiled/commander/index.js";import{agentCommand}from"#cli/agent-command.js";function parseConnectPrincipalType(e){if(e===`app`||e===`user`)return e;throw new InvalidArgumentError(`Expected principal type "app" or "user".`)}function registerIntegrationCommands(e){let{applicationContext:t,logger:n,program:r}=e,i=r.command(`integration`).description(`Set up an eve integration`);agentCommand(i.command(`setup <kind>`),t).description(`Run a built-in integration setup flow`).option(`-y, --yes`).option(`--force`,`Overwrite files created by setup.`).option(`--non-interactive`,`Run without interactive prompts, instead emit structured NDJSON when further input is required`).option(`--answer <key=value>`,`Answer a setup question; requires --non-interactive.`,parseSetupAnswer,{}).action(async(e,r)=>{let{runIntegrationSetupCommand:i}=await import(`./integration-setup.js`);await i(n,t.root,e,{yes:r.yes,force:r.force,nonInteractive:r.nonInteractive,answers:r.answer})}),agentCommand(i.command(`connect <slug> <service> [canonical-name]`,{hidden:!0}),t).option(`-y, --yes`).option(`--creation-type <type>`,`Select the Vercel Connect creation type.`).option(`--connection-method <method>`,`Select the Vercel Connect connection method.`).option(`--principal-type <type>`,`Require app- or user-scoped Vercel Connect credentials.`,parseConnectPrincipalType).option(`--non-interactive`,`Run without interactive prompts, instead emit structured NDJSON when further input is required`).action(async(e,r,i,a)=>{let{runIntegrationConnectCommand:o}=await import(`./integration-connect.js`);await o(n,t.root,e,r,i,a)})}export{parseConnectPrincipalType,registerIntegrationCommands};