@copilotkit/shared 1.9.2-next.10 → 1.9.2-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 +0 -26
- package/dist/chunk-BANDZXMP.mjs +1 -0
- package/dist/{chunk-6ZQCK4W5.mjs → chunk-TFPJQ2MX.mjs} +21 -34
- package/dist/chunk-TFPJQ2MX.mjs.map +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +20 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -12
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +1 -2
- package/dist/utils/errors.d.ts +1 -25
- package/dist/utils/errors.js +22 -37
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/errors.mjs +5 -10
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +20 -35
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +7 -12
- package/dist/utils/json-schema.test.d.ts +2 -0
- package/dist/utils/json-schema.test.js +510 -0
- package/dist/utils/json-schema.test.js.map +1 -0
- package/dist/utils/json-schema.test.mjs +324 -0
- package/dist/utils/json-schema.test.mjs.map +1 -0
- package/package.json +1 -1
- package/src/types/index.ts +0 -1
- package/src/utils/errors.ts +19 -54
- package/tsup.config.ts +6 -1
- package/dist/chunk-6ZQCK4W5.mjs.map +0 -1
- package/dist/chunk-IPTKMBGN.mjs +0 -1
- package/dist/chunk-JBZL77KS.mjs +0 -1
- package/dist/chunk-JBZL77KS.mjs.map +0 -1
- package/dist/types/trace.d.ts +0 -55
- package/dist/types/trace.js +0 -19
- package/dist/types/trace.js.map +0 -1
- package/dist/types/trace.mjs +0 -2
- package/dist/types/trace.mjs.map +0 -1
- package/src/types/trace.ts +0 -70
- /package/dist/{chunk-IPTKMBGN.mjs.map → chunk-BANDZXMP.mjs.map} +0 -0
package/dist/types/trace.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
interface CopilotTraceEvent {
|
|
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 CopilotTraceHandler = (traceEvent: CopilotTraceEvent) => void | Promise<void>;
|
|
54
|
-
|
|
55
|
-
export { CopilotRequestContext, CopilotTraceEvent, CopilotTraceHandler };
|
package/dist/types/trace.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/trace.ts
|
|
17
|
-
var trace_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(trace_exports);
|
|
19
|
-
//# sourceMappingURL=trace.js.map
|
package/dist/types/trace.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/trace.ts"],"sourcesContent":["export interface CopilotTraceEvent {\n type: \"error\" | \"request\" | \"response\" | \"agent_state\" | \"action\" | \"message\" | \"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 CopilotTraceHandler = (traceEvent: CopilotTraceEvent) => void | Promise<void>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/trace.mjs
DELETED
package/dist/types/trace.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/src/types/trace.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export interface CopilotTraceEvent {
|
|
2
|
-
type: "error" | "request" | "response" | "agent_state" | "action" | "message" | "performance";
|
|
3
|
-
timestamp: number;
|
|
4
|
-
context: CopilotRequestContext;
|
|
5
|
-
error?: any; // Present when type is 'error'
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface CopilotRequestContext {
|
|
9
|
-
// Basic identifiers
|
|
10
|
-
threadId?: string;
|
|
11
|
-
runId?: string;
|
|
12
|
-
source: "runtime" | "ui" | "agent" | "network";
|
|
13
|
-
|
|
14
|
-
// Request details
|
|
15
|
-
request?: {
|
|
16
|
-
operation: string;
|
|
17
|
-
method?: string;
|
|
18
|
-
url?: string;
|
|
19
|
-
path?: string;
|
|
20
|
-
headers?: Record<string, string>;
|
|
21
|
-
body?: any;
|
|
22
|
-
startTime: number;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// Response details
|
|
26
|
-
response?: {
|
|
27
|
-
status?: number;
|
|
28
|
-
statusText?: string;
|
|
29
|
-
headers?: Record<string, string>;
|
|
30
|
-
body?: any;
|
|
31
|
-
endTime: number;
|
|
32
|
-
latency: number;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// Agent context
|
|
36
|
-
agent?: {
|
|
37
|
-
name?: string;
|
|
38
|
-
nodeName?: string;
|
|
39
|
-
state?: any;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Message flow context
|
|
43
|
-
messages?: {
|
|
44
|
-
input?: any[];
|
|
45
|
-
output?: any[];
|
|
46
|
-
messageCount?: number;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// Technical context
|
|
50
|
-
technical?: {
|
|
51
|
-
userAgent?: string;
|
|
52
|
-
host?: string;
|
|
53
|
-
environment?: string;
|
|
54
|
-
version?: string;
|
|
55
|
-
stackTrace?: string;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// Performance metrics
|
|
59
|
-
performance?: {
|
|
60
|
-
requestDuration?: number;
|
|
61
|
-
streamingDuration?: number;
|
|
62
|
-
actionExecutionTime?: number;
|
|
63
|
-
memoryUsage?: number;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
// Extensible metadata
|
|
67
|
-
metadata?: Record<string, any>;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export type CopilotTraceHandler = (traceEvent: CopilotTraceEvent) => void | Promise<void>;
|
|
File without changes
|