@copilotkit/shared 1.51.5-next.0 → 1.51.5-next.2
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 +4 -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.ts → message.d.cts} +14 -12
- 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 +16 -14
- 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-7KOT4KP4.mjs +0 -435
- package/dist/chunk-7KOT4KP4.mjs.map +0 -1
- package/dist/chunk-DE5XAMMI.mjs +0 -110
- package/dist/chunk-DE5XAMMI.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-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-ZI7ZVRL3.mjs +0 -38
- package/dist/chunk-ZI7ZVRL3.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.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
package/dist/package.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
package/dist/package.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.mjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/telemetry/events.d.ts
|
|
2
|
+
type AnalyticsEvents = {
|
|
3
|
+
"oss.runtime.instance_created": RuntimeInstanceCreatedInfo;
|
|
4
|
+
"oss.runtime.copilot_request_created": {
|
|
5
|
+
"cloud.guardrails.enabled": boolean;
|
|
6
|
+
requestType: string;
|
|
7
|
+
"cloud.api_key_provided": boolean;
|
|
8
|
+
"cloud.public_api_key"?: string;
|
|
9
|
+
"cloud.base_url"?: string;
|
|
10
|
+
};
|
|
11
|
+
"oss.runtime.server_action_executed": {};
|
|
12
|
+
"oss.runtime.remote_action_executed": RemoteActionExecutionInfo;
|
|
13
|
+
"oss.runtime.agent_execution_stream_started": {
|
|
14
|
+
hashedLgcKey?: string;
|
|
15
|
+
};
|
|
16
|
+
"oss.runtime.agent_execution_stream_ended": AgentExecutionResponseInfo;
|
|
17
|
+
"oss.runtime.agent_execution_stream_errored": {
|
|
18
|
+
hashedLgcKey?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
interface RuntimeInstanceCreatedInfo {
|
|
23
|
+
actionsAmount: number;
|
|
24
|
+
endpointTypes: string[];
|
|
25
|
+
hashedLgcKey?: string;
|
|
26
|
+
endpointsAmount: number;
|
|
27
|
+
agentsAmount?: number | null;
|
|
28
|
+
"cloud.api_key_provided": boolean;
|
|
29
|
+
"cloud.public_api_key"?: string;
|
|
30
|
+
"cloud.base_url"?: string;
|
|
31
|
+
}
|
|
32
|
+
interface RemoteActionExecutionInfo {
|
|
33
|
+
agentExecution: boolean;
|
|
34
|
+
type: "self-hosted" | "langgraph-platform";
|
|
35
|
+
agentsAmount?: number | null;
|
|
36
|
+
hashedLgcKey?: string;
|
|
37
|
+
}
|
|
38
|
+
interface AgentExecutionResponseInfo {
|
|
39
|
+
provider?: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
langGraphHost?: string;
|
|
42
|
+
langGraphVersion?: string;
|
|
43
|
+
hashedLgcKey?: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { AnalyticsEvents };
|
|
47
|
+
//# sourceMappingURL=events.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.cts","names":[],"sources":["../../src/telemetry/events.ts"],"mappings":";KAAY,eAAA;EACV,8BAAA,EAAgC,0BAAA;EAChC,qCAAA;IACE,0BAAA;IACA,WAAA;IACA,wBAAA;IACA,sBAAA;IACA,gBAAA;EAAA;EAEF,oCAAA;EACA,oCAAA,EAAsC,yBAAA;EACtC,4CAAA;IAAgD,YAAA;EAAA;EAChD,0CAAA,EAA4C,0BAAA;EAC5C,4CAAA;IACE,YAAA;IACA,KAAA;EAAA;AAAA;AAAA,UAIa,0BAAA;EACf,aAAA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,YAAA;EACA,wBAAA;EACA,sBAAA;EACA,gBAAA;AAAA;AAAA,UAGe,yBAAA;EACf,cAAA;EACA,IAAA;EACA,YAAA;EACA,YAAA;AAAA;AAAA,UAGe,0BAAA;EACf,QAAA;EACA,KAAA;EACA,aAAA;EACA,gBAAA;EACA,YAAA;AAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/telemetry/events.d.ts
|
|
2
|
+
type AnalyticsEvents = {
|
|
3
|
+
"oss.runtime.instance_created": RuntimeInstanceCreatedInfo;
|
|
4
|
+
"oss.runtime.copilot_request_created": {
|
|
5
|
+
"cloud.guardrails.enabled": boolean;
|
|
6
|
+
requestType: string;
|
|
7
|
+
"cloud.api_key_provided": boolean;
|
|
8
|
+
"cloud.public_api_key"?: string;
|
|
9
|
+
"cloud.base_url"?: string;
|
|
10
|
+
};
|
|
11
|
+
"oss.runtime.server_action_executed": {};
|
|
12
|
+
"oss.runtime.remote_action_executed": RemoteActionExecutionInfo;
|
|
13
|
+
"oss.runtime.agent_execution_stream_started": {
|
|
14
|
+
hashedLgcKey?: string;
|
|
15
|
+
};
|
|
16
|
+
"oss.runtime.agent_execution_stream_ended": AgentExecutionResponseInfo;
|
|
17
|
+
"oss.runtime.agent_execution_stream_errored": {
|
|
18
|
+
hashedLgcKey?: string;
|
|
19
|
+
error?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
interface RuntimeInstanceCreatedInfo {
|
|
23
|
+
actionsAmount: number;
|
|
24
|
+
endpointTypes: string[];
|
|
25
|
+
hashedLgcKey?: string;
|
|
26
|
+
endpointsAmount: number;
|
|
27
|
+
agentsAmount?: number | null;
|
|
28
|
+
"cloud.api_key_provided": boolean;
|
|
29
|
+
"cloud.public_api_key"?: string;
|
|
30
|
+
"cloud.base_url"?: string;
|
|
31
|
+
}
|
|
32
|
+
interface RemoteActionExecutionInfo {
|
|
33
|
+
agentExecution: boolean;
|
|
34
|
+
type: "self-hosted" | "langgraph-platform";
|
|
35
|
+
agentsAmount?: number | null;
|
|
36
|
+
hashedLgcKey?: string;
|
|
37
|
+
}
|
|
38
|
+
interface AgentExecutionResponseInfo {
|
|
39
|
+
provider?: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
langGraphHost?: string;
|
|
42
|
+
langGraphVersion?: string;
|
|
43
|
+
hashedLgcKey?: string;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { AnalyticsEvents };
|
|
47
|
+
//# sourceMappingURL=events.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.mts","names":[],"sources":["../../src/telemetry/events.ts"],"mappings":";KAAY,eAAA;EACV,8BAAA,EAAgC,0BAAA;EAChC,qCAAA;IACE,0BAAA;IACA,WAAA;IACA,wBAAA;IACA,sBAAA;IACA,gBAAA;EAAA;EAEF,oCAAA;EACA,oCAAA,EAAsC,yBAAA;EACtC,4CAAA;IAAgD,YAAA;EAAA;EAChD,0CAAA,EAA4C,0BAAA;EAC5C,4CAAA;IACE,YAAA;IACA,KAAA;EAAA;AAAA;AAAA,UAIa,0BAAA;EACf,aAAA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,YAAA;EACA,wBAAA;EACA,sBAAA;EACA,gBAAA;AAAA;AAAA,UAGe,yBAAA;EACf,cAAA;EACA,IAAA;EACA,YAAA;EACA,YAAA;AAAA;AAAA,UAGe,0BAAA;EACf,QAAA;EACA,KAAA;EACA,aAAA;EACA,gBAAA;EACA,YAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TelemetryClient, isTelemetryDisabled } from "./telemetry-client.mjs";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_package = require('../package.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/telemetry/scarf-client.ts
|
|
4
|
+
const SCARF_BASE_URL = `https://copilotkit.gateway.scarf.sh/${require_package.version}`;
|
|
5
|
+
var ScarfClient = class {
|
|
6
|
+
constructor() {}
|
|
7
|
+
async logEvent(properties) {
|
|
8
|
+
try {
|
|
9
|
+
const controller = new AbortController();
|
|
10
|
+
const timeoutId = setTimeout(() => controller.abort(), 3e3);
|
|
11
|
+
const queryParams = new URLSearchParams();
|
|
12
|
+
Object.entries(properties).forEach(([key, value]) => {
|
|
13
|
+
if (value !== null && value !== void 0) queryParams.append(key, String(value));
|
|
14
|
+
});
|
|
15
|
+
const url = `${SCARF_BASE_URL}?${queryParams.toString()}`;
|
|
16
|
+
const response = await fetch(url, {
|
|
17
|
+
method: "GET",
|
|
18
|
+
signal: controller.signal
|
|
19
|
+
});
|
|
20
|
+
clearTimeout(timeoutId);
|
|
21
|
+
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var scarf_client_default = new ScarfClient();
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.default = scarf_client_default;
|
|
29
|
+
//# sourceMappingURL=scarf-client.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scarf-client.cjs","names":[],"sources":["../../src/telemetry/scarf-client.ts"],"sourcesContent":["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":";;;AAEA,MAAM,iBAAiB;AAEvB,IAAM,cAAN,MAAkB;CAChB,cAAc;CAEd,MAAM,SAAS,YAAgD;AAC7D,MAAI;GACF,MAAM,aAAa,IAAI,iBAAiB;GACxC,MAAM,YAAY,iBAAiB,WAAW,OAAO,EAAE,IAAK;GAE5D,MAAM,cAAc,IAAI,iBAAiB;AAEzC,UAAO,QAAQ,WAAW,CAAC,SAAS,CAAC,KAAK,WAAW;AACnD,QAAI,UAAU,QAAQ,UAAU,OAC9B,aAAY,OAAO,KAAK,OAAO,MAAM,CAAC;KAExC;GAEF,MAAM,MAAM,GAAG,eAAe,GAAG,YAAY,UAAU;GAEvD,MAAM,WAAW,MAAM,MAAM,KAAK;IAChC,QAAQ;IACR,QAAQ,WAAW;IACpB,CAAC;AAEF,gBAAa,UAAU;AAEvB,OAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,uBAAuB,SAAS,SAAS;UAErD;;;AAMZ,2BAAe,IAAI,aAAa"}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { version } from "../package.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/telemetry/scarf-client.ts
|
|
4
|
+
const SCARF_BASE_URL = `https://copilotkit.gateway.scarf.sh/${version}`;
|
|
5
|
+
var ScarfClient = class {
|
|
6
|
+
constructor() {}
|
|
7
|
+
async logEvent(properties) {
|
|
8
|
+
try {
|
|
9
|
+
const controller = new AbortController();
|
|
10
|
+
const timeoutId = setTimeout(() => controller.abort(), 3e3);
|
|
11
|
+
const queryParams = new URLSearchParams();
|
|
12
|
+
Object.entries(properties).forEach(([key, value]) => {
|
|
13
|
+
if (value !== null && value !== void 0) queryParams.append(key, String(value));
|
|
14
|
+
});
|
|
15
|
+
const url = `${SCARF_BASE_URL}?${queryParams.toString()}`;
|
|
16
|
+
const response = await fetch(url, {
|
|
17
|
+
method: "GET",
|
|
18
|
+
signal: controller.signal
|
|
19
|
+
});
|
|
20
|
+
clearTimeout(timeoutId);
|
|
21
|
+
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
6
24
|
};
|
|
25
|
+
var scarf_client_default = new ScarfClient();
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { scarf_client_default as default };
|
|
7
29
|
//# sourceMappingURL=scarf-client.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"
|
|
1
|
+
{"version":3,"file":"scarf-client.mjs","names":["packageJson.version"],"sources":["../../src/telemetry/scarf-client.ts"],"sourcesContent":["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":";;;AAEA,MAAM,iBAAiB,uCAAuCA;AAE9D,IAAM,cAAN,MAAkB;CAChB,cAAc;CAEd,MAAM,SAAS,YAAgD;AAC7D,MAAI;GACF,MAAM,aAAa,IAAI,iBAAiB;GACxC,MAAM,YAAY,iBAAiB,WAAW,OAAO,EAAE,IAAK;GAE5D,MAAM,cAAc,IAAI,iBAAiB;AAEzC,UAAO,QAAQ,WAAW,CAAC,SAAS,CAAC,KAAK,WAAW;AACnD,QAAI,UAAU,QAAQ,UAAU,OAC9B,aAAY,OAAO,KAAK,OAAO,MAAM,CAAC;KAExC;GAEF,MAAM,MAAM,GAAG,eAAe,GAAG,YAAY,UAAU;GAEvD,MAAM,WAAW,MAAM,MAAM,KAAK;IAChC,QAAQ;IACR,QAAQ,WAAW;IACpB,CAAC;AAEF,gBAAa,UAAU;AAEvB,OAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,uBAAuB,SAAS,SAAS;UAErD;;;AAMZ,2BAAe,IAAI,aAAa"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_utils = require('./utils.cjs');
|
|
3
|
+
const require_scarf_client = require('./scarf-client.cjs');
|
|
4
|
+
let uuid = require("uuid");
|
|
5
|
+
let _segment_analytics_node = require("@segment/analytics-node");
|
|
6
|
+
|
|
7
|
+
//#region src/telemetry/telemetry-client.ts
|
|
8
|
+
/**
|
|
9
|
+
* Checks if telemetry is disabled via environment variables.
|
|
10
|
+
* Users can opt out by setting:
|
|
11
|
+
* - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1
|
|
12
|
+
* - DO_NOT_TRACK=true or DO_NOT_TRACK=1
|
|
13
|
+
*/
|
|
14
|
+
function isTelemetryDisabled() {
|
|
15
|
+
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";
|
|
16
|
+
}
|
|
17
|
+
var TelemetryClient = class {
|
|
18
|
+
constructor({ packageName, packageVersion, telemetryDisabled, telemetryBaseUrl, sampleRate }) {
|
|
19
|
+
this.globalProperties = {};
|
|
20
|
+
this.cloudConfiguration = null;
|
|
21
|
+
this.telemetryDisabled = false;
|
|
22
|
+
this.sampleRate = .05;
|
|
23
|
+
this.anonymousId = `anon_${(0, uuid.v4)()}`;
|
|
24
|
+
this.packageName = packageName;
|
|
25
|
+
this.packageVersion = packageVersion;
|
|
26
|
+
this.telemetryDisabled = telemetryDisabled || isTelemetryDisabled();
|
|
27
|
+
if (this.telemetryDisabled) return;
|
|
28
|
+
this.setSampleRate(sampleRate);
|
|
29
|
+
this.segment = new _segment_analytics_node.Analytics({ writeKey: process.env.COPILOTKIT_SEGMENT_WRITE_KEY || "n7XAZtQCGS2v1vvBy3LgBCv2h3Y8whja" });
|
|
30
|
+
this.setGlobalProperties({
|
|
31
|
+
"copilotkit.package.name": packageName,
|
|
32
|
+
"copilotkit.package.version": packageVersion
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
shouldSendEvent() {
|
|
36
|
+
return Math.random() < this.sampleRate;
|
|
37
|
+
}
|
|
38
|
+
async capture(event, properties) {
|
|
39
|
+
if (!this.shouldSendEvent() || !this.segment) return;
|
|
40
|
+
const flattenedProperties = require_utils.flattenObject(properties);
|
|
41
|
+
const propertiesWithGlobal = {
|
|
42
|
+
...this.globalProperties,
|
|
43
|
+
...flattenedProperties
|
|
44
|
+
};
|
|
45
|
+
const orderedPropertiesWithGlobal = Object.keys(propertiesWithGlobal).sort().reduce((obj, key) => {
|
|
46
|
+
obj[key] = propertiesWithGlobal[key];
|
|
47
|
+
return obj;
|
|
48
|
+
}, {});
|
|
49
|
+
this.segment.track({
|
|
50
|
+
anonymousId: this.anonymousId,
|
|
51
|
+
event,
|
|
52
|
+
properties: { ...orderedPropertiesWithGlobal }
|
|
53
|
+
});
|
|
54
|
+
await require_scarf_client.default.logEvent({ event });
|
|
55
|
+
}
|
|
56
|
+
setGlobalProperties(properties) {
|
|
57
|
+
const flattenedProperties = require_utils.flattenObject(properties);
|
|
58
|
+
this.globalProperties = {
|
|
59
|
+
...this.globalProperties,
|
|
60
|
+
...flattenedProperties
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
setCloudConfiguration(properties) {
|
|
64
|
+
this.cloudConfiguration = properties;
|
|
65
|
+
this.setGlobalProperties({ cloud: {
|
|
66
|
+
publicApiKey: properties.publicApiKey,
|
|
67
|
+
baseUrl: properties.baseUrl
|
|
68
|
+
} });
|
|
69
|
+
}
|
|
70
|
+
setSampleRate(sampleRate) {
|
|
71
|
+
let _sampleRate;
|
|
72
|
+
_sampleRate = sampleRate ?? .05;
|
|
73
|
+
if (process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE) _sampleRate = parseFloat(process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE);
|
|
74
|
+
if (_sampleRate < 0 || _sampleRate > 1) throw new Error("Sample rate must be between 0 and 1");
|
|
75
|
+
this.sampleRate = _sampleRate;
|
|
76
|
+
this.setGlobalProperties({
|
|
77
|
+
sampleRate: this.sampleRate,
|
|
78
|
+
sampleRateAdjustmentFactor: 1 - this.sampleRate,
|
|
79
|
+
sampleWeight: 1 / this.sampleRate
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
exports.TelemetryClient = TelemetryClient;
|
|
86
|
+
exports.isTelemetryDisabled = isTelemetryDisabled;
|
|
87
|
+
//# sourceMappingURL=telemetry-client.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-client.cjs","names":["Analytics","flattenObject","scarfClient"],"sources":["../../src/telemetry/telemetry-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"],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,sBAA+B;AAC7C,QACG,QAAQ,IACN,kCAAkC,UACpC,QAAQ,IACN,kCAAkC,OACpC,QAAQ,IAA2C,iBAClD,UACD,QAAQ,IAA2C,iBAAiB;;AAIzE,IAAa,kBAAb,MAA6B;CAU3B,YAAY,EACV,aACA,gBACA,mBACA,kBACA,cAOC;0BApBqC,EAAE;4BAC6B;2BAGlC;oBACR;qBACP,sBAAgB;AAepC,OAAK,cAAc;AACnB,OAAK,iBAAiB;AACtB,OAAK,oBAAoB,qBAAqB,qBAAqB;AAEnE,MAAI,KAAK,kBACP;AAGF,OAAK,cAAc,WAAW;AAO9B,OAAK,UAAU,IAAIA,kCAAU,EAC3B,UAJA,QAAQ,IAAI,gCACZ,oCAID,CAAC;AAEF,OAAK,oBAAoB;GACvB,2BAA2B;GAC3B,8BAA8B;GAC/B,CAAC;;CAGJ,AAAQ,kBAAkB;AAExB,SADqB,KAAK,QAAQ,GACZ,KAAK;;CAG7B,MAAM,QACJ,OACA,YACA;AACA,MAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,KAAK,QACnC;EAGF,MAAM,sBAAsBC,4BAAc,WAAW;EACrD,MAAM,uBAAuB;GAC3B,GAAG,KAAK;GACR,GAAG;GACJ;EACD,MAAM,8BAA8B,OAAO,KAAK,qBAAqB,CAClE,MAAM,CACN,QACE,KAAK,QAAQ;AACZ,OAAI,OAAO,qBAAqB;AAChC,UAAO;KAET,EAAE,CACH;AAEH,OAAK,QAAQ,MAAM;GACjB,aAAa,KAAK;GAClB;GACA,YAAY,EAAE,GAAG,6BAA6B;GAC/C,CAAC;AAEF,QAAMC,6BAAY,SAAS,EACzB,OACD,CAAC;;CAGJ,oBAAoB,YAAiC;EACnD,MAAM,sBAAsBD,4BAAc,WAAW;AACrD,OAAK,mBAAmB;GACtB,GAAG,KAAK;GACR,GAAG;GACJ;;CAGH,sBAAsB,YAAuD;AAC3E,OAAK,qBAAqB;AAE1B,OAAK,oBAAoB,EACvB,OAAO;GACL,cAAc,WAAW;GACzB,SAAS,WAAW;GACrB,EACF,CAAC;;CAGJ,AAAQ,cAAc,YAAgC;EACpD,IAAI;AAEJ,gBAAc,cAAc;AAG5B,MAAI,QAAQ,IAAI,iCAEd,eAAc,WAAW,QAAQ,IAAI,iCAAiC;AAGxE,MAAI,cAAc,KAAK,cAAc,EACnC,OAAM,IAAI,MAAM,sCAAsC;AAGxD,OAAK,aAAa;AAClB,OAAK,oBAAoB;GACvB,YAAY,KAAK;GACjB,4BAA4B,IAAI,KAAK;GACrC,cAAc,IAAI,KAAK;GACxB,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AnalyticsEvents } from "./events.cjs";
|
|
2
|
+
import { Analytics } from "@segment/analytics-node";
|
|
3
|
+
|
|
4
|
+
//#region src/telemetry/telemetry-client.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Checks if telemetry is disabled via environment variables.
|
|
7
|
+
* Users can opt out by setting:
|
|
8
|
+
* - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1
|
|
9
|
+
* - DO_NOT_TRACK=true or DO_NOT_TRACK=1
|
|
10
|
+
*/
|
|
11
|
+
declare function isTelemetryDisabled(): boolean;
|
|
12
|
+
declare class TelemetryClient {
|
|
13
|
+
segment: Analytics | undefined;
|
|
14
|
+
globalProperties: Record<string, any>;
|
|
15
|
+
cloudConfiguration: {
|
|
16
|
+
publicApiKey: string;
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
} | null;
|
|
19
|
+
packageName: string;
|
|
20
|
+
packageVersion: string;
|
|
21
|
+
private telemetryDisabled;
|
|
22
|
+
private sampleRate;
|
|
23
|
+
private anonymousId;
|
|
24
|
+
constructor({
|
|
25
|
+
packageName,
|
|
26
|
+
packageVersion,
|
|
27
|
+
telemetryDisabled,
|
|
28
|
+
telemetryBaseUrl,
|
|
29
|
+
sampleRate
|
|
30
|
+
}: {
|
|
31
|
+
packageName: string;
|
|
32
|
+
packageVersion: string;
|
|
33
|
+
telemetryDisabled?: boolean;
|
|
34
|
+
telemetryBaseUrl?: string;
|
|
35
|
+
sampleRate?: number;
|
|
36
|
+
});
|
|
37
|
+
private shouldSendEvent;
|
|
38
|
+
capture<K extends keyof AnalyticsEvents>(event: K, properties: AnalyticsEvents[K]): Promise<void>;
|
|
39
|
+
setGlobalProperties(properties: Record<string, any>): void;
|
|
40
|
+
setCloudConfiguration(properties: {
|
|
41
|
+
publicApiKey: string;
|
|
42
|
+
baseUrl: string;
|
|
43
|
+
}): void;
|
|
44
|
+
private setSampleRate;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { TelemetryClient, isTelemetryDisabled };
|
|
48
|
+
//# sourceMappingURL=telemetry-client.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-client.d.cts","names":[],"sources":["../../src/telemetry/telemetry-client.ts"],"mappings":";;;;;;AAYA;;;;iBAAgB,mBAAA,CAAA;AAAA,cAYH,eAAA;EACX,OAAA,EAAS,SAAA;EACT,gBAAA,EAAkB,MAAA;EAClB,kBAAA;IAAsB,YAAA;IAAsB,OAAA;EAAA;EAC5C,WAAA;EACA,cAAA;EAAA,QACQ,iBAAA;EAAA,QACA,UAAA;EAAA,QACA,WAAA;;IAGN,WAAA;IACA,cAAA;IACA,iBAAA;IACA,gBAAA;IACA;EAAA;IAEA,WAAA;IACA,cAAA;IACA,iBAAA;IACA,gBAAA;IACA,UAAA;EAAA;EAAA,QA2BM,eAAA;EAKF,OAAA,iBAAwB,eAAA,CAAA,CAC5B,KAAA,EAAO,CAAA,EACP,UAAA,EAAY,eAAA,CAAgB,CAAA,IAAE,OAAA;EAgChC,mBAAA,CAAoB,UAAA,EAAY,MAAA;EAQhC,qBAAA,CAAsB,UAAA;IAAc,YAAA;IAAsB,OAAA;EAAA;EAAA,QAWlD,aAAA;AAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AnalyticsEvents } from "./events.mjs";
|
|
2
|
+
import { Analytics } from "@segment/analytics-node";
|
|
3
|
+
|
|
4
|
+
//#region src/telemetry/telemetry-client.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Checks if telemetry is disabled via environment variables.
|
|
7
|
+
* Users can opt out by setting:
|
|
8
|
+
* - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1
|
|
9
|
+
* - DO_NOT_TRACK=true or DO_NOT_TRACK=1
|
|
10
|
+
*/
|
|
11
|
+
declare function isTelemetryDisabled(): boolean;
|
|
12
|
+
declare class TelemetryClient {
|
|
13
|
+
segment: Analytics | undefined;
|
|
14
|
+
globalProperties: Record<string, any>;
|
|
15
|
+
cloudConfiguration: {
|
|
16
|
+
publicApiKey: string;
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
} | null;
|
|
19
|
+
packageName: string;
|
|
20
|
+
packageVersion: string;
|
|
21
|
+
private telemetryDisabled;
|
|
22
|
+
private sampleRate;
|
|
23
|
+
private anonymousId;
|
|
24
|
+
constructor({
|
|
25
|
+
packageName,
|
|
26
|
+
packageVersion,
|
|
27
|
+
telemetryDisabled,
|
|
28
|
+
telemetryBaseUrl,
|
|
29
|
+
sampleRate
|
|
30
|
+
}: {
|
|
31
|
+
packageName: string;
|
|
32
|
+
packageVersion: string;
|
|
33
|
+
telemetryDisabled?: boolean;
|
|
34
|
+
telemetryBaseUrl?: string;
|
|
35
|
+
sampleRate?: number;
|
|
36
|
+
});
|
|
37
|
+
private shouldSendEvent;
|
|
38
|
+
capture<K extends keyof AnalyticsEvents>(event: K, properties: AnalyticsEvents[K]): Promise<void>;
|
|
39
|
+
setGlobalProperties(properties: Record<string, any>): void;
|
|
40
|
+
setCloudConfiguration(properties: {
|
|
41
|
+
publicApiKey: string;
|
|
42
|
+
baseUrl: string;
|
|
43
|
+
}): void;
|
|
44
|
+
private setSampleRate;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { TelemetryClient, isTelemetryDisabled };
|
|
48
|
+
//# sourceMappingURL=telemetry-client.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-client.d.mts","names":[],"sources":["../../src/telemetry/telemetry-client.ts"],"mappings":";;;;;;AAYA;;;;iBAAgB,mBAAA,CAAA;AAAA,cAYH,eAAA;EACX,OAAA,EAAS,SAAA;EACT,gBAAA,EAAkB,MAAA;EAClB,kBAAA;IAAsB,YAAA;IAAsB,OAAA;EAAA;EAC5C,WAAA;EACA,cAAA;EAAA,QACQ,iBAAA;EAAA,QACA,UAAA;EAAA,QACA,WAAA;;IAGN,WAAA;IACA,cAAA;IACA,iBAAA;IACA,gBAAA;IACA;EAAA;IAEA,WAAA;IACA,cAAA;IACA,iBAAA;IACA,gBAAA;IACA,UAAA;EAAA;EAAA,QA2BM,eAAA;EAKF,OAAA,iBAAwB,eAAA,CAAA,CAC5B,KAAA,EAAO,CAAA,EACP,UAAA,EAAY,eAAA,CAAgB,CAAA,IAAE,OAAA;EAgChC,mBAAA,CAAoB,UAAA,EAAY,MAAA;EAQhC,qBAAA,CAAsB,UAAA;IAAc,YAAA;IAAsB,OAAA;EAAA;EAAA,QAWlD,aAAA;AAAA"}
|
|
@@ -1,11 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { flattenObject } from "./utils.mjs";
|
|
2
|
+
import scarf_client_default from "./scarf-client.mjs";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
import { Analytics } from "@segment/analytics-node";
|
|
5
|
+
|
|
6
|
+
//#region src/telemetry/telemetry-client.ts
|
|
7
|
+
/**
|
|
8
|
+
* Checks if telemetry is disabled via environment variables.
|
|
9
|
+
* Users can opt out by setting:
|
|
10
|
+
* - COPILOTKIT_TELEMETRY_DISABLED=true or COPILOTKIT_TELEMETRY_DISABLED=1
|
|
11
|
+
* - DO_NOT_TRACK=true or DO_NOT_TRACK=1
|
|
12
|
+
*/
|
|
13
|
+
function isTelemetryDisabled() {
|
|
14
|
+
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";
|
|
15
|
+
}
|
|
16
|
+
var TelemetryClient = class {
|
|
17
|
+
constructor({ packageName, packageVersion, telemetryDisabled, telemetryBaseUrl, sampleRate }) {
|
|
18
|
+
this.globalProperties = {};
|
|
19
|
+
this.cloudConfiguration = null;
|
|
20
|
+
this.telemetryDisabled = false;
|
|
21
|
+
this.sampleRate = .05;
|
|
22
|
+
this.anonymousId = `anon_${v4()}`;
|
|
23
|
+
this.packageName = packageName;
|
|
24
|
+
this.packageVersion = packageVersion;
|
|
25
|
+
this.telemetryDisabled = telemetryDisabled || isTelemetryDisabled();
|
|
26
|
+
if (this.telemetryDisabled) return;
|
|
27
|
+
this.setSampleRate(sampleRate);
|
|
28
|
+
this.segment = new Analytics({ writeKey: process.env.COPILOTKIT_SEGMENT_WRITE_KEY || "n7XAZtQCGS2v1vvBy3LgBCv2h3Y8whja" });
|
|
29
|
+
this.setGlobalProperties({
|
|
30
|
+
"copilotkit.package.name": packageName,
|
|
31
|
+
"copilotkit.package.version": packageVersion
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
shouldSendEvent() {
|
|
35
|
+
return Math.random() < this.sampleRate;
|
|
36
|
+
}
|
|
37
|
+
async capture(event, properties) {
|
|
38
|
+
if (!this.shouldSendEvent() || !this.segment) return;
|
|
39
|
+
const flattenedProperties = flattenObject(properties);
|
|
40
|
+
const propertiesWithGlobal = {
|
|
41
|
+
...this.globalProperties,
|
|
42
|
+
...flattenedProperties
|
|
43
|
+
};
|
|
44
|
+
const orderedPropertiesWithGlobal = Object.keys(propertiesWithGlobal).sort().reduce((obj, key) => {
|
|
45
|
+
obj[key] = propertiesWithGlobal[key];
|
|
46
|
+
return obj;
|
|
47
|
+
}, {});
|
|
48
|
+
this.segment.track({
|
|
49
|
+
anonymousId: this.anonymousId,
|
|
50
|
+
event,
|
|
51
|
+
properties: { ...orderedPropertiesWithGlobal }
|
|
52
|
+
});
|
|
53
|
+
await scarf_client_default.logEvent({ event });
|
|
54
|
+
}
|
|
55
|
+
setGlobalProperties(properties) {
|
|
56
|
+
const flattenedProperties = flattenObject(properties);
|
|
57
|
+
this.globalProperties = {
|
|
58
|
+
...this.globalProperties,
|
|
59
|
+
...flattenedProperties
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
setCloudConfiguration(properties) {
|
|
63
|
+
this.cloudConfiguration = properties;
|
|
64
|
+
this.setGlobalProperties({ cloud: {
|
|
65
|
+
publicApiKey: properties.publicApiKey,
|
|
66
|
+
baseUrl: properties.baseUrl
|
|
67
|
+
} });
|
|
68
|
+
}
|
|
69
|
+
setSampleRate(sampleRate) {
|
|
70
|
+
let _sampleRate;
|
|
71
|
+
_sampleRate = sampleRate ?? .05;
|
|
72
|
+
if (process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE) _sampleRate = parseFloat(process.env.COPILOTKIT_TELEMETRY_SAMPLE_RATE);
|
|
73
|
+
if (_sampleRate < 0 || _sampleRate > 1) throw new Error("Sample rate must be between 0 and 1");
|
|
74
|
+
this.sampleRate = _sampleRate;
|
|
75
|
+
this.setGlobalProperties({
|
|
76
|
+
sampleRate: this.sampleRate,
|
|
77
|
+
sampleRateAdjustmentFactor: 1 - this.sampleRate,
|
|
78
|
+
sampleWeight: 1 / this.sampleRate
|
|
79
|
+
});
|
|
80
|
+
}
|
|
10
81
|
};
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { TelemetryClient, isTelemetryDisabled };
|
|
11
85
|
//# sourceMappingURL=telemetry-client.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"telemetry-client.mjs","names":["uuidv4","scarfClient"],"sources":["../../src/telemetry/telemetry-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"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,sBAA+B;AAC7C,QACG,QAAQ,IACN,kCAAkC,UACpC,QAAQ,IACN,kCAAkC,OACpC,QAAQ,IAA2C,iBAClD,UACD,QAAQ,IAA2C,iBAAiB;;AAIzE,IAAa,kBAAb,MAA6B;CAU3B,YAAY,EACV,aACA,gBACA,mBACA,kBACA,cAOC;0BApBqC,EAAE;4BAC6B;2BAGlC;oBACR;qBACP,QAAQA,IAAQ;AAepC,OAAK,cAAc;AACnB,OAAK,iBAAiB;AACtB,OAAK,oBAAoB,qBAAqB,qBAAqB;AAEnE,MAAI,KAAK,kBACP;AAGF,OAAK,cAAc,WAAW;AAO9B,OAAK,UAAU,IAAI,UAAU,EAC3B,UAJA,QAAQ,IAAI,gCACZ,oCAID,CAAC;AAEF,OAAK,oBAAoB;GACvB,2BAA2B;GAC3B,8BAA8B;GAC/B,CAAC;;CAGJ,AAAQ,kBAAkB;AAExB,SADqB,KAAK,QAAQ,GACZ,KAAK;;CAG7B,MAAM,QACJ,OACA,YACA;AACA,MAAI,CAAC,KAAK,iBAAiB,IAAI,CAAC,KAAK,QACnC;EAGF,MAAM,sBAAsB,cAAc,WAAW;EACrD,MAAM,uBAAuB;GAC3B,GAAG,KAAK;GACR,GAAG;GACJ;EACD,MAAM,8BAA8B,OAAO,KAAK,qBAAqB,CAClE,MAAM,CACN,QACE,KAAK,QAAQ;AACZ,OAAI,OAAO,qBAAqB;AAChC,UAAO;KAET,EAAE,CACH;AAEH,OAAK,QAAQ,MAAM;GACjB,aAAa,KAAK;GAClB;GACA,YAAY,EAAE,GAAG,6BAA6B;GAC/C,CAAC;AAEF,QAAMC,qBAAY,SAAS,EACzB,OACD,CAAC;;CAGJ,oBAAoB,YAAiC;EACnD,MAAM,sBAAsB,cAAc,WAAW;AACrD,OAAK,mBAAmB;GACtB,GAAG,KAAK;GACR,GAAG;GACJ;;CAGH,sBAAsB,YAAuD;AAC3E,OAAK,qBAAqB;AAE1B,OAAK,oBAAoB,EACvB,OAAO;GACL,cAAc,WAAW;GACzB,SAAS,WAAW;GACrB,EACF,CAAC;;CAGJ,AAAQ,cAAc,YAAgC;EACpD,IAAI;AAEJ,gBAAc,cAAc;AAG5B,MAAI,QAAQ,IAAI,iCAEd,eAAc,WAAW,QAAQ,IAAI,iCAAiC;AAGxE,MAAI,cAAc,KAAK,cAAc,EACnC,OAAM,IAAI,MAAM,sCAAsC;AAGxD,OAAK,aAAa;AAClB,OAAK,oBAAoB;GACvB,YAAY,KAAK;GACjB,4BAA4B,IAAI,KAAK;GACrC,cAAc,IAAI,KAAK;GACxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
require("chalk");
|
|
3
|
+
|
|
4
|
+
//#region src/telemetry/utils.ts
|
|
5
|
+
function flattenObject(obj, parentKey = "", res = {}) {
|
|
6
|
+
for (let key in obj) {
|
|
7
|
+
const propName = parentKey ? `${parentKey}.${key}` : key;
|
|
8
|
+
if (typeof obj[key] === "object" && obj[key] !== null) flattenObject(obj[key], propName, res);
|
|
9
|
+
else res[propName] = obj[key];
|
|
10
|
+
}
|
|
11
|
+
return res;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.flattenObject = flattenObject;
|
|
16
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":[],"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":";;;;AAEA,SAAgB,cACd,KACA,YAAY,IACZ,MAA2B,EAAE,EACR;AACrB,MAAK,IAAI,OAAO,KAAK;EACnB,MAAM,WAAW,YAAY,GAAG,UAAU,GAAG,QAAQ;AACrD,MAAI,OAAO,IAAI,SAAS,YAAY,IAAI,SAAS,KAC/C,eAAc,IAAI,MAAM,UAAU,IAAI;MAEtC,KAAI,YAAY,IAAI;;AAGxB,QAAO"}
|
package/dist/telemetry/utils.mjs
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import "chalk";
|
|
2
|
+
|
|
3
|
+
//#region src/telemetry/utils.ts
|
|
4
|
+
function flattenObject(obj, parentKey = "", res = {}) {
|
|
5
|
+
for (let key in obj) {
|
|
6
|
+
const propName = parentKey ? `${parentKey}.${key}` : key;
|
|
7
|
+
if (typeof obj[key] === "object" && obj[key] !== null) flattenObject(obj[key], propName, res);
|
|
8
|
+
else res[propName] = obj[key];
|
|
9
|
+
}
|
|
10
|
+
return res;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { flattenObject };
|
|
9
15
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"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":";;;AAEA,SAAgB,cACd,KACA,YAAY,IACZ,MAA2B,EAAE,EACR;AACrB,MAAK,IAAI,OAAO,KAAK;EACnB,MAAM,WAAW,YAAY,GAAG,UAAU,GAAG,QAAQ;AACrD,MAAI,OAAO,IAAI,SAAS,YAAY,IAAI,SAAS,KAC/C,eAAc,IAAI,MAAM,UAAU,IAAI;MAEtC,KAAI,YAAY,IAAI;;AAGxB,QAAO"}
|