forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
64 lines (57 loc) · 1.8 KB
/
Copy pathindex.ts
File metadata and controls
64 lines (57 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export * from "./types";
export * from "./utils";
export * from "./constants";
export * from "./telemetry";
export * from "./debug";
export * from "./standard-schema";
export * from "./attachments";
export { logger } from "./logger";
export { finalizeRunEvents } from "./finalize-events";
export {
TranscriptionErrorCode,
TranscriptionErrors,
type TranscriptionErrorResponse,
} from "./transcription-errors";
import * as packageJson from "../package.json";
export const COPILOTKIT_VERSION = packageJson.version;
// Re-export only types from license-verifier (types are erased at compile time,
// so they don't pull in the Node-only `crypto` dependency into client bundles).
// Server-side packages (e.g. @copilotkit/runtime) should import runtime functions
// like createLicenseChecker and getLicenseWarningHeader directly from
// @copilotkit/license-verifier.
export type {
LicenseContextValue,
LicenseChecker,
LicenseStatus,
LicensePayload,
LicenseFeatures,
LicenseTier,
LicenseOwner,
LicenseMode,
} from "@copilotkit/license-verifier";
/**
* Client-safe license context factory.
*
* When status is null (no token provided), all features return true
* (unlicensed = unrestricted, with branding). This is inlined here to
* avoid importing the full license-verifier bundle (which depends on
* Node's `crypto`) into browser bundles.
*/
export function createLicenseContextValue(status: null): {
status: null;
license: null;
checkFeature: (feature: string) => boolean;
getLimit: (feature: string) => number | null;
} {
return {
status: null,
license: null,
checkFeature: () => true,
getLimit: () => null,
};
}
export {
A2UI_DEFAULT_GENERATION_GUIDELINES,
A2UI_DEFAULT_DESIGN_GUIDELINES,
} from "./a2ui-prompts";
export type { DebugEventEnvelope } from "./debug-event-envelope";