@copilotkit/shared 1.51.4 → 1.51.5-next.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.
- package/CHANGELOG.md +8 -0
- package/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/constants/index.cjs +13 -0
- package/dist/constants/index.cjs.map +1 -0
- package/dist/constants/{index.d.ts → index.d.cts} +3 -1
- package/dist/constants/index.d.cts.map +1 -0
- package/dist/constants/index.d.mts +8 -0
- package/dist/constants/index.d.mts.map +1 -0
- package/dist/constants/index.mjs +8 -12
- package/dist/constants/index.mjs.map +1 -1
- package/dist/index.cjs +64 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +23 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +16 -123
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1017 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.mjs +6 -0
- package/dist/package.mjs.map +1 -0
- package/dist/telemetry/events.d.cts +47 -0
- package/dist/telemetry/events.d.cts.map +1 -0
- package/dist/telemetry/events.d.mts +47 -0
- package/dist/telemetry/events.d.mts.map +1 -0
- package/dist/telemetry/index.d.mts +1 -0
- package/dist/telemetry/scarf-client.cjs +29 -0
- package/dist/telemetry/scarf-client.cjs.map +1 -0
- package/dist/telemetry/scarf-client.mjs +27 -5
- package/dist/telemetry/scarf-client.mjs.map +1 -1
- package/dist/telemetry/telemetry-client.cjs +87 -0
- package/dist/telemetry/telemetry-client.cjs.map +1 -0
- package/dist/telemetry/telemetry-client.d.cts +48 -0
- package/dist/telemetry/telemetry-client.d.cts.map +1 -0
- package/dist/telemetry/telemetry-client.d.mts +48 -0
- package/dist/telemetry/telemetry-client.d.mts.map +1 -0
- package/dist/telemetry/telemetry-client.mjs +83 -9
- package/dist/telemetry/telemetry-client.mjs.map +1 -1
- package/dist/telemetry/utils.cjs +16 -0
- package/dist/telemetry/utils.cjs.map +1 -0
- package/dist/telemetry/utils.mjs +14 -8
- package/dist/telemetry/utils.mjs.map +1 -1
- package/dist/types/{action.d.ts → action.d.cts} +32 -32
- package/dist/types/action.d.cts.map +1 -0
- package/dist/types/action.d.mts +59 -0
- package/dist/types/action.d.mts.map +1 -0
- package/dist/types/copilot-cloud-config.d.cts +15 -0
- package/dist/types/copilot-cloud-config.d.cts.map +1 -0
- package/dist/types/copilot-cloud-config.d.mts +15 -0
- package/dist/types/copilot-cloud-config.d.mts.map +1 -0
- package/dist/types/error.d.cts +57 -0
- package/dist/types/error.d.cts.map +1 -0
- package/dist/types/error.d.mts +57 -0
- package/dist/types/error.d.mts.map +1 -0
- package/dist/types/message.d.cts +31 -0
- package/dist/types/message.d.cts.map +1 -0
- package/dist/types/message.d.mts +31 -0
- package/dist/types/message.d.mts.map +1 -0
- package/dist/types/openai-assistant.d.cts +55 -0
- package/dist/types/openai-assistant.d.cts.map +1 -0
- package/dist/types/openai-assistant.d.mts +55 -0
- package/dist/types/openai-assistant.d.mts.map +1 -0
- package/dist/types/utility.d.cts +6 -0
- package/dist/types/utility.d.cts.map +1 -0
- package/dist/types/utility.d.mts +6 -0
- package/dist/types/utility.d.mts.map +1 -0
- package/dist/utils/conditions.cjs +32 -0
- package/dist/utils/conditions.cjs.map +1 -0
- package/dist/utils/{conditions.d.ts → conditions.d.cts} +16 -11
- package/dist/utils/conditions.d.cts.map +1 -0
- package/dist/utils/conditions.d.mts +31 -0
- package/dist/utils/conditions.d.mts.map +1 -0
- package/dist/utils/conditions.mjs +30 -6
- package/dist/utils/conditions.mjs.map +1 -1
- package/dist/utils/console-styling.cjs +91 -0
- package/dist/utils/console-styling.cjs.map +1 -0
- package/dist/utils/console-styling.d.cts +65 -0
- package/dist/utils/console-styling.d.cts.map +1 -0
- package/dist/utils/console-styling.d.mts +65 -0
- package/dist/utils/console-styling.d.mts.map +1 -0
- package/dist/utils/console-styling.mjs +83 -15
- package/dist/utils/console-styling.mjs.map +1 -1
- package/dist/utils/errors.cjs +439 -0
- package/dist/utils/errors.cjs.map +1 -0
- package/dist/utils/{errors.d.ts → errors.d.cts} +188 -156
- package/dist/utils/errors.d.cts.map +1 -0
- package/dist/utils/errors.d.mts +312 -0
- package/dist/utils/errors.d.mts.map +1 -0
- package/dist/utils/errors.mjs +416 -63
- package/dist/utils/errors.mjs.map +1 -1
- package/dist/utils/index.cjs +50 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/{index.d.ts → index.d.cts} +10 -11
- package/dist/utils/index.d.cts.map +1 -0
- package/dist/utils/index.d.mts +31 -0
- package/dist/utils/index.d.mts.map +1 -0
- package/dist/utils/index.mjs +47 -107
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/json-schema.cjs +157 -0
- package/dist/utils/json-schema.cjs.map +1 -0
- package/dist/utils/{json-schema.d.ts → json-schema.d.cts} +19 -17
- package/dist/utils/json-schema.d.cts.map +1 -0
- package/dist/utils/json-schema.d.mts +36 -0
- package/dist/utils/json-schema.d.mts.map +1 -0
- package/dist/utils/json-schema.mjs +152 -12
- package/dist/utils/json-schema.mjs.map +1 -1
- package/dist/utils/random-id.cjs +38 -0
- package/dist/utils/random-id.cjs.map +1 -0
- package/dist/utils/{random-id.d.ts → random-id.d.cts} +3 -1
- package/dist/utils/random-id.d.cts.map +1 -0
- package/dist/utils/random-id.d.mts +8 -0
- package/dist/utils/random-id.d.mts.map +1 -0
- package/dist/utils/random-id.mjs +33 -12
- package/dist/utils/random-id.mjs.map +1 -1
- package/dist/utils/requests.cjs +58 -0
- package/dist/utils/requests.cjs.map +1 -0
- package/dist/utils/{requests.d.ts → requests.d.cts} +3 -1
- package/dist/utils/requests.d.cts.map +1 -0
- package/dist/utils/requests.d.mts +12 -0
- package/dist/utils/requests.d.mts.map +1 -0
- package/dist/utils/requests.mjs +56 -6
- package/dist/utils/requests.mjs.map +1 -1
- package/dist/utils/{types.d.ts → types.d.cts} +9 -7
- package/dist/utils/types.d.cts.map +1 -0
- package/dist/utils/types.d.mts +22 -0
- package/dist/utils/types.d.mts.map +1 -0
- package/package.json +17 -15
- package/src/types/message.ts +3 -1
- package/tsdown.config.ts +36 -0
- package/vitest.config.mjs +11 -0
- package/dist/chunk-2OJ5OJ2D.mjs +0 -1
- package/dist/chunk-2OJ5OJ2D.mjs.map +0 -1
- package/dist/chunk-3DK3UMRW.mjs +0 -217
- package/dist/chunk-3DK3UMRW.mjs.map +0 -1
- package/dist/chunk-6BE7PM2Q.mjs +0 -110
- package/dist/chunk-6BE7PM2Q.mjs.map +0 -1
- package/dist/chunk-BVVLGLFE.mjs +0 -435
- package/dist/chunk-BVVLGLFE.mjs.map +0 -1
- package/dist/chunk-FCCOSO5L.mjs +0 -1
- package/dist/chunk-FCCOSO5L.mjs.map +0 -1
- package/dist/chunk-GS5BLXSZ.mjs +0 -41
- package/dist/chunk-GS5BLXSZ.mjs.map +0 -1
- package/dist/chunk-HFJ7Q6KR.mjs +0 -38
- package/dist/chunk-HFJ7Q6KR.mjs.map +0 -1
- package/dist/chunk-IAFBVORQ.mjs +0 -1
- package/dist/chunk-IAFBVORQ.mjs.map +0 -1
- package/dist/chunk-M2RJI5BZ.mjs +0 -94
- package/dist/chunk-M2RJI5BZ.mjs.map +0 -1
- package/dist/chunk-MSUB6DGR.mjs +0 -1
- package/dist/chunk-MSUB6DGR.mjs.map +0 -1
- package/dist/chunk-N5EP5OD5.mjs +0 -1
- package/dist/chunk-N5EP5OD5.mjs.map +0 -1
- package/dist/chunk-NAFEBKSO.mjs +0 -1
- package/dist/chunk-NAFEBKSO.mjs.map +0 -1
- package/dist/chunk-P7STFMPO.mjs +0 -1
- package/dist/chunk-P7STFMPO.mjs.map +0 -1
- package/dist/chunk-UYARLQNA.mjs +0 -1
- package/dist/chunk-UYARLQNA.mjs.map +0 -1
- package/dist/chunk-V7BSERGI.mjs +0 -62
- package/dist/chunk-V7BSERGI.mjs.map +0 -1
- package/dist/chunk-WAZHII6M.mjs +0 -67
- package/dist/chunk-WAZHII6M.mjs.map +0 -1
- package/dist/chunk-XTHC46M2.mjs +0 -1
- package/dist/chunk-XTHC46M2.mjs.map +0 -1
- package/dist/chunk-ZIC6V6S5.mjs +0 -13
- package/dist/chunk-ZIC6V6S5.mjs.map +0 -1
- package/dist/chunk-ZUE2VR7D.mjs +0 -38
- package/dist/chunk-ZUE2VR7D.mjs.map +0 -1
- package/dist/constants/index.js +0 -40
- package/dist/constants/index.js.map +0 -1
- package/dist/index.d.ts +0 -25
- package/dist/index.js +0 -1138
- package/dist/index.js.map +0 -1
- package/dist/telemetry/events.d.ts +0 -45
- package/dist/telemetry/events.js +0 -19
- package/dist/telemetry/events.js.map +0 -1
- package/dist/telemetry/events.mjs +0 -1
- package/dist/telemetry/events.mjs.map +0 -1
- package/dist/telemetry/index.d.ts +0 -3
- package/dist/telemetry/index.js +0 -191
- package/dist/telemetry/index.js.map +0 -1
- package/dist/telemetry/index.mjs +0 -12
- package/dist/telemetry/index.mjs.map +0 -1
- package/dist/telemetry/scarf-client.d.ts +0 -7
- package/dist/telemetry/scarf-client.js +0 -59
- package/dist/telemetry/scarf-client.js.map +0 -1
- package/dist/telemetry/security-check.d.ts +0 -2
- package/dist/telemetry/security-check.js +0 -2
- package/dist/telemetry/security-check.js.map +0 -1
- package/dist/telemetry/security-check.mjs +0 -1
- package/dist/telemetry/security-check.mjs.map +0 -1
- package/dist/telemetry/telemetry-client.d.ts +0 -40
- package/dist/telemetry/telemetry-client.js +0 -189
- package/dist/telemetry/telemetry-client.js.map +0 -1
- package/dist/telemetry/utils.d.ts +0 -8
- package/dist/telemetry/utils.js +0 -73
- package/dist/telemetry/utils.js.map +0 -1
- package/dist/types/action.js +0 -19
- package/dist/types/action.js.map +0 -1
- package/dist/types/action.mjs +0 -2
- package/dist/types/action.mjs.map +0 -1
- package/dist/types/copilot-cloud-config.d.ts +0 -13
- package/dist/types/copilot-cloud-config.js +0 -19
- package/dist/types/copilot-cloud-config.js.map +0 -1
- package/dist/types/copilot-cloud-config.mjs +0 -2
- package/dist/types/copilot-cloud-config.mjs.map +0 -1
- package/dist/types/error.d.ts +0 -55
- package/dist/types/error.js +0 -19
- package/dist/types/error.js.map +0 -1
- package/dist/types/error.mjs +0 -2
- package/dist/types/error.mjs.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.js +0 -19
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -8
- package/dist/types/index.mjs.map +0 -1
- package/dist/types/message.d.ts +0 -28
- package/dist/types/message.js +0 -19
- package/dist/types/message.js.map +0 -1
- package/dist/types/message.mjs +0 -2
- package/dist/types/message.mjs.map +0 -1
- package/dist/types/openai-assistant.d.ts +0 -53
- package/dist/types/openai-assistant.js +0 -19
- package/dist/types/openai-assistant.js.map +0 -1
- package/dist/types/openai-assistant.mjs +0 -2
- package/dist/types/openai-assistant.mjs.map +0 -1
- package/dist/types/utility.d.ts +0 -6
- package/dist/types/utility.js +0 -19
- package/dist/types/utility.js.map +0 -1
- package/dist/types/utility.mjs +0 -2
- package/dist/types/utility.mjs.map +0 -1
- package/dist/utils/conditions.js +0 -86
- package/dist/utils/conditions.js.map +0 -1
- package/dist/utils/console-styling.d.ts +0 -84
- package/dist/utils/console-styling.js +0 -123
- package/dist/utils/console-styling.js.map +0 -1
- package/dist/utils/errors.js +0 -452
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/index.js +0 -964
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/json-schema.js +0 -244
- package/dist/utils/json-schema.js.map +0 -1
- package/dist/utils/random-id.js +0 -68
- package/dist/utils/random-id.js.map +0 -1
- package/dist/utils/requests.js +0 -91
- package/dist/utils/requests.js.map +0 -1
- package/dist/utils/types.js +0 -19
- package/dist/utils/types.js.map +0 -1
- package/dist/utils/types.mjs +0 -2
- package/dist/utils/types.mjs.map +0 -1
- package/jest.config.js +0 -5
- package/rollup.config.mjs +0 -54
- package/tsup.config.ts +0 -15
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/telemetry/telemetry-client.ts
|
|
31
|
-
var telemetry_client_exports = {};
|
|
32
|
-
__export(telemetry_client_exports, {
|
|
33
|
-
TelemetryClient: () => TelemetryClient,
|
|
34
|
-
isTelemetryDisabled: () => isTelemetryDisabled
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(telemetry_client_exports);
|
|
37
|
-
var import_analytics_node = require("@segment/analytics-node");
|
|
38
|
-
|
|
39
|
-
// src/telemetry/utils.ts
|
|
40
|
-
var import_chalk = __toESM(require("chalk"));
|
|
41
|
-
function flattenObject(obj, parentKey = "", res = {}) {
|
|
42
|
-
for (let key in obj) {
|
|
43
|
-
const propName = parentKey ? `${parentKey}.${key}` : key;
|
|
44
|
-
if (typeof obj[key] === "object" && obj[key] !== null) {
|
|
45
|
-
flattenObject(obj[key], propName, res);
|
|
46
|
-
} else {
|
|
47
|
-
res[propName] = obj[key];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return res;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// src/telemetry/telemetry-client.ts
|
|
54
|
-
var import_uuid = require("uuid");
|
|
55
|
-
|
|
56
|
-
// package.json
|
|
57
|
-
var version = "1.51.4";
|
|
58
|
-
|
|
59
|
-
// src/telemetry/scarf-client.ts
|
|
60
|
-
var SCARF_BASE_URL = `https://copilotkit.gateway.scarf.sh/${version}`;
|
|
61
|
-
var ScarfClient = class {
|
|
62
|
-
constructor() {
|
|
63
|
-
}
|
|
64
|
-
async logEvent(properties) {
|
|
65
|
-
try {
|
|
66
|
-
const controller = new AbortController();
|
|
67
|
-
const timeoutId = setTimeout(() => controller.abort(), 3e3);
|
|
68
|
-
const queryParams = new URLSearchParams();
|
|
69
|
-
Object.entries(properties).forEach(([key, value]) => {
|
|
70
|
-
if (value !== null && value !== void 0) {
|
|
71
|
-
queryParams.append(key, String(value));
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
const url = `${SCARF_BASE_URL}?${queryParams.toString()}`;
|
|
75
|
-
const response = await fetch(url, {
|
|
76
|
-
method: "GET",
|
|
77
|
-
signal: controller.signal
|
|
78
|
-
});
|
|
79
|
-
clearTimeout(timeoutId);
|
|
80
|
-
if (!response.ok) {
|
|
81
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
82
|
-
}
|
|
83
|
-
} catch {
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
var scarf_client_default = new ScarfClient();
|
|
88
|
-
|
|
89
|
-
// src/telemetry/telemetry-client.ts
|
|
90
|
-
function isTelemetryDisabled() {
|
|
91
|
-
return process.env.COPILOTKIT_TELEMETRY_DISABLED === "true" || process.env.COPILOTKIT_TELEMETRY_DISABLED === "1" || process.env.DO_NOT_TRACK === "true" || process.env.DO_NOT_TRACK === "1";
|
|
92
|
-
}
|
|
93
|
-
var TelemetryClient = class {
|
|
94
|
-
constructor({
|
|
95
|
-
packageName,
|
|
96
|
-
packageVersion,
|
|
97
|
-
telemetryDisabled,
|
|
98
|
-
telemetryBaseUrl,
|
|
99
|
-
sampleRate
|
|
100
|
-
}) {
|
|
101
|
-
this.globalProperties = {};
|
|
102
|
-
this.cloudConfiguration = null;
|
|
103
|
-
this.telemetryDisabled = false;
|
|
104
|
-
this.sampleRate = 0.05;
|
|
105
|
-
this.anonymousId = `anon_${(0, import_uuid.v4)()}`;
|
|
106
|
-
this.packageName = packageName;
|
|
107
|
-
this.packageVersion = packageVersion;
|
|
108
|
-
this.telemetryDisabled = telemetryDisabled || isTelemetryDisabled();
|
|
109
|
-
if (this.telemetryDisabled) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.setSampleRate(sampleRate);
|
|
113
|
-
const writeKey = process.env.COPILOTKIT_SEGMENT_WRITE_KEY || "n7XAZtQCGS2v1vvBy3LgBCv2h3Y8whja";
|
|
114
|
-
this.segment = new import_analytics_node.Analytics({
|
|
115
|
-
writeKey
|
|
116
|
-
});
|
|
117
|
-
this.setGlobalProperties({
|
|
118
|
-
"copilotkit.package.name": packageName,
|
|
119
|
-
"copilotkit.package.version": packageVersion
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
shouldSendEvent() {
|
|
123
|
-
const randomNumber = Math.random();
|
|
124
|
-
return randomNumber < this.sampleRate;
|
|
125
|
-
}
|
|
126
|
-
async capture(event, properties) {
|
|
127
|
-
if (!this.shouldSendEvent() || !this.segment) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
const flattenedProperties = flattenObject(properties);
|
|
131
|
-
const propertiesWithGlobal = {
|
|
132
|
-
...this.globalProperties,
|
|
133
|
-
...flattenedProperties
|
|
134
|
-
};
|
|
135
|
-
const orderedPropertiesWithGlobal = Object.keys(propertiesWithGlobal).sort().reduce(
|
|
136
|
-
(obj, key) => {
|
|
137
|
-
obj[key] = propertiesWithGlobal[key];
|
|
138
|
-
return obj;
|
|
139
|
-
},
|
|
140
|
-
{}
|
|
141
|
-
);
|
|
142
|
-
this.segment.track({
|
|
143
|
-
anonymousId: this.anonymousId,
|
|
144
|
-
event,
|
|
145
|
-
properties: { ...orderedPropertiesWithGlobal }
|
|
146
|
-
});
|
|
147
|
-
await scarf_client_default.logEvent({
|
|
148
|
-
event
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
setGlobalProperties(properties) {
|
|
152
|
-
const flattenedProperties = flattenObject(properties);
|
|
153
|
-
this.globalProperties = {
|
|
154
|
-
...this.globalProperties,
|
|
155
|
-
...flattenedProperties
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
setCloudConfiguration(properties) {
|
|
159
|
-
this.cloudConfiguration = properties;
|
|
160
|
-
this.setGlobalProperties({
|
|
161
|
-
cloud: {
|
|
162
|
-
publicApiKey: properties.publicApiKey,
|
|
163
|
-
baseUrl: properties.baseUrl
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
setSampleRate(sampleRate) {
|
|
168
|
-
let _sampleRate;
|
|
169
|
-
_sampleRate = sampleRate ?? 0.05;
|
|
170
|
-
if (process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE) {
|
|
171
|
-
_sampleRate = parseFloat(process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE);
|
|
172
|
-
}
|
|
173
|
-
if (_sampleRate < 0 || _sampleRate > 1) {
|
|
174
|
-
throw new Error("Sample rate must be between 0 and 1");
|
|
175
|
-
}
|
|
176
|
-
this.sampleRate = _sampleRate;
|
|
177
|
-
this.setGlobalProperties({
|
|
178
|
-
sampleRate: this.sampleRate,
|
|
179
|
-
sampleRateAdjustmentFactor: 1 - this.sampleRate,
|
|
180
|
-
sampleWeight: 1 / this.sampleRate
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
-
0 && (module.exports = {
|
|
186
|
-
TelemetryClient,
|
|
187
|
-
isTelemetryDisabled
|
|
188
|
-
});
|
|
189
|
-
//# sourceMappingURL=telemetry-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/telemetry/telemetry-client.ts","../../src/telemetry/utils.ts","../../package.json","../../src/telemetry/scarf-client.ts"],"sourcesContent":["import { Analytics } from \"@segment/analytics-node\";\nimport { AnalyticsEvents } from \"./events\";\nimport { flattenObject } from \"./utils\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport scarfClient from \"./scarf-client\";\n\n/**\n * Checks if telemetry is disabled via environment variables.\n * Users can opt out by setting:\n * - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1\n * - DO_NOT_TRACK=true or DO_NOT_TRACK=1\n */\nexport function isTelemetryDisabled(): boolean {\n return (\n (process.env as Record<string, string | undefined>)\n .COPILOTKIT_TELEMETRY_DISABLED === \"true\" ||\n (process.env as Record<string, string | undefined>)\n .COPILOTKIT_TELEMETRY_DISABLED === \"1\" ||\n (process.env as Record<string, string | undefined>).DO_NOT_TRACK ===\n \"true\" ||\n (process.env as Record<string, string | undefined>).DO_NOT_TRACK === \"1\"\n );\n}\n\nexport class TelemetryClient {\n segment: Analytics | undefined;\n globalProperties: Record<string, any> = {};\n cloudConfiguration: { publicApiKey: string; baseUrl: string } | null = null;\n packageName: string;\n packageVersion: string;\n private telemetryDisabled: boolean = false;\n private sampleRate: number = 0.05;\n private anonymousId = `anon_${uuidv4()}`;\n\n constructor({\n packageName,\n packageVersion,\n telemetryDisabled,\n telemetryBaseUrl,\n sampleRate,\n }: {\n packageName: string;\n packageVersion: string;\n telemetryDisabled?: boolean;\n telemetryBaseUrl?: string;\n sampleRate?: number;\n }) {\n this.packageName = packageName;\n this.packageVersion = packageVersion;\n this.telemetryDisabled = telemetryDisabled || isTelemetryDisabled();\n\n if (this.telemetryDisabled) {\n return;\n }\n\n this.setSampleRate(sampleRate);\n\n // eslint-disable-next-line\n const writeKey =\n process.env.COPILOTKIT_SEGMENT_WRITE_KEY ||\n \"n7XAZtQCGS2v1vvBy3LgBCv2h3Y8whja\";\n\n this.segment = new Analytics({\n writeKey,\n });\n\n this.setGlobalProperties({\n \"copilotkit.package.name\": packageName,\n \"copilotkit.package.version\": packageVersion,\n });\n }\n\n private shouldSendEvent() {\n const randomNumber = Math.random();\n return randomNumber < this.sampleRate;\n }\n\n async capture<K extends keyof AnalyticsEvents>(\n event: K,\n properties: AnalyticsEvents[K],\n ) {\n if (!this.shouldSendEvent() || !this.segment) {\n return;\n }\n\n const flattenedProperties = flattenObject(properties);\n const propertiesWithGlobal = {\n ...this.globalProperties,\n ...flattenedProperties,\n };\n const orderedPropertiesWithGlobal = Object.keys(propertiesWithGlobal)\n .sort()\n .reduce(\n (obj, key) => {\n obj[key] = propertiesWithGlobal[key];\n return obj;\n },\n {} as Record<string, any>,\n );\n\n this.segment.track({\n anonymousId: this.anonymousId,\n event,\n properties: { ...orderedPropertiesWithGlobal },\n });\n\n await scarfClient.logEvent({\n event,\n });\n }\n\n setGlobalProperties(properties: Record<string, any>) {\n const flattenedProperties = flattenObject(properties);\n this.globalProperties = {\n ...this.globalProperties,\n ...flattenedProperties,\n };\n }\n\n setCloudConfiguration(properties: { publicApiKey: string; baseUrl: string }) {\n this.cloudConfiguration = properties;\n\n this.setGlobalProperties({\n cloud: {\n publicApiKey: properties.publicApiKey,\n baseUrl: properties.baseUrl,\n },\n });\n }\n\n private setSampleRate(sampleRate: number | undefined) {\n let _sampleRate: number;\n\n _sampleRate = sampleRate ?? 0.05;\n\n // eslint-disable-next-line\n if (process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE) {\n // eslint-disable-next-line\n _sampleRate = parseFloat(process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE);\n }\n\n if (_sampleRate < 0 || _sampleRate > 1) {\n throw new Error(\"Sample rate must be between 0 and 1\");\n }\n\n this.sampleRate = _sampleRate;\n this.setGlobalProperties({\n sampleRate: this.sampleRate,\n sampleRateAdjustmentFactor: 1 - this.sampleRate,\n sampleWeight: 1 / this.sampleRate,\n });\n }\n}\n","import chalk from \"chalk\";\n\nexport function flattenObject(\n obj: Record<string, any>,\n parentKey = \"\",\n res: Record<string, any> = {},\n): Record<string, any> {\n for (let key in obj) {\n const propName = parentKey ? `${parentKey}.${key}` : key;\n if (typeof obj[key] === \"object\" && obj[key] !== null) {\n flattenObject(obj[key], propName, res);\n } else {\n res[propName] = obj[key];\n }\n }\n return res;\n}\n\nexport function printSecurityNotice(advisory: {\n advisory: string | null;\n message: string;\n severity: \"low\" | \"medium\" | \"high\" | \"none\";\n}) {\n const severityColor =\n {\n low: chalk.blue,\n medium: chalk.yellow,\n high: chalk.red,\n }[advisory.severity.toLowerCase()] || chalk.white;\n\n console.log();\n console.log(\n `━━━━━━━━━━━━━━━━━━ ${chalk.bold(`CopilotKit`)} ━━━━━━━━━━━━━━━━━━`,\n );\n console.log();\n console.log(\n `${chalk.bold(`Severity: ${severityColor(advisory.severity.toUpperCase())}`)}`,\n );\n console.log();\n console.log(`${chalk.bold(advisory.message)}`);\n console.log();\n console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);\n}\n","{\n \"name\": \"@copilotkit/shared\",\n \"private\": false,\n \"homepage\": \"https://github.com/CopilotKit/CopilotKit\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/CopilotKit/CopilotKit.git\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"version\": \"1.51.4\",\n \"sideEffects\": false,\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\"\n }\n },\n \"unpkg\": \"./dist/index.umd.js\",\n \"jsdelivr\": \"./dist/index.umd.js\",\n \"types\": \"./dist/index.d.ts\",\n \"license\": \"MIT\",\n \"scripts\": {\n \"build\": \"tsup --clean && rollup -c rollup.config.mjs\",\n \"dev\": \"tsup --watch --no-splitting\",\n \"test\": \"jest --passWithNoTests\",\n \"check-types\": \"tsc --noEmit\",\n \"link:global\": \"pnpm link --global\",\n \"unlink:global\": \"pnpm unlink --global\"\n },\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/uuid\": \"^10.0.0\",\n \"eslint\": \"^8.56.0\",\n \"eslint-config-custom\": \"workspace:*\",\n \"jest\": \"^29.6.4\",\n \"ts-jest\": \"^29.1.1\",\n \"tsconfig\": \"workspace:*\",\n \"tsup\": \"^6.7.0\",\n \"typescript\": \"^5.2.3\",\n \"zod-to-json-schema\": \"^3.23.5\"\n },\n \"dependencies\": {\n \"@segment/analytics-node\": \"^2.1.2\",\n \"chalk\": \"4.1.2\",\n \"graphql\": \"^16.8.1\",\n \"uuid\": \"^10.0.0\",\n \"zod\": \"^3.23.3\"\n },\n \"peerDependencies\": {\n \"@ag-ui/core\": \"^0.0.43\"\n },\n \"keywords\": [\n \"copilotkit\",\n \"copilot\",\n \"react\",\n \"nextjs\",\n \"nodejs\",\n \"ai\",\n \"assistant\",\n \"javascript\",\n \"automation\",\n \"textarea\"\n ]\n}\n","import * as packageJson from \"../../package.json\";\n\nconst SCARF_BASE_URL = `https://copilotkit.gateway.scarf.sh/${packageJson.version}`;\n\nclass ScarfClient {\n constructor() {}\n\n async logEvent(properties: Record<string, any>): Promise<void> {\n try {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), 3000);\n\n const queryParams = new URLSearchParams();\n\n Object.entries(properties).forEach(([key, value]) => {\n if (value !== null && value !== undefined) {\n queryParams.append(key, String(value));\n }\n });\n\n const url = `${SCARF_BASE_URL}?${queryParams.toString()}`;\n\n const response = await fetch(url, {\n method: \"GET\",\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n } catch {\n // Silently fail - telemetry should not break the application\n }\n }\n}\n\nexport default new ScarfClient();\n"],"mappings":"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","names":["uuidv4"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare function flattenObject(obj: Record<string, any>, parentKey?: string, res?: Record<string, any>): Record<string, any>;
|
|
2
|
-
declare function printSecurityNotice(advisory: {
|
|
3
|
-
advisory: string | null;
|
|
4
|
-
message: string;
|
|
5
|
-
severity: "low" | "medium" | "high" | "none";
|
|
6
|
-
}): void;
|
|
7
|
-
|
|
8
|
-
export { flattenObject, printSecurityNotice };
|
package/dist/telemetry/utils.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/telemetry/utils.ts
|
|
31
|
-
var utils_exports = {};
|
|
32
|
-
__export(utils_exports, {
|
|
33
|
-
flattenObject: () => flattenObject,
|
|
34
|
-
printSecurityNotice: () => printSecurityNotice
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(utils_exports);
|
|
37
|
-
var import_chalk = __toESM(require("chalk"));
|
|
38
|
-
function flattenObject(obj, parentKey = "", res = {}) {
|
|
39
|
-
for (let key in obj) {
|
|
40
|
-
const propName = parentKey ? `${parentKey}.${key}` : key;
|
|
41
|
-
if (typeof obj[key] === "object" && obj[key] !== null) {
|
|
42
|
-
flattenObject(obj[key], propName, res);
|
|
43
|
-
} else {
|
|
44
|
-
res[propName] = obj[key];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return res;
|
|
48
|
-
}
|
|
49
|
-
function printSecurityNotice(advisory) {
|
|
50
|
-
const severityColor = {
|
|
51
|
-
low: import_chalk.default.blue,
|
|
52
|
-
medium: import_chalk.default.yellow,
|
|
53
|
-
high: import_chalk.default.red
|
|
54
|
-
}[advisory.severity.toLowerCase()] || import_chalk.default.white;
|
|
55
|
-
console.log();
|
|
56
|
-
console.log(
|
|
57
|
-
`\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 ${import_chalk.default.bold(`CopilotKit`)} \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501`
|
|
58
|
-
);
|
|
59
|
-
console.log();
|
|
60
|
-
console.log(
|
|
61
|
-
`${import_chalk.default.bold(`Severity: ${severityColor(advisory.severity.toUpperCase())}`)}`
|
|
62
|
-
);
|
|
63
|
-
console.log();
|
|
64
|
-
console.log(`${import_chalk.default.bold(advisory.message)}`);
|
|
65
|
-
console.log();
|
|
66
|
-
console.log(`\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501`);
|
|
67
|
-
}
|
|
68
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
-
0 && (module.exports = {
|
|
70
|
-
flattenObject,
|
|
71
|
-
printSecurityNotice
|
|
72
|
-
});
|
|
73
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/telemetry/utils.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport function flattenObject(\n obj: Record<string, any>,\n parentKey = \"\",\n res: Record<string, any> = {},\n): Record<string, any> {\n for (let key in obj) {\n const propName = parentKey ? `${parentKey}.${key}` : key;\n if (typeof obj[key] === \"object\" && obj[key] !== null) {\n flattenObject(obj[key], propName, res);\n } else {\n res[propName] = obj[key];\n }\n }\n return res;\n}\n\nexport function printSecurityNotice(advisory: {\n advisory: string | null;\n message: string;\n severity: \"low\" | \"medium\" | \"high\" | \"none\";\n}) {\n const severityColor =\n {\n low: chalk.blue,\n medium: chalk.yellow,\n high: chalk.red,\n }[advisory.severity.toLowerCase()] || chalk.white;\n\n console.log();\n console.log(\n `━━━━━━━━━━━━━━━━━━ ${chalk.bold(`CopilotKit`)} ━━━━━━━━━━━━━━━━━━`,\n );\n console.log();\n console.log(\n `${chalk.bold(`Severity: ${severityColor(advisory.severity.toUpperCase())}`)}`,\n );\n console.log();\n console.log(`${chalk.bold(advisory.message)}`);\n console.log();\n console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAEX,SAAS,cACd,KACA,YAAY,IACZ,MAA2B,CAAC,GACP;AACrB,WAAS,OAAO,KAAK;AACnB,UAAM,WAAW,YAAY,GAAG,aAAa,QAAQ;AACrD,QAAI,OAAO,IAAI,GAAG,MAAM,YAAY,IAAI,GAAG,MAAM,MAAM;AACrD,oBAAc,IAAI,GAAG,GAAG,UAAU,GAAG;AAAA,IACvC,OAAO;AACL,UAAI,QAAQ,IAAI,IAAI,GAAG;AAAA,IACzB;AAAA,EACF;AACA,SAAO;AACT;AAEO,SAAS,oBAAoB,UAIjC;AACD,QAAM,gBACJ;AAAA,IACE,KAAK,aAAAA,QAAM;AAAA,IACX,QAAQ,aAAAA,QAAM;AAAA,IACd,MAAM,aAAAA,QAAM;AAAA,EACd,EAAE,SAAS,SAAS,YAAY,CAAC,KAAK,aAAAA,QAAM;AAE9C,UAAQ,IAAI;AACZ,UAAQ;AAAA,IACN,gHAAsB,aAAAA,QAAM,KAAK,YAAY;AAAA,EAC/C;AACA,UAAQ,IAAI;AACZ,UAAQ;AAAA,IACN,GAAG,aAAAA,QAAM,KAAK,aAAa,cAAc,SAAS,SAAS,YAAY,CAAC,GAAG;AAAA,EAC7E;AACA,UAAQ,IAAI;AACZ,UAAQ,IAAI,GAAG,aAAAA,QAAM,KAAK,SAAS,OAAO,GAAG;AAC7C,UAAQ,IAAI;AACZ,UAAQ,IAAI,kSAAkD;AAChE;","names":["chalk"]}
|
package/dist/types/action.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/action.ts
|
|
17
|
-
var action_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(action_exports);
|
|
19
|
-
//# sourceMappingURL=action.js.map
|
package/dist/types/action.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/action.ts"],"sourcesContent":["type TypeMap = {\n string: string;\n number: number;\n boolean: boolean;\n object: object;\n \"string[]\": string[];\n \"number[]\": number[];\n \"boolean[]\": boolean[];\n \"object[]\": object[];\n};\n\ntype AbstractParameter = {\n name: string;\n type?: keyof TypeMap;\n description?: string;\n required?: boolean;\n};\n\ninterface StringParameter extends AbstractParameter {\n type: \"string\";\n enum?: string[];\n}\n\ninterface ObjectParameter extends AbstractParameter {\n type: \"object\";\n attributes?: Parameter[];\n}\n\ninterface ObjectArrayParameter extends AbstractParameter {\n type: \"object[]\";\n attributes?: Parameter[];\n}\n\ntype SpecialParameters =\n | StringParameter\n | ObjectParameter\n | ObjectArrayParameter;\ninterface BaseParameter extends AbstractParameter {\n type?: Exclude<AbstractParameter[\"type\"], SpecialParameters[\"type\"]>;\n}\n\nexport type Parameter = BaseParameter | SpecialParameters;\n\ntype OptionalParameterType<P extends AbstractParameter> =\n P[\"required\"] extends false ? undefined : never;\n\ntype StringParameterType<P> = P extends StringParameter\n ? P extends { enum?: Array<infer E> }\n ? E\n : string\n : never;\n\ntype ObjectParameterType<P> = P extends ObjectParameter\n ? P extends { attributes?: infer Attributes extends Parameter[] }\n ? MappedParameterTypes<Attributes>\n : object\n : never;\n\ntype ObjectArrayParameterType<P> = P extends ObjectArrayParameter\n ? P extends { attributes?: infer Attributes extends Parameter[] }\n ? MappedParameterTypes<Attributes>[]\n : any[]\n : never;\n\ntype MappedTypeOrString<T> = T extends keyof TypeMap ? TypeMap[T] : string;\ntype BaseParameterType<P extends AbstractParameter> = P extends {\n type: infer T;\n}\n ? T extends BaseParameter[\"type\"]\n ? MappedTypeOrString<T>\n : never\n : string;\n\nexport type MappedParameterTypes<T extends Parameter[] | [] = []> = T extends []\n ? Record<string, any>\n : {\n [P in T[number] as P[\"name\"]]:\n | OptionalParameterType<P>\n | StringParameterType<P>\n | ObjectParameterType<P>\n | ObjectArrayParameterType<P>\n | BaseParameterType<P>;\n };\n\nexport type Action<T extends Parameter[] | [] = []> = {\n name: string;\n description?: string;\n parameters?: T;\n handler?: T extends []\n ? () => any | Promise<any>\n : (args: MappedParameterTypes<T>) => any | Promise<any>;\n additionalConfig?: Record<string, any>;\n};\n\n// This is the original \"ceiling is being raised\" version of MappedParameterTypes.\n//\n// ceiling is being raised. cursor's copilot helped us write \"superhuman code\"\n// for a critical feature. We can read this code, but VERY few engineers out\n// there could write it from scratch.\n// Took lots of convincing too. \"come on, this must be possible, try harder\".\n// and obviously- done in parts.\n//\n// - https://twitter.com/ataiiam/status/1765089261374914957\n// (Mar 5, 2024)\n//\n// export type MappedParameterTypes<T extends Parameter[]> = {\n// // Check if the parameter has an 'enum' defined\n// [P in T[number] as P[\"name\"]]: P extends { enum: Array<infer E> }\n// ? E extends string // Ensure the enum values are strings\n// ? P[\"required\"] extends false // Check if the parameter is optional\n// ? E | undefined // If so, include 'undefined' in the type\n// : E // Otherwise, use the enum type directly\n// : never // This case should not occur since 'enum' implies string values\n// : // Handle parameters defined as 'object' with specified attributes\n// P extends { type: \"object\"; attributes: infer Attributes }\n// ? Attributes extends Parameter[]\n// ? MappedParameterTypes<Attributes> // Recursively map the attributes of the object\n// : never // If 'attributes' is not an array of Parameters, this is invalid\n// : // Handle parameters defined as 'object[]' without specified attributes\n// P extends { type: \"object[]\"; attributes?: never }\n// ? any[] // Default to 'any[]' for arrays of objects without specific attributes\n// : // Handle parameters defined as 'object[]' with specified attributes\n// P extends { type: \"object[]\"; attributes: infer Attributes }\n// ? Attributes extends Parameter[]\n// ? MappedParameterTypes<Attributes>[] // Recursively map each object in the array\n// : any[] // Default to 'any[]' if attributes are not properly defined\n// : // Handle all other parameter types\n// P[\"required\"] extends false\n// ? // Include 'undefined' for optional parameters\n// TypeMap[P[\"type\"] extends keyof TypeMap ? P[\"type\"] : \"string\"] | undefined\n// : // Use the direct mapping from 'TypeMap' for the parameter's type\n// TypeMap[P[\"type\"] extends keyof TypeMap ? P[\"type\"] : \"string\"];\n// };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/action.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/copilot-cloud-config.ts
|
|
17
|
-
var copilot_cloud_config_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(copilot_cloud_config_exports);
|
|
19
|
-
//# sourceMappingURL=copilot-cloud-config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/copilot-cloud-config.ts"],"sourcesContent":["export interface CopilotCloudConfig {\n guardrails: {\n input: {\n restrictToTopic: {\n enabled: boolean;\n validTopics: string[];\n invalidTopics: string[];\n };\n };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/error.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
interface CopilotErrorEvent {
|
|
2
|
-
type: "error" | "request" | "response" | "agent_state" | "action" | "message" | "performance";
|
|
3
|
-
timestamp: number;
|
|
4
|
-
context: CopilotRequestContext;
|
|
5
|
-
error?: any;
|
|
6
|
-
}
|
|
7
|
-
interface CopilotRequestContext {
|
|
8
|
-
threadId?: string;
|
|
9
|
-
runId?: string;
|
|
10
|
-
source: "runtime" | "ui" | "agent" | "network";
|
|
11
|
-
request?: {
|
|
12
|
-
operation: string;
|
|
13
|
-
method?: string;
|
|
14
|
-
url?: string;
|
|
15
|
-
path?: string;
|
|
16
|
-
headers?: Record<string, string>;
|
|
17
|
-
body?: any;
|
|
18
|
-
startTime: number;
|
|
19
|
-
};
|
|
20
|
-
response?: {
|
|
21
|
-
status?: number;
|
|
22
|
-
statusText?: string;
|
|
23
|
-
headers?: Record<string, string>;
|
|
24
|
-
body?: any;
|
|
25
|
-
endTime: number;
|
|
26
|
-
latency: number;
|
|
27
|
-
};
|
|
28
|
-
agent?: {
|
|
29
|
-
name?: string;
|
|
30
|
-
nodeName?: string;
|
|
31
|
-
state?: any;
|
|
32
|
-
};
|
|
33
|
-
messages?: {
|
|
34
|
-
input?: any[];
|
|
35
|
-
output?: any[];
|
|
36
|
-
messageCount?: number;
|
|
37
|
-
};
|
|
38
|
-
technical?: {
|
|
39
|
-
userAgent?: string;
|
|
40
|
-
host?: string;
|
|
41
|
-
environment?: string;
|
|
42
|
-
version?: string;
|
|
43
|
-
stackTrace?: string;
|
|
44
|
-
};
|
|
45
|
-
performance?: {
|
|
46
|
-
requestDuration?: number;
|
|
47
|
-
streamingDuration?: number;
|
|
48
|
-
actionExecutionTime?: number;
|
|
49
|
-
memoryUsage?: number;
|
|
50
|
-
};
|
|
51
|
-
metadata?: Record<string, any>;
|
|
52
|
-
}
|
|
53
|
-
type CopilotErrorHandler = (errorEvent: CopilotErrorEvent) => void | Promise<void>;
|
|
54
|
-
|
|
55
|
-
export { CopilotErrorEvent, CopilotErrorHandler, CopilotRequestContext };
|
package/dist/types/error.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/error.ts
|
|
17
|
-
var error_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(error_exports);
|
|
19
|
-
//# sourceMappingURL=error.js.map
|
package/dist/types/error.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/error.ts"],"sourcesContent":["export interface CopilotErrorEvent {\n type:\n | \"error\"\n | \"request\"\n | \"response\"\n | \"agent_state\"\n | \"action\"\n | \"message\"\n | \"performance\";\n timestamp: number;\n context: CopilotRequestContext;\n error?: any; // Present when type is 'error'\n}\n\nexport interface CopilotRequestContext {\n // Basic identifiers\n threadId?: string;\n runId?: string;\n source: \"runtime\" | \"ui\" | \"agent\" | \"network\";\n\n // Request details\n request?: {\n operation: string;\n method?: string;\n url?: string;\n path?: string;\n headers?: Record<string, string>;\n body?: any;\n startTime: number;\n };\n\n // Response details\n response?: {\n status?: number;\n statusText?: string;\n headers?: Record<string, string>;\n body?: any;\n endTime: number;\n latency: number;\n };\n\n // Agent context\n agent?: {\n name?: string;\n nodeName?: string;\n state?: any;\n };\n\n // Message flow context\n messages?: {\n input?: any[];\n output?: any[];\n messageCount?: number;\n };\n\n // Technical context\n technical?: {\n userAgent?: string;\n host?: string;\n environment?: string;\n version?: string;\n stackTrace?: string;\n };\n\n // Performance metrics\n performance?: {\n requestDuration?: number;\n streamingDuration?: number;\n actionExecutionTime?: number;\n memoryUsage?: number;\n };\n\n // Extensible metadata\n metadata?: Record<string, any>;\n}\n\nexport type CopilotErrorHandler = (\n errorEvent: CopilotErrorEvent,\n) => void | Promise<void>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/error.mjs
DELETED
package/dist/types/error.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { AssistantMessage, CoAgentStateRenderHandler, CoAgentStateRenderHandlerArguments, FunctionCallHandler, FunctionCallHandlerArguments, FunctionDefinition, JSONValue, ToolDefinition } from './openai-assistant.js';
|
|
2
|
-
export { Action, MappedParameterTypes, Parameter } from './action.js';
|
|
3
|
-
export { CopilotCloudConfig } from './copilot-cloud-config.js';
|
|
4
|
-
export { PartialBy, RequiredBy } from './utility.js';
|
|
5
|
-
export { CopilotErrorEvent, CopilotErrorHandler, CopilotRequestContext } from './error.js';
|
|
6
|
-
export { AIMessage, ActivityMessage, DeveloperMessage, ImageData, Message, Role, SystemMessage, ToolCall, ToolResult, UserMessage } from './message.js';
|
|
7
|
-
import '@ag-ui/core';
|
package/dist/types/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/index.ts
|
|
17
|
-
var types_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(types_exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from \"./openai-assistant\";\nexport * from \"./action\";\nexport * from \"./copilot-cloud-config\";\nexport * from \"./utility\";\nexport * from \"./error\";\nexport * from \"./message\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/index.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "../chunk-N5EP5OD5.mjs";
|
|
2
|
-
import "../chunk-NAFEBKSO.mjs";
|
|
3
|
-
import "../chunk-MSUB6DGR.mjs";
|
|
4
|
-
import "../chunk-2OJ5OJ2D.mjs";
|
|
5
|
-
import "../chunk-UYARLQNA.mjs";
|
|
6
|
-
import "../chunk-IAFBVORQ.mjs";
|
|
7
|
-
import "../chunk-FCCOSO5L.mjs";
|
|
8
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/message.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import agui from '@ag-ui/core';
|
|
2
|
-
|
|
3
|
-
interface ImageData {
|
|
4
|
-
format: string;
|
|
5
|
-
bytes: string;
|
|
6
|
-
}
|
|
7
|
-
type Role = agui.Role;
|
|
8
|
-
type SystemMessage = agui.SystemMessage;
|
|
9
|
-
type DeveloperMessage = agui.DeveloperMessage;
|
|
10
|
-
type ToolCall = agui.ToolCall;
|
|
11
|
-
type ActivityMessage = agui.ActivityMessage;
|
|
12
|
-
type ToolResult = agui.ToolMessage & {
|
|
13
|
-
toolName?: string;
|
|
14
|
-
};
|
|
15
|
-
type AIMessage = agui.AssistantMessage & {
|
|
16
|
-
generativeUI?: (props?: any) => any;
|
|
17
|
-
generativeUIPosition?: "before" | "after";
|
|
18
|
-
agentName?: string;
|
|
19
|
-
state?: any;
|
|
20
|
-
image?: ImageData;
|
|
21
|
-
runId?: string;
|
|
22
|
-
};
|
|
23
|
-
type UserMessage = agui.UserMessage & {
|
|
24
|
-
image?: ImageData;
|
|
25
|
-
};
|
|
26
|
-
type Message = AIMessage | ToolResult | UserMessage | SystemMessage | DeveloperMessage | ActivityMessage;
|
|
27
|
-
|
|
28
|
-
export { AIMessage, ActivityMessage, DeveloperMessage, ImageData, Message, Role, SystemMessage, ToolCall, ToolResult, UserMessage };
|
package/dist/types/message.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/message.ts
|
|
17
|
-
var message_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(message_exports);
|
|
19
|
-
//# sourceMappingURL=message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/message.ts"],"sourcesContent":["import agui from \"@ag-ui/core\";\n\nexport interface ImageData {\n format: string;\n bytes: string;\n}\n\n// Pass through types\nexport type Role = agui.Role;\nexport type SystemMessage = agui.SystemMessage;\nexport type DeveloperMessage = agui.DeveloperMessage;\nexport type ToolCall = agui.ToolCall;\nexport type ActivityMessage = agui.ActivityMessage;\n\n// Extended message types\nexport type ToolResult = agui.ToolMessage & {\n toolName?: string;\n};\n\nexport type AIMessage = agui.AssistantMessage & {\n generativeUI?: (props?: any) => any;\n generativeUIPosition?: \"before\" | \"after\";\n agentName?: string;\n state?: any;\n image?: ImageData;\n runId?: string;\n};\n\nexport type UserMessage = agui.UserMessage & {\n image?: ImageData;\n};\n\nexport type Message =\n | AIMessage\n | ToolResult\n | UserMessage\n | SystemMessage\n | DeveloperMessage\n | ActivityMessage;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/message.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|