copilotkit 2.1.2 → 3.0.1

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.
Files changed (69) hide show
  1. package/README.md +179 -0
  2. package/index.js +75447 -71992
  3. package/package.json +1 -1
  4. package/src/commands/docs.d.ts +0 -17
  5. package/src/commands/docs.d.ts.map +0 -1
  6. package/src/commands/init.d.ts +0 -142
  7. package/src/commands/init.d.ts.map +0 -1
  8. package/src/commands/kite.d.ts +0 -8
  9. package/src/commands/kite.d.ts.map +0 -1
  10. package/src/commands/license.d.ts +0 -25
  11. package/src/commands/license.d.ts.map +0 -1
  12. package/src/commands/login.d.ts +0 -13
  13. package/src/commands/login.d.ts.map +0 -1
  14. package/src/commands/logs.d.ts +0 -32
  15. package/src/commands/logs.d.ts.map +0 -1
  16. package/src/commands/version.d.ts +0 -8
  17. package/src/commands/version.d.ts.map +0 -1
  18. package/src/config.d.ts +0 -46
  19. package/src/config.d.ts.map +0 -1
  20. package/src/index.d.ts +0 -21
  21. package/src/index.d.ts.map +0 -1
  22. package/src/services/agentcore-config.d.ts +0 -34
  23. package/src/services/agentcore-config.d.ts.map +0 -1
  24. package/src/services/api-client.d.ts +0 -99
  25. package/src/services/api-client.d.ts.map +0 -1
  26. package/src/services/auth.service.d.ts +0 -141
  27. package/src/services/auth.service.d.ts.map +0 -1
  28. package/src/services/cli-auth-diagnostics.d.ts +0 -71
  29. package/src/services/cli-auth-diagnostics.d.ts.map +0 -1
  30. package/src/services/cli-logs.d.ts +0 -45
  31. package/src/services/cli-logs.d.ts.map +0 -1
  32. package/src/services/cli-tips.d.ts +0 -45
  33. package/src/services/cli-tips.d.ts.map +0 -1
  34. package/src/services/config.service.d.ts +0 -53
  35. package/src/services/config.service.d.ts.map +0 -1
  36. package/src/services/kite-game-engine.d.ts +0 -99
  37. package/src/services/kite-game-engine.d.ts.map +0 -1
  38. package/src/services/kite-game-score.d.ts +0 -33
  39. package/src/services/kite-game-score.d.ts.map +0 -1
  40. package/src/services/project-scaffold.d.ts +0 -49
  41. package/src/services/project-scaffold.d.ts.map +0 -1
  42. package/src/services/showcase-config.d.ts +0 -19
  43. package/src/services/showcase-config.d.ts.map +0 -1
  44. package/src/services/telemetry/event-properties.d.ts +0 -128
  45. package/src/services/telemetry/event-properties.d.ts.map +0 -1
  46. package/src/services/telemetry/index.d.ts +0 -48
  47. package/src/services/telemetry/index.d.ts.map +0 -1
  48. package/src/services/telemetry/installation-id.d.ts +0 -22
  49. package/src/services/telemetry/installation-id.d.ts.map +0 -1
  50. package/src/services/telemetry/opt-out.d.ts +0 -24
  51. package/src/services/telemetry/opt-out.d.ts.map +0 -1
  52. package/src/services/telemetry/telemetry.service.d.ts +0 -74
  53. package/src/services/telemetry/telemetry.service.d.ts.map +0 -1
  54. package/src/types.d.ts +0 -227
  55. package/src/types.d.ts.map +0 -1
  56. package/src/ui/banner.d.ts +0 -3
  57. package/src/ui/banner.d.ts.map +0 -1
  58. package/src/ui/browser-login.d.ts +0 -75
  59. package/src/ui/browser-login.d.ts.map +0 -1
  60. package/src/ui/cli-tip.d.ts +0 -111
  61. package/src/ui/cli-tip.d.ts.map +0 -1
  62. package/src/ui/init-flow.d.ts +0 -28
  63. package/src/ui/init-flow.d.ts.map +0 -1
  64. package/src/ui/kite-game.d.ts +0 -26
  65. package/src/ui/kite-game.d.ts.map +0 -1
  66. package/src/ui/login-flow.d.ts +0 -22
  67. package/src/ui/login-flow.d.ts.map +0 -1
  68. package/src/ui/spinner.d.ts +0 -9
  69. package/src/ui/spinner.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/auth.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAmB,MAAM,iBAAiB,CAAC;AASlE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AA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AAM,gCAAgC,oFACsC,CAAC;AAEpF;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,cAAc,CAOzB;AAED;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO9E;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CA2BvC;AAED;;;;;;GAMG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAa5C"}
@@ -1,71 +0,0 @@
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
@@ -1 +0,0 @@
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;A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ostics. */
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
@@ -1 +0,0 @@
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"}
@@ -1,45 +0,0 @@
1
- /** User-facing CopilotKit guidance that can be rendered by future CLI surfaces. */
2
- export interface CliTip {
3
- /** Stable identifier for analytics, tests, and renderer keys. */
4
- id: string;
5
- /** Tip copy shown to the user. */
6
- text: string;
7
- /** Numeric estimate of how relevant the tip is to common CLI users. */
8
- relevancy: number;
9
- /** Numeric estimate of how much implementation insight the tip provides. */
10
- insight: number;
11
- }
12
- /** Options used to select a ranked subset of CLI tips. */
13
- export interface SelectCliTipsOptions {
14
- /** Candidate tips to rank and filter. */
15
- tips?: readonly CliTip[];
16
- /** Maximum number of tips to return after ranking. */
17
- limit?: number;
18
- /** Minimum relevancy score required for inclusion. */
19
- minimumRelevancy?: number;
20
- /** Minimum insight score required for inclusion. */
21
- minimumInsight?: number;
22
- }
23
- /** Reusable CopilotKit tip catalog for later CLI rendering. */
24
- export declare const CLI_TIPS: readonly CliTip[];
25
- /**
26
- * Returns the reusable CopilotKit CLI tip catalog.
27
- *
28
- * @returns Read-only CopilotKit tip entries.
29
- */
30
- export declare function getCliTips(): readonly CliTip[];
31
- /**
32
- * Ranks CLI tips by relevancy, then insight, then stable identifier.
33
- *
34
- * @param tips - Candidate tips to rank.
35
- * @returns A new ranked array without mutating the input.
36
- */
37
- export declare function rankCliTips(tips?: readonly CliTip[]): readonly CliTip[];
38
- /**
39
- * Selects ranked CLI tips using optional score thresholds and a limit.
40
- *
41
- * @param options - Selection options.
42
- * @returns Ranked tips matching the provided filters.
43
- */
44
- export declare function selectCliTips(options?: SelectCliTipsOptions): readonly CliTip[];
45
- //# sourceMappingURL=cli-tips.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-tips.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/cli-tips.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,MAAM,WAAW,MAAM;IACrB,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,+DAA+D;AAC/D,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAuPpC,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,SAAS,MAAM,EAAE,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,GAAE,SAAS,MAAM,EAAa,GAAG,SAAS,MAAM,EAAE,CAcjF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,SAAS,MAAM,EAAE,CAYnF"}
@@ -1,53 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,99 +0,0 @@
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
@@ -1 +0,0 @@
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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oD;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"}
@@ -1,33 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,49 +0,0 @@
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
@@ -1 +0,0 @@
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;AAOlD;;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,CAwB7E;AAoLD;;;;;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"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Showcase identifiers consumed by the langgraph-python starter when run
3
- * under one of the showcase frameworks (a2ui, opengenui).
4
- *
5
- * The starter reads `showcase.json` at runtime to swap out the demo it shows.
6
- */
7
- export type ShowcaseId = 'a2ui' | 'opengenui';
8
- /**
9
- * Writes a `showcase.json` sidecar file selecting the showcase variant.
10
- *
11
- * Mirrors the legacy CLI's `applyShowcaseConfig` behavior so that pointing
12
- * the a2ui / opengenui frameworks at the langgraph-python starter still
13
- * works without a dedicated template repo.
14
- *
15
- * @param projectDir - The freshly-scaffolded project directory.
16
- * @param showcase - Showcase variant to record.
17
- */
18
- export declare function writeShowcaseConfig(projectDir: string, showcase: ShowcaseId): Promise<void>;
19
- //# sourceMappingURL=showcase-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showcase-config.d.ts","sourceRoot":"","sources":["../../../../../apps/cli/src/services/showcase-config.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;AAE9C;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,UAAU,GACnB,OAAO,CAAC,IAAI,CAAC,CAGf"}
@@ -1,128 +0,0 @@
1
- /** Bounded enum of `command` values emitted on telemetry events. */
2
- export type TelemetryCommand = 'init' | 'login' | 'logout' | 'license' | 'whoami' | 'docs' | 'help' | 'version' | 'unknown';
3
- /** Bounded enum of `outcome` values emitted on telemetry events. */
4
- export type TelemetryOutcome = 'started' | 'succeeded' | 'failed';
5
- /** Bounded enum of `error_code` values emitted on failed events. */
6
- export type TelemetryErrorCode = 'validation' | 'auth' | 'network' | 'timeout' | 'prerequisite_missing' | 'template_fetch' | 'git' | 'filesystem' | 'user_aborted' | 'unknown';
7
- /**
8
- * Stable string discriminators set on `Error.code` so {@link classifyError}
9
- * can map a thrown error to a {@link TelemetryErrorCode} bucket. Keep throw
10
- * sites and the classifier referencing the same constants — typo'd literals
11
- * silently degrade to `"unknown"`.
12
- */
13
- export declare const TELEMETRY_ERROR_CODES: {
14
- readonly TEMPLATE_FETCH_FAILED: "TEMPLATE_FETCH_FAILED";
15
- readonly GIT_FAILED: "GIT_FAILED";
16
- readonly PREREQUISITE_MISSING: "PREREQUISITE_MISSING";
17
- readonly INVALID_FRAMEWORK: "INVALID_FRAMEWORK";
18
- readonly AUTH_FAILED: "AUTH_FAILED";
19
- readonly USER_ABORTED: "USER_ABORTED";
20
- };
21
- /** Union of valid {@link TELEMETRY_ERROR_CODES} values. */
22
- export type TelemetryErrorTag = (typeof TELEMETRY_ERROR_CODES)[keyof typeof TELEMETRY_ERROR_CODES];
23
- /**
24
- * Attaches a stable {@link TelemetryErrorTag} to an Error's `code` field so
25
- * {@link classifyError} can bucket the failure. Returns the same instance for
26
- * inline use in `throw` statements.
27
- *
28
- * @param err - The error to tag.
29
- * @param code - The discriminator to set.
30
- * @returns The same error instance, with `.code` assigned.
31
- */
32
- export declare function tagError<E extends Error>(err: E, code: TelemetryErrorTag): E;
33
- /**
34
- * Minimal session payload read from the auth store when building base
35
- * properties. Decouples this module from the full {@link StoredAuth} shape.
36
- */
37
- export interface TelemetryAuthSnapshot {
38
- userId: string;
39
- email: string;
40
- }
41
- /**
42
- * Build identity payload mirroring the shape of {@link getBuildInfo}.
43
- */
44
- export interface TelemetryBuildInfo {
45
- version: string;
46
- buildNumber: string;
47
- commitSha: string;
48
- }
49
- /** Injectable dependencies for {@link buildBaseProperties}. */
50
- export interface BaseDeps {
51
- installationId: string;
52
- sessionId: string;
53
- buildInfo: TelemetryBuildInfo;
54
- auth: TelemetryAuthSnapshot | null;
55
- env: NodeJS.ProcessEnv;
56
- nodeVersion: string;
57
- platform: NodeJS.Platform | string;
58
- arch: string;
59
- }
60
- /** Output shape of {@link buildBaseProperties}. */
61
- export interface BaseProperties {
62
- installation_id: string;
63
- session_id: string;
64
- cli_version: string;
65
- cli_build_number: string;
66
- cli_commit_sha: string;
67
- node_version: string;
68
- platform: string;
69
- arch: string;
70
- is_ci: boolean;
71
- is_authenticated: boolean;
72
- clerk_user_id?: string;
73
- email_hash?: string;
74
- }
75
- /**
76
- * Detects whether the current process is running in a CI environment.
77
- *
78
- * @param env - Process environment variables.
79
- * @returns `true` when any known CI indicator env var is set to a non-empty value.
80
- */
81
- export declare function detectCi(env: NodeJS.ProcessEnv): boolean;
82
- /**
83
- * Truncated SHA-256 hash of an email for PII-free correlation.
84
- *
85
- * Matches the wire format used by ops-api at
86
- * `apps/ops-api/src/services/telemetry-sink.service.ts:68-70`.
87
- *
88
- * @param email - The email to hash.
89
- * @returns A 16-character lowercase hex string.
90
- */
91
- export declare function hashEmail(email: string): string;
92
- /**
93
- * Builds the base property set emitted on every telemetry event.
94
- *
95
- * @param deps - Build identity, auth snapshot, env, and platform info.
96
- * @returns The base properties object.
97
- */
98
- export declare function buildBaseProperties(deps: BaseDeps): BaseProperties;
99
- /**
100
- * Flag shape for {@link subcommandForInit}.
101
- */
102
- export interface InitSubcommandFlags {
103
- intelligence?: boolean;
104
- framework?: string;
105
- }
106
- /**
107
- * Derives the bounded `subcommand` property for the init/create command.
108
- *
109
- * Returns `"interactive"` when neither branching flag is set, `"intelligence"`
110
- * for the intelligence branch, the framework value when `--framework` is set
111
- * to a known {@link AgentFramework}, and `"invalid"` when an unknown framework
112
- * value is supplied (to avoid leaking arbitrary user-typed strings).
113
- *
114
- * @param flags - The parsed init flags.
115
- * @returns The bounded subcommand value.
116
- */
117
- export declare function subcommandForInit(flags: InitSubcommandFlags): string;
118
- /**
119
- * Classifies an unknown error value into a bounded {@link TelemetryErrorCode}.
120
- *
121
- * Inspects `Error.name`, status codes on `ApiClientError`-shaped errors, and
122
- * `AbortError` for timeouts. Never returns or emits the raw error message.
123
- *
124
- * @param err - The thrown value.
125
- * @returns A bounded error code suitable for the `error_code` property.
126
- */
127
- export declare function classifyError(err: unknown): TelemetryErrorCode;
128
- //# sourceMappingURL=event-properties.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-properties.d.ts","sourceRoot":"","sources":["../../../../../../apps/cli/src/services/telemetry/event-properties.ts"],"names":[],"mappings":"AAGA,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,MAAM,GACN,MAAM,GACN,SAAS,GACT,SAAS,CAAC;AAEd,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElE,oEAAoE;AACpE,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,MAAM,GACN,SAAS,GACT,SAAS,GACT,sBAAsB,GACtB,gBAAgB,GAChB,KAAK,GACL,YAAY,GACZ,cAAc,GACd,SAAS,CAAC;AAEd;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAOxB,CAAC;AAEX,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,GAAG,CAAC,CAG5E;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAA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AO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAQpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,kBAAkB,CAuC9D"}
@@ -1,48 +0,0 @@
1
- import { type TelemetryEvent, type TelemetryEventProperties, type TelemetryService } from "./telemetry.service.js";
2
- /**
3
- * Lazily constructs and returns the process-wide telemetry service.
4
- *
5
- * Generates a fresh `session_id` on first call, resolves opt-out state, and
6
- * persists the anonymous `installation_id` if not already present.
7
- *
8
- * @returns The singleton telemetry service.
9
- */
10
- export declare function getTelemetry(): TelemetryService;
11
- /**
12
- * Records a telemetry event through the process-wide singleton.
13
- *
14
- * @param event - The event payload to send.
15
- */
16
- export declare function recordTelemetryEvent(event: TelemetryEvent): void;
17
- /**
18
- * Awaits in-flight telemetry sends up to a bounded timeout. No-op when the
19
- * singleton has not been initialised.
20
- *
21
- * @param timeoutMs - Optional override for the flush ceiling.
22
- */
23
- export declare function flushTelemetry(timeoutMs?: number): Promise<void>;
24
- /**
25
- * Flushes telemetry then exits the process with the given code. Use this in
26
- * place of bare `process.exit(N)` calls anywhere an event may have just been
27
- * recorded.
28
- *
29
- * @param code - The exit code to use.
30
- */
31
- export declare function exitWithFlush(code: number): Promise<never>;
32
- /**
33
- * Wraps an async command runner with a `started` event on entry and a
34
- * `succeeded` or `failed` event on exit. The wrapped function's return value
35
- * and rejections pass through unchanged.
36
- *
37
- * @param base - The event properties common to both started and finished
38
- * events (typically `{ command, subcommand?, scope? }`).
39
- * @param fn - The command runner to wrap.
40
- * @returns The result of `fn`.
41
- */
42
- export declare function withTelemetry<T>(base: Omit<TelemetryEventProperties, "outcome" | "duration_ms" | "error_code">, fn: () => Promise<T>): Promise<T>;
43
- /**
44
- * Test-only helper that drops the singleton so each test sees a fresh state.
45
- * Not part of the public production surface.
46
- */
47
- export declare function __resetTelemetryForTests(): void;
48
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../apps/cli/src/services/telemetry/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAE7B,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AA2BhC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,gBAAgB,CA4B/C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAEhE;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,SAAS,GAAE,MAAiC,GAC3C,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAGhE;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACnC,IAAI,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC,EAC9E,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAoBZ;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}