@copilotkitnext/runtime 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/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/endpoints/express-single.cjs +187 -0
- package/dist/endpoints/express-single.cjs.map +1 -0
- package/dist/endpoints/express-single.d.cts +15 -0
- package/dist/endpoints/express-single.d.cts.map +1 -0
- package/dist/endpoints/express-single.d.mts +15 -0
- package/dist/endpoints/express-single.d.mts.map +1 -0
- package/dist/endpoints/express-single.mjs +184 -0
- package/dist/endpoints/express-single.mjs.map +1 -0
- package/dist/endpoints/express-utils.cjs +118 -0
- package/dist/endpoints/express-utils.cjs.map +1 -0
- package/dist/endpoints/express-utils.mjs +116 -0
- package/dist/endpoints/express-utils.mjs.map +1 -0
- package/dist/endpoints/express.cjs +165 -0
- package/dist/endpoints/express.cjs.map +1 -0
- package/dist/endpoints/express.d.cts +15 -0
- package/dist/endpoints/express.d.cts.map +1 -0
- package/dist/endpoints/express.d.mts +15 -0
- package/dist/endpoints/express.d.mts.map +1 -0
- package/dist/endpoints/express.mjs +162 -0
- package/dist/endpoints/express.mjs.map +1 -0
- package/dist/endpoints/hono-single.cjs +140 -0
- package/dist/endpoints/hono-single.cjs.map +1 -0
- package/dist/endpoints/hono-single.d.cts +31 -0
- package/dist/endpoints/hono-single.d.cts.map +1 -0
- package/dist/endpoints/hono-single.d.mts +31 -0
- package/dist/endpoints/hono-single.d.mts.map +1 -0
- package/dist/endpoints/hono-single.mjs +139 -0
- package/dist/endpoints/hono-single.mjs.map +1 -0
- package/dist/endpoints/hono.cjs +152 -0
- package/dist/endpoints/hono.cjs.map +1 -0
- package/dist/endpoints/hono.d.cts +47 -0
- package/dist/endpoints/hono.d.cts.map +1 -0
- package/dist/endpoints/hono.d.mts +47 -0
- package/dist/endpoints/hono.d.mts.map +1 -0
- package/dist/endpoints/hono.mjs +151 -0
- package/dist/endpoints/hono.mjs.map +1 -0
- package/dist/endpoints/index.cjs +2 -0
- package/dist/endpoints/index.d.mts +2 -0
- package/dist/endpoints/index.mjs +4 -0
- package/dist/endpoints/single-route-helpers.cjs +67 -0
- package/dist/endpoints/single-route-helpers.cjs.map +1 -0
- package/dist/endpoints/single-route-helpers.mjs +64 -0
- package/dist/endpoints/single-route-helpers.mjs.map +1 -0
- package/dist/express.cjs +6 -0
- package/dist/express.d.cts +3 -0
- package/dist/express.d.mts +3 -19
- package/dist/express.mjs +3 -477
- package/dist/handlers/get-runtime-info.cjs +36 -0
- package/dist/handlers/get-runtime-info.cjs.map +1 -0
- package/dist/handlers/get-runtime-info.mjs +36 -0
- package/dist/handlers/get-runtime-info.mjs.map +1 -0
- package/dist/handlers/handle-connect.cjs +102 -0
- package/dist/handlers/handle-connect.cjs.map +1 -0
- package/dist/handlers/handle-connect.mjs +101 -0
- package/dist/handlers/handle-connect.mjs.map +1 -0
- package/dist/handlers/handle-run.cjs +114 -0
- package/dist/handlers/handle-run.cjs.map +1 -0
- package/dist/handlers/handle-run.mjs +113 -0
- package/dist/handlers/handle-run.mjs.map +1 -0
- package/dist/handlers/handle-stop.cjs +46 -0
- package/dist/handlers/handle-stop.cjs.map +1 -0
- package/dist/handlers/handle-stop.mjs +45 -0
- package/dist/handlers/handle-stop.mjs.map +1 -0
- package/dist/handlers/handle-transcribe.cjs +111 -0
- package/dist/handlers/handle-transcribe.cjs.map +1 -0
- package/dist/handlers/handle-transcribe.mjs +110 -0
- package/dist/handlers/handle-transcribe.mjs.map +1 -0
- package/dist/handlers/header-utils.cjs +25 -0
- package/dist/handlers/header-utils.cjs.map +1 -0
- package/dist/handlers/header-utils.mjs +24 -0
- package/dist/handlers/header-utils.mjs.map +1 -0
- package/dist/index.cjs +25 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.mts +9 -139
- package/dist/index.mjs +10 -335
- package/dist/middleware.cjs +29 -0
- package/dist/middleware.cjs.map +1 -0
- package/dist/middleware.d.cts +24 -0
- package/dist/middleware.d.cts.map +1 -0
- package/dist/middleware.d.mts +24 -0
- package/dist/middleware.d.mts.map +1 -0
- package/dist/middleware.mjs +27 -0
- package/dist/middleware.mjs.map +1 -0
- 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/runner/agent-runner.cjs +7 -0
- package/dist/runner/agent-runner.cjs.map +1 -0
- package/dist/runner/agent-runner.d.cts +28 -0
- package/dist/runner/agent-runner.d.cts.map +1 -0
- package/dist/runner/agent-runner.d.mts +28 -0
- package/dist/runner/agent-runner.d.mts.map +1 -0
- package/dist/runner/agent-runner.mjs +6 -0
- package/dist/runner/agent-runner.mjs.map +1 -0
- package/dist/runner/in-memory.cjs +230 -0
- package/dist/runner/in-memory.cjs.map +1 -0
- package/dist/runner/in-memory.d.cts +14 -0
- package/dist/runner/in-memory.d.cts.map +1 -0
- package/dist/runner/in-memory.d.mts +14 -0
- package/dist/runner/in-memory.d.mts.map +1 -0
- package/dist/runner/in-memory.mjs +229 -0
- package/dist/runner/in-memory.mjs.map +1 -0
- package/dist/runner/index.cjs +4 -0
- package/dist/runner/index.d.cts +4 -0
- package/dist/runner/index.d.mts +4 -0
- package/dist/runner/index.mjs +5 -0
- package/dist/runtime.cjs +27 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +43 -0
- package/dist/runtime.d.cts.map +1 -0
- package/dist/runtime.d.mts +43 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +26 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/transcription-service/transcription-service.cjs +7 -0
- package/dist/transcription-service/transcription-service.cjs.map +1 -0
- package/dist/transcription-service/transcription-service.d.cts +14 -0
- package/dist/transcription-service/transcription-service.d.cts.map +1 -0
- package/dist/transcription-service/transcription-service.d.mts +14 -0
- package/dist/transcription-service/transcription-service.d.mts.map +1 -0
- package/dist/transcription-service/transcription-service.mjs +6 -0
- package/dist/transcription-service/transcription-service.mjs.map +1 -0
- package/package.json +25 -22
- package/tsdown.config.ts +16 -0
- package/dist/chunk-5GKH3W25.mjs +0 -1054
- package/dist/chunk-5GKH3W25.mjs.map +0 -1
- package/dist/express.d.ts +0 -19
- package/dist/express.js +0 -1292
- package/dist/express.js.map +0 -1
- package/dist/express.mjs.map +0 -1
- package/dist/index.d.ts +0 -139
- package/dist/index.js +0 -1387
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/runtime-BsuyYT2l.d.mts +0 -98
- package/dist/runtime-BsuyYT2l.d.ts +0 -98
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AfterRequestMiddleware, BeforeRequestMiddleware } from "./middleware.cjs";
|
|
2
|
+
import { TranscriptionService } from "./transcription-service/transcription-service.cjs";
|
|
3
|
+
import { AgentRunner } from "./runner/agent-runner.cjs";
|
|
4
|
+
import { MaybePromise, NonEmptyRecord } from "@copilotkitnext/shared";
|
|
5
|
+
import { AbstractAgent } from "@ag-ui/client";
|
|
6
|
+
|
|
7
|
+
//#region src/runtime.d.ts
|
|
8
|
+
declare const VERSION: string;
|
|
9
|
+
/**
|
|
10
|
+
* Options used to construct a `CopilotRuntime` instance.
|
|
11
|
+
*/
|
|
12
|
+
interface CopilotRuntimeOptions {
|
|
13
|
+
/** Map of available agents (loaded lazily is fine). */
|
|
14
|
+
agents: MaybePromise<NonEmptyRecord<Record<string, AbstractAgent>>>;
|
|
15
|
+
/** The runner to use for running agents. */
|
|
16
|
+
runner?: AgentRunner;
|
|
17
|
+
/** Optional transcription service for audio processing. */
|
|
18
|
+
transcriptionService?: TranscriptionService;
|
|
19
|
+
/** Optional *before* middleware – callback function or webhook URL. */
|
|
20
|
+
beforeRequestMiddleware?: BeforeRequestMiddleware;
|
|
21
|
+
/** Optional *after* middleware – callback function or webhook URL. */
|
|
22
|
+
afterRequestMiddleware?: AfterRequestMiddleware;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Central runtime object passed to all request handlers.
|
|
26
|
+
*/
|
|
27
|
+
declare class CopilotRuntime {
|
|
28
|
+
agents: CopilotRuntimeOptions["agents"];
|
|
29
|
+
transcriptionService: CopilotRuntimeOptions["transcriptionService"];
|
|
30
|
+
beforeRequestMiddleware: CopilotRuntimeOptions["beforeRequestMiddleware"];
|
|
31
|
+
afterRequestMiddleware: CopilotRuntimeOptions["afterRequestMiddleware"];
|
|
32
|
+
runner: AgentRunner;
|
|
33
|
+
constructor({
|
|
34
|
+
agents,
|
|
35
|
+
transcriptionService,
|
|
36
|
+
beforeRequestMiddleware,
|
|
37
|
+
afterRequestMiddleware,
|
|
38
|
+
runner
|
|
39
|
+
}: CopilotRuntimeOptions);
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { CopilotRuntime, CopilotRuntimeOptions, VERSION };
|
|
43
|
+
//# sourceMappingURL=runtime.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.cts","names":[],"sources":["../src/runtime.ts"],"mappings":";;;;;;;cAWa,OAAA;;AAAb;;UAKiB,qBAAA;EALiB;EAOhC,MAAA,EAAQ,YAAA,CAAa,cAAA,CAAe,MAAA,SAAe,aAAA;EAFpC;EAIf,MAAA,GAAS,WAAA;;EAET,oBAAA,GAAuB,oBAAA;EAJa;EAMpC,uBAAA,GAA0B,uBAAA;EANlB;EAQR,sBAAA,GAAyB,sBAAA;AAAA;;;;cAMd,cAAA;EACJ,MAAA,EAAQ,qBAAA;EACR,oBAAA,EAAsB,qBAAA;EACtB,uBAAA,EAAyB,qBAAA;EACzB,sBAAA,EAAwB,qBAAA;EACxB,MAAA,EAAQ,WAAA;;IAGb,MAAA;IACA,oBAAA;IACA,uBAAA;IACA,sBAAA;IACA;EAAA,GACC,qBAAA;AAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AfterRequestMiddleware, BeforeRequestMiddleware } from "./middleware.mjs";
|
|
2
|
+
import { TranscriptionService } from "./transcription-service/transcription-service.mjs";
|
|
3
|
+
import { AgentRunner } from "./runner/agent-runner.mjs";
|
|
4
|
+
import { AbstractAgent } from "@ag-ui/client";
|
|
5
|
+
import { MaybePromise, NonEmptyRecord } from "@copilotkitnext/shared";
|
|
6
|
+
|
|
7
|
+
//#region src/runtime.d.ts
|
|
8
|
+
declare const VERSION: string;
|
|
9
|
+
/**
|
|
10
|
+
* Options used to construct a `CopilotRuntime` instance.
|
|
11
|
+
*/
|
|
12
|
+
interface CopilotRuntimeOptions {
|
|
13
|
+
/** Map of available agents (loaded lazily is fine). */
|
|
14
|
+
agents: MaybePromise<NonEmptyRecord<Record<string, AbstractAgent>>>;
|
|
15
|
+
/** The runner to use for running agents. */
|
|
16
|
+
runner?: AgentRunner;
|
|
17
|
+
/** Optional transcription service for audio processing. */
|
|
18
|
+
transcriptionService?: TranscriptionService;
|
|
19
|
+
/** Optional *before* middleware – callback function or webhook URL. */
|
|
20
|
+
beforeRequestMiddleware?: BeforeRequestMiddleware;
|
|
21
|
+
/** Optional *after* middleware – callback function or webhook URL. */
|
|
22
|
+
afterRequestMiddleware?: AfterRequestMiddleware;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Central runtime object passed to all request handlers.
|
|
26
|
+
*/
|
|
27
|
+
declare class CopilotRuntime {
|
|
28
|
+
agents: CopilotRuntimeOptions["agents"];
|
|
29
|
+
transcriptionService: CopilotRuntimeOptions["transcriptionService"];
|
|
30
|
+
beforeRequestMiddleware: CopilotRuntimeOptions["beforeRequestMiddleware"];
|
|
31
|
+
afterRequestMiddleware: CopilotRuntimeOptions["afterRequestMiddleware"];
|
|
32
|
+
runner: AgentRunner;
|
|
33
|
+
constructor({
|
|
34
|
+
agents,
|
|
35
|
+
transcriptionService,
|
|
36
|
+
beforeRequestMiddleware,
|
|
37
|
+
afterRequestMiddleware,
|
|
38
|
+
runner
|
|
39
|
+
}: CopilotRuntimeOptions);
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { CopilotRuntime, CopilotRuntimeOptions, VERSION };
|
|
43
|
+
//# sourceMappingURL=runtime.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/runtime.ts"],"mappings":";;;;;;;cAWa,OAAA;;AAAb;;UAKiB,qBAAA;EALiB;EAOhC,MAAA,EAAQ,YAAA,CAAa,cAAA,CAAe,MAAA,SAAe,aAAA;EAFpC;EAIf,MAAA,GAAS,WAAA;;EAET,oBAAA,GAAuB,oBAAA;EAJa;EAMpC,uBAAA,GAA0B,uBAAA;EANlB;EAQR,sBAAA,GAAyB,sBAAA;AAAA;;;;cAMd,cAAA;EACJ,MAAA,EAAQ,qBAAA;EACR,oBAAA,EAAsB,qBAAA;EACtB,uBAAA,EAAyB,qBAAA;EACzB,sBAAA,EAAwB,qBAAA;EACxB,MAAA,EAAQ,WAAA;;IAGb,MAAA;IACA,oBAAA;IACA,uBAAA;IACA,sBAAA;IACA;EAAA,GACC,qBAAA;AAAA"}
|
package/dist/runtime.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { version } from "./package.mjs";
|
|
2
|
+
import { InMemoryAgentRunner } from "./runner/in-memory.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/runtime.ts
|
|
5
|
+
const VERSION = version;
|
|
6
|
+
/**
|
|
7
|
+
* Central runtime object passed to all request handlers.
|
|
8
|
+
*/
|
|
9
|
+
var CopilotRuntime = class {
|
|
10
|
+
agents;
|
|
11
|
+
transcriptionService;
|
|
12
|
+
beforeRequestMiddleware;
|
|
13
|
+
afterRequestMiddleware;
|
|
14
|
+
runner;
|
|
15
|
+
constructor({ agents, transcriptionService, beforeRequestMiddleware, afterRequestMiddleware, runner }) {
|
|
16
|
+
this.agents = agents;
|
|
17
|
+
this.transcriptionService = transcriptionService;
|
|
18
|
+
this.beforeRequestMiddleware = beforeRequestMiddleware;
|
|
19
|
+
this.afterRequestMiddleware = afterRequestMiddleware;
|
|
20
|
+
this.runner = runner ?? new InMemoryAgentRunner();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CopilotRuntime, VERSION };
|
|
26
|
+
//# sourceMappingURL=runtime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.mjs","names":["pkg.version"],"sources":["../src/runtime.ts"],"sourcesContent":["import { MaybePromise, NonEmptyRecord } from \"@copilotkitnext/shared\";\nimport { AbstractAgent } from \"@ag-ui/client\";\nimport pkg from \"../package.json\";\nimport type {\n BeforeRequestMiddleware,\n AfterRequestMiddleware,\n} from \"./middleware\";\nimport { TranscriptionService } from \"./transcription-service/transcription-service\";\nimport { AgentRunner } from \"./runner/agent-runner\";\nimport { InMemoryAgentRunner } from \"./runner/in-memory\";\n\nexport const VERSION = pkg.version;\n\n/**\n * Options used to construct a `CopilotRuntime` instance.\n */\nexport interface CopilotRuntimeOptions {\n /** Map of available agents (loaded lazily is fine). */\n agents: MaybePromise<NonEmptyRecord<Record<string, AbstractAgent>>>;\n /** The runner to use for running agents. */\n runner?: AgentRunner;\n /** Optional transcription service for audio processing. */\n transcriptionService?: TranscriptionService;\n /** Optional *before* middleware – callback function or webhook URL. */\n beforeRequestMiddleware?: BeforeRequestMiddleware;\n /** Optional *after* middleware – callback function or webhook URL. */\n afterRequestMiddleware?: AfterRequestMiddleware;\n}\n\n/**\n * Central runtime object passed to all request handlers.\n */\nexport class CopilotRuntime {\n public agents: CopilotRuntimeOptions[\"agents\"];\n public transcriptionService: CopilotRuntimeOptions[\"transcriptionService\"];\n public beforeRequestMiddleware: CopilotRuntimeOptions[\"beforeRequestMiddleware\"];\n public afterRequestMiddleware: CopilotRuntimeOptions[\"afterRequestMiddleware\"];\n public runner: AgentRunner;\n\n constructor({\n agents,\n transcriptionService,\n beforeRequestMiddleware,\n afterRequestMiddleware,\n runner,\n }: CopilotRuntimeOptions) {\n this.agents = agents;\n this.transcriptionService = transcriptionService;\n this.beforeRequestMiddleware = beforeRequestMiddleware;\n this.afterRequestMiddleware = afterRequestMiddleware;\n this.runner = runner ?? new InMemoryAgentRunner();\n }\n}\n"],"mappings":";;;;AAWA,MAAa,UAAUA;;;;AAqBvB,IAAa,iBAAb,MAA4B;CAC1B,AAAO;CACP,AAAO;CACP,AAAO;CACP,AAAO;CACP,AAAO;CAEP,YAAY,EACV,QACA,sBACA,yBACA,wBACA,UACwB;AACxB,OAAK,SAAS;AACd,OAAK,uBAAuB;AAC5B,OAAK,0BAA0B;AAC/B,OAAK,yBAAyB;AAC9B,OAAK,SAAS,UAAU,IAAI,qBAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription-service.cjs","names":[],"sources":["../../src/transcription-service/transcription-service.ts"],"sourcesContent":["export interface TranscribeFileOptions {\n audioFile: File;\n /** MIME type of the audio file */\n mimeType?: string;\n /** Size of the audio file in bytes */\n size?: number;\n}\n\nexport abstract class TranscriptionService {\n abstract transcribeFile(options: TranscribeFileOptions): Promise<string>;\n}\n"],"mappings":";;AAQA,IAAsB,uBAAtB,MAA2C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/transcription-service/transcription-service.d.ts
|
|
2
|
+
interface TranscribeFileOptions {
|
|
3
|
+
audioFile: File;
|
|
4
|
+
/** MIME type of the audio file */
|
|
5
|
+
mimeType?: string;
|
|
6
|
+
/** Size of the audio file in bytes */
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare abstract class TranscriptionService {
|
|
10
|
+
abstract transcribeFile(options: TranscribeFileOptions): Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TranscribeFileOptions, TranscriptionService };
|
|
14
|
+
//# sourceMappingURL=transcription-service.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription-service.d.cts","names":[],"sources":["../../src/transcription-service/transcription-service.ts"],"mappings":";UAAiB,qBAAA;EACf,SAAA,EAAW,IAAA;EADyB;EAGpC,QAAA;EAFe;EAIf,IAAA;AAAA;AAAA,uBAGoB,oBAAA;EAAA,SACX,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAwB,OAAA;AAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/transcription-service/transcription-service.d.ts
|
|
2
|
+
interface TranscribeFileOptions {
|
|
3
|
+
audioFile: File;
|
|
4
|
+
/** MIME type of the audio file */
|
|
5
|
+
mimeType?: string;
|
|
6
|
+
/** Size of the audio file in bytes */
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
declare abstract class TranscriptionService {
|
|
10
|
+
abstract transcribeFile(options: TranscribeFileOptions): Promise<string>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { TranscribeFileOptions, TranscriptionService };
|
|
14
|
+
//# sourceMappingURL=transcription-service.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription-service.d.mts","names":[],"sources":["../../src/transcription-service/transcription-service.ts"],"mappings":";UAAiB,qBAAA;EACf,SAAA,EAAW,IAAA;EADyB;EAGpC,QAAA;EAFe;EAIf,IAAA;AAAA;AAAA,uBAGoB,oBAAA;EAAA,SACX,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAwB,OAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcription-service.mjs","names":[],"sources":["../../src/transcription-service/transcription-service.ts"],"sourcesContent":["export interface TranscribeFileOptions {\n audioFile: File;\n /** MIME type of the audio file */\n mimeType?: string;\n /** Size of the audio file in bytes */\n size?: number;\n}\n\nexport abstract class TranscriptionService {\n abstract transcribeFile(options: TranscribeFileOptions): Promise<string>;\n}\n"],"mappings":";AAQA,IAAsB,uBAAtB,MAA2C"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkitnext/runtime",
|
|
3
|
-
"version": "1.51.
|
|
3
|
+
"version": "1.51.5-next.1",
|
|
4
4
|
"description": "Server-side runtime package for CopilotKit2",
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"types": "dist/index.d.
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"types": "./dist/index.d.cts",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
12
|
},
|
|
13
13
|
"./express": {
|
|
14
|
-
"types": "./dist/express.d.ts",
|
|
15
14
|
"import": "./dist/express.mjs",
|
|
16
|
-
"require": "./dist/express.
|
|
17
|
-
}
|
|
15
|
+
"require": "./dist/express.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
@@ -25,39 +25,42 @@
|
|
|
25
25
|
"@types/node": "^22.15.3",
|
|
26
26
|
"eslint": "^9.30.0",
|
|
27
27
|
"supertest": "^7.1.1",
|
|
28
|
-
"
|
|
28
|
+
"tsdown": "^0.20.3",
|
|
29
29
|
"typescript": "5.8.2",
|
|
30
30
|
"vitest": "^3.0.5",
|
|
31
|
-
"@copilotkitnext/eslint-config": "1.51.
|
|
32
|
-
"@copilotkitnext/typescript-config": "1.51.
|
|
31
|
+
"@copilotkitnext/eslint-config": "1.51.5-next.1",
|
|
32
|
+
"@copilotkitnext/typescript-config": "1.51.5-next.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ag-ui/client": "0.0.
|
|
36
|
-
"@ag-ui/core": "0.0.
|
|
37
|
-
"@ag-ui/encoder": "0.0.
|
|
35
|
+
"@ag-ui/client": "0.0.45",
|
|
36
|
+
"@ag-ui/core": "0.0.45",
|
|
37
|
+
"@ag-ui/encoder": "0.0.45",
|
|
38
38
|
"cors": "^2.8.5",
|
|
39
39
|
"express": "^4.21.2",
|
|
40
40
|
"hono": "^4.11.4",
|
|
41
41
|
"rxjs": "7.8.1",
|
|
42
|
-
"@copilotkitnext/shared": "1.51.
|
|
42
|
+
"@copilotkitnext/shared": "1.51.5-next.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@ag-ui/client": "0.0.
|
|
46
|
-
"@ag-ui/core": "0.0.
|
|
47
|
-
"@ag-ui/encoder": "0.0.
|
|
48
|
-
"@copilotkitnext/shared": "1.51.
|
|
45
|
+
"@ag-ui/client": "0.0.45",
|
|
46
|
+
"@ag-ui/core": "0.0.45",
|
|
47
|
+
"@ag-ui/encoder": "0.0.45",
|
|
48
|
+
"@copilotkitnext/shared": "1.51.5-next.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=18"
|
|
53
53
|
},
|
|
54
|
+
"module": "./dist/index.mjs",
|
|
54
55
|
"scripts": {
|
|
55
|
-
"build": "
|
|
56
|
-
"dev": "
|
|
56
|
+
"build": "tsdown",
|
|
57
|
+
"dev": "tsdown --watch",
|
|
57
58
|
"lint": "eslint .",
|
|
58
59
|
"check-types": "tsc --noEmit",
|
|
59
60
|
"test": "vitest run",
|
|
60
61
|
"test:watch": "vitest",
|
|
61
|
-
"test:coverage": "vitest run --coverage"
|
|
62
|
+
"test:coverage": "vitest run --coverage",
|
|
63
|
+
"publint": "publint .",
|
|
64
|
+
"attw": "attw --pack . --profile node16"
|
|
62
65
|
}
|
|
63
66
|
}
|
package/tsdown.config.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from "tsdown";
|
|
2
|
+
|
|
3
|
+
const isWatch = process.argv.includes("--watch");
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
entry: ["src/index.ts", "src/express.ts"],
|
|
7
|
+
format: ["esm", "cjs"],
|
|
8
|
+
dts: !isWatch,
|
|
9
|
+
sourcemap: true,
|
|
10
|
+
clean: !isWatch,
|
|
11
|
+
target: "es2022",
|
|
12
|
+
outDir: "dist",
|
|
13
|
+
unbundle: true,
|
|
14
|
+
checks: { pluginTimings: false },
|
|
15
|
+
exports: true,
|
|
16
|
+
});
|