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
|
+
/** Shared CLI diagnostics log path retained for auth-specific imports/tests. */
|
|
2
|
+
export { CLI_LOG_PATH as CLI_AUTH_DIAGNOSTICS_LOG_PATH } from "./cli-logs.js";
|
|
3
|
+
/** Sanitized hosted CLI auth event captured in the browser flow. */
|
|
4
|
+
export interface HostedCliAuthDiagnosticEvent {
|
|
5
|
+
at: string;
|
|
6
|
+
details?: Record<string, unknown>;
|
|
7
|
+
phase: string;
|
|
8
|
+
}
|
|
9
|
+
/** Sanitized hosted CLI auth snapshot handed back to the local CLI callback. */
|
|
10
|
+
export interface HostedCliAuthDiagnosticSnapshot {
|
|
11
|
+
events: HostedCliAuthDiagnosticEvent[];
|
|
12
|
+
flowId: string;
|
|
13
|
+
}
|
|
14
|
+
/** Active CLI auth diagnostics session. */
|
|
15
|
+
export interface CliAuthDiagnostics {
|
|
16
|
+
readonly runId: string;
|
|
17
|
+
logError(phase: string, error: unknown, details?: Record<string, unknown>): void;
|
|
18
|
+
logHostedSnapshot(snapshot: HostedCliAuthDiagnosticSnapshot): void;
|
|
19
|
+
logPhase(phase: string, details?: Record<string, unknown>): void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Summarizes a loopback callback URL without including auth query values.
|
|
23
|
+
*
|
|
24
|
+
* @param rawUrl - URL to summarize.
|
|
25
|
+
* @returns Safe callback metadata for diagnostics.
|
|
26
|
+
*/
|
|
27
|
+
export declare function summarizeCallbackUrl(rawUrl: string): Record<string, unknown>;
|
|
28
|
+
/**
|
|
29
|
+
* Summarizes a state token without logging its full value.
|
|
30
|
+
*
|
|
31
|
+
* @param value - State token to summarize.
|
|
32
|
+
* @returns Redacted state metadata.
|
|
33
|
+
*/
|
|
34
|
+
export declare function summarizeState(value: string | null | undefined): Record<string, unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Parses a hosted CLI auth diagnostics snapshot from the loopback callback.
|
|
37
|
+
*
|
|
38
|
+
* @param raw - Raw query parameter value.
|
|
39
|
+
* @returns A sanitized snapshot or null when absent/invalid.
|
|
40
|
+
*/
|
|
41
|
+
export declare function parseHostedCliAuthDiagnosticSnapshot(raw: string | null): HostedCliAuthDiagnosticSnapshot | null;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a temporary CLI auth diagnostics session.
|
|
44
|
+
*
|
|
45
|
+
* @param runId - Correlation id for the login attempt.
|
|
46
|
+
* @returns Logger that mirrors high-signal events to stderr and the CLI log.
|
|
47
|
+
*/
|
|
48
|
+
export declare function createCliAuthDiagnostics(runId: string): CliAuthDiagnostics;
|
|
49
|
+
/**
|
|
50
|
+
* Controls whether CLI auth diagnostics are mirrored to stderr.
|
|
51
|
+
*
|
|
52
|
+
* Deprecated compatibility wrapper around the shared CLI logs setting.
|
|
53
|
+
*
|
|
54
|
+
* @param verbose - Whether stderr mirroring should be enabled.
|
|
55
|
+
*/
|
|
56
|
+
export declare function setCliAuthDiagnosticsVerbose(verbose: boolean): void;
|
|
57
|
+
/**
|
|
58
|
+
* Returns whether CLI auth diagnostics are currently mirrored to stderr.
|
|
59
|
+
*
|
|
60
|
+
* @returns Current stderr mirroring state.
|
|
61
|
+
*/
|
|
62
|
+
export declare function isCliAuthDiagnosticsVerboseEnabled(): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Returns a concrete error instance for user-facing CLI error propagation.
|
|
65
|
+
*
|
|
66
|
+
* @param error - Unknown thrown value.
|
|
67
|
+
* @param fallbackMessage - Message to use when no concrete error exists.
|
|
68
|
+
* @returns An Error instance.
|
|
69
|
+
*/
|
|
70
|
+
export declare function toConcreteError(error: unknown, fallbackMessage: string): Error;
|
|
71
|
+
//# sourceMappingURL=cli-auth-diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-auth-diagnostics.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/cli-auth-diagnostics.ts"],"names":[],"mappings":"AAOA,gFAAgF;AAChF,OAAO,EAAE,YAAY,IAAI,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAE9E,oEAAoE;AACpE,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,gFAAgF;AAChF,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,4BAA4B,EAAE,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,2CAA2C;AAC3C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjF,iBAAiB,CAAC,QAAQ,EAAE,+BAA+B,GAAG,IAAI,CAAC;IACnE,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAClE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAY5E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUxF;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,MAAM,GAAG,IAAI,GACjB,+BAA+B,GAAG,IAAI,CA8CxC;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAoD1E;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,IAAI,OAAO,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,EACd,eAAe,EAAE,MAAM,GACtB,KAAK,CAUP"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Private per-user directory used by the CLI for structured diagnostics. */
|
|
2
|
+
export declare const CLI_LOG_DIRECTORY: string;
|
|
3
|
+
/** Shared per-user log file used by the CLI for structured diagnostics. */
|
|
4
|
+
export declare const CLI_LOG_PATH: string;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the resolved filesystem path of the CLI log file.
|
|
7
|
+
*
|
|
8
|
+
* @returns Absolute CLI log path.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCliLogPath(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Controls whether high-signal CLI diagnostics are mirrored to stderr.
|
|
13
|
+
*
|
|
14
|
+
* @param verbose - Whether stderr mirroring should be enabled.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setCliLogsVerbose(verbose: boolean): void;
|
|
17
|
+
/**
|
|
18
|
+
* Returns whether CLI diagnostics are currently mirrored to stderr.
|
|
19
|
+
*
|
|
20
|
+
* @returns Current stderr mirroring state.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isCliLogsVerboseEnabled(): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Writes a structured log event to the shared CLI log file.
|
|
25
|
+
*
|
|
26
|
+
* @param level - Log level.
|
|
27
|
+
* @param payload - Structured payload to append.
|
|
28
|
+
*/
|
|
29
|
+
export declare function writeCliLog(level: "error" | "info", payload: Record<string, unknown>): void;
|
|
30
|
+
/**
|
|
31
|
+
* Mirrors a formatted diagnostics line to stderr when verbose mode is enabled.
|
|
32
|
+
*
|
|
33
|
+
* @param prefix - User-facing log prefix.
|
|
34
|
+
* @param phase - Phase identifier.
|
|
35
|
+
* @param details - Sanitized metadata to render.
|
|
36
|
+
*/
|
|
37
|
+
export declare function maybeWriteCliVerboseLine(prefix: string, phase: string, details: Record<string, unknown>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Reads the last `count` lines from the shared CLI log file.
|
|
40
|
+
*
|
|
41
|
+
* @param count - Number of trailing lines to return.
|
|
42
|
+
* @returns Trailing log lines, or an empty array when the file does not exist.
|
|
43
|
+
*/
|
|
44
|
+
export declare function readCliLogTail(count: number): string[];
|
|
45
|
+
//# sourceMappingURL=cli-logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-logs.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/cli-logs.ts"],"names":[],"mappings":"AAKA,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,QAG7B,CAAC;AACF,2EAA2E;AAC3E,eAAO,MAAM,YAAY,QAA0C,CAAC;AAyDpE;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAExD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,GAAG,MAAM,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI,CAEN;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI,CAMN;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BtD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { StoredAuth } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Persistent store for CLI authentication credentials.
|
|
4
|
+
*
|
|
5
|
+
* Wraps the `copilotkit-auth` conf store and provides typed read/write access
|
|
6
|
+
* to the fields defined by {@link StoredAuth}.
|
|
7
|
+
*/
|
|
8
|
+
export declare const authStore: {
|
|
9
|
+
/**
|
|
10
|
+
* Persists all fields of the given {@link StoredAuth} to disk.
|
|
11
|
+
*
|
|
12
|
+
* @param auth - The authentication data to store.
|
|
13
|
+
*/
|
|
14
|
+
save(auth: StoredAuth): void;
|
|
15
|
+
/**
|
|
16
|
+
* Reads all stored auth fields and returns them as a {@link StoredAuth} object.
|
|
17
|
+
*
|
|
18
|
+
* Returns `null` if no `cliToken` is present in the store.
|
|
19
|
+
*/
|
|
20
|
+
get(): StoredAuth | null;
|
|
21
|
+
/**
|
|
22
|
+
* Reads and returns only the stored CLI token.
|
|
23
|
+
*
|
|
24
|
+
* Returns `null` if no token has been saved.
|
|
25
|
+
*/
|
|
26
|
+
getToken(): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Removes all entries from the auth store.
|
|
29
|
+
*/
|
|
30
|
+
clear(): void;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* General-purpose persistent key/value store for CLI dev settings.
|
|
34
|
+
*
|
|
35
|
+
* Wraps the `copilotkit-config` conf store with generic typed accessors.
|
|
36
|
+
*/
|
|
37
|
+
export declare const configStore: {
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the value stored under the given key.
|
|
40
|
+
*
|
|
41
|
+
* @param key - The configuration key to look up.
|
|
42
|
+
* @returns The stored value cast to `T`, or `undefined` if not present.
|
|
43
|
+
*/
|
|
44
|
+
get<T>(key: string): T | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Stores `value` under the given key.
|
|
47
|
+
*
|
|
48
|
+
* @param key - The configuration key to write.
|
|
49
|
+
* @param value - The value to store.
|
|
50
|
+
*/
|
|
51
|
+
set(key: string, value: unknown): void;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=config.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.service.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/config.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C;;;;;GAKG;AACH,eAAO,MAAM,SAAS;IACpB;;;;OAIG;eACQ,UAAU,GAAG,IAAI;IAa5B;;;;OAIG;WACI,UAAU,GAAG,IAAI;IAcxB;;;;OAIG;gBACS,MAAM,GAAG,IAAI;IAIzB;;OAEG;aACM,IAAI;CAGd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW;IACtB;;;;;OAKG;QACC,CAAC,OAAO,MAAM,GAAG,CAAC,GAAG,SAAS;IAIlC;;;;;OAKG;aACM,MAAM,SAAS,OAAO,GAAG,IAAI;CAGvC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Hardcoded password for threads access (temporary). */
|
|
2
|
+
export declare const THREADS_PASSWORD = "earlyaccess";
|
|
3
|
+
/**
|
|
4
|
+
* Checks whether the user has previously unlocked threads access.
|
|
5
|
+
*
|
|
6
|
+
* Reads the `threads-access` key from the global config store.
|
|
7
|
+
* Returns `false` when the key is absent or not `true`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasThreadsAccess(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Grants threads access by writing `threads-access: true` to the global config.
|
|
12
|
+
*/
|
|
13
|
+
export declare function grantThreadsAccess(): void;
|
|
14
|
+
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/feature-flags.ts"],"names":[],"mappings":"AAEA,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** Width of the default kite game board. */
|
|
2
|
+
export declare const DEFAULT_KITE_GAME_WIDTH = 42;
|
|
3
|
+
/** Height of the default kite game board. */
|
|
4
|
+
export declare const DEFAULT_KITE_GAME_HEIGHT = 20;
|
|
5
|
+
/** Initial X coordinate of the kite. */
|
|
6
|
+
export declare const KITE_X = 8;
|
|
7
|
+
/** Terminal glyph used to render the player kite. */
|
|
8
|
+
export declare const KITE_PLAYER_GLYPH = "\uD83E\uDE81";
|
|
9
|
+
/** Terminal glyph used to render cloud obstacles. */
|
|
10
|
+
export declare const KITE_CLOUD_GLYPH = "\u2601\uFE0F";
|
|
11
|
+
/** Function used to generate deterministic random values. */
|
|
12
|
+
export type KiteGameRng = () => number;
|
|
13
|
+
/** Cloud obstacle in the kite game board. */
|
|
14
|
+
export interface KiteCloud {
|
|
15
|
+
/** Horizontal position of the cloud column. */
|
|
16
|
+
readonly x: number;
|
|
17
|
+
/** First open row in the cloud gap. */
|
|
18
|
+
readonly gapY: number;
|
|
19
|
+
/** Height of the open cloud gap. */
|
|
20
|
+
readonly gapHeight: number;
|
|
21
|
+
/** Whether the kite already scored for passing this cloud. */
|
|
22
|
+
readonly passed: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Complete deterministic kite game state. */
|
|
25
|
+
export interface KiteGameState {
|
|
26
|
+
/** Board width in terminal cells. */
|
|
27
|
+
readonly width: number;
|
|
28
|
+
/** Board height in terminal rows. */
|
|
29
|
+
readonly height: number;
|
|
30
|
+
/** Current kite Y coordinate. */
|
|
31
|
+
readonly kiteY: number;
|
|
32
|
+
/** Current kite vertical velocity. */
|
|
33
|
+
readonly velocity: number;
|
|
34
|
+
/** Current score. */
|
|
35
|
+
readonly score: number;
|
|
36
|
+
/** Number of elapsed engine ticks. */
|
|
37
|
+
readonly tick: number;
|
|
38
|
+
/** Whether physics and cloud movement have started. */
|
|
39
|
+
readonly started: boolean;
|
|
40
|
+
/** Whether the current run has crashed. */
|
|
41
|
+
readonly crashed: boolean;
|
|
42
|
+
/** Active cloud obstacles. */
|
|
43
|
+
readonly clouds: readonly KiteCloud[];
|
|
44
|
+
}
|
|
45
|
+
/** Input options for creating a kite game. */
|
|
46
|
+
export interface CreateKiteGameOptions {
|
|
47
|
+
/** Board width in terminal cells. */
|
|
48
|
+
readonly width?: number;
|
|
49
|
+
/** Board height in terminal rows. */
|
|
50
|
+
readonly height?: number;
|
|
51
|
+
/** Random source for deterministic tests. */
|
|
52
|
+
readonly rng?: KiteGameRng;
|
|
53
|
+
}
|
|
54
|
+
/** Difficulty values derived from the current score. */
|
|
55
|
+
export interface KiteGameDifficulty {
|
|
56
|
+
/** Number of ticks between cloud movement steps. */
|
|
57
|
+
readonly moveEveryTicks: number;
|
|
58
|
+
/** Number of columns between newly spawned clouds. */
|
|
59
|
+
readonly cloudSpacing: number;
|
|
60
|
+
/** Height of the safe gap through each cloud. */
|
|
61
|
+
readonly gapHeight: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Derives progressive game difficulty from score.
|
|
65
|
+
*
|
|
66
|
+
* @param score - Current game score.
|
|
67
|
+
* @returns Difficulty values for the current score.
|
|
68
|
+
*/
|
|
69
|
+
export declare function getKiteGameDifficulty(score: number): KiteGameDifficulty;
|
|
70
|
+
/**
|
|
71
|
+
* Creates the initial kite game state.
|
|
72
|
+
*
|
|
73
|
+
* @param options - Board size and deterministic RNG options.
|
|
74
|
+
* @returns A fresh kite game state.
|
|
75
|
+
*/
|
|
76
|
+
export declare function createKiteGame(options?: CreateKiteGameOptions): KiteGameState;
|
|
77
|
+
/**
|
|
78
|
+
* Applies one flap impulse to the kite.
|
|
79
|
+
*
|
|
80
|
+
* @param state - Current game state.
|
|
81
|
+
* @returns Updated game state.
|
|
82
|
+
*/
|
|
83
|
+
export declare function flapKite(state: KiteGameState): KiteGameState;
|
|
84
|
+
/**
|
|
85
|
+
* Advances the deterministic kite game by one tick.
|
|
86
|
+
*
|
|
87
|
+
* @param state - Current game state.
|
|
88
|
+
* @param rng - Random source for newly spawned clouds.
|
|
89
|
+
* @returns Updated game state.
|
|
90
|
+
*/
|
|
91
|
+
export declare function tickKiteGame(state: KiteGameState, rng?: KiteGameRng): KiteGameState;
|
|
92
|
+
/**
|
|
93
|
+
* Renders the current game state into terminal text rows.
|
|
94
|
+
*
|
|
95
|
+
* @param state - Current game state.
|
|
96
|
+
* @returns Board rows suitable for Ink text rendering.
|
|
97
|
+
*/
|
|
98
|
+
export declare function renderKiteGameRows(state: KiteGameState): string[];
|
|
99
|
+
//# sourceMappingURL=kite-game-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kite-game-engine.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/kite-game-engine.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,6CAA6C;AAC7C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,wCAAwC;AACxC,eAAO,MAAM,MAAM,IAAI,CAAC;AAExB,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,iBAAO,CAAC;AAEtC,qDAAqD;AACrD,eAAO,MAAM,gBAAgB,iBAAO,CAAC;A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;IACpD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC,sDAAsD;IACtD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAQD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAMvE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAA0B,GAClC,aAAa,CAiBf;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAK5D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,EACpB,GAAG,GAAE,WAAyB,GAC7B,aAAa,CA0Cf;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CAcjE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Config key used to persist the anonymous kite game high score. */
|
|
3
|
+
export declare const KITE_GAME_HIGH_SCORE_KEY = "kite-game-high-score";
|
|
4
|
+
declare const kiteGameHighScoreSchema: z.ZodObject<{
|
|
5
|
+
version: z.ZodLiteral<1>;
|
|
6
|
+
score: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
/** Versioned high-score record stored in the CLI config store. */
|
|
9
|
+
export type KiteGameHighScore = z.infer<typeof kiteGameHighScoreSchema>;
|
|
10
|
+
/** Store contract used by the kite high-score service. */
|
|
11
|
+
export interface KiteGameScoreStore {
|
|
12
|
+
/** Reads a raw value from the backing store. */
|
|
13
|
+
get<T>(key: string): T | undefined;
|
|
14
|
+
/** Writes a raw value to the backing store. */
|
|
15
|
+
set(key: string, value: unknown): void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Reads the stored kite game high score.
|
|
19
|
+
*
|
|
20
|
+
* @param store - Backing store to read from.
|
|
21
|
+
* @returns The validated high score, or zero when unset or invalid.
|
|
22
|
+
*/
|
|
23
|
+
export declare function readKiteGameHighScore(store?: KiteGameScoreStore): number;
|
|
24
|
+
/**
|
|
25
|
+
* Persists a new kite game high score when it beats the current score.
|
|
26
|
+
*
|
|
27
|
+
* @param score - Candidate score to save.
|
|
28
|
+
* @param store - Backing store to write to.
|
|
29
|
+
* @returns The stored high score after applying the candidate score.
|
|
30
|
+
*/
|
|
31
|
+
export declare function saveKiteGameHighScore(score: number, store?: KiteGameScoreStore): number;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=kite-game-score.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kite-game-score.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/kite-game-score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,qEAAqE;AACrE,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAE/D,QAAA,MAAM,uBAAuB;;;iBAG3B,CAAC;AAEH,kEAAkE;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,0DAA0D;AAC1D,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAEnC,+CAA+C;IAC/C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,GAAE,kBAAgC,GAAG,MAAM,CAGrF;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,kBAAgC,GAAG,MAAM,CASpG"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TemplateSource } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Options for scaffolding a new CopilotKit project directory.
|
|
4
|
+
*/
|
|
5
|
+
export interface ScaffoldOptions {
|
|
6
|
+
/** Absolute or relative path to the target project directory. */
|
|
7
|
+
projectDir: string;
|
|
8
|
+
/** Template source — either a GitHub URL string or explicit components. */
|
|
9
|
+
template: string | TemplateSource;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Scaffolds a new CopilotKit project by cloning a template from GitHub.
|
|
13
|
+
*
|
|
14
|
+
* @param options - {@link ScaffoldOptions} controlling scaffold behavior.
|
|
15
|
+
* @throws {Error} If `projectDir` already exists and is non-empty.
|
|
16
|
+
*/
|
|
17
|
+
export declare function scaffoldProject(options: ScaffoldOptions): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Copies `.env.example` to `.env` if `.env` does not already exist.
|
|
20
|
+
*
|
|
21
|
+
* @param projectDir - The project directory.
|
|
22
|
+
* @returns `true` when `.env` was created from `.env.example`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function copyEnvExample(projectDir: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Writes or appends the license key to the `.env` file in the project directory.
|
|
27
|
+
*
|
|
28
|
+
* If the template already contains a `.env.example`, copies it to `.env` first,
|
|
29
|
+
* then ensures `COPILOTKIT_LICENSE_TOKEN` is set. If no `.env.example` exists,
|
|
30
|
+
* creates a fresh `.env` with the license key.
|
|
31
|
+
*
|
|
32
|
+
* @param projectDir - The project directory.
|
|
33
|
+
* @param licenseKey - The license key value.
|
|
34
|
+
*/
|
|
35
|
+
export declare function writeEnvLicenseKey(projectDir: string, licenseKey: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Checks whether a git user name and email are configured for `projectDir`.
|
|
38
|
+
*
|
|
39
|
+
* @param projectDir - Directory in which to check git identity.
|
|
40
|
+
* @returns `true` if both name and email are configured, `false` otherwise.
|
|
41
|
+
*/
|
|
42
|
+
export declare function checkGitIdentity(projectDir: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Creates an initial git commit in `projectDir` staging all files.
|
|
45
|
+
*
|
|
46
|
+
* @param projectDir - Directory in which to create the initial commit.
|
|
47
|
+
*/
|
|
48
|
+
export declare function commitInitial(projectDir: string): Promise<void>;
|
|
49
|
+
//# sourceMappingURL=project-scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-scaffold.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/project-scaffold.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB7E;AAuID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAU1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,IAAI,CAsBN;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAkB5D;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrE"}
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent framework options — matches CopilotKit CLI supported frameworks.
|
|
3
|
+
*
|
|
4
|
+
* Each value corresponds to a supported agent integration target that
|
|
5
|
+
* CopilotKit Intelligence can scaffold or connect to.
|
|
6
|
+
*/
|
|
7
|
+
export type AgentFramework = 'langgraph-py' | 'langgraph-js' | 'flows' | 'mastra' | 'pydantic-ai' | 'llamaindex' | 'agno' | 'adk' | 'aws-strands-py' | 'a2a' | 'microsoft-agent-framework-dotnet' | 'microsoft-agent-framework-py';
|
|
8
|
+
/**
|
|
9
|
+
* Runtime list of all supported agent frameworks.
|
|
10
|
+
*
|
|
11
|
+
* Used for validation of CLI flags and any other user-provided framework
|
|
12
|
+
* values before they are used as template keys.
|
|
13
|
+
*/
|
|
14
|
+
export declare const AGENT_FRAMEWORKS: readonly ["langgraph-py", "langgraph-js", "flows", "mastra", "pydantic-ai", "llamaindex", "agno", "adk", "aws-strands-py", "a2a", "microsoft-agent-framework-dotnet", "microsoft-agent-framework-py"];
|
|
15
|
+
/**
|
|
16
|
+
* Structured template source with explicit branch support.
|
|
17
|
+
*
|
|
18
|
+
* Used when the branch name contains `/` characters that break URL parsing.
|
|
19
|
+
*/
|
|
20
|
+
export interface TemplateSource {
|
|
21
|
+
owner: string;
|
|
22
|
+
repo: string;
|
|
23
|
+
branch: string;
|
|
24
|
+
path: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Emoji markers shown next to each framework in interactive prompts and
|
|
28
|
+
* completion messages. Mirrors the set used by the legacy CopilotKit CLI.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FRAMEWORK_EMOJI: Record<AgentFramework, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Framework display labels for interactive prompts.
|
|
33
|
+
*
|
|
34
|
+
* Each entry pairs a human-readable label with its corresponding
|
|
35
|
+
* {@link AgentFramework} value for use in ink select-input components.
|
|
36
|
+
*/
|
|
37
|
+
export declare const FRAMEWORK_CHOICES: Array<{
|
|
38
|
+
label: string;
|
|
39
|
+
value: AgentFramework;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Checks whether a string is one of the supported CLI framework identifiers.
|
|
43
|
+
*
|
|
44
|
+
* @param value - User-provided framework string.
|
|
45
|
+
* @returns `true` when the value is a supported {@link AgentFramework}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isAgentFramework(value: string): value is AgentFramework;
|
|
48
|
+
/**
|
|
49
|
+
* Builds the user-facing invalid-framework error for CLI validation failures.
|
|
50
|
+
*
|
|
51
|
+
* @param value - Unsupported framework string provided by the user.
|
|
52
|
+
* @returns A human-readable validation error message.
|
|
53
|
+
*/
|
|
54
|
+
export declare function formatInvalidFrameworkError(value: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* GitHub URL templates for each framework's example.
|
|
57
|
+
*
|
|
58
|
+
* Used by the scaffold service to download the appropriate starter template
|
|
59
|
+
* via git sparse checkout.
|
|
60
|
+
*/
|
|
61
|
+
export declare const TEMPLATE_REPOS: Record<AgentFramework, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Template metadata used by `copilotkit init` to resolve scaffold behavior.
|
|
64
|
+
*/
|
|
65
|
+
export interface InitTemplateDefinition {
|
|
66
|
+
/** Stable identifier for the template choice. */
|
|
67
|
+
id: string;
|
|
68
|
+
/** Source used by the scaffold service to fetch the template. */
|
|
69
|
+
template: string | TemplateSource;
|
|
70
|
+
/** Whether the scaffold path must authenticate and issue a license key. */
|
|
71
|
+
requiresLicense: boolean;
|
|
72
|
+
/** Success flair shown when scaffolding completes. */
|
|
73
|
+
successEmoji: string;
|
|
74
|
+
/** Runtime and setup prerequisites expected by the scaffolded template. */
|
|
75
|
+
prerequisites: InitTemplatePrerequisite[];
|
|
76
|
+
/** Command used to install project dependencies after scaffolding. */
|
|
77
|
+
installCommand: string;
|
|
78
|
+
/** Additional setup commands needed after dependency installation. */
|
|
79
|
+
postInstallCommands?: string[];
|
|
80
|
+
/** Command used to run the scaffolded project after dependencies are ready. */
|
|
81
|
+
runCommand: string;
|
|
82
|
+
/** Environment variables the user should set before running the template. */
|
|
83
|
+
environment: InitTemplateEnvironmentKey[];
|
|
84
|
+
}
|
|
85
|
+
/** Tool or runtime needed by an init template. */
|
|
86
|
+
export interface InitTemplatePrerequisite {
|
|
87
|
+
/** Executable name used for PATH checks. */
|
|
88
|
+
command: string;
|
|
89
|
+
/** Human-readable prerequisite label. */
|
|
90
|
+
label: string;
|
|
91
|
+
/** Whether the prerequisite is needed during setup or only while running. */
|
|
92
|
+
phase: 'setup' | 'runtime';
|
|
93
|
+
/** Template-specific install guidance shown when the command is missing. */
|
|
94
|
+
installHint: string;
|
|
95
|
+
}
|
|
96
|
+
/** Environment variable metadata shown in init next steps. */
|
|
97
|
+
export interface InitTemplateEnvironmentKey {
|
|
98
|
+
/** Environment variable name. */
|
|
99
|
+
key: string;
|
|
100
|
+
/** Whether the template cannot run usefully without this value. */
|
|
101
|
+
required: boolean;
|
|
102
|
+
/** Short user-facing note about how the value is used. */
|
|
103
|
+
note: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Catalog of standard framework templates.
|
|
107
|
+
*
|
|
108
|
+
* These templates scaffold without requiring CLI authentication or license
|
|
109
|
+
* issuance.
|
|
110
|
+
*/
|
|
111
|
+
export declare const FRAMEWORK_TEMPLATES: Record<AgentFramework, InitTemplateDefinition>;
|
|
112
|
+
/**
|
|
113
|
+
* Explicit template metadata for the langgraph-python-threads example.
|
|
114
|
+
*
|
|
115
|
+
* Uses structured fields instead of a URL because the branch name contains a
|
|
116
|
+
* `/` which breaks URL-based parsing.
|
|
117
|
+
*/
|
|
118
|
+
export declare const THREADS_TEMPLATE: InitTemplateDefinition;
|
|
119
|
+
/**
|
|
120
|
+
* Shape of user/org data returned by ops-api after successful CLI authentication.
|
|
121
|
+
*
|
|
122
|
+
* Received from the `/cli/auth/callback` endpoint and used to populate
|
|
123
|
+
* the local {@link StoredAuth} credential store.
|
|
124
|
+
*/
|
|
125
|
+
export interface AuthPayload {
|
|
126
|
+
/** Short-lived CLI session token issued by ops-api. */
|
|
127
|
+
cliToken: string;
|
|
128
|
+
/** Authenticated user record. */
|
|
129
|
+
user: {
|
|
130
|
+
id: string;
|
|
131
|
+
email: string;
|
|
132
|
+
name: string | null;
|
|
133
|
+
};
|
|
134
|
+
/** Organization the user authenticated under. */
|
|
135
|
+
organization: {
|
|
136
|
+
clerkOrgId: string;
|
|
137
|
+
organizationName?: string;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Scope accepted by CLI license listing requests.
|
|
142
|
+
*/
|
|
143
|
+
export type CliLicenseScope = 'org' | 'user';
|
|
144
|
+
/**
|
|
145
|
+
* License metadata returned by the authenticated CLI license API.
|
|
146
|
+
*/
|
|
147
|
+
export interface CliLicenseRecord {
|
|
148
|
+
/** Stable license identifier. */
|
|
149
|
+
license_id: string;
|
|
150
|
+
/** Issued license tier. */
|
|
151
|
+
tier: string;
|
|
152
|
+
/** Maximum seat count for the license. */
|
|
153
|
+
seat_limit: number;
|
|
154
|
+
/** Feature flags embedded in the license payload. */
|
|
155
|
+
features: Record<string, boolean>;
|
|
156
|
+
/** Whether the license grants remove-branding rights. */
|
|
157
|
+
remove_branding: boolean;
|
|
158
|
+
/** Timestamp when the license was formally issued, or null when pending. */
|
|
159
|
+
issued_at: string | null;
|
|
160
|
+
/** Timestamp when the license expires. */
|
|
161
|
+
expires_at: string;
|
|
162
|
+
/** Timestamp when the license row was created. */
|
|
163
|
+
created_at: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Shape stored in the copilotkit-auth conf store on disk.
|
|
167
|
+
*
|
|
168
|
+
* Written after a successful login and read by subsequent CLI commands
|
|
169
|
+
* that require an authenticated session.
|
|
170
|
+
*/
|
|
171
|
+
export interface StoredAuth {
|
|
172
|
+
/** CLI session token used to authenticate requests to ops-api. */
|
|
173
|
+
cliToken: string;
|
|
174
|
+
/** Stable identifier for the authenticated user. */
|
|
175
|
+
userId: string;
|
|
176
|
+
/** Email address of the authenticated user. */
|
|
177
|
+
email: string;
|
|
178
|
+
/** Active Clerk organization identifier for the authenticated session. */
|
|
179
|
+
clerkOrgId: string;
|
|
180
|
+
/** Display name for the authenticated organization, when available. */
|
|
181
|
+
organizationName?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Shape of init options after flag parsing and interactive prompts are resolved.
|
|
185
|
+
*
|
|
186
|
+
* Represents the fully-resolved configuration for a `copilotkit init` invocation,
|
|
187
|
+
* ready to be handed to the scaffold service.
|
|
188
|
+
*/
|
|
189
|
+
export interface InitOptions {
|
|
190
|
+
/** Human-readable name for the project being initialized. */
|
|
191
|
+
name: string;
|
|
192
|
+
/** Whether the user chose the Intelligence (threads) path. */
|
|
193
|
+
intelligence: boolean;
|
|
194
|
+
/** Target agent framework — only set when intelligence is false. */
|
|
195
|
+
framework: AgentFramework | null;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Resolves the init template metadata for the supplied scaffold options.
|
|
199
|
+
*
|
|
200
|
+
* @param options - Resolved init options that determine the scaffold path.
|
|
201
|
+
* @returns The template definition that should drive scaffolding.
|
|
202
|
+
* @throws {Error} When a non-threads scaffold is missing a framework.
|
|
203
|
+
*/
|
|
204
|
+
export declare function resolveInitTemplate(options: Pick<InitOptions, 'intelligence' | 'framework'>): InitTemplateDefinition;
|
|
205
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../apps/cli/src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,cAAc,GACd,OAAO,GACP,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,MAAM,GAGN,KAAK,GACL,gBAAgB,GAChB,KAAK,GACL,kCAAkC,GAClC,8BAA8B,CAAC;AAGnC;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,uMAaiB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;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