copilotkit 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/base-command.js +1 -1
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/dev.js +2 -5
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +228 -155
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.js +2 -5
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +2 -5
- package/dist/commands/logout.js.map +1 -1
- package/dist/lib/init/index.d.ts +3 -2
- package/dist/lib/init/index.js +178 -99
- package/dist/lib/init/index.js.map +1 -1
- package/dist/lib/init/questions.js +92 -47
- package/dist/lib/init/questions.js.map +1 -1
- package/dist/lib/init/scaffold/agent.d.ts +19 -0
- package/dist/lib/init/scaffold/agent.js +161 -0
- package/dist/lib/init/scaffold/agent.js.map +1 -0
- package/dist/lib/init/scaffold/env.js +4 -2
- package/dist/lib/init/scaffold/env.js.map +1 -1
- package/dist/lib/init/scaffold/github.d.ts +1 -4
- package/dist/lib/init/scaffold/github.js +1 -46
- package/dist/lib/init/scaffold/github.js.map +1 -1
- package/dist/lib/init/scaffold/index.d.ts +2 -1
- package/dist/lib/init/scaffold/index.js +96 -54
- package/dist/lib/init/scaffold/index.js.map +1 -1
- package/dist/lib/init/scaffold/shadcn.js +15 -6
- package/dist/lib/init/scaffold/shadcn.js.map +1 -1
- package/dist/lib/init/types/index.d.ts +1 -1
- package/dist/lib/init/types/index.js +12 -2
- package/dist/lib/init/types/index.js.map +1 -1
- package/dist/lib/init/types/questions.d.ts +7 -2
- package/dist/lib/init/types/questions.js +4 -1
- package/dist/lib/init/types/questions.js.map +1 -1
- package/dist/lib/init/types/templates.d.ts +11 -2
- package/dist/lib/init/types/templates.js +8 -1
- package/dist/lib/init/types/templates.js.map +1 -1
- package/dist/services/auth.service.js +1 -4
- package/dist/services/auth.service.js.map +1 -1
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/utils/version.js.map +1 -1
- package/oclif.manifest.json +12 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/init/types/questions.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\"\n\nexport type Question = {\n type: 'input' | 'yes/no' | 'select'\n name: Fields\n message: string\n choices?: string[]\n default?: string\n when?: (answers: Record<string, any>) => boolean\n}\n\n// Agent framework options\nexport const AGENT_FRAMEWORKS = ['CrewAI', 'LangGraph', 'None'] as const;\nexport type AgentFramework = typeof AGENT_FRAMEWORKS[number];\n\n// CrewAI types\nexport const CREW_TYPES = ['Crews', 'Flows'] as const;\nexport type CrewType = typeof CREW_TYPES[number];\n\n// UI component options\nexport const CHAT_COMPONENTS = ['CopilotChat','CopilotSidebar', 'Headless', 'CopilotPopup'] as const;\nexport type ChatComponent = typeof CHAT_COMPONENTS[number];\n\n// LangGraph agent types\nexport const LANGGRAPH_AGENTS = ['Python Starter', 'TypeScript Starter', 'None'] as const;\nexport type LangGraphAgent = typeof LANGGRAPH_AGENTS[number];\n\n// Yes/No type for consistent options\nexport type YesNo = 'Yes' | 'No';\n\n// All possible field names for questions\nexport type Fields = \n \"copilotKitVersion\" | \n \"agentFramework\" | \n \"alreadyDeployed\" |\n \"fastApiEnabled\" | \n \"useCopilotCloud\" | \n \"chatUi\" | \n \"langGraphAgent\" | \n \"langGraphPlatform\" |\n \"langGraphPlatformUrl\" | \n \"crewType\" | \n \"crewName\" | \n \"langGraphRemoteEndpointURL\" |\n \"crewUrl\" | \n \"crewBearerToken\" | \n \"langSmithApiKey\" | \n \"llmToken\";\n\n// Complete configuration shape that holds all possible answers\nexport interface Config {\n copilotKitVersion: string;\n agentFramework: AgentFramework;\n alreadyDeployed?: YesNo;\n fastApiEnabled?: YesNo;\n useCopilotCloud?: YesNo;\n chatUi: ChatComponent;\n\n // LangGraph\n langGraphAgent?: LangGraphAgent;\n langGraphPlatform?: YesNo;\n langGraphPlatformUrl?: string;\n langGraphRemoteEndpointURL?: string;\n\n // CrewAI\n crewType?: CrewType;\n crewName?: string;\n crewUrl?: string;\n crewBearerToken?: string;\n\n // API keys and tokens\n copilotCloudPublicApiKey?: string;\n langSmithApiKey?: string;\n llmToken?: string;\n}\n\n// CLI flags definition - single source of truth for flag descriptions\nexport const ConfigFlags = {\n copilotKitVersion: Flags.string({description: 'CopilotKit version to use (e.g. 1.7.0)'}),\n agentFramework: Flags.string({description: 'Agent framework to power your copilot', options: AGENT_FRAMEWORKS}),\n fastApiEnabled: Flags.string({description: 'Use FastAPI to serve your agent locally', options: ['Yes', 'No']}),\n useCopilotCloud: Flags.string({description: 'Use Copilot Cloud for production-ready hosting', options: ['Yes', 'No']}),\n chatUi: Flags.string({description: 'Chat UI component to add to your app', options: CHAT_COMPONENTS}),\n langGraphAgent: Flags.string({description: 'LangGraph agent template to use', options: LANGGRAPH_AGENTS}),\n crewType: Flags.string({description: 'CrewAI implementation type', options: CREW_TYPES}),\n crewName: Flags.string({description: 'Name for your CrewAI agent'}),\n crewUrl: Flags.string({description: 'URL endpoint for your CrewAI agent'}),\n crewBearerToken: Flags.string({description: 'Bearer token for CrewAI authentication'}),\n langSmithApiKey: Flags.string({description: 'LangSmith API key for LangGraph observability'}),\n llmToken: Flags.string({description: 'API key for your preferred LLM provider'}),\n}"],"mappings":";AAAA,SAAS,aAAa;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/init/types/questions.ts"],"sourcesContent":["import { Flags } from \"@oclif/core\"\n\nexport type Question = {\n type: 'input' | 'yes/no' | 'select'\n name: Fields\n message: string\n choices?: string[]\n default?: string\n when?: (answers: Record<string, any>) => boolean\n sensitive?: boolean\n}\n\n// Agent framework options\nexport const AGENT_FRAMEWORKS = ['CrewAI', 'LangGraph', 'None'] as const;\nexport type AgentFramework = typeof AGENT_FRAMEWORKS[number];\n\n// CrewAI types\nexport const CREW_TYPES = ['Crews', 'Flows'] as const;\nexport type CrewType = typeof CREW_TYPES[number];\n\n// UI component options\nexport const CHAT_COMPONENTS = ['CopilotChat','CopilotSidebar', 'Headless', 'CopilotPopup'] as const;\nexport type ChatComponent = typeof CHAT_COMPONENTS[number];\n\n// LangGraph agent types\nexport const LANGGRAPH_AGENTS = ['Python Starter', 'TypeScript Starter', 'None'] as const;\nexport type LangGraphAgent = typeof LANGGRAPH_AGENTS[number];\n\n// CrewAI Flow templates\nexport const CREW_FLOW_TEMPLATES = ['Starter', 'None'] as const;\nexport type CrewFlowTemplate = typeof CREW_FLOW_TEMPLATES[number];\n\n// Yes/No type for consistent options\nexport type YesNo = 'Yes' | 'No';\n\n// All possible field names for questions\nexport type Fields = \n \"copilotKitVersion\" | \n \"agentFramework\" | \n \"alreadyDeployed\" |\n \"fastApiEnabled\" | \n \"useCopilotCloud\" | \n \"chatUi\" | \n \"langGraphAgent\" | \n \"langGraphPlatform\" |\n \"langGraphPlatformUrl\" | \n \"crewType\" | \n \"crewName\" | \n \"langGraphRemoteEndpointURL\" |\n \"crewUrl\" | \n \"crewBearerToken\" | \n \"langSmithApiKey\" | \n \"llmToken\" |\n \"crewFlowAgent\";\n\n// Complete configuration shape that holds all possible answers\nexport interface Config {\n copilotKitVersion: string;\n agentFramework: AgentFramework;\n alreadyDeployed?: YesNo;\n fastApiEnabled?: YesNo;\n useCopilotCloud?: YesNo;\n chatUi: ChatComponent;\n\n // LangGraph\n langGraphAgent?: LangGraphAgent;\n langGraphPlatform?: YesNo;\n langGraphPlatformUrl?: string;\n langGraphRemoteEndpointURL?: string;\n\n // CrewAI\n crewType?: CrewType;\n crewName?: string;\n crewUrl?: string;\n crewBearerToken?: string;\n crewFlowAgent?: string;\n\n // API keys and tokens\n copilotCloudPublicApiKey?: string;\n langSmithApiKey?: string;\n llmToken?: string;\n}\n\n// CLI flags definition - single source of truth for flag descriptions\nexport const ConfigFlags = {\n copilotKitVersion: Flags.string({description: 'CopilotKit version to use (e.g. 1.7.0)'}),\n agentFramework: Flags.string({description: 'Agent framework to power your copilot', options: AGENT_FRAMEWORKS}),\n fastApiEnabled: Flags.string({description: 'Use FastAPI to serve your agent locally', options: ['Yes', 'No']}),\n useCopilotCloud: Flags.string({description: 'Use Copilot Cloud for production-ready hosting', options: ['Yes', 'No']}),\n chatUi: Flags.string({description: 'Chat UI component to add to your app', options: CHAT_COMPONENTS}),\n langGraphAgent: Flags.string({description: 'LangGraph agent template to use', options: LANGGRAPH_AGENTS}),\n crewType: Flags.string({description: 'CrewAI implementation type', options: CREW_TYPES}),\n crewName: Flags.string({description: 'Name for your CrewAI agent'}),\n crewUrl: Flags.string({description: 'URL endpoint for your CrewAI agent'}),\n crewBearerToken: Flags.string({description: 'Bearer token for CrewAI authentication'}),\n langSmithApiKey: Flags.string({description: 'LangSmith API key for LangGraph observability'}),\n llmToken: Flags.string({description: 'API key for your preferred LLM provider'}),\n crewFlowAgent: Flags.string({description: 'CrewAI Flow template to use', options: CREW_FLOW_TEMPLATES}),\n}"],"mappings":";AAAA,SAAS,aAAa;AAaf,IAAM,mBAAmB,CAAC,UAAU,aAAa,MAAM;AAIvD,IAAM,aAAa,CAAC,SAAS,OAAO;AAIpC,IAAM,kBAAkB,CAAC,eAAc,kBAAkB,YAAY,cAAc;AAInF,IAAM,mBAAmB,CAAC,kBAAkB,sBAAsB,MAAM;AAIxE,IAAM,sBAAsB,CAAC,WAAW,MAAM;AAuD9C,IAAM,cAAc;AAAA,EACzB,mBAAmB,MAAM,OAAO,EAAC,aAAa,yCAAwC,CAAC;AAAA,EACvF,gBAAgB,MAAM,OAAO,EAAC,aAAa,yCAAyC,SAAS,iBAAgB,CAAC;AAAA,EAC9G,gBAAgB,MAAM,OAAO,EAAC,aAAa,2CAA2C,SAAS,CAAC,OAAO,IAAI,EAAC,CAAC;AAAA,EAC7G,iBAAiB,MAAM,OAAO,EAAC,aAAa,kDAAkD,SAAS,CAAC,OAAO,IAAI,EAAC,CAAC;AAAA,EACrH,QAAQ,MAAM,OAAO,EAAC,aAAa,wCAAwC,SAAS,gBAAe,CAAC;AAAA,EACpG,gBAAgB,MAAM,OAAO,EAAC,aAAa,mCAAmC,SAAS,iBAAgB,CAAC;AAAA,EACxG,UAAU,MAAM,OAAO,EAAC,aAAa,8BAA8B,SAAS,WAAU,CAAC;AAAA,EACvF,UAAU,MAAM,OAAO,EAAC,aAAa,6BAA4B,CAAC;AAAA,EAClE,SAAS,MAAM,OAAO,EAAC,aAAa,qCAAoC,CAAC;AAAA,EACzE,iBAAiB,MAAM,OAAO,EAAC,aAAa,yCAAwC,CAAC;AAAA,EACrF,iBAAiB,MAAM,OAAO,EAAC,aAAa,gDAA+C,CAAC;AAAA,EAC5F,UAAU,MAAM,OAAO,EAAC,aAAa,0CAAyC,CAAC;AAAA,EAC/E,eAAe,MAAM,OAAO,EAAC,aAAa,+BAA+B,SAAS,oBAAmB,CAAC;AACxG;","names":[]}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
type ChatTemplate = "CopilotChat" | "CopilotPopup" | "CopilotSidebar";
|
|
2
|
-
type StarterTemplate = "LangGraphPlatform" | "RemoteEndpoint" | "Standard" | "CrewEnterprise";
|
|
2
|
+
type StarterTemplate = "LangGraphPlatform" | "RemoteEndpoint" | "Standard" | "CrewEnterprise" | "CrewFlowsStarter";
|
|
3
3
|
type Template = ChatTemplate | StarterTemplate;
|
|
4
|
-
declare const templateMapping:
|
|
4
|
+
declare const templateMapping: {
|
|
5
|
+
LangGraphPlatform: string;
|
|
6
|
+
RemoteEndpoint: string;
|
|
7
|
+
CrewEnterprise: string[];
|
|
8
|
+
CrewFlowsStarter: string[];
|
|
9
|
+
Standard: string;
|
|
10
|
+
CopilotChat: string;
|
|
11
|
+
CopilotPopup: string;
|
|
12
|
+
CopilotSidebar: string;
|
|
13
|
+
};
|
|
5
14
|
|
|
6
15
|
export { type ChatTemplate, type StarterTemplate, type Template, templateMapping };
|
|
@@ -3,7 +3,14 @@ var BASE_URL = "http://registry.copilotkit.ai/r";
|
|
|
3
3
|
var templateMapping = {
|
|
4
4
|
"LangGraphPlatform": `${BASE_URL}/langgraph-platform-starter.json`,
|
|
5
5
|
"RemoteEndpoint": `${BASE_URL}/remote-endpoint-starter.json`,
|
|
6
|
-
"CrewEnterprise":
|
|
6
|
+
"CrewEnterprise": [
|
|
7
|
+
`${BASE_URL}/coagents-crew-starter.json`
|
|
8
|
+
],
|
|
9
|
+
"CrewFlowsStarter": [
|
|
10
|
+
`${BASE_URL}/coagents-starter-ui.json`,
|
|
11
|
+
`${BASE_URL}/agent-layout.json`,
|
|
12
|
+
`${BASE_URL}/remote-endpoint.json`
|
|
13
|
+
],
|
|
7
14
|
"Standard": `${BASE_URL}/standard-starter.json`,
|
|
8
15
|
"CopilotChat": `${BASE_URL}/chat.json`,
|
|
9
16
|
"CopilotPopup": `${BASE_URL}/popup.json`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/init/types/templates.ts"],"sourcesContent":["export type ChatTemplate = \n \"CopilotChat\" |\n \"CopilotPopup\" |\n \"CopilotSidebar\"\n\nexport type StarterTemplate = \n \"LangGraphPlatform\" |\n \"RemoteEndpoint\" |\n \"Standard\" |\n \"CrewEnterprise\"\n\nexport type Template = ChatTemplate | StarterTemplate\n\nconst BASE_URL = \"http://registry.copilotkit.ai/r\"\n\nexport const templateMapping
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/init/types/templates.ts"],"sourcesContent":["export type ChatTemplate = \n \"CopilotChat\" |\n \"CopilotPopup\" |\n \"CopilotSidebar\"\n\nexport type StarterTemplate = \n \"LangGraphPlatform\" |\n \"RemoteEndpoint\" |\n \"Standard\" |\n \"CrewEnterprise\" |\n \"CrewFlowsStarter\"\n\nexport type Template = ChatTemplate | StarterTemplate\n\nconst BASE_URL = \"http://registry.copilotkit.ai/r\"\n\nexport const templateMapping = {\n \"LangGraphPlatform\": `${BASE_URL}/langgraph-platform-starter.json`,\n \"RemoteEndpoint\": `${BASE_URL}/remote-endpoint-starter.json`,\n \"CrewEnterprise\": [\n `${BASE_URL}/coagents-crew-starter.json`,\n ],\n\n \"CrewFlowsStarter\": [\n `${BASE_URL}/coagents-starter-ui.json`,\n `${BASE_URL}/agent-layout.json`,\n `${BASE_URL}/remote-endpoint.json`\n ],\n\n \"Standard\": `${BASE_URL}/standard-starter.json`,\n \"CopilotChat\": `${BASE_URL}/chat.json`,\n \"CopilotPopup\": `${BASE_URL}/popup.json`,\n \"CopilotSidebar\": `${BASE_URL}/sidebar.json`,\n}"],"mappings":";AAcA,IAAM,WAAW;AAEV,IAAM,kBAAkB;AAAA,EAC3B,qBAAqB,GAAG,QAAQ;AAAA,EAChC,kBAAkB,GAAG,QAAQ;AAAA,EAC7B,kBAAkB;AAAA,IACd,GAAG,QAAQ;AAAA,EACf;AAAA,EAEA,oBAAoB;AAAA,IAChB,GAAG,QAAQ;AAAA,IACX,GAAG,QAAQ;AAAA,IACX,GAAG,QAAQ;AAAA,EACf;AAAA,EAEA,YAAY,GAAG,QAAQ;AAAA,EACvB,eAAe,GAAG,QAAQ;AAAA,EAC1B,gBAAgB,GAAG,QAAQ;AAAA,EAC3B,kBAAkB,GAAG,QAAQ;AACjC;","names":[]}
|
|
@@ -138,8 +138,6 @@ var AuthService = class {
|
|
|
138
138
|
if (shouldLogin) {
|
|
139
139
|
const loginResult = await this.login({ exitAfterLogin: false });
|
|
140
140
|
cliToken = loginResult.cliToken;
|
|
141
|
-
cmd.log(`\u{1FA81} Logged in as ${chalk.hex("#7553fc")(loginResult.user.email)}
|
|
142
|
-
`);
|
|
143
141
|
return loginResult;
|
|
144
142
|
} else {
|
|
145
143
|
cmd.error("Authentication required to proceed.");
|
|
@@ -199,8 +197,7 @@ var AuthService = class {
|
|
|
199
197
|
}
|
|
200
198
|
this.config.set("cliToken", cliToken);
|
|
201
199
|
res.status(200).json({ message: "Callback called" });
|
|
202
|
-
spinner.succeed(`\u{1FA81} Successfully logged in as ${chalk.hex("#7553fc")(user.email)}
|
|
203
|
-
`);
|
|
200
|
+
spinner.succeed(`\u{1FA81} Successfully logged in as ${chalk.hex("#7553fc")(user.email)}`);
|
|
204
201
|
if (exitAfterLogin) {
|
|
205
202
|
process.exit(0);
|
|
206
203
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/auth.service.ts","../../src/utils/trpc.ts","../../src/services/analytics.service.ts"],"sourcesContent":["// @ts-ignore\nimport Conf from 'conf'\nimport cors from 'cors'\nimport express from 'express'\nimport crypto from 'node:crypto'\nimport open from 'open'\nimport getPort from 'get-port'\nimport ora from 'ora'\nimport chalk from 'chalk'\nimport inquirer from 'inquirer'\nimport {Command} from '@oclif/core'\nimport {createTRPCClient} from '../utils/trpc.js'\nimport {AnalyticsService} from '../services/analytics.service.js'\nimport { BaseCommand } from '../commands/base-command.js'\n\ninterface LoginResponse {\n cliToken: string\n user: {\n email: string\n id: string\n }\n organization: {\n id: string\n }\n}\n\nexport class AuthService {\n private readonly config = new Conf({projectName: 'CopilotKitCLI'})\n private readonly COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || 'https://cloud.copilotkit.ai'\n\n getToken(): string | undefined {\n return this.config.get('cliToken') as string | undefined\n }\n\n getCLIToken(): string | undefined {\n const cliToken = this.config.get('cliToken') as string | undefined\n return cliToken\n }\n\n async logout(cmd: BaseCommand): Promise<void> {\n this.config.delete('cliToken')\n }\n\n async requireLogin(cmd: Command): Promise<LoginResponse> {\n let cliToken = this.getCLIToken()\n\n // Check authentication\n if (!cliToken) {\n try {\n const {shouldLogin} = await inquirer.prompt([\n {\n name: 'shouldLogin',\n type: 'confirm',\n message: 'You are not yet authenticated. Authenticate with Copilot Cloud? (press Enter to confirm)',\n default: true,\n },\n ])\n\n if (shouldLogin) {\n const loginResult = await this.login({exitAfterLogin: false})\n cliToken = loginResult.cliToken\n cmd.log(`🪁 Logged in as ${chalk.hex('#7553fc')(loginResult.user.email)}\\n`)\n return loginResult\n } else {\n cmd.error('Authentication required to proceed.')\n }\n } catch (error) {\n if (error instanceof Error && error.name === 'ExitPromptError') {\n cmd.error(chalk.yellow('\\nAuthentication cancelled'))\n }\n\n throw error\n }\n }\n\n let me\n\n const trpcClient = createTRPCClient(cliToken)\n try {\n me = await trpcClient.me.query()\n } catch (error) {\n cmd.log(chalk.red('Could not authenticate with Copilot Cloud. Please try again.'))\n process.exit(1)\n }\n\n if (!me.organization || !me.user) {\n cmd.error('Authentication required to proceed.')\n }\n\n return {cliToken, user: me.user, organization: me.organization}\n }\n\n async login({exitAfterLogin}: {exitAfterLogin?: boolean} = {exitAfterLogin: true}): Promise<LoginResponse> {\n let analytics: AnalyticsService\n analytics = new AnalyticsService()\n\n const app = express()\n app.use(cors())\n app.use(express.urlencoded({extended: true}))\n app.use(express.json())\n\n const port = await getPort()\n const state = crypto.randomBytes(16).toString('hex')\n\n return new Promise(async (resolve) => {\n const server = app.listen(port, () => {})\n\n await analytics.track({\n event: 'cli.login.initiated',\n properties: {},\n })\n\n const spinner = ora('Waiting for browser authentication to complete...\\n').start()\n\n app.post('/callback', async (req, res) => {\n const {cliToken, user, organization} = req.body\n\n analytics = new AnalyticsService({userId: user.id, organizationId: organization.id, email: user.email})\n await analytics.track({\n event: 'cli.login.success',\n properties: {\n organizationId: organization.id,\n userId: user.id,\n email: user.email,\n },\n })\n\n if (state !== req.query.state) {\n res.status(401).json({message: 'Invalid state'})\n spinner.fail('Invalid state')\n return\n }\n\n this.config.set('cliToken', cliToken)\n res.status(200).json({message: 'Callback called'})\n spinner.succeed(`🪁 Successfully logged in as ${chalk.hex('#7553fc')(user.email)}\\n`)\n if (exitAfterLogin) {\n process.exit(0)\n } else {\n server.close();\n resolve({cliToken, user, organization});\n }\n })\n\n open(`${this.COPILOT_CLOUD_BASE_URL}/cli-auth?callbackUrl=http://localhost:${port}/callback&state=${state}`)\n })\n }\n}\n","import {createTRPCClient as createTRPClient_, unstable_httpBatchStreamLink} from '@trpc/client'\nimport type {CLIRouter} from '@repo/trpc-cli/cli-router'\nimport superjson from 'superjson'\n\nexport const COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || 'https://cloud.copilotkit.ai'\n\nexport function createTRPCClient(cliToken: string) {\n return createTRPClient_<CLIRouter>({\n links: [\n unstable_httpBatchStreamLink({\n transformer: superjson,\n url: `${COPILOT_CLOUD_BASE_URL}/api/trpc-cli`,\n headers: () => {\n const headers = new Headers()\n headers.set('x-trpc-source', 'cli')\n headers.set('x-cli-token', cliToken)\n return headers\n },\n }),\n ],\n })\n}\n","import {Analytics} from '@segment/analytics-node'\nimport {AnalyticsEvents} from './events.js'\nimport Conf from 'conf'\n\nexport class AnalyticsService {\n private segment: Analytics | undefined\n private globalProperties: Record<string, any> = {}\n private userId: string | undefined;\n private email: string | undefined;\n private organizationId: string | undefined;\n private config = new Conf({projectName: 'CopilotKitCLI'})\n\n constructor(private readonly authData?: {\n userId: string,\n email: string,\n organizationId: string,\n }) {\n if (process.env.SEGMENT_DISABLED === 'true') {\n return;\n }\n\n const segmentWriteKey = process.env.SEGMENT_WRITE_KEY || \"9Pv6QyExYef2P4hPz4gks6QAvNMi2AOf\"\n\n this.globalProperties = {\n service: 'cli',\n }\n\n\n if (this.authData?.userId) {\n this.userId = this.authData.userId\n }\n\n if (this.authData?.email) {\n this.email = this.authData.email\n this.globalProperties.email = this.authData.email\n }\n\n if (this.authData?.organizationId) {\n this.organizationId = this.authData.organizationId\n }\n\n this.segment = new Analytics({\n writeKey: segmentWriteKey,\n disable: process.env.SEGMENT_DISABLE === 'true',\n })\n\n const config = new Conf({projectName: 'CopilotKitCLI'})\n if (!config.get('anonymousId')) {\n config.set('anonymousId', crypto.randomUUID())\n }\n }\n\n private getAnonymousId(): string {\n const anonymousId = this.config.get('anonymousId')\n if (!anonymousId) {\n const anonymousId = crypto.randomUUID()\n this.config.set('anonymousId', anonymousId)\n return anonymousId\n }\n\n return anonymousId as string;\n }\n\n public track<K extends keyof AnalyticsEvents>(\n event: Omit<Parameters<Analytics['track']>[0], 'userId'> & {\n event: K\n properties: AnalyticsEvents[K]\n },\n ): Promise<void> {\n if (!this.segment) {\n return Promise.resolve();\n }\n\n const payload = {\n userId: this.userId ? this.userId : undefined,\n email: this.email ? this.email : undefined,\n anonymousId: this.getAnonymousId(),\n event: event.event,\n properties: {\n ...this.globalProperties,\n ...event.properties,\n $groups: this.organizationId ? {\n segment_group: this.organizationId,\n } : undefined,\n eventProperties: {\n ...event.properties,\n ...this.globalProperties,\n },\n },\n }\n\n return new Promise((resolve, reject) => {\n this.segment!.track(payload, (err) => {\n if (err) {\n // Resolve anyway\n resolve();\n }\n\n resolve();\n })\n });\n }\n}\n"],"mappings":";AACA,OAAOA,WAAU;AACjB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAOC,aAAY;AACnB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,OAAO,cAAc;;;ACTrB,SAAQ,oBAAoB,kBAAkB,oCAAmC;AAEjF,OAAO,eAAe;AAEf,IAAM,yBAAyB,QAAQ,IAAI,0BAA0B;AAErE,SAAS,iBAAiB,UAAkB;AACjD,SAAO,iBAA4B;AAAA,IACjC,OAAO;AAAA,MACL,6BAA6B;AAAA,QAC3B,aAAa;AAAA,QACb,KAAK,GAAG,sBAAsB;AAAA,QAC9B,SAAS,MAAM;AACb,gBAAM,UAAU,IAAI,QAAQ;AAC5B,kBAAQ,IAAI,iBAAiB,KAAK;AAClC,kBAAQ,IAAI,eAAe,QAAQ;AACnC,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;;;ACrBA,SAAQ,iBAAgB;AAExB,OAAO,UAAU;AAEV,IAAM,mBAAN,MAAuB;AAAA,EAQ5B,YAA6B,UAI1B;AAJ0B;AAK3B,QAAI,QAAQ,IAAI,qBAAqB,QAAQ;AAC3C;AAAA,IACF;AAEA,UAAM,kBAAkB,QA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I,iBAAiB,EAAC,QAAQ,KAAK,IAAI,gBAAgB,aAAa,IAAI,OAAO,KAAK,MAAK,CAAC;AACtG,cAAM,UAAU,MAAM;AAAA,UACpB,OAAO;AAAA,UACP,YAAY;AAAA,YACV,gBAAgB,aAAa;AAAA,YAC7B,QAAQ,KAAK;AAAA,YACb,OAAO,KAAK;AAAA,UACd;AAAA,QACF,CAAC;AAED,YAAI,UAAU,IAAI,MAAM,OAAO;AAC7B,cAAI,OAAO,GAAG,EAAE,KAAK,EAAC,SAAS,gBAAe,CAAC;AAC/C,kBAAQ,KAAK,eAAe;AAC5B;AAAA,QACF;AAEA,aAAK,OAAO,IAAI,YAAY,QAAQ;AACpC,YAAI,OAAO,GAAG,EAAE,KAAK,EAAC,SAAS,kBAAiB,CAAC;AACjD,gBAAQ,QAAQ,uCAAgC,MAAM,IAAI,SAAS,EAAE,KAAK,KAAK,CAAC;AAAA,CAAI;AACpF,YAAI,gBAAgB;AAClB,kBAAQ,KAAK,CAAC;AAAA,QAChB,OAAO;AACL,iBAAO,MAAM;AACb,kBAAQ,EAAC,UAAU,MAAM,aAAY,CAAC;AAAA,QACxC;AAAA,MACF,CAAC;AAED,WAAK,GAAG,KAAK,sBAAsB,0CAA0C,IAAI,mBAAmB,KAAK,EAAE;AAAA,IAC7G,CAAC;AAAA,EACH;AACF;","names":["Conf","crypto","anonymousId","Conf","crypto"]}
|
|
1
|
+
{"version":3,"sources":["../../src/services/auth.service.ts","../../src/utils/trpc.ts","../../src/services/analytics.service.ts"],"sourcesContent":["// @ts-ignore\nimport Conf from 'conf'\nimport cors from 'cors'\nimport express from 'express'\nimport crypto from 'node:crypto'\nimport open from 'open'\nimport getPort from 'get-port'\nimport ora from 'ora'\nimport chalk from 'chalk'\nimport inquirer from 'inquirer'\nimport {Command} from '@oclif/core'\nimport {createTRPCClient} from '../utils/trpc.js'\nimport {AnalyticsService} from '../services/analytics.service.js'\nimport { BaseCommand } from '../commands/base-command.js'\n\ninterface LoginResponse {\n cliToken: string\n user: {\n email: string\n id: string\n }\n organization: {\n id: string\n }\n}\n\nexport class AuthService {\n private readonly config = new Conf({projectName: 'CopilotKitCLI'})\n private readonly COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || 'https://cloud.copilotkit.ai'\n\n getToken(): string | undefined {\n return this.config.get('cliToken') as string | undefined\n }\n\n getCLIToken(): string | undefined {\n const cliToken = this.config.get('cliToken') as string | undefined\n return cliToken\n }\n\n async logout(cmd: BaseCommand): Promise<void> {\n this.config.delete('cliToken')\n }\n\n async requireLogin(cmd: Command): Promise<LoginResponse> {\n let cliToken = this.getCLIToken()\n\n // Check authentication\n if (!cliToken) {\n try {\n const {shouldLogin} = await inquirer.prompt([\n {\n name: 'shouldLogin',\n type: 'confirm',\n message: 'You are not yet authenticated. Authenticate with Copilot Cloud? (press Enter to confirm)',\n default: true,\n },\n ])\n\n if (shouldLogin) {\n const loginResult = await this.login({exitAfterLogin: false})\n cliToken = loginResult.cliToken\n return loginResult\n } else {\n cmd.error('Authentication required to proceed.')\n }\n } catch (error) {\n if (error instanceof Error && error.name === 'ExitPromptError') {\n cmd.error(chalk.yellow('\\nAuthentication cancelled'))\n }\n\n throw error\n }\n }\n\n let me\n\n const trpcClient = createTRPCClient(cliToken)\n try {\n me = await trpcClient.me.query()\n } catch (error) {\n cmd.log(chalk.red('Could not authenticate with Copilot Cloud. Please try again.'))\n process.exit(1)\n }\n\n if (!me.organization || !me.user) {\n cmd.error('Authentication required to proceed.')\n }\n\n return {cliToken, user: me.user, organization: me.organization}\n }\n\n async login({exitAfterLogin}: {exitAfterLogin?: boolean} = {exitAfterLogin: true}): Promise<LoginResponse> {\n let analytics: AnalyticsService\n analytics = new AnalyticsService()\n\n const app = express()\n app.use(cors())\n app.use(express.urlencoded({extended: true}))\n app.use(express.json())\n\n const port = await getPort()\n const state = crypto.randomBytes(16).toString('hex')\n\n return new Promise(async (resolve) => {\n const server = app.listen(port, () => {})\n\n await analytics.track({\n event: 'cli.login.initiated',\n properties: {},\n })\n\n const spinner = ora('Waiting for browser authentication to complete...\\n').start()\n\n app.post('/callback', async (req, res) => {\n const {cliToken, user, organization} = req.body\n\n analytics = new AnalyticsService({userId: user.id, organizationId: organization.id, email: user.email})\n await analytics.track({\n event: 'cli.login.success',\n properties: {\n organizationId: organization.id,\n userId: user.id,\n email: user.email,\n },\n })\n\n if (state !== req.query.state) {\n res.status(401).json({message: 'Invalid state'})\n spinner.fail('Invalid state')\n return\n }\n\n this.config.set('cliToken', cliToken)\n res.status(200).json({message: 'Callback called'})\n spinner.succeed(`🪁 Successfully logged in as ${chalk.hex('#7553fc')(user.email)}`)\n if (exitAfterLogin) {\n process.exit(0)\n } else {\n server.close();\n resolve({cliToken, user, organization});\n }\n })\n\n open(`${this.COPILOT_CLOUD_BASE_URL}/cli-auth?callbackUrl=http://localhost:${port}/callback&state=${state}`)\n })\n }\n}\n","import {createTRPCClient as createTRPClient_, unstable_httpBatchStreamLink} from '@trpc/client'\nimport type {CLIRouter} from '@repo/trpc-cli/cli-router'\nimport superjson from 'superjson'\n\nexport const COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || 'https://cloud.copilotkit.ai'\n\nexport function createTRPCClient(cliToken: string) {\n return createTRPClient_<CLIRouter>({\n links: [\n unstable_httpBatchStreamLink({\n transformer: superjson,\n url: `${COPILOT_CLOUD_BASE_URL}/api/trpc-cli`,\n headers: () => {\n const headers = new Headers()\n headers.set('x-trpc-source', 'cli')\n headers.set('x-cli-token', cliToken)\n return headers\n },\n }),\n ],\n })\n}\n","import {Analytics} from '@segment/analytics-node'\nimport {AnalyticsEvents} from './events.js'\nimport Conf from 'conf'\n\nexport class AnalyticsService {\n private segment: Analytics | undefined\n private globalProperties: Record<string, any> = {}\n private userId: string | undefined;\n private email: string | undefined;\n private organizationId: string | undefined;\n private config = new Conf({projectName: 'CopilotKitCLI'})\n\n constructor(private readonly authData?: {\n userId: string,\n email: string,\n organizationId: string,\n }) {\n if (process.env.SEGMENT_DISABLED === 'true') {\n return;\n }\n\n const segmentWriteKey = process.env.SEGMENT_WRITE_KEY || \"9Pv6QyExYef2P4hPz4gks6QAvNMi2AOf\"\n\n this.globalProperties = {\n service: 'cli',\n }\n\n\n if (this.authData?.userId) {\n this.userId = this.authData.userId\n }\n\n if (this.authData?.email) {\n this.email = this.authData.email\n this.globalProperties.email = this.authData.email\n }\n\n if (this.authData?.organizationId) {\n this.organizationId = this.authData.organizationId\n }\n\n this.segment = new Analytics({\n writeKey: segmentWriteKey,\n disable: process.env.SEGMENT_DISABLE === 'true',\n })\n\n const config = new Conf({projectName: 'CopilotKitCLI'})\n if (!config.get('anonymousId')) {\n config.set('anonymousId', crypto.randomUUID())\n }\n }\n\n private getAnonymousId(): string {\n const anonymousId = this.config.get('anonymousId')\n if (!anonymousId) {\n const anonymousId = crypto.randomUUID()\n this.config.set('anonymousId', anonymousId)\n return anonymousId\n }\n\n return anonymousId as string;\n }\n\n public track<K extends keyof AnalyticsEvents>(\n event: Omit<Parameters<Analytics['track']>[0], 'userId'> & {\n event: K\n properties: AnalyticsEvents[K]\n },\n ): Promise<void> {\n if (!this.segment) {\n return Promise.resolve();\n }\n\n const payload = {\n userId: this.userId ? this.userId : undefined,\n email: this.email ? this.email : undefined,\n anonymousId: this.getAnonymousId(),\n event: event.event,\n properties: {\n ...this.globalProperties,\n ...event.properties,\n $groups: this.organizationId ? {\n segment_group: this.organizationId,\n } : undefined,\n eventProperties: {\n ...event.properties,\n ...this.globalProperties,\n },\n },\n }\n\n return new Promise((resolve, reject) => {\n this.segment!.track(payload, (err) => {\n if (err) {\n // Resolve anyway\n resolve();\n }\n\n resolve();\n })\n });\n }\n}\n"],"mappings":";AACA,OAAOA,WAAU;AACjB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAOC,aAAY;AACnB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,OAAO,cAAc;;;ACTrB,S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AAAA,MACF,CAAC;AAED,WAAK,GAAG,KAAK,sBAAsB,0CAA0C,IAAI,mBAAmB,KAAK,EAAE;AAAA,IAC7G,CAAC;AAAA,EACH;AACF;","names":["Conf","crypto","anonymousId","Conf","crypto"]}
|
package/dist/utils/version.d.ts
CHANGED
package/dist/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/version.ts"],"sourcesContent":["// This is auto generated!\nexport const LIB_VERSION = \"0.0.
|
|
1
|
+
{"version":3,"sources":["../../src/utils/version.ts"],"sourcesContent":["// This is auto generated!\nexport const LIB_VERSION = \"0.0.16\";\n"],"mappings":";AACO,IAAM,cAAc;","names":[]}
|
package/oclif.manifest.json
CHANGED
|
@@ -177,6 +177,17 @@
|
|
|
177
177
|
"multiple": false,
|
|
178
178
|
"type": "option"
|
|
179
179
|
},
|
|
180
|
+
"crewFlowAgent": {
|
|
181
|
+
"description": "CrewAI Flow template to use",
|
|
182
|
+
"name": "crewFlowAgent",
|
|
183
|
+
"hasDynamicHelp": false,
|
|
184
|
+
"multiple": false,
|
|
185
|
+
"options": [
|
|
186
|
+
"Starter",
|
|
187
|
+
"None"
|
|
188
|
+
],
|
|
189
|
+
"type": "option"
|
|
190
|
+
},
|
|
180
191
|
"runtimeUrl": {
|
|
181
192
|
"description": "runtime URL",
|
|
182
193
|
"name": "runtimeUrl",
|
|
@@ -259,5 +270,5 @@
|
|
|
259
270
|
]
|
|
260
271
|
}
|
|
261
272
|
},
|
|
262
|
-
"version": "0.0.
|
|
273
|
+
"version": "0.0.16"
|
|
263
274
|
}
|