copilotkit 1.54.0 → 2.0.0
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/index.js +89779 -0
- package/package.json +4 -114
- package/src/commands/docs.d.ts +17 -0
- package/src/commands/docs.d.ts.map +1 -0
- package/src/commands/init.d.ts +103 -0
- package/src/commands/init.d.ts.map +1 -0
- package/src/commands/kite.d.ts +8 -0
- package/src/commands/kite.d.ts.map +1 -0
- package/src/commands/license.d.ts +17 -0
- package/src/commands/license.d.ts.map +1 -0
- package/src/commands/login.d.ts +13 -0
- package/src/commands/login.d.ts.map +1 -0
- package/src/commands/logs.d.ts +32 -0
- package/src/commands/logs.d.ts.map +1 -0
- package/src/commands/version.d.ts +8 -0
- package/src/commands/version.d.ts.map +1 -0
- package/src/config.d.ts +31 -0
- package/src/config.d.ts.map +1 -0
- package/src/index.d.ts +21 -0
- package/src/index.d.ts.map +1 -0
- package/src/services/api-client.d.ts +106 -0
- package/src/services/api-client.d.ts.map +1 -0
- package/src/services/auth.service.d.ts +107 -0
- package/src/services/auth.service.d.ts.map +1 -0
- package/src/services/cli-auth-diagnostics.d.ts +71 -0
- package/src/services/cli-auth-diagnostics.d.ts.map +1 -0
- package/src/services/cli-logs.d.ts +45 -0
- package/src/services/cli-logs.d.ts.map +1 -0
- package/src/services/config.service.d.ts +53 -0
- package/src/services/config.service.d.ts.map +1 -0
- package/src/services/feature-flags.d.ts +14 -0
- package/src/services/feature-flags.d.ts.map +1 -0
- package/src/services/kite-game-engine.d.ts +99 -0
- package/src/services/kite-game-engine.d.ts.map +1 -0
- package/src/services/kite-game-score.d.ts +33 -0
- package/src/services/kite-game-score.d.ts.map +1 -0
- package/src/services/project-scaffold.d.ts +49 -0
- package/src/services/project-scaffold.d.ts.map +1 -0
- package/src/types.d.ts +205 -0
- package/src/types.d.ts.map +1 -0
- package/src/ui/banner.d.ts +3 -0
- package/src/ui/banner.d.ts.map +1 -0
- package/src/ui/browser-login.d.ts +71 -0
- package/src/ui/browser-login.d.ts.map +1 -0
- package/src/ui/init-flow.d.ts +35 -0
- package/src/ui/init-flow.d.ts.map +1 -0
- package/src/ui/kite-game.d.ts +26 -0
- package/src/ui/kite-game.d.ts.map +1 -0
- package/src/ui/login-flow.d.ts +22 -0
- package/src/ui/login-flow.d.ts.map +1 -0
- package/src/ui/spinner.d.ts +9 -0
- package/src/ui/spinner.d.ts.map +1 -0
- package/LICENSE +0 -21
- package/README.md +0 -83
- package/bin/dev.cmd +0 -3
- package/bin/dev.js +0 -8
- package/bin/run.cmd +0 -3
- package/bin/run.js +0 -17
- package/dist/commands/base-command.d.ts +0 -12
- package/dist/commands/base-command.js +0 -65
- package/dist/commands/base-command.js.map +0 -1
- package/dist/commands/create.d.ts +0 -24
- package/dist/commands/create.js +0 -507
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/dev.d.ts +0 -25
- package/dist/commands/dev.js +0 -776
- package/dist/commands/dev.js.map +0 -1
- package/dist/commands/init.d.ts +0 -11
- package/dist/commands/init.js +0 -523
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/login.d.ts +0 -13
- package/dist/commands/login.js +0 -374
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.d.ts +0 -13
- package/dist/commands/logout.js +0 -375
- package/dist/commands/logout.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/lib/init/ide-docs.d.ts +0 -25
- package/dist/lib/init/ide-docs.js +0 -170
- package/dist/lib/init/ide-docs.js.map +0 -1
- package/dist/lib/init/index.d.ts +0 -14
- package/dist/lib/init/index.js +0 -1104
- package/dist/lib/init/index.js.map +0 -1
- package/dist/lib/init/questions.d.ts +0 -9
- package/dist/lib/init/questions.js +0 -508
- package/dist/lib/init/questions.js.map +0 -1
- package/dist/lib/init/scaffold/agent.d.ts +0 -20
- package/dist/lib/init/scaffold/agent.js +0 -173
- package/dist/lib/init/scaffold/agent.js.map +0 -1
- package/dist/lib/init/scaffold/crew-inputs.d.ts +0 -3
- package/dist/lib/init/scaffold/crew-inputs.js +0 -59
- package/dist/lib/init/scaffold/crew-inputs.js.map +0 -1
- package/dist/lib/init/scaffold/env.d.ts +0 -7
- package/dist/lib/init/scaffold/env.js +0 -124
- package/dist/lib/init/scaffold/env.js.map +0 -1
- package/dist/lib/init/scaffold/github.d.ts +0 -17
- package/dist/lib/init/scaffold/github.js +0 -114
- package/dist/lib/init/scaffold/github.js.map +0 -1
- package/dist/lib/init/scaffold/index.d.ts +0 -10
- package/dist/lib/init/scaffold/index.js +0 -690
- package/dist/lib/init/scaffold/index.js.map +0 -1
- package/dist/lib/init/scaffold/langgraph-assistants.d.ts +0 -18
- package/dist/lib/init/scaffold/langgraph-assistants.js +0 -26
- package/dist/lib/init/scaffold/langgraph-assistants.js.map +0 -1
- package/dist/lib/init/scaffold/packages.d.ts +0 -7
- package/dist/lib/init/scaffold/packages.js +0 -62
- package/dist/lib/init/scaffold/packages.js.map +0 -1
- package/dist/lib/init/scaffold/shadcn.d.ts +0 -7
- package/dist/lib/init/scaffold/shadcn.js +0 -279
- package/dist/lib/init/scaffold/shadcn.js.map +0 -1
- package/dist/lib/init/types/index.d.ts +0 -4
- package/dist/lib/init/types/index.js +0 -238
- package/dist/lib/init/types/index.js.map +0 -1
- package/dist/lib/init/types/questions.d.ts +0 -209
- package/dist/lib/init/types/questions.js +0 -214
- package/dist/lib/init/types/questions.js.map +0 -1
- package/dist/lib/init/types/templates.d.ts +0 -17
- package/dist/lib/init/types/templates.js +0 -26
- package/dist/lib/init/types/templates.js.map +0 -1
- package/dist/lib/init/utils.d.ts +0 -3
- package/dist/lib/init/utils.js +0 -8
- package/dist/lib/init/utils.js.map +0 -1
- package/dist/services/analytics.service.d.ts +0 -38
- package/dist/services/analytics.service.js +0 -134
- package/dist/services/analytics.service.js.map +0 -1
- package/dist/services/auth.service.d.ts +0 -26
- package/dist/services/auth.service.js +0 -299
- package/dist/services/auth.service.js.map +0 -1
- package/dist/services/events.d.ts +0 -119
- package/dist/services/events.js +0 -1
- package/dist/services/events.js.map +0 -1
- package/dist/services/tunnel.service.d.ts +0 -15
- package/dist/services/tunnel.service.js +0 -21
- package/dist/services/tunnel.service.js.map +0 -1
- package/dist/utils/detect-endpoint-type.utils.d.ts +0 -15
- package/dist/utils/detect-endpoint-type.utils.js +0 -157
- package/dist/utils/detect-endpoint-type.utils.js.map +0 -1
- package/dist/utils/trpc.d.ts +0 -4
- package/dist/utils/trpc.js +0 -25
- package/dist/utils/trpc.js.map +0 -1
- package/dist/utils/version.d.ts +0 -3
- package/dist/utils/version.js +0 -6
- package/dist/utils/version.js.map +0 -1
- package/oclif.manifest.json +0 -208
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { login as defaultLogin } from "../services/auth.service.js";
|
|
3
|
+
/** Message shown before the CLI opens the browser for authentication. */
|
|
4
|
+
export declare const BROWSER_LOGIN_CONFIRMATION_MESSAGE = "Sign in to your \uD83E\uDE81 CopilotKit account in your browser.";
|
|
5
|
+
/** Prompt shown after the pre-login explanation. */
|
|
6
|
+
export declare const BROWSER_LOGIN_CONFIRMATION_PROMPT = "Press Enter to continue...";
|
|
7
|
+
/** Browser login function shape shared by command flows. */
|
|
8
|
+
export type BrowserLoginRunner = typeof defaultLogin;
|
|
9
|
+
/** Rendered state for the shared browser-login interaction. */
|
|
10
|
+
export type BrowserLoginPhase = "idle" | "confirming" | "waiting" | "success" | "error";
|
|
11
|
+
/** User and organization data displayed after a successful login. */
|
|
12
|
+
export interface BrowserLoginIdentity {
|
|
13
|
+
/** Authenticated user email. */
|
|
14
|
+
email: string;
|
|
15
|
+
/** Authenticated organization display name or Clerk organization id. */
|
|
16
|
+
organizationName: string;
|
|
17
|
+
}
|
|
18
|
+
/** Current state exposed by {@link useBrowserLogin}. */
|
|
19
|
+
export interface BrowserLoginState {
|
|
20
|
+
/** Current interaction phase. */
|
|
21
|
+
phase: BrowserLoginPhase;
|
|
22
|
+
/** Authenticated identity, available after success. */
|
|
23
|
+
identity: BrowserLoginIdentity | null;
|
|
24
|
+
/** User-facing error message, available after failure. */
|
|
25
|
+
errorMessage: string;
|
|
26
|
+
}
|
|
27
|
+
/** Context value exposed by {@link BrowserLoginProvider}. */
|
|
28
|
+
export interface BrowserLoginContextValue {
|
|
29
|
+
/** Runs the shared browser login flow, including confirmation when interactive. */
|
|
30
|
+
runLogin: BrowserLoginRunner;
|
|
31
|
+
/** Current browser login UI state. */
|
|
32
|
+
state: BrowserLoginState;
|
|
33
|
+
/** Confirms that the browser login may begin. */
|
|
34
|
+
confirmBrowserLoginStart: () => unknown;
|
|
35
|
+
}
|
|
36
|
+
/** Props for {@link BrowserLoginProvider}. */
|
|
37
|
+
export interface BrowserLoginProviderProps {
|
|
38
|
+
/** Child Ink tree that can call {@link useBrowserLogin}. */
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
/** Injectable login implementation, primarily for tests. */
|
|
41
|
+
loginRunner?: BrowserLoginRunner;
|
|
42
|
+
/** Overrides TTY detection, primarily for tests. */
|
|
43
|
+
isInteractive?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns whether the CLI should pause for a browser-login confirmation.
|
|
47
|
+
*
|
|
48
|
+
* @returns True when both standard input and output are interactive TTYs.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isBrowserLoginConfirmationInteractive(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Provides a shared browser-login runner and UI state to CLI Ink flows.
|
|
53
|
+
*
|
|
54
|
+
* @param props - Provider props.
|
|
55
|
+
* @returns Provider element for descendant command UI.
|
|
56
|
+
*/
|
|
57
|
+
export declare function BrowserLoginProvider({ children, loginRunner, isInteractive, }: BrowserLoginProviderProps): ReactElement;
|
|
58
|
+
/**
|
|
59
|
+
* Reads the shared browser-login runner and UI state.
|
|
60
|
+
*
|
|
61
|
+
* @returns Browser-login context value.
|
|
62
|
+
* @throws When rendered outside {@link BrowserLoginProvider}.
|
|
63
|
+
*/
|
|
64
|
+
export declare function useBrowserLogin(): BrowserLoginContextValue;
|
|
65
|
+
/**
|
|
66
|
+
* Renders the shared browser-login confirmation and result states.
|
|
67
|
+
*
|
|
68
|
+
* @returns Ink element for the current browser-login phase.
|
|
69
|
+
*/
|
|
70
|
+
export declare function BrowserLoginConfirmation(): ReactElement | null;
|
|
71
|
+
//# sourceMappingURL=browser-login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-login.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/ui/browser-login.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAIpE,yEAAyE;AACzE,eAAO,MAAM,kCAAkC,qEACW,CAAC;AAE3D,oDAAoD;AACpD,eAAO,MAAM,iCAAiC,+BAChB,CAAC;AAE/B,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,OAAO,YAAY,CAAC;AAErD,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,YAAY,GACZ,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAEZ,qEAAqE;AACrE,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,wDAAwD;AACxD,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,KAAK,EAAE,iBAAiB,CAAC;IACzB,uDAAuD;IACvD,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,0DAA0D;IAC1D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,6DAA6D;AAC7D,MAAM,WAAW,wBAAwB;IACvC,mFAAmF;IACnF,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,sCAAsC;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,iDAAiD;IACjD,wBAAwB,EAAE,MAAM,OAAO,CAAC;CACzC;AAED,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAmBD;;;;GAIG;AACH,wBAAgB,qCAAqC,IAAI,OAAO,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,WAA0B,EAC1B,aAAa,GACd,EAAE,yBAAyB,GAAG,YAAY,CA4F1C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,wBAAwB,CAO1D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,YAAY,GAAG,IAAI,CAiD9D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { InitOptions } from "../types.js";
|
|
2
|
+
/** Props for the {@link InitFlow} component. */
|
|
3
|
+
export interface InitFlowProps {
|
|
4
|
+
/** Pre-filled project name from --name flag, or `null` to prompt. */
|
|
5
|
+
initialName: string | null;
|
|
6
|
+
/** Pre-selected via --intelligence flag, or `null` to prompt. */
|
|
7
|
+
initialIntelligence: boolean | null;
|
|
8
|
+
/** Pre-selected via --framework flag, or `null` to prompt. */
|
|
9
|
+
initialFramework: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Callback invoked when all prompts are complete.
|
|
12
|
+
*
|
|
13
|
+
* Receives a fully-resolved {@link InitOptions} object, or `null` when the
|
|
14
|
+
* user cancels (future extension point).
|
|
15
|
+
*/
|
|
16
|
+
onComplete: (options: InitOptions | null) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Callback invoked when the user wants to sign up for threads access.
|
|
19
|
+
*
|
|
20
|
+
* The init flow renders the mailing list screen; this callback fires the
|
|
21
|
+
* API request. When it resolves, the flow returns to the password screen.
|
|
22
|
+
*/
|
|
23
|
+
onRequestThreadsAccess: () => Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Ink component that steps through the interactive `init` prompts.
|
|
27
|
+
*
|
|
28
|
+
* Flow:
|
|
29
|
+
* 1. Project name
|
|
30
|
+
* 2. Do you want Intelligence?
|
|
31
|
+
* - Yes → password gate (or skip if already unlocked) → done with threads template
|
|
32
|
+
* - No → framework picker → done with framework template
|
|
33
|
+
*/
|
|
34
|
+
export declare function InitFlow({ initialName, initialIntelligence, initialFramework, onComplete, onRequestThreadsAccess, }: InitFlowProps): import("react/jsx-runtime").JSX.Element | null;
|
|
35
|
+
//# sourceMappingURL=init-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-flow.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/ui/init-flow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AA4B/D,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,iEAAiE;IACjE,mBAAmB,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,8DAA8D;IAC9D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;;;OAKG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD;;;;;OAKG;IACH,sBAAsB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,sBAAsB,GACvB,EAAE,aAAa,kDA4Of"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import { type KiteGameRng } from '../services/kite-game-engine.js';
|
|
3
|
+
/** Props for the {@link KiteGame} component. */
|
|
4
|
+
export interface KiteGameProps {
|
|
5
|
+
/** Random source used by the deterministic game engine. */
|
|
6
|
+
readonly rng?: KiteGameRng;
|
|
7
|
+
/** Interval between engine ticks in milliseconds. */
|
|
8
|
+
readonly tickMs?: number;
|
|
9
|
+
/** Called when the player quits the game. */
|
|
10
|
+
readonly onExit?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders the hidden terminal kite game.
|
|
14
|
+
*
|
|
15
|
+
* @param props - Component configuration.
|
|
16
|
+
* @returns The Ink game UI.
|
|
17
|
+
*/
|
|
18
|
+
export declare function KiteGame({ rng, tickMs, onExit, }: KiteGameProps): ReactElement;
|
|
19
|
+
/**
|
|
20
|
+
* Converts terminal width into the playable board width.
|
|
21
|
+
*
|
|
22
|
+
* @param terminalWidth - Terminal column count.
|
|
23
|
+
* @returns Playable board width in terminal cells.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getPlayableWidth(terminalWidth: number): number;
|
|
26
|
+
//# sourceMappingURL=kite-game.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kite-game.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/ui/kite-game.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAML,KAAK,WAAW,EAEjB,MAAM,iCAAiC,CAAC;AAMzC,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAE3B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAMD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAiB,EACjB,MAAwB,EACxB,MAAM,GACP,EAAE,aAAa,GAAG,YAAY,CA4G9B;AAuCD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAE9D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Props for the {@link LoginFlow} component. */
|
|
2
|
+
interface LoginFlowProps {
|
|
3
|
+
/**
|
|
4
|
+
* Callback invoked once the login attempt has settled.
|
|
5
|
+
*
|
|
6
|
+
* @param result - Final login result.
|
|
7
|
+
*/
|
|
8
|
+
onComplete: (result: {
|
|
9
|
+
error?: Error;
|
|
10
|
+
success: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Ink component that drives the browser-based login flow.
|
|
15
|
+
*
|
|
16
|
+
* On mount it calls the shared browser-login runner, renders the shared
|
|
17
|
+
* confirmation and status UI, then notifies the caller when the attempt has
|
|
18
|
+
* settled.
|
|
19
|
+
*/
|
|
20
|
+
export declare function LoginFlow({ onComplete }: LoginFlowProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=login-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-flow.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/ui/login-flow.tsx"],"names":[],"mappings":"AAMA,iDAAiD;AACjD,UAAU,cAAc;IACtB;;;;OAIG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CACnE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,EAAE,cAAc,2CAoBvD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Props for the {@link Spinner} component. */
|
|
2
|
+
interface SpinnerProps {
|
|
3
|
+
/** Label displayed next to the spinner. */
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
/** Spinner with a label, animated as a kite drifting on the wind. */
|
|
7
|
+
export declare function Spinner({ label }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/ui/spinner.tsx"],"names":[],"mappings":"AAGA,+CAA+C;AAC/C,UAAU,YAAY;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf;AAoBD,qEAAqE;AACrE,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,YAAY,2CAiB9C"}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Atai Barkai
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# 🪁 CopilotKit CLI
|
|
2
|
-
|
|
3
|
-
> **NOTE:** The CopilotKit CLI is an optional tool that enhances the developer experience of CopilotKit. [It is not required to use CopilotKit. Click here to get started with CopilotKit](https://docs.copilotkit.ai)..
|
|
4
|
-
|
|
5
|
-
[](https://npmjs.org/package/copilotkit)
|
|
6
|
-
[](https://npmjs.org/package/copilotkit)
|
|
7
|
-
|
|
8
|
-
- [Installation](#installation)
|
|
9
|
-
- [Commands](#commands)
|
|
10
|
-
- [init](#init-add-copilotkit-to-your-nextjs-project)
|
|
11
|
-
- [login](#login-authenticating-with-copilot-cloud)
|
|
12
|
-
- [dev](#dev-local-endpoint-development)
|
|
13
|
-
- [Need help?](#need-help)
|
|
14
|
-
|
|
15
|
-
## What is the CopilotKit CLI?
|
|
16
|
-
|
|
17
|
-
The CopilotKit CLI boosts your [CopilotKit](https://github.com/copilotkit/copilotkit) development experience. It integrates neatly with Copilot Cloud.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
# npm
|
|
23
|
-
npm install -g copilotkit
|
|
24
|
-
|
|
25
|
-
# pnpm
|
|
26
|
-
pnpm install -g copilotkit
|
|
27
|
-
|
|
28
|
-
# yarn
|
|
29
|
-
yarn global add copilotkit
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Commands
|
|
33
|
-
|
|
34
|
-
### `init`: Add CopilotKit to your Next.js project
|
|
35
|
-
|
|
36
|
-
The fastest way to add CopilotKit to your Next.js project is with the init command:
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
|
-
# Navigate to your Next.js project
|
|
40
|
-
cd my-nextjs-app
|
|
41
|
-
|
|
42
|
-
# Run the init command
|
|
43
|
-
copilotkit init
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
This interactive command will:
|
|
47
|
-
|
|
48
|
-
- Set up the required UI components
|
|
49
|
-
- Configure AI agents if desired (LangGraph, CrewAI)
|
|
50
|
-
- Connect to Copilot Cloud (optional)
|
|
51
|
-
- Create all necessary configuration files
|
|
52
|
-
|
|
53
|
-
You can also pass flags to automate the setup:
|
|
54
|
-
|
|
55
|
-
```sh
|
|
56
|
-
copilotkit init --mode LangGraph
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### `login`: Authenticating with Copilot Cloud
|
|
60
|
-
|
|
61
|
-
First, ensure you have an account on [Copilot Cloud](https://cloud.copilotkit.ai).
|
|
62
|
-
|
|
63
|
-
Then, run the following command to authenticate with Copilot Cloud:
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
copilotkit login
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### `dev`: Local Endpoint Development
|
|
70
|
-
|
|
71
|
-
The CopilotKit CLI allows you to create a local tunnel to your CopilotKit remote endpoints, agents, and LangGraph apps.
|
|
72
|
-
|
|
73
|
-
For example, to create a local tunnel to an endpoint running locally on port 8000, you can run:
|
|
74
|
-
|
|
75
|
-
```sh
|
|
76
|
-
copilotkit dev --port 8000
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Need help?
|
|
80
|
-
|
|
81
|
-
You can always run `copilotkit --help` to get help on the CopilotKit CLI.
|
|
82
|
-
|
|
83
|
-
You're welcome to join our [Discord](https://discord.gg/copilotkit) to get help from the CopilotKit team and community.
|
package/bin/dev.cmd
DELETED
package/bin/dev.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --loader ts-node/esm --disable-warning=ExperimentalWarning
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line n/shebang
|
|
4
|
-
import {execute} from '@oclif/core'
|
|
5
|
-
|
|
6
|
-
process.env.SENTRY_DISABLED = 'true'
|
|
7
|
-
process.env.SEGMENT_DISABLED = 'true'
|
|
8
|
-
await execute({development: true, dir: import.meta.url})
|
package/bin/run.cmd
DELETED
package/bin/run.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import {execute} from '@oclif/core'
|
|
4
|
-
|
|
5
|
-
const main = async () => {
|
|
6
|
-
try {
|
|
7
|
-
await execute({dir: import.meta.url})
|
|
8
|
-
} catch (error) {
|
|
9
|
-
// Rely on command-level error handling to surface friendly messages.
|
|
10
|
-
// If we reach here it means something happened before oclif handed off to the command.
|
|
11
|
-
const message = error?.message || 'Unknown error'
|
|
12
|
-
console.error(message)
|
|
13
|
-
process.exitCode = 1
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
void main()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
|
|
3
|
-
declare class BaseCommand extends Command {
|
|
4
|
-
init(): Promise<void>;
|
|
5
|
-
catch(err: any): Promise<void>;
|
|
6
|
-
finally(): Promise<void>;
|
|
7
|
-
run(): Promise<void>;
|
|
8
|
-
checkCLIVersion(): Promise<void>;
|
|
9
|
-
gracefulError(message: string): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { BaseCommand };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// src/commands/base-command.ts
|
|
2
|
-
import { Command } from "@oclif/core";
|
|
3
|
-
import Sentry, { consoleIntegration } from "@sentry/node";
|
|
4
|
-
|
|
5
|
-
// src/utils/version.ts
|
|
6
|
-
var LIB_VERSION = "1.54.0";
|
|
7
|
-
|
|
8
|
-
// src/utils/trpc.ts
|
|
9
|
-
import { createTRPCClient as trpcClient, httpBatchLink } from "@trpc/client";
|
|
10
|
-
import superjson from "superjson";
|
|
11
|
-
var COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || "https://cloud.copilotkit.ai";
|
|
12
|
-
|
|
13
|
-
// src/commands/base-command.ts
|
|
14
|
-
import chalk from "chalk";
|
|
15
|
-
var BaseCommand = class extends Command {
|
|
16
|
-
async init() {
|
|
17
|
-
await this.checkCLIVersion();
|
|
18
|
-
if (process.env.SENTRY_DISABLED === "true") {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
Sentry.init({
|
|
22
|
-
dsn: process.env.SENTRY_DSN || "https://1eea15d32e2eacb0456a77db5e39aeeb@o4507288195170304.ingest.us.sentry.io/4508581448581120",
|
|
23
|
-
integrations: [consoleIntegration()],
|
|
24
|
-
// Tracing
|
|
25
|
-
tracesSampleRate: 1
|
|
26
|
-
// Capture 100% of the transactions
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
async catch(err) {
|
|
30
|
-
if (process.env.SENTRY_DISABLED !== "true") {
|
|
31
|
-
Sentry.captureException(err);
|
|
32
|
-
}
|
|
33
|
-
const message = err?.message ?? "Unknown error";
|
|
34
|
-
this.log("\n" + chalk.red(message) + "\n");
|
|
35
|
-
const exitCode = err?.oclif?.exit ?? 1;
|
|
36
|
-
this.exit(exitCode);
|
|
37
|
-
}
|
|
38
|
-
async finally() {
|
|
39
|
-
if (process.env.SENTRY_DISABLED === "true") {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
Sentry.close();
|
|
43
|
-
}
|
|
44
|
-
async run() {
|
|
45
|
-
}
|
|
46
|
-
async checkCLIVersion() {
|
|
47
|
-
try {
|
|
48
|
-
const response = await fetch(`${COPILOT_CLOUD_BASE_URL}/api/healthz`);
|
|
49
|
-
const data = await response.json();
|
|
50
|
-
const cloudVersion = data.cliVersion;
|
|
51
|
-
if (!cloudVersion || cloudVersion === LIB_VERSION) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
} catch {
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
async gracefulError(message) {
|
|
58
|
-
this.log("\n" + chalk.red(message));
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
BaseCommand
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=base-command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/base-command.ts","../../src/utils/version.ts","../../src/utils/trpc.ts"],"sourcesContent":["import { Command } from \"@oclif/core\";\nimport Sentry, { consoleIntegration } from \"@sentry/node\";\nimport { LIB_VERSION } from \"../utils/version.js\";\nimport { COPILOT_CLOUD_BASE_URL } from \"../utils/trpc.js\";\nimport chalk from \"chalk\";\n\nexport class BaseCommand extends Command {\n async init() {\n await this.checkCLIVersion();\n\n if (process.env.SENTRY_DISABLED === \"true\") {\n return;\n }\n\n Sentry.init({\n dsn:\n process.env.SENTRY_DSN ||\n \"https://1eea15d32e2eacb0456a77db5e39aeeb@o4507288195170304.ingest.us.sentry.io/4508581448581120\",\n integrations: [consoleIntegration()],\n // Tracing\n tracesSampleRate: 1.0, // Capture 100% of the transactions\n });\n }\n\n async catch(err: any) {\n if (process.env.SENTRY_DISABLED !== \"true\") {\n Sentry.captureException(err);\n }\n\n const message = err?.message ?? \"Unknown error\";\n\n this.log(\"\\n\" + chalk.red(message) + \"\\n\");\n\n const exitCode = err?.oclif?.exit ?? 1;\n this.exit(exitCode);\n }\n\n async finally() {\n if (process.env.SENTRY_DISABLED === \"true\") {\n return;\n }\n\n Sentry.close();\n }\n\n async run() {}\n\n async checkCLIVersion() {\n try {\n const response = await fetch(`${COPILOT_CLOUD_BASE_URL}/api/healthz`);\n\n const data = await response.json();\n const cloudVersion = data.cliVersion;\n\n if (!cloudVersion || cloudVersion === LIB_VERSION) {\n return;\n }\n\n // TODO: add this back in, removed for crew ai launch since we don't want to keep releasing cloud\n // this.log(chalk.yellow('================ New version available! =================\\n'))\n // this.log(`You are using CopilotKit CLI v${LIB_VERSION}.`)\n // this.log(`A new CopilotKit CLI version is available (v${cloudVersion}).\\n`)\n // this.log('Please update your CLI to the latest version:\\n\\n')\n // this.log(`${chalk.cyan(chalk.underline(chalk.bold('npm:')))}\\t npm install -g copilotkit@${cloudVersion}\\n`)\n // this.log(`${chalk.cyan(chalk.underline(chalk.bold('pnpm:')))}\\t pnpm install -g copilotkit@${cloudVersion}\\n`)\n // this.log(`${chalk.cyan(chalk.underline(chalk.bold('yarn:')))}\\t yarn global add copilotkit@${cloudVersion}\\n`)\n // this.log(chalk.yellow('============================================================\\n\\n'))\n } catch {\n // Version check is non-critical — don't crash the CLI when offline\n }\n }\n\n async gracefulError(message: string) {\n this.log(\"\\n\" + chalk.red(message));\n process.exit(1);\n }\n}\n","// This is auto generated!\nexport const LIB_VERSION = \"1.54.0\";\n","import { createTRPCClient as trpcClient, httpBatchLink } from \"@trpc/client\";\nimport superjson from \"superjson\";\n\nexport const COPILOT_CLOUD_BASE_URL =\n process.env.COPILOT_CLOUD_BASE_URL || \"https://cloud.copilotkit.ai\";\n\nexport function createTRPCClient(cliToken: string): any {\n return trpcClient({\n links: [\n httpBatchLink({\n url: `${COPILOT_CLOUD_BASE_URL}/api/trpc-cli`,\n transformer: superjson,\n headers: () => {\n return {\n \"x-trpc-source\": \"cli\",\n \"x-cli-token\": cliToken,\n };\n },\n }),\n ],\n });\n}\n"],"mappings":";AAAA,SAAS,eAAe;AACxB,OAAO,UAAU,0BAA0B;;;ACApC,IAAM,cAAc;;;ACD3B,SAAS,oBAAoB,YAAY,qBAAqB;AAC9D,OAAO,eAAe;AAEf,IAAM,yBACX,QAAQ,IAAI,0BAA0B;;;AFAxC,OAAO,WAAW;AAEX,IAAM,cAAN,cAA0B,QAAQ;AAAA,EACvC,MAAM,OAAO;AACX,UAAM,KAAK,gBAAgB;AAE3B,QAAI,QAAQ,IAAI,oBAAoB,QAAQ;AAC1C;AAAA,IACF;AAEA,WAAO,KAAK;AAAA,MACV,KACE,QAAQ,IAAI,cACZ;AAAA,MACF,cAAc,CAAC,mBAAmB,CAAC;AAAA;AAAA,MAEnC,kBAAkB;AAAA;AAAA,IACpB,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,MAAM,KAAU;AACpB,QAAI,QAAQ,IAAI,oBAAoB,QAAQ;AAC1C,aAAO,iBAAiB,GAAG;AAAA,IAC7B;AAEA,UAAM,UAAU,KAAK,WAAW;AAEhC,SAAK,IAAI,OAAO,MAAM,IAAI,OAAO,IAAI,IAAI;AAEzC,UAAM,WAAW,KAAK,OAAO,QAAQ;AACrC,SAAK,KAAK,QAAQ;AAAA,EACpB;AAAA,EAEA,MAAM,UAAU;AACd,QAAI,QAAQ,IAAI,oBAAoB,QAAQ;AAC1C;AAAA,IACF;AAEA,WAAO,MAAM;AAAA,EACf;AAAA,EAEA,MAAM,MAAM;AAAA,EAAC;AAAA,EAEb,MAAM,kBAAkB;AACtB,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,GAAG,sBAAsB,cAAc;AAEpE,YAAM,OAAO,MAAM,SAAS,KAAK;AACjC,YAAM,eAAe,KAAK;AAE1B,UAAI,CAAC,gBAAgB,iBAAiB,aAAa;AACjD;AAAA,MACF;AAAA,IAWF,QAAQ;AAAA,IAER;AAAA,EACF;AAAA,EAEA,MAAM,cAAc,SAAiB;AACnC,SAAK,IAAI,OAAO,MAAM,IAAI,OAAO,CAAC;AAClC,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as _oclif_core_interfaces from '@oclif/core/interfaces';
|
|
2
|
-
import { Config } from '@oclif/core';
|
|
3
|
-
import { BaseCommand } from './base-command.js';
|
|
4
|
-
|
|
5
|
-
declare class Create extends BaseCommand {
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
framework: _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
|
|
10
|
-
name: _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
|
|
11
|
-
"no-banner": _oclif_core_interfaces.BooleanFlag<boolean>;
|
|
12
|
-
project: _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
|
|
13
|
-
};
|
|
14
|
-
static args: {
|
|
15
|
-
projectName: _oclif_core_interfaces.Arg<string | undefined, Record<string, unknown>>;
|
|
16
|
-
};
|
|
17
|
-
constructor(argv: string[], config: Config);
|
|
18
|
-
run(): Promise<void>;
|
|
19
|
-
private promptProjectName;
|
|
20
|
-
private promptAgentFramework;
|
|
21
|
-
private downloadTemplate;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { Create as default };
|