@copilotkit/shared 0.0.0-main-20260402184302 → 0.0.0-main-20260403195251
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/CHANGELOG.md +5 -1
- package/dist/constants/index.d.ts +11 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/finalize-events.d.ts +11 -0
- package/dist/finalize-events.d.ts.map +1 -0
- package/dist/index.cjs +17 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +16 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +17 -3
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +17 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/logger.d.ts +5 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/standard-schema.d.ts +32 -0
- package/dist/standard-schema.d.ts.map +1 -0
- package/dist/telemetry/events.d.ts +39 -0
- package/dist/telemetry/events.d.ts.map +1 -0
- package/dist/telemetry/telemetry-client.d.ts +48 -0
- package/dist/telemetry/telemetry-client.d.ts.map +1 -0
- package/dist/transcription-errors.d.ts +52 -0
- package/dist/transcription-errors.d.ts.map +1 -0
- package/dist/types/action.d.ts +59 -0
- package/dist/types/action.d.ts.map +1 -0
- package/dist/types/copilot-cloud-config.d.ts +15 -0
- package/dist/types/copilot-cloud-config.d.ts.map +1 -0
- package/dist/types/error.d.ts +57 -0
- package/dist/types/error.d.ts.map +1 -0
- package/dist/types/message.d.ts +31 -0
- package/dist/types/message.d.ts.map +1 -0
- package/dist/types/openai-assistant.d.ts +55 -0
- package/dist/types/openai-assistant.d.ts.map +1 -0
- package/dist/types/utility.d.ts +6 -0
- package/dist/types/utility.d.ts.map +1 -0
- package/dist/utils/conditions.d.ts +31 -0
- package/dist/utils/conditions.d.ts.map +1 -0
- package/dist/utils/console-styling.d.ts +65 -0
- package/dist/utils/console-styling.d.ts.map +1 -0
- package/dist/utils/errors.d.ts +312 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/index.d.ts +53 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/json-schema.d.ts +36 -0
- package/dist/utils/json-schema.d.ts.map +1 -0
- package/dist/utils/random-id.d.ts +8 -0
- package/dist/utils/random-id.d.ts.map +1 -0
- package/dist/utils/requests.d.ts +12 -0
- package/dist/utils/requests.d.ts.map +1 -0
- package/dist/utils/types.d.ts +33 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +37 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# @copilotkit/shared
|
|
2
2
|
|
|
3
|
-
## 0.0.0-main-
|
|
3
|
+
## 0.0.0-main-20260403195251
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- 1ceb963: refactor: consolidate V1/V2 packages into flat @copilotkit/\* structure
|
|
8
8
|
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 52a9322: Fixing license warnings, barrel export and typing
|
|
12
|
+
|
|
9
13
|
## 1.55.0-next.8
|
|
10
14
|
|
|
11
15
|
## 1.55.0-next.7
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/constants/index.d.ts
|
|
2
|
+
declare const COPILOT_CLOUD_API_URL = "https://api.cloud.copilotkit.ai";
|
|
3
|
+
declare const COPILOT_CLOUD_VERSION = "v1";
|
|
4
|
+
declare const COPILOT_CLOUD_CHAT_URL = "https://api.cloud.copilotkit.ai/copilotkit/v1";
|
|
5
|
+
declare const COPILOT_CLOUD_PUBLIC_API_KEY_HEADER = "X-CopilotCloud-Public-Api-Key";
|
|
6
|
+
declare const DEFAULT_AGENT_ID = "default";
|
|
7
|
+
/** Phoenix channel event name used for all AG-UI events. */
|
|
8
|
+
declare const AG_UI_CHANNEL_EVENT = "ag-ui";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AG_UI_CHANNEL_EVENT, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, DEFAULT_AGENT_ID };
|
|
11
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/constants/index.ts"],"mappings":";cAAa,qBAAA;AAAA,cACA,qBAAA;AAAA,cACA,sBAAA;AAAA,cACA,mCAAA;AAAA,cAGA,gBAAA;;cAGA,mBAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseEvent } from "@ag-ui/client";
|
|
2
|
+
|
|
3
|
+
//#region src/finalize-events.d.ts
|
|
4
|
+
interface FinalizeRunOptions {
|
|
5
|
+
stopRequested?: boolean;
|
|
6
|
+
interruptionMessage?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function finalizeRunEvents(events: BaseEvent[], options?: FinalizeRunOptions): BaseEvent[];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { finalizeRunEvents };
|
|
11
|
+
//# sourceMappingURL=finalize-events.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalize-events.d.cts","names":[],"sources":["../src/finalize-events.ts"],"mappings":";;;UAGU,kBAAA;EACR,aAAA;EACA,mBAAA;AAAA;AAAA,iBAMc,iBAAA,CACd,MAAA,EAAQ,SAAA,IACR,OAAA,GAAS,kBAAA,GACR,SAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -17,6 +17,22 @@ const require_transcription_errors = require('./transcription-errors.cjs');
|
|
|
17
17
|
|
|
18
18
|
//#region src/index.ts
|
|
19
19
|
const COPILOTKIT_VERSION = require_package.version;
|
|
20
|
+
/**
|
|
21
|
+
* Client-safe license context factory.
|
|
22
|
+
*
|
|
23
|
+
* When status is null (no token provided), all features return true
|
|
24
|
+
* (unlicensed = unrestricted, with branding). This is inlined here to
|
|
25
|
+
* avoid importing the full license-verifier bundle (which depends on
|
|
26
|
+
* Node's `crypto`) into browser bundles.
|
|
27
|
+
*/
|
|
28
|
+
function createLicenseContextValue(status) {
|
|
29
|
+
return {
|
|
30
|
+
status: null,
|
|
31
|
+
license: null,
|
|
32
|
+
checkFeature: () => true,
|
|
33
|
+
getLimit: () => null
|
|
34
|
+
};
|
|
35
|
+
}
|
|
20
36
|
|
|
21
37
|
//#endregion
|
|
22
38
|
exports.AG_UI_CHANNEL_EVENT = require_index$1.AG_UI_CHANNEL_EVENT;
|
|
@@ -53,6 +69,7 @@ exports.TranscriptionErrors = require_transcription_errors.TranscriptionErrors;
|
|
|
53
69
|
exports.UpgradeRequiredError = require_errors.UpgradeRequiredError;
|
|
54
70
|
exports.actionParametersToJsonSchema = require_json_schema.actionParametersToJsonSchema;
|
|
55
71
|
exports.convertJsonSchemaToZodSchema = require_json_schema.convertJsonSchemaToZodSchema;
|
|
72
|
+
exports.createLicenseContextValue = createLicenseContextValue;
|
|
56
73
|
exports.dataToUUID = require_random_id.dataToUUID;
|
|
57
74
|
exports.ensureStructuredError = require_errors.ensureStructuredError;
|
|
58
75
|
exports.executeConditions = require_conditions.executeConditions;
|
|
@@ -78,12 +95,4 @@ exports.safeParseToolArgs = require_index.safeParseToolArgs;
|
|
|
78
95
|
exports.schemaToJsonSchema = require_standard_schema.schemaToJsonSchema;
|
|
79
96
|
exports.styledConsole = require_console_styling.styledConsole;
|
|
80
97
|
exports.tryMap = require_index.tryMap;
|
|
81
|
-
var _copilotkit_license_verifier = require("@copilotkit/license-verifier");
|
|
82
|
-
Object.keys(_copilotkit_license_verifier).forEach(function (k) {
|
|
83
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
get: function () { return _copilotkit_license_verifier[k]; }
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
|
|
89
98
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./utils\";\nexport * from \"./constants\";\nexport * from \"./telemetry\";\nexport * from \"./standard-schema\";\n\nexport { logger } from \"./logger\";\nexport { finalizeRunEvents } from \"./finalize-events\";\n\nexport {\n TranscriptionErrorCode,\n TranscriptionErrors,\n type TranscriptionErrorResponse,\n} from \"./transcription-errors\";\n\nimport * as packageJson from \"../package.json\";\nexport const COPILOTKIT_VERSION = packageJson.version;\n\nexport
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./utils\";\nexport * from \"./constants\";\nexport * from \"./telemetry\";\nexport * from \"./standard-schema\";\n\nexport { logger } from \"./logger\";\nexport { finalizeRunEvents } from \"./finalize-events\";\n\nexport {\n TranscriptionErrorCode,\n TranscriptionErrors,\n type TranscriptionErrorResponse,\n} from \"./transcription-errors\";\n\nimport * as packageJson from \"../package.json\";\nexport const COPILOTKIT_VERSION = packageJson.version;\n\n// Re-export only types from license-verifier (types are erased at compile time,\n// so they don't pull in the Node-only `crypto` dependency into client bundles).\n// Server-side packages (e.g. @copilotkit/runtime) should import runtime functions\n// like createLicenseChecker and getLicenseWarningHeader directly from\n// @copilotkit/license-verifier.\nexport type {\n LicenseContextValue,\n LicenseChecker,\n LicenseStatus,\n LicensePayload,\n LicenseFeatures,\n LicenseTier,\n LicenseOwner,\n LicenseMode,\n} from \"@copilotkit/license-verifier\";\n\n/**\n * Client-safe license context factory.\n *\n * When status is null (no token provided), all features return true\n * (unlicensed = unrestricted, with branding). This is inlined here to\n * avoid importing the full license-verifier bundle (which depends on\n * Node's `crypto`) into browser bundles.\n */\nexport function createLicenseContextValue(status: null): {\n status: null;\n license: null;\n checkFeature: (feature: string) => boolean;\n getLimit: (feature: string) => number | null;\n} {\n return {\n status: null,\n license: null,\n checkFeature: () => true,\n getLimit: () => null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,MAAa;;;;;;;;;AA0Bb,SAAgB,0BAA0B,QAKxC;AACA,QAAO;EACL,QAAQ;EACR,SAAS;EACT,oBAAoB;EACpB,gBAAgB;EACjB"}
|
package/dist/index.d.cts
CHANGED
|
@@ -18,10 +18,24 @@ import { InferSchemaOutput, SchemaToJsonSchemaOptions, StandardJSONSchemaV1, Sta
|
|
|
18
18
|
import { logger } from "./logger.cjs";
|
|
19
19
|
import { finalizeRunEvents } from "./finalize-events.cjs";
|
|
20
20
|
import { TranscriptionErrorCode, TranscriptionErrorResponse, TranscriptionErrors } from "./transcription-errors.cjs";
|
|
21
|
-
|
|
21
|
+
import { LicenseChecker, LicenseContextValue, LicenseFeatures, LicenseMode, LicenseOwner, LicensePayload, LicenseStatus, LicenseTier } from "@copilotkit/license-verifier";
|
|
22
22
|
|
|
23
23
|
//#region src/index.d.ts
|
|
24
24
|
declare const COPILOTKIT_VERSION: string;
|
|
25
|
+
/**
|
|
26
|
+
* Client-safe license context factory.
|
|
27
|
+
*
|
|
28
|
+
* When status is null (no token provided), all features return true
|
|
29
|
+
* (unlicensed = unrestricted, with branding). This is inlined here to
|
|
30
|
+
* avoid importing the full license-verifier bundle (which depends on
|
|
31
|
+
* Node's `crypto`) into browser bundles.
|
|
32
|
+
*/
|
|
33
|
+
declare function createLicenseContextValue(status: null): {
|
|
34
|
+
status: null;
|
|
35
|
+
license: null;
|
|
36
|
+
checkFeature: (feature: string) => boolean;
|
|
37
|
+
getLimit: (feature: string) => number | null;
|
|
38
|
+
};
|
|
25
39
|
//#endregion
|
|
26
|
-
export { AG_UI_CHANNEL_EVENT, AIMessage, Action, ActivityMessage, AgentDescription, AssistantMessage, BANNER_ERROR_NAMES, BaseCondition, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, ComparisonCondition, ComparisonRule, Condition, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotCloudConfig, CopilotErrorEvent, CopilotErrorHandler, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, CopilotRequestContext, DEFAULT_AGENT_ID, DeveloperMessage, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, ExistenceCondition, ExistenceRule, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, ImageData, InferSchemaOutput, IntelligenceRuntimeInfo, JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaNumber, JSONSchemaObject, JSONSchemaString, JSONValue, LogicalCondition, LogicalRule, MappedParameterTypes, MaybePromise, Message, MissingPublicApiKeyError, NonEmptyRecord, Parameter, PartialBy, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ReasoningMessage, RequiredBy, ResolvedCopilotKitError, Role, Rule, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SchemaToJsonSchemaOptions, Severity, StandardJSONSchemaV1, StandardSchemaV1, SystemMessage, TelemetryClient, ToolCall, ToolDefinition, ToolResult, TranscriptionErrorCode, type TranscriptionErrorResponse, TranscriptionErrors, UpgradeRequiredError, UserMessage, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
40
|
+
export { AG_UI_CHANNEL_EVENT, AIMessage, Action, ActivityMessage, AgentDescription, AssistantMessage, BANNER_ERROR_NAMES, BaseCondition, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, ComparisonCondition, ComparisonRule, Condition, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotCloudConfig, CopilotErrorEvent, CopilotErrorHandler, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, CopilotRequestContext, DEFAULT_AGENT_ID, DeveloperMessage, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, ExistenceCondition, ExistenceRule, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, ImageData, InferSchemaOutput, IntelligenceRuntimeInfo, JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaNumber, JSONSchemaObject, JSONSchemaString, JSONValue, type LicenseChecker, type LicenseContextValue, type LicenseFeatures, type LicenseMode, type LicenseOwner, type LicensePayload, type LicenseStatus, type LicenseTier, LogicalCondition, LogicalRule, MappedParameterTypes, MaybePromise, Message, MissingPublicApiKeyError, NonEmptyRecord, Parameter, PartialBy, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ReasoningMessage, RequiredBy, ResolvedCopilotKitError, Role, Rule, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SchemaToJsonSchemaOptions, Severity, StandardJSONSchemaV1, StandardSchemaV1, SystemMessage, TelemetryClient, ToolCall, ToolDefinition, ToolResult, TranscriptionErrorCode, type TranscriptionErrorResponse, TranscriptionErrors, UpgradeRequiredError, UserMessage, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, createLicenseContextValue, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
27
41
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cAgBa,kBAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cAgBa,kBAAA;;;;;;;;;iBA0BG,yBAAA,CAA0B,MAAA;EACxC,MAAA;EACA,OAAA;EACA,YAAA,GAAe,OAAA;EACf,QAAA,GAAW,OAAA;AAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -19,10 +19,24 @@ import { InferSchemaOutput, SchemaToJsonSchemaOptions, StandardJSONSchemaV1, Sta
|
|
|
19
19
|
import { logger } from "./logger.mjs";
|
|
20
20
|
import { finalizeRunEvents } from "./finalize-events.mjs";
|
|
21
21
|
import { TranscriptionErrorCode, TranscriptionErrorResponse, TranscriptionErrors } from "./transcription-errors.mjs";
|
|
22
|
-
|
|
22
|
+
import { LicenseChecker, LicenseContextValue, LicenseFeatures, LicenseMode, LicenseOwner, LicensePayload, LicenseStatus, LicenseTier } from "@copilotkit/license-verifier";
|
|
23
23
|
|
|
24
24
|
//#region src/index.d.ts
|
|
25
25
|
declare const COPILOTKIT_VERSION: string;
|
|
26
|
+
/**
|
|
27
|
+
* Client-safe license context factory.
|
|
28
|
+
*
|
|
29
|
+
* When status is null (no token provided), all features return true
|
|
30
|
+
* (unlicensed = unrestricted, with branding). This is inlined here to
|
|
31
|
+
* avoid importing the full license-verifier bundle (which depends on
|
|
32
|
+
* Node's `crypto`) into browser bundles.
|
|
33
|
+
*/
|
|
34
|
+
declare function createLicenseContextValue(status: null): {
|
|
35
|
+
status: null;
|
|
36
|
+
license: null;
|
|
37
|
+
checkFeature: (feature: string) => boolean;
|
|
38
|
+
getLimit: (feature: string) => number | null;
|
|
39
|
+
};
|
|
26
40
|
//#endregion
|
|
27
|
-
export { AG_UI_CHANNEL_EVENT, AIMessage, Action, ActivityMessage, AgentDescription, AssistantMessage, BANNER_ERROR_NAMES, BaseCondition, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, ComparisonCondition, ComparisonRule, Condition, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotCloudConfig, CopilotErrorEvent, CopilotErrorHandler, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, CopilotRequestContext, DEFAULT_AGENT_ID, DeveloperMessage, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, ExistenceCondition, ExistenceRule, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, ImageData, InferSchemaOutput, IntelligenceRuntimeInfo, JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaNumber, JSONSchemaObject, JSONSchemaString, JSONValue, LogicalCondition, LogicalRule, MappedParameterTypes, MaybePromise, Message, MissingPublicApiKeyError, NonEmptyRecord, Parameter, PartialBy, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ReasoningMessage, RequiredBy, ResolvedCopilotKitError, Role, Rule, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SchemaToJsonSchemaOptions, Severity, StandardJSONSchemaV1, StandardSchemaV1, SystemMessage, TelemetryClient, ToolCall, ToolDefinition, ToolResult, TranscriptionErrorCode, type TranscriptionErrorResponse, TranscriptionErrors, UpgradeRequiredError, UserMessage, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
41
|
+
export { AG_UI_CHANNEL_EVENT, AIMessage, Action, ActivityMessage, AgentDescription, AssistantMessage, BANNER_ERROR_NAMES, BaseCondition, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, ComparisonCondition, ComparisonRule, Condition, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotCloudConfig, CopilotErrorEvent, CopilotErrorHandler, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, CopilotRequestContext, DEFAULT_AGENT_ID, DeveloperMessage, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, ExistenceCondition, ExistenceRule, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, ImageData, InferSchemaOutput, IntelligenceRuntimeInfo, JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaNumber, JSONSchemaObject, JSONSchemaString, JSONValue, type LicenseChecker, type LicenseContextValue, type LicenseFeatures, type LicenseMode, type LicenseOwner, type LicensePayload, type LicenseStatus, type LicenseTier, LogicalCondition, LogicalRule, MappedParameterTypes, MaybePromise, Message, MissingPublicApiKeyError, NonEmptyRecord, Parameter, PartialBy, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ReasoningMessage, RequiredBy, ResolvedCopilotKitError, Role, Rule, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SchemaToJsonSchemaOptions, Severity, StandardJSONSchemaV1, StandardSchemaV1, SystemMessage, TelemetryClient, ToolCall, ToolDefinition, ToolResult, TranscriptionErrorCode, type TranscriptionErrorResponse, TranscriptionErrors, UpgradeRequiredError, UserMessage, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, createLicenseContextValue, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
28
42
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;cAgBa,kBAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;cAgBa,kBAAA;;;;;;;;;iBA0BG,yBAAA,CAA0B,MAAA;EACxC,MAAA;EACA,OAAA;EACA,YAAA,GAAe,OAAA;EACf,QAAA,GAAW,OAAA;AAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AssistantMessage, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, JSONValue, ToolDefinition } from "./types/openai-assistant.cjs";
|
|
2
|
+
import { Action, MappedParameterTypes, Parameter } from "./types/action.cjs";
|
|
3
|
+
import { CopilotCloudConfig } from "./types/copilot-cloud-config.cjs";
|
|
4
|
+
import { PartialBy, RequiredBy } from "./types/utility.cjs";
|
|
5
|
+
import { CopilotErrorEvent, CopilotErrorHandler, CopilotRequestContext } from "./types/error.cjs";
|
|
6
|
+
import { AIMessage, ActivityMessage, DeveloperMessage, ImageData, Message, ReasoningMessage, Role, SystemMessage, ToolCall, ToolResult, UserMessage } from "./types/message.cjs";
|
|
7
|
+
import { BaseCondition, ComparisonCondition, ComparisonRule, Condition, ExistenceCondition, ExistenceRule, LogicalCondition, LogicalRule, Rule, executeConditions } from "./utils/conditions.cjs";
|
|
8
|
+
import { ConsoleColors, ConsoleStyles, logCopilotKitPlatformMessage, logStyled, publicApiKeyRequired, styledConsole } from "./utils/console-styling.cjs";
|
|
9
|
+
import { BANNER_ERROR_NAMES, COPILOT_CLOUD_ERROR_NAMES, ConfigurationError, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, MissingPublicApiKeyError, ResolvedCopilotKitError, Severity, UpgradeRequiredError, ensureStructuredError, getPossibleVersionMismatch, isStructuredCopilotKitError } from "./utils/errors.cjs";
|
|
10
|
+
import { JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaNumber, JSONSchemaObject, JSONSchemaString, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, getZodParameters, jsonSchemaToActionParameters } from "./utils/json-schema.cjs";
|
|
11
|
+
import { AgentDescription, IntelligenceRuntimeInfo, MaybePromise, NonEmptyRecord, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode } from "./utils/types.cjs";
|
|
12
|
+
import { dataToUUID, isValidUUID, randomId, randomUUID } from "./utils/random-id.cjs";
|
|
13
|
+
import { readBody } from "./utils/requests.cjs";
|
|
14
|
+
import { isMacOS, parseJson, partialJSONParse, phoenixExponentialBackoff, safeParseToolArgs, tryMap } from "./utils/index.cjs";
|
|
15
|
+
import { AG_UI_CHANNEL_EVENT, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, DEFAULT_AGENT_ID } from "./constants/index.cjs";
|
|
16
|
+
import { TelemetryClient, isTelemetryDisabled } from "./telemetry/telemetry-client.cjs";
|
|
17
|
+
import { InferSchemaOutput, SchemaToJsonSchemaOptions, StandardJSONSchemaV1, StandardSchemaV1, schemaToJsonSchema } from "./standard-schema.cjs";
|
|
18
|
+
import { logger } from "./logger.cjs";
|
|
19
|
+
import { finalizeRunEvents } from "./finalize-events.cjs";
|
|
20
|
+
import { TranscriptionErrorCode, TranscriptionErrorResponse, TranscriptionErrors } from "./transcription-errors.cjs";
|
|
21
|
+
import { LicenseChecker, LicenseContextValue, LicenseFeatures, LicenseMode, LicenseOwner, LicensePayload, LicenseStatus, LicenseTier } from "@copilotkit/license-verifier";
|
|
22
|
+
|
|
23
|
+
//#region src/index.d.ts
|
|
24
|
+
declare const COPILOTKIT_VERSION: string;
|
|
25
|
+
/**
|
|
26
|
+
* Client-safe license context factory.
|
|
27
|
+
*
|
|
28
|
+
* When status is null (no token provided), all features return true
|
|
29
|
+
* (unlicensed = unrestricted, with branding). This is inlined here to
|
|
30
|
+
* avoid importing the full license-verifier bundle (which depends on
|
|
31
|
+
* Node's `crypto`) into browser bundles.
|
|
32
|
+
*/
|
|
33
|
+
declare function createLicenseContextValue(status: null): {
|
|
34
|
+
status: null;
|
|
35
|
+
license: null;
|
|
36
|
+
checkFeature: (feature: string) => boolean;
|
|
37
|
+
getLimit: (feature: string) => number | null;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { AG_UI_CHANNEL_EVENT, AIMessage, Action, ActivityMessage, AgentDescription, AssistantMessage, BANNER_ERROR_NAMES, BaseCondition, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, ComparisonCondition, ComparisonRule, Condition, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotCloudConfig, CopilotErrorEvent, CopilotErrorHandler, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, CopilotRequestContext, DEFAULT_AGENT_ID, DeveloperMessage, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, ExistenceCondition, ExistenceRule, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, ImageData, InferSchemaOutput, IntelligenceRuntimeInfo, JSONSchema, JSONSchemaArray, JSONSchemaBoolean, JSONSchemaNumber, JSONSchemaObject, JSONSchemaString, JSONValue, type LicenseChecker, type LicenseContextValue, type LicenseFeatures, type LicenseMode, type LicenseOwner, type LicensePayload, type LicenseStatus, type LicenseTier, LogicalCondition, LogicalRule, MappedParameterTypes, MaybePromise, Message, MissingPublicApiKeyError, NonEmptyRecord, Parameter, PartialBy, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ReasoningMessage, RequiredBy, ResolvedCopilotKitError, Role, Rule, RuntimeInfo, RuntimeLicenseStatus, RuntimeMode, SchemaToJsonSchemaOptions, Severity, StandardJSONSchemaV1, StandardSchemaV1, SystemMessage, TelemetryClient, ToolCall, ToolDefinition, ToolResult, TranscriptionErrorCode, type TranscriptionErrorResponse, TranscriptionErrors, UpgradeRequiredError, UserMessage, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, createLicenseContextValue, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
41
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;cAgBa,kBAAA;;;;;;;;;iBA0BG,yBAAA,CAA0B,MAAA;EACxC,MAAA;EACA,OAAA;EACA,YAAA,GAAe,OAAA;EACf,QAAA,GAAW,OAAA;AAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -14,11 +14,25 @@ import { logger } from "./logger.mjs";
|
|
|
14
14
|
import { finalizeRunEvents } from "./finalize-events.mjs";
|
|
15
15
|
import { TranscriptionErrorCode, TranscriptionErrors } from "./transcription-errors.mjs";
|
|
16
16
|
|
|
17
|
-
export * from "@copilotkit/license-verifier"
|
|
18
|
-
|
|
19
17
|
//#region src/index.ts
|
|
20
18
|
const COPILOTKIT_VERSION = version;
|
|
19
|
+
/**
|
|
20
|
+
* Client-safe license context factory.
|
|
21
|
+
*
|
|
22
|
+
* When status is null (no token provided), all features return true
|
|
23
|
+
* (unlicensed = unrestricted, with branding). This is inlined here to
|
|
24
|
+
* avoid importing the full license-verifier bundle (which depends on
|
|
25
|
+
* Node's `crypto`) into browser bundles.
|
|
26
|
+
*/
|
|
27
|
+
function createLicenseContextValue(status) {
|
|
28
|
+
return {
|
|
29
|
+
status: null,
|
|
30
|
+
license: null,
|
|
31
|
+
checkFeature: () => true,
|
|
32
|
+
getLimit: () => null
|
|
33
|
+
};
|
|
34
|
+
}
|
|
21
35
|
|
|
22
36
|
//#endregion
|
|
23
|
-
export { AG_UI_CHANNEL_EVENT, BANNER_ERROR_NAMES, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, DEFAULT_AGENT_ID, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, MissingPublicApiKeyError, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ResolvedCopilotKitError, Severity, TelemetryClient, TranscriptionErrorCode, TranscriptionErrors, UpgradeRequiredError, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
37
|
+
export { AG_UI_CHANNEL_EVENT, BANNER_ERROR_NAMES, COPILOTKIT_VERSION, COPILOT_CLOUD_API_URL, COPILOT_CLOUD_CHAT_URL, COPILOT_CLOUD_ERROR_NAMES, COPILOT_CLOUD_PUBLIC_API_KEY_HEADER, COPILOT_CLOUD_VERSION, ConfigurationError, ConsoleColors, ConsoleStyles, CopilotKitAgentDiscoveryError, CopilotKitApiDiscoveryError, CopilotKitError, CopilotKitErrorCode, CopilotKitLowLevelError, CopilotKitMisuseError, CopilotKitRemoteEndpointDiscoveryError, CopilotKitVersionMismatchError, DEFAULT_AGENT_ID, ERROR_CONFIG, ERROR_NAMES, ErrorVisibility, MissingPublicApiKeyError, RUNTIME_MODE_INTELLIGENCE, RUNTIME_MODE_SSE, ResolvedCopilotKitError, Severity, TelemetryClient, TranscriptionErrorCode, TranscriptionErrors, UpgradeRequiredError, actionParametersToJsonSchema, convertJsonSchemaToZodSchema, createLicenseContextValue, dataToUUID, ensureStructuredError, executeConditions, finalizeRunEvents, getPossibleVersionMismatch, getZodParameters, isMacOS, isStructuredCopilotKitError, isTelemetryDisabled, isValidUUID, jsonSchemaToActionParameters, logCopilotKitPlatformMessage, logStyled, logger, parseJson, partialJSONParse, phoenixExponentialBackoff, publicApiKeyRequired, randomId, randomUUID, readBody, safeParseToolArgs, schemaToJsonSchema, styledConsole, tryMap };
|
|
24
38
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["packageJson.version"],"sources":["../src/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./utils\";\nexport * from \"./constants\";\nexport * from \"./telemetry\";\nexport * from \"./standard-schema\";\n\nexport { logger } from \"./logger\";\nexport { finalizeRunEvents } from \"./finalize-events\";\n\nexport {\n TranscriptionErrorCode,\n TranscriptionErrors,\n type TranscriptionErrorResponse,\n} from \"./transcription-errors\";\n\nimport * as packageJson from \"../package.json\";\nexport const COPILOTKIT_VERSION = packageJson.version;\n\nexport
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["packageJson.version"],"sources":["../src/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./utils\";\nexport * from \"./constants\";\nexport * from \"./telemetry\";\nexport * from \"./standard-schema\";\n\nexport { logger } from \"./logger\";\nexport { finalizeRunEvents } from \"./finalize-events\";\n\nexport {\n TranscriptionErrorCode,\n TranscriptionErrors,\n type TranscriptionErrorResponse,\n} from \"./transcription-errors\";\n\nimport * as packageJson from \"../package.json\";\nexport const COPILOTKIT_VERSION = packageJson.version;\n\n// Re-export only types from license-verifier (types are erased at compile time,\n// so they don't pull in the Node-only `crypto` dependency into client bundles).\n// Server-side packages (e.g. @copilotkit/runtime) should import runtime functions\n// like createLicenseChecker and getLicenseWarningHeader directly from\n// @copilotkit/license-verifier.\nexport type {\n LicenseContextValue,\n LicenseChecker,\n LicenseStatus,\n LicensePayload,\n LicenseFeatures,\n LicenseTier,\n LicenseOwner,\n LicenseMode,\n} from \"@copilotkit/license-verifier\";\n\n/**\n * Client-safe license context factory.\n *\n * When status is null (no token provided), all features return true\n * (unlicensed = unrestricted, with branding). This is inlined here to\n * avoid importing the full license-verifier bundle (which depends on\n * Node's `crypto`) into browser bundles.\n */\nexport function createLicenseContextValue(status: null): {\n status: null;\n license: null;\n checkFeature: (feature: string) => boolean;\n getLimit: (feature: string) => number | null;\n} {\n return {\n status: null,\n license: null,\n checkFeature: () => true,\n getLimit: () => null,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,MAAa,qBAAqBA;;;;;;;;;AA0BlC,SAAgB,0BAA0B,QAKxC;AACA,QAAO;EACL,QAAQ;EACR,SAAS;EACT,oBAAoB;EACpB,gBAAgB;EACjB"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1229,6 +1229,22 @@ ${getSeeMoreMarkdown(troubleshootingLink)}`;
|
|
|
1229
1229
|
//#endregion
|
|
1230
1230
|
//#region src/index.ts
|
|
1231
1231
|
const COPILOTKIT_VERSION = version;
|
|
1232
|
+
/**
|
|
1233
|
+
* Client-safe license context factory.
|
|
1234
|
+
*
|
|
1235
|
+
* When status is null (no token provided), all features return true
|
|
1236
|
+
* (unlicensed = unrestricted, with branding). This is inlined here to
|
|
1237
|
+
* avoid importing the full license-verifier bundle (which depends on
|
|
1238
|
+
* Node's `crypto`) into browser bundles.
|
|
1239
|
+
*/
|
|
1240
|
+
function createLicenseContextValue(status) {
|
|
1241
|
+
return {
|
|
1242
|
+
status: null,
|
|
1243
|
+
license: null,
|
|
1244
|
+
checkFeature: () => true,
|
|
1245
|
+
getLimit: () => null
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1232
1248
|
|
|
1233
1249
|
//#endregion
|
|
1234
1250
|
exports.AG_UI_CHANNEL_EVENT = AG_UI_CHANNEL_EVENT;
|
|
@@ -1265,6 +1281,7 @@ exports.TranscriptionErrors = TranscriptionErrors;
|
|
|
1265
1281
|
exports.UpgradeRequiredError = UpgradeRequiredError;
|
|
1266
1282
|
exports.actionParametersToJsonSchema = actionParametersToJsonSchema;
|
|
1267
1283
|
exports.convertJsonSchemaToZodSchema = convertJsonSchemaToZodSchema;
|
|
1284
|
+
exports.createLicenseContextValue = createLicenseContextValue;
|
|
1268
1285
|
exports.dataToUUID = dataToUUID;
|
|
1269
1286
|
exports.ensureStructuredError = ensureStructuredError;
|
|
1270
1287
|
exports.executeConditions = executeConditions;
|
|
@@ -1290,13 +1307,5 @@ exports.safeParseToolArgs = safeParseToolArgs;
|
|
|
1290
1307
|
exports.schemaToJsonSchema = schemaToJsonSchema;
|
|
1291
1308
|
exports.styledConsole = styledConsole;
|
|
1292
1309
|
exports.tryMap = tryMap;
|
|
1293
|
-
var _copilotkit_license_verifier = require("@copilotkit/license-verifier");
|
|
1294
|
-
Object.keys(_copilotkit_license_verifier).forEach(function (k) {
|
|
1295
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1296
|
-
enumerable: true,
|
|
1297
|
-
get: function () { return _copilotkit_license_verifier[k]; }
|
|
1298
|
-
});
|
|
1299
|
-
});
|
|
1300
|
-
|
|
1301
1310
|
});
|
|
1302
1311
|
//# sourceMappingURL=index.umd.js.map
|