copilotkit 0.0.4 → 0.0.7
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/README.md +56 -2
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +8 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +5 -0
- package/dist/commands/base-command.d.ts +11 -0
- package/dist/commands/base-command.js +70 -0
- package/dist/commands/base-command.js.map +1 -0
- package/dist/commands/dev.d.ts +25 -0
- package/dist/commands/dev.js +591 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/login.d.ts +13 -0
- package/dist/commands/login.js +306 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +13 -0
- package/dist/commands/logout.js +309 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/services/analytics.service.d.ts +25 -0
- package/dist/services/analytics.service.js +75 -0
- package/dist/services/analytics.service.js.map +1 -0
- package/dist/services/auth.service.d.ts +23 -0
- package/dist/services/auth.service.js +226 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/events.d.ts +31 -0
- package/dist/services/events.js +1 -0
- package/dist/services/events.js.map +1 -0
- package/dist/services/tunnel.service.d.ts +15 -0
- package/dist/services/tunnel.service.js +17 -0
- package/dist/services/tunnel.service.js.map +1 -0
- package/dist/utils/detect-endpoint-type.utils.d.ts +13 -0
- package/dist/utils/detect-endpoint-type.utils.js +117 -0
- package/dist/utils/detect-endpoint-type.utils.js.map +1 -0
- package/dist/utils/trpc.d.ts +139 -0
- package/dist/utils/trpc.js +25 -0
- package/dist/utils/trpc.js.map +1 -0
- package/dist/utils/version.d.ts +3 -0
- package/dist/utils/version.js +6 -0
- package/dist/utils/version.js.map +1 -0
- package/oclif.manifest.json +106 -0
- package/package.json +85 -81
- package/LICENSE +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/detect-endpoint-type.utils.ts"],"sourcesContent":["import { TRPCError } from \"@trpc/server\";\nimport { z } from \"zod\";\n\nexport enum RemoteEndpointType {\n LangGraphPlatform = 'LangGraphPlatform',\n CopilotKit = 'CopilotKit',\n Invalid = 'Invalid',\n}\n\nconst removeTrailingSlash = (url: string) => url.replace(/\\/$/, '');\n\nexport const getHumanReadableEndpointType = (type: RemoteEndpointType) => {\n switch (type) {\n case RemoteEndpointType.LangGraphPlatform:\n return 'LangGraph Platform';\n case RemoteEndpointType.CopilotKit:\n return 'CopilotKit';\n default:\n return 'Invalid';\n }\n}\n\nexport async function detectRemoteEndpointType(url: string): Promise<{\n url: string;\n type: RemoteEndpointType;\n humanReadableType: string;\n}> {\n\n const promises = [\n isLangGraphPlatformEndpoint(url),\n isCopilotKitEndpoint(url),\n ];\n\n if (!url.endsWith('/copilotkit')) {\n promises.push(isCopilotKitEndpoint(`${removeTrailingSlash(url)}/copilotkit`));\n }\n\n const results = await Promise.all(promises);\n\n // LangGraph Platform\n if (results[0]) {\n return {\n url,\n type: RemoteEndpointType.LangGraphPlatform,\n humanReadableType: 'LangGraph Platform',\n }\n }\n\n // CopilotKit\n if (results[1]) {\n return {\n url,\n type: RemoteEndpointType.CopilotKit,\n humanReadableType: 'CopilotKit',\n }\n }\n\n // CopilotKit with appended /copilotkit\n if (results[2]) {\n return {\n url: `${removeTrailingSlash(url)}/copilotkit`,\n type: RemoteEndpointType.CopilotKit,\n humanReadableType: 'CopilotKit',\n }\n }\n\n return {\n url,\n type: RemoteEndpointType.Invalid,\n humanReadableType: 'Invalid',\n };\n}\n\nasync function isLangGraphPlatformEndpoint(url: string, retries: number = 0): Promise<boolean> {\n let response\n\n try {\n response = await fetch(`${url}/assistants/search`, {\n method: 'POST',\n\n body: JSON.stringify({\n metadata: {},\n limit: 99,\n offset: 0,\n }),\n });\n } catch (error) {\n return false;\n }\n\n if (!response.ok) {\n if (response.status === 502) {\n if (retries < 3) {\n console.log(\"RETRYING LGC\", retries + 1);\n return isLangGraphPlatformEndpoint(url, retries + 1);\n }\n }\n\n if (response.status === 403) {\n return true;\n }\n\n return false;\n }\n\n const data = await response.json();\n\n if (data[0].assistant_id) {\n return true;\n }\n\n return false;\n}\n\nasync function isCopilotKitEndpoint(url: string, retries: number = 0): Promise<boolean> {\n let response\n\n try {\n response = await fetch(`${url}/info`, {\n method: \"POST\",\n body: JSON.stringify({}),\n });\n } catch (error) {\n return false;\n }\n\n if (!response.ok) {\n if (response.status === 502) {\n if (retries < 3) {\n console.log(\"RETRYING CK\", retries + 1);\n return isCopilotKitEndpoint(url, retries + 1);\n }\n }\n\n return false;\n }\n\n const data = await response.json();\n\n if (data.agents && data.actions) {\n return true;\n }\n\n return false;\n}"],"mappings":";AAGO,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,uBAAoB;AACpB,EAAAA,oBAAA,gBAAa;AACb,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAMZ,IAAM,sBAAsB,CAAC,QAAgB,IAAI,QAAQ,OAAO,EAAE;AAE3D,IAAM,+BAA+B,CAAC,SAA6B;AACxE,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,eAAsB,yBAAyB,KAI5C;AAED,QAAM,WAAW;AAAA,IACf,4BAA4B,GAAG;AAAA,IAC/B,qBAAqB,GAAG;AAAA,EAC1B;AAEA,MAAI,CAAC,IAAI,SAAS,aAAa,GAAG;AAChC,aAAS,KAAK,qBAAqB,GAAG,oBAAoB,GAAG,CAAC,aAAa,CAAC;AAAA,EAC9E;AAEA,QAAM,UAAU,MAAM,QAAQ,IAAI,QAAQ;AAG1C,MAAI,QAAQ,CAAC,GAAG;AACd,WAAO;AAAA,MACL;AAAA,MACA,MAAM;AAAA,MACN,mBAAmB;AAAA,IACrB;AAAA,EACF;AAGA,MAAI,QAAQ,CAAC,GAAG;AACd,WAAO;AAAA,MACL;AAAA,MACA,MAAM;AAAA,MACN,mBAAmB;AAAA,IACrB;AAAA,EACF;AAGA,MAAI,QAAQ,CAAC,GAAG;AACd,WAAO;AAAA,MACL,KAAK,GAAG,oBAAoB,GAAG,CAAC;AAAA,MAChC,MAAM;AAAA,MACN,mBAAmB;AAAA,IACrB;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,mBAAmB;AAAA,EACrB;AACF;AAEA,eAAe,4BAA4B,KAAa,UAAkB,GAAqB;AAC7F,MAAI;AAEJ,MAAI;AACF,eAAW,MAAM,MAAM,GAAG,GAAG,sBAAsB;AAAA,MACjD,QAAQ;AAAA,MAER,MAAM,KAAK,UAAU;AAAA,QACnB,UAAU,CAAC;AAAA,QACX,OAAO;AAAA,QACP,QAAQ;AAAA,MACV,CAAC;AAAA,IACH,CAAC;AAAA,EACH,SAAS,OAAO;AACd,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,SAAS,IAAI;AAChB,QAAI,SAAS,WAAW,KAAK;AAC3B,UAAI,UAAU,GAAG;AACf,gBAAQ,IAAI,gBAAgB,UAAU,CAAC;AACvC,eAAO,4BAA4B,KAAK,UAAU,CAAC;AAAA,MACrD;AAAA,IACF;AAEA,QAAI,SAAS,WAAW,KAAK;AAC3B,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT;AAEA,QAAM,OAAO,MAAM,SAAS,KAAK;AAEjC,MAAI,KAAK,CAAC,EAAE,cAAc;AACxB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEA,eAAe,qBAAqB,KAAa,UAAkB,GAAqB;AACtF,MAAI;AAEJ,MAAI;AACF,eAAW,MAAM,MAAM,GAAG,GAAG,SAAS;AAAA,MACpC,QAAQ;AAAA,MACR,MAAM,KAAK,UAAU,CAAC,CAAC;AAAA,IACzB,CAAC;AAAA,EACH,SAAS,OAAO;AACd,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,SAAS,IAAI;AAChB,QAAI,SAAS,WAAW,KAAK;AAC3B,UAAI,UAAU,GAAG;AACf,gBAAQ,IAAI,eAAe,UAAU,CAAC;AACtC,eAAO,qBAAqB,KAAK,UAAU,CAAC;AAAA,MAC9C;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,QAAM,OAAO,MAAM,SAAS,KAAK;AAEjC,MAAI,KAAK,UAAU,KAAK,SAAS;AAC/B,WAAO;AAAA,EACT;AAEA,SAAO;AACT;","names":["RemoteEndpointType"]}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as _trpc_client from '@trpc/client';
|
|
2
|
+
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
3
|
+
import * as zod from 'zod';
|
|
4
|
+
|
|
5
|
+
declare const COPILOT_CLOUD_BASE_URL: string;
|
|
6
|
+
declare function createTRPCClient(cliToken: string): {
|
|
7
|
+
me: {
|
|
8
|
+
query: _trpc_client.Resolver<{
|
|
9
|
+
input: void;
|
|
10
|
+
output: {
|
|
11
|
+
user: any;
|
|
12
|
+
organization: any;
|
|
13
|
+
};
|
|
14
|
+
errorShape: {
|
|
15
|
+
data: {
|
|
16
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
17
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
18
|
+
httpStatus: number;
|
|
19
|
+
path?: string | undefined;
|
|
20
|
+
stack?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
message: string;
|
|
23
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
24
|
+
};
|
|
25
|
+
transformer: true;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
reportRemoteEndpointLocalTunnel: {
|
|
29
|
+
mutate: _trpc_client.Resolver<{
|
|
30
|
+
input: {
|
|
31
|
+
tunnelId: string;
|
|
32
|
+
projectId: string;
|
|
33
|
+
tunnelUrl: string;
|
|
34
|
+
port: number;
|
|
35
|
+
endpointType?: any;
|
|
36
|
+
};
|
|
37
|
+
output: {
|
|
38
|
+
remoteEndpointId: any;
|
|
39
|
+
localTunnelId: any;
|
|
40
|
+
};
|
|
41
|
+
errorShape: {
|
|
42
|
+
data: {
|
|
43
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
44
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
45
|
+
httpStatus: number;
|
|
46
|
+
path?: string | undefined;
|
|
47
|
+
stack?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
message: string;
|
|
50
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
51
|
+
};
|
|
52
|
+
transformer: true;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
pingLocalTunnel: {
|
|
56
|
+
query: _trpc_client.Resolver<{
|
|
57
|
+
input: {
|
|
58
|
+
localTunnelId: string;
|
|
59
|
+
};
|
|
60
|
+
output: {
|
|
61
|
+
success: boolean;
|
|
62
|
+
};
|
|
63
|
+
errorShape: {
|
|
64
|
+
data: {
|
|
65
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
66
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
67
|
+
httpStatus: number;
|
|
68
|
+
path?: string | undefined;
|
|
69
|
+
stack?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
message: string;
|
|
72
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
73
|
+
};
|
|
74
|
+
transformer: true;
|
|
75
|
+
}>;
|
|
76
|
+
};
|
|
77
|
+
deleteLocalTunnel: {
|
|
78
|
+
mutate: _trpc_client.Resolver<{
|
|
79
|
+
input: {
|
|
80
|
+
localTunnelId: string;
|
|
81
|
+
};
|
|
82
|
+
output: {
|
|
83
|
+
success: boolean;
|
|
84
|
+
} | null;
|
|
85
|
+
errorShape: {
|
|
86
|
+
data: {
|
|
87
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
88
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
89
|
+
httpStatus: number;
|
|
90
|
+
path?: string | undefined;
|
|
91
|
+
stack?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
message: string;
|
|
94
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
95
|
+
};
|
|
96
|
+
transformer: true;
|
|
97
|
+
}>;
|
|
98
|
+
};
|
|
99
|
+
listOrgs: {
|
|
100
|
+
query: _trpc_client.Resolver<{
|
|
101
|
+
input: void;
|
|
102
|
+
output: any;
|
|
103
|
+
errorShape: {
|
|
104
|
+
data: {
|
|
105
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
106
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
107
|
+
httpStatus: number;
|
|
108
|
+
path?: string | undefined;
|
|
109
|
+
stack?: string | undefined;
|
|
110
|
+
};
|
|
111
|
+
message: string;
|
|
112
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
113
|
+
};
|
|
114
|
+
transformer: true;
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
117
|
+
listOrgProjects: {
|
|
118
|
+
query: _trpc_client.Resolver<{
|
|
119
|
+
input: {
|
|
120
|
+
orgId: string;
|
|
121
|
+
};
|
|
122
|
+
output: any;
|
|
123
|
+
errorShape: {
|
|
124
|
+
data: {
|
|
125
|
+
zodError: zod.typeToFlattenedError<any, string> | null;
|
|
126
|
+
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
127
|
+
httpStatus: number;
|
|
128
|
+
path?: string | undefined;
|
|
129
|
+
stack?: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
message: string;
|
|
132
|
+
code: _trpc_server_unstable_core_do_not_import.TRPC_ERROR_CODE_NUMBER;
|
|
133
|
+
};
|
|
134
|
+
transformer: true;
|
|
135
|
+
}>;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export { COPILOT_CLOUD_BASE_URL, createTRPCClient };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/utils/trpc.ts
|
|
2
|
+
import { createTRPCClient as createTRPClient_, unstable_httpBatchStreamLink } from "@trpc/client";
|
|
3
|
+
import superjson from "superjson";
|
|
4
|
+
var COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || "https://cloud.copilotkit.ai";
|
|
5
|
+
function createTRPCClient(cliToken) {
|
|
6
|
+
return createTRPClient_({
|
|
7
|
+
links: [
|
|
8
|
+
unstable_httpBatchStreamLink({
|
|
9
|
+
transformer: superjson,
|
|
10
|
+
url: `${COPILOT_CLOUD_BASE_URL}/api/trpc-cli`,
|
|
11
|
+
headers: () => {
|
|
12
|
+
const headers = new Headers();
|
|
13
|
+
headers.set("x-trpc-source", "cli");
|
|
14
|
+
headers.set("x-cli-token", cliToken);
|
|
15
|
+
return headers;
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
COPILOT_CLOUD_BASE_URL,
|
|
23
|
+
createTRPCClient
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=trpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/trpc.ts"],"sourcesContent":["import {createTRPCClient as createTRPClient_, unstable_httpBatchStreamLink} from '@trpc/client'\nimport type {CLIRouter} from '@repo/trpc-cli/cli-router'\nimport superjson from 'superjson'\n\nexport const COPILOT_CLOUD_BASE_URL = process.env.COPILOT_CLOUD_BASE_URL || 'https://cloud.copilotkit.ai'\n\nexport function createTRPCClient(cliToken: string) {\n return createTRPClient_<CLIRouter>({\n links: [\n unstable_httpBatchStreamLink({\n transformer: superjson,\n url: `${COPILOT_CLOUD_BASE_URL}/api/trpc-cli`,\n headers: () => {\n const headers = new Headers()\n headers.set('x-trpc-source', 'cli')\n headers.set('x-cli-token', cliToken)\n return headers\n },\n }),\n ],\n })\n}\n"],"mappings":";AAAA,SAAQ,oBAAoB,kBAAkB,oCAAmC;AAEjF,OAAO,eAAe;AAEf,IAAM,yBAAyB,QAAQ,IAAI,0BAA0B;AAErE,SAAS,iBAAiB,UAAkB;AACjD,SAAO,iBAA4B;AAAA,IACjC,OAAO;AAAA,MACL,6BAA6B;AAAA,QAC3B,aAAa;AAAA,QACb,KAAK,GAAG,sBAAsB;AAAA,QAC9B,SAAS,MAAM;AACb,gBAAM,UAAU,IAAI,QAAQ;AAC5B,kBAAQ,IAAI,iBAAiB,KAAK;AAClC,kBAAQ,IAAI,eAAe,QAAQ;AACnC,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/version.ts"],"sourcesContent":["// This is auto generated!\nexport const LIB_VERSION = \"0.0.7\";\n"],"mappings":";AACO,IAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commands": {
|
|
3
|
+
"base-command": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"flags": {},
|
|
7
|
+
"hasDynamicHelp": false,
|
|
8
|
+
"hiddenAliases": [],
|
|
9
|
+
"id": "base-command",
|
|
10
|
+
"pluginAlias": "copilotkit",
|
|
11
|
+
"pluginName": "copilotkit",
|
|
12
|
+
"pluginType": "core",
|
|
13
|
+
"strict": true,
|
|
14
|
+
"enableJsonFlag": false,
|
|
15
|
+
"isESM": true,
|
|
16
|
+
"relativePath": [
|
|
17
|
+
"dist",
|
|
18
|
+
"commands",
|
|
19
|
+
"base-command.js"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"dev": {
|
|
23
|
+
"aliases": [],
|
|
24
|
+
"args": {},
|
|
25
|
+
"description": "describe the command here",
|
|
26
|
+
"examples": [
|
|
27
|
+
"<%= config.bin %> <%= command.id %>"
|
|
28
|
+
],
|
|
29
|
+
"flags": {
|
|
30
|
+
"port": {
|
|
31
|
+
"description": "port",
|
|
32
|
+
"name": "port",
|
|
33
|
+
"required": true,
|
|
34
|
+
"hasDynamicHelp": false,
|
|
35
|
+
"multiple": false,
|
|
36
|
+
"type": "option"
|
|
37
|
+
},
|
|
38
|
+
"project": {
|
|
39
|
+
"description": "project",
|
|
40
|
+
"name": "project",
|
|
41
|
+
"hasDynamicHelp": false,
|
|
42
|
+
"multiple": false,
|
|
43
|
+
"type": "option"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"hasDynamicHelp": false,
|
|
47
|
+
"hiddenAliases": [],
|
|
48
|
+
"id": "dev",
|
|
49
|
+
"pluginAlias": "copilotkit",
|
|
50
|
+
"pluginName": "copilotkit",
|
|
51
|
+
"pluginType": "core",
|
|
52
|
+
"strict": true,
|
|
53
|
+
"isESM": true,
|
|
54
|
+
"relativePath": [
|
|
55
|
+
"dist",
|
|
56
|
+
"commands",
|
|
57
|
+
"dev.js"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"login": {
|
|
61
|
+
"aliases": [],
|
|
62
|
+
"args": {},
|
|
63
|
+
"description": "Authenticate with Copilot Cloud",
|
|
64
|
+
"examples": [
|
|
65
|
+
"<%= config.bin %> login"
|
|
66
|
+
],
|
|
67
|
+
"flags": {},
|
|
68
|
+
"hasDynamicHelp": false,
|
|
69
|
+
"hiddenAliases": [],
|
|
70
|
+
"id": "login",
|
|
71
|
+
"pluginAlias": "copilotkit",
|
|
72
|
+
"pluginName": "copilotkit",
|
|
73
|
+
"pluginType": "core",
|
|
74
|
+
"strict": true,
|
|
75
|
+
"isESM": true,
|
|
76
|
+
"relativePath": [
|
|
77
|
+
"dist",
|
|
78
|
+
"commands",
|
|
79
|
+
"login.js"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"logout": {
|
|
83
|
+
"aliases": [],
|
|
84
|
+
"args": {},
|
|
85
|
+
"description": "Authenticate with Copilot Cloud",
|
|
86
|
+
"examples": [
|
|
87
|
+
"<%= config.bin %> logout"
|
|
88
|
+
],
|
|
89
|
+
"flags": {},
|
|
90
|
+
"hasDynamicHelp": false,
|
|
91
|
+
"hiddenAliases": [],
|
|
92
|
+
"id": "logout",
|
|
93
|
+
"pluginAlias": "copilotkit",
|
|
94
|
+
"pluginName": "copilotkit",
|
|
95
|
+
"pluginType": "core",
|
|
96
|
+
"strict": true,
|
|
97
|
+
"isESM": true,
|
|
98
|
+
"relativePath": [
|
|
99
|
+
"dist",
|
|
100
|
+
"commands",
|
|
101
|
+
"logout.js"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"version": "0.0.7"
|
|
106
|
+
}
|
package/package.json
CHANGED
|
@@ -1,98 +1,102 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilotkit",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/**/*",
|
|
11
|
-
"react/dist/**/*",
|
|
12
|
-
"svelte/dist/**/*",
|
|
13
|
-
"vue/dist/**/*"
|
|
14
|
-
],
|
|
15
|
-
"exports": {
|
|
16
|
-
"./package.json": "./package.json",
|
|
17
|
-
".": {
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/index.mjs",
|
|
20
|
-
"module": "./dist/index.mjs",
|
|
21
|
-
"require": "./dist/index.js"
|
|
22
|
-
},
|
|
23
|
-
"./react": {
|
|
24
|
-
"types": "./react/dist/index.d.ts",
|
|
25
|
-
"import": "./react/dist/index.mjs",
|
|
26
|
-
"module": "./react/dist/index.mjs",
|
|
27
|
-
"require": "./react/dist/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./svelte": {
|
|
30
|
-
"types": "./svelte/dist/index.d.ts",
|
|
31
|
-
"import": "./svelte/dist/index.mjs",
|
|
32
|
-
"module": "./svelte/dist/index.mjs",
|
|
33
|
-
"require": "./svelte/dist/index.js"
|
|
34
|
-
},
|
|
35
|
-
"./vue": {
|
|
36
|
-
"types": "./vue/dist/index.d.ts",
|
|
37
|
-
"import": "./vue/dist/index.mjs",
|
|
38
|
-
"module": "./vue/dist/index.mjs",
|
|
39
|
-
"require": "./vue/dist/index.js"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"jest": {
|
|
43
|
-
"preset": "ts-jest",
|
|
44
|
-
"testEnvironment": "node"
|
|
3
|
+
"description": "CopilotKit CLI",
|
|
4
|
+
"version": "0.0.7",
|
|
5
|
+
"author": "CopilotKit",
|
|
6
|
+
"bin": {
|
|
7
|
+
"copilotkit": "./bin/run.js",
|
|
8
|
+
"cpk": "./bin/run.js"
|
|
45
9
|
},
|
|
10
|
+
"bugs": "https://github.com/copilotkit/cli/issues",
|
|
46
11
|
"dependencies": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
12
|
+
"@oclif/core": "^4.2.0",
|
|
13
|
+
"@paralleldrive/cuid2": "^2.2.2",
|
|
14
|
+
"@segment/analytics-node": "^2.1.2",
|
|
15
|
+
"@sentry/node": "^7.116.0",
|
|
16
|
+
"@trpc/client": "^11.0.0-rc.666",
|
|
17
|
+
"@trpc/server": "^11.0.0-rc.666",
|
|
18
|
+
"ansis": "^3.3.2",
|
|
19
|
+
"axios": "^1.7.8",
|
|
20
|
+
"chalk": "^5.3.0",
|
|
21
|
+
"conf": "^13.1.0",
|
|
22
|
+
"cors": "^2.8.5",
|
|
23
|
+
"express": "^4.21.2",
|
|
24
|
+
"get-port": "^7.1.0",
|
|
25
|
+
"inquirer": "^12.3.0",
|
|
26
|
+
"localtunnel": "^2.0.2",
|
|
27
|
+
"open": "^10.1.0",
|
|
28
|
+
"ora": "^8.1.1",
|
|
29
|
+
"superjson": "^2.2.1",
|
|
30
|
+
"zod": "^3.22.4"
|
|
52
31
|
},
|
|
53
32
|
"devDependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/
|
|
58
|
-
"@types/
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"eslint
|
|
33
|
+
"@oclif/prettier-config": "^0.2.1",
|
|
34
|
+
"@oclif/test": "^4",
|
|
35
|
+
"@types/chai": "^4.3.20",
|
|
36
|
+
"@types/cors": "^2.8.17",
|
|
37
|
+
"@types/express": "^5.0.0",
|
|
38
|
+
"@types/localtunnel": "^2.0.4",
|
|
39
|
+
"@types/mocha": "^10",
|
|
40
|
+
"@types/node": "^18",
|
|
41
|
+
"@types/sinon": "^17.0.3",
|
|
42
|
+
"@types/sinon-chai": "^4.0.0",
|
|
43
|
+
"chai": "^4",
|
|
44
|
+
"eslint": "^8",
|
|
45
|
+
"eslint-config-oclif": "^5",
|
|
46
|
+
"eslint-config-oclif-typescript": "^3",
|
|
47
|
+
"eslint-config-prettier": "^9",
|
|
48
|
+
"mocha": "^10",
|
|
49
|
+
"oclif": "^4",
|
|
50
|
+
"shx": "^0.3.3",
|
|
51
|
+
"sinon": "^19.0.2",
|
|
52
|
+
"sinon-chai": "^4.0.0",
|
|
53
|
+
"ts-node": "^10",
|
|
54
|
+
"tsup": "^8.0.2",
|
|
55
|
+
"typescript": "^5"
|
|
66
56
|
},
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"svelte": "^3.29.0",
|
|
70
|
-
"vue": "^3.3.4"
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=18.0.0"
|
|
71
59
|
},
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
|
|
60
|
+
"files": [
|
|
61
|
+
"/bin",
|
|
62
|
+
"/dist",
|
|
63
|
+
"/oclif.manifest.json"
|
|
64
|
+
],
|
|
65
|
+
"homepage": "https://github.com/copilotkit/cli",
|
|
66
|
+
"keywords": [
|
|
67
|
+
"oclif"
|
|
68
|
+
],
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"main": "dist/index.js",
|
|
71
|
+
"type": "module",
|
|
72
|
+
"oclif": {
|
|
73
|
+
"bin": "copilotkit",
|
|
74
|
+
"dirname": "copilotkit",
|
|
75
|
+
"commands": "./dist/commands",
|
|
76
|
+
"topicSeparator": " ",
|
|
77
|
+
"topics": {
|
|
78
|
+
"tunnel": {
|
|
79
|
+
"description": "Create a local tunnel to expose your agent to the internet"
|
|
80
|
+
},
|
|
81
|
+
"login": {
|
|
82
|
+
"description": "Authenticate with Copilot Cloud"
|
|
83
|
+
}
|
|
81
84
|
}
|
|
82
85
|
},
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
+
"repository": "https://github.com/copilotkit/cli",
|
|
87
|
+
"types": "dist/index.d.ts",
|
|
86
88
|
"publishConfig": {
|
|
87
89
|
"access": "public"
|
|
88
90
|
},
|
|
89
91
|
"scripts": {
|
|
92
|
+
"clean": "shx rm -rf dist",
|
|
93
|
+
"extract-version": "node -p \"'// This is auto generated!\\nexport const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/utils/version.ts",
|
|
94
|
+
"prebuild": "pnpm run clean && pnpm run extract-version",
|
|
90
95
|
"build": "tsup",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"test": "jest --forceExit --env @edge-runtime/jest-environment .test.ts && jest --forceExit --env node .test.ts"
|
|
96
|
+
"lint": "echo oops",
|
|
97
|
+
"generate-manifest": "oclif manifest",
|
|
98
|
+
"test": "mocha --forbid-only --reporter spec \"test/**/*.test.ts\"",
|
|
99
|
+
"version": "oclif readme && git add README.md",
|
|
100
|
+
"validate": "node validate-package.js"
|
|
97
101
|
}
|
|
98
102
|
}
|
package/LICENSE
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Copyright 2023 Recursively.ai
|
|
2
|
-
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|