@copilotkit/runtime 2.0.0-rc.14 → 2.0.0-rc.16
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/runtime/core/package-info.cjs +1 -1
- package/dist/runtime/core/package-info.mjs +1 -1
- package/dist/runtime/generative-ui/surface-writer.cjs +4 -4
- package/dist/runtime/generative-ui/surface-writer.cjs.map +1 -1
- package/dist/runtime/generative-ui/surface-writer.d.cts.map +1 -1
- package/dist/runtime/generative-ui/surface-writer.d.mts.map +1 -1
- package/dist/runtime/generative-ui/surface-writer.mjs +5 -5
- package/dist/runtime/generative-ui/surface-writer.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/runtime/core/package-info.ts
|
|
3
3
|
const RUNTIME_PACKAGE_NAME = "@copilotkit/runtime";
|
|
4
|
-
const RUNTIME_PACKAGE_VERSION = "2.0.0-rc.
|
|
4
|
+
const RUNTIME_PACKAGE_VERSION = "2.0.0-rc.16";
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
exports.RUNTIME_PACKAGE_NAME = RUNTIME_PACKAGE_NAME;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/runtime/core/package-info.ts
|
|
2
2
|
const RUNTIME_PACKAGE_NAME = "@copilotkit/runtime";
|
|
3
|
-
const RUNTIME_PACKAGE_VERSION = "2.0.0-rc.
|
|
3
|
+
const RUNTIME_PACKAGE_VERSION = "2.0.0-rc.16";
|
|
4
4
|
|
|
5
5
|
//#endregion
|
|
6
6
|
export { RUNTIME_PACKAGE_NAME, RUNTIME_PACKAGE_VERSION };
|
|
@@ -28,7 +28,7 @@ function createSurfaceWriter(emit) {
|
|
|
28
28
|
target,
|
|
29
29
|
catalogId: catalog,
|
|
30
30
|
operations: [{
|
|
31
|
-
version:
|
|
31
|
+
version: _copilotkit_shared.A2UI_VERSION,
|
|
32
32
|
createSurface: {
|
|
33
33
|
surfaceId,
|
|
34
34
|
catalogId: catalog
|
|
@@ -46,7 +46,7 @@ function createSurfaceWriter(emit) {
|
|
|
46
46
|
});
|
|
47
47
|
return {
|
|
48
48
|
setRoot: (node) => append({
|
|
49
|
-
version:
|
|
49
|
+
version: _copilotkit_shared.A2UI_VERSION,
|
|
50
50
|
updateComponents: {
|
|
51
51
|
surfaceId,
|
|
52
52
|
components: [{
|
|
@@ -56,14 +56,14 @@ function createSurfaceWriter(emit) {
|
|
|
56
56
|
}
|
|
57
57
|
}),
|
|
58
58
|
upsert: (...nodes) => append({
|
|
59
|
-
version:
|
|
59
|
+
version: _copilotkit_shared.A2UI_VERSION,
|
|
60
60
|
updateComponents: {
|
|
61
61
|
surfaceId,
|
|
62
62
|
components: nodes
|
|
63
63
|
}
|
|
64
64
|
}),
|
|
65
65
|
updateData: (path, value) => append({
|
|
66
|
-
version:
|
|
66
|
+
version: _copilotkit_shared.A2UI_VERSION,
|
|
67
67
|
updateDataModel: {
|
|
68
68
|
surfaceId,
|
|
69
69
|
path,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-writer.cjs","names":["EventType","GENERATIVE_UI_ACTIVITY_TYPE","GENERATIVE_UI_ROOT_ID"],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"sourcesContent":["import { EventType } from \"@ag-ui/client\";\nimport type { BaseEvent } from \"@ag-ui/client\";\nimport {\n GENERATIVE_UI_ACTIVITY_TYPE,\n GENERATIVE_UI_ROOT_ID,\n generativeUISurfaceMessageId,\n} from \"@copilotkit/shared\";\nimport type {\n A2UIComponentNode,\n A2UIOperation,\n GenerativeUISurfaceContent,\n} from \"@copilotkit/shared\";\n\nexport interface GenerativeUISurfaceWriter {\n setRoot(node: Omit<A2UIComponentNode, \"id\">): void;\n upsert(...nodes: A2UIComponentNode[]): void;\n /** Sets `value` at `path`. A `null` value deletes the key at `path`. */\n updateData(path: string, value: unknown): void;\n close(): void;\n}\n\n/**\n * Experimental. Programmatic façade for custom agents and workflows: emits the\n * same `generative-ui-surface` activity events as `render_ui`, one per call.\n * Every operation is A2UI v1.0.\n * Does not validate against the browser manifest; the client still validates\n * every operation before applying it.\n */\nexport function createSurfaceWriter(emit: (event: BaseEvent) => void) {\n return {\n openSurface({\n target,\n surfaceId,\n catalog,\n }: {\n target: string;\n surfaceId: string;\n catalog: string;\n }): GenerativeUISurfaceWriter {\n const messageId = generativeUISurfaceMessageId(surfaceId);\n const patch = (ops: unknown[]) =>\n emit({\n type: EventType.ACTIVITY_DELTA,\n messageId,\n activityType: GENERATIVE_UI_ACTIVITY_TYPE,\n patch: ops,\n });\n const append = (op: A2UIOperation) =>\n patch([{ op: \"add\", path: \"/operations/-\", value: op }]);\n const content: GenerativeUISurfaceContent = {\n surfaceId,\n target,\n catalogId: catalog,\n operations: [\n {
|
|
1
|
+
{"version":3,"file":"surface-writer.cjs","names":["EventType","GENERATIVE_UI_ACTIVITY_TYPE","A2UI_VERSION","GENERATIVE_UI_ROOT_ID"],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"sourcesContent":["import { EventType } from \"@ag-ui/client\";\nimport type { BaseEvent } from \"@ag-ui/client\";\nimport {\n A2UI_VERSION,\n GENERATIVE_UI_ACTIVITY_TYPE,\n GENERATIVE_UI_ROOT_ID,\n generativeUISurfaceMessageId,\n} from \"@copilotkit/shared\";\nimport type {\n A2UIComponentNode,\n A2UIOperation,\n GenerativeUISurfaceContent,\n} from \"@copilotkit/shared\";\n\nexport interface GenerativeUISurfaceWriter {\n setRoot(node: Omit<A2UIComponentNode, \"id\">): void;\n upsert(...nodes: A2UIComponentNode[]): void;\n /** Sets `value` at `path`. A `null` value deletes the key at `path`. */\n updateData(path: string, value: unknown): void;\n close(): void;\n}\n\n/**\n * Experimental. Programmatic façade for custom agents and workflows: emits the\n * same `generative-ui-surface` activity events as `render_ui`, one per call.\n * Every operation is A2UI v1.0.\n * Does not validate against the browser manifest; the client still validates\n * every operation before applying it.\n */\nexport function createSurfaceWriter(emit: (event: BaseEvent) => void) {\n return {\n openSurface({\n target,\n surfaceId,\n catalog,\n }: {\n target: string;\n surfaceId: string;\n catalog: string;\n }): GenerativeUISurfaceWriter {\n const messageId = generativeUISurfaceMessageId(surfaceId);\n const patch = (ops: unknown[]) =>\n emit({\n type: EventType.ACTIVITY_DELTA,\n messageId,\n activityType: GENERATIVE_UI_ACTIVITY_TYPE,\n patch: ops,\n });\n const append = (op: A2UIOperation) =>\n patch([{ op: \"add\", path: \"/operations/-\", value: op }]);\n const content: GenerativeUISurfaceContent = {\n surfaceId,\n target,\n catalogId: catalog,\n operations: [\n {\n version: A2UI_VERSION,\n createSurface: { surfaceId, catalogId: catalog },\n },\n ],\n status: \"streaming\",\n rejected: [],\n };\n emit({\n type: EventType.ACTIVITY_SNAPSHOT,\n messageId,\n activityType: GENERATIVE_UI_ACTIVITY_TYPE,\n content,\n replace: true,\n });\n return {\n setRoot: (node) =>\n append({\n version: A2UI_VERSION,\n updateComponents: {\n surfaceId,\n components: [\n { ...node, id: GENERATIVE_UI_ROOT_ID } as A2UIComponentNode,\n ],\n },\n }),\n upsert: (...nodes) =>\n append({\n version: A2UI_VERSION,\n updateComponents: { surfaceId, components: nodes },\n }),\n updateData: (path, value) =>\n append({\n version: A2UI_VERSION,\n updateDataModel: { surfaceId, path, value },\n }),\n close: () =>\n patch([{ op: \"replace\", path: \"/status\", value: \"ready\" }]),\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AA6BA,SAAgB,oBAAoB,MAAkC;AACpE,QAAO,EACL,YAAY,EACV,QACA,WACA,WAK4B;EAC5B,MAAM,iEAAyC,UAAU;EACzD,MAAM,SAAS,QACb,KAAK;GACH,MAAMA,wBAAU;GAChB;GACA,cAAcC;GACd,OAAO;GACR,CAAC;EACJ,MAAM,UAAU,OACd,MAAM,CAAC;GAAE,IAAI;GAAO,MAAM;GAAiB,OAAO;GAAI,CAAC,CAAC;EAC1D,MAAM,UAAsC;GAC1C;GACA;GACA,WAAW;GACX,YAAY,CACV;IACE,SAASC;IACT,eAAe;KAAE;KAAW,WAAW;KAAS;IACjD,CACF;GACD,QAAQ;GACR,UAAU,EAAE;GACb;AACD,OAAK;GACH,MAAMF,wBAAU;GAChB;GACA,cAAcC;GACd;GACA,SAAS;GACV,CAAC;AACF,SAAO;GACL,UAAU,SACR,OAAO;IACL,SAASC;IACT,kBAAkB;KAChB;KACA,YAAY,CACV;MAAE,GAAG;MAAM,IAAIC;MAAuB,CACvC;KACF;IACF,CAAC;GACJ,SAAS,GAAG,UACV,OAAO;IACL,SAASD;IACT,kBAAkB;KAAE;KAAW,YAAY;KAAO;IACnD,CAAC;GACJ,aAAa,MAAM,UACjB,OAAO;IACL,SAASA;IACT,iBAAiB;KAAE;KAAW;KAAM;KAAO;IAC5C,CAAC;GACJ,aACE,MAAM,CAAC;IAAE,IAAI;IAAW,MAAM;IAAW,OAAO;IAAS,CAAC,CAAC;GAC9D;IAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-writer.d.cts","names":[],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"surface-writer.d.cts","names":[],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"mappings":";;;;UAciB,yBAAA;EACf,OAAA,CAAQ,IAAA,EAAM,IAAA,CAAK,iBAAA;EACnB,MAAA,IAAU,KAAA,EAAO,iBAAA;EAFuB;EAIxC,UAAA,CAAW,IAAA,UAAc,KAAA;EACzB,KAAA;AAAA;;;;;;;;iBAUc,mBAAA,CAAoB,IAAA,GAAO,KAAA,EAAO,SAAA;;;;;;IAO5C,MAAA;IACA,SAAA;IACA,OAAA;EAAA,IACE,yBAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-writer.d.mts","names":[],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"surface-writer.d.mts","names":[],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"mappings":";;;;UAciB,yBAAA;EACf,OAAA,CAAQ,IAAA,EAAM,IAAA,CAAK,iBAAA;EACnB,MAAA,IAAU,KAAA,EAAO,iBAAA;EAFuB;EAIxC,UAAA,CAAW,IAAA,UAAc,KAAA;EACzB,KAAA;AAAA;;;;;;;;iBAUc,mBAAA,CAAoB,IAAA,GAAO,KAAA,EAAO,SAAA;;;;;;IAO5C,MAAA;IACA,SAAA;IACA,OAAA;EAAA,IACE,yBAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GENERATIVE_UI_ACTIVITY_TYPE, GENERATIVE_UI_ROOT_ID, generativeUISurfaceMessageId } from "@copilotkit/shared";
|
|
1
|
+
import { A2UI_VERSION, GENERATIVE_UI_ACTIVITY_TYPE, GENERATIVE_UI_ROOT_ID, generativeUISurfaceMessageId } from "@copilotkit/shared";
|
|
2
2
|
import { EventType } from "@ag-ui/client";
|
|
3
3
|
|
|
4
4
|
//#region src/runtime/generative-ui/surface-writer.ts
|
|
@@ -28,7 +28,7 @@ function createSurfaceWriter(emit) {
|
|
|
28
28
|
target,
|
|
29
29
|
catalogId: catalog,
|
|
30
30
|
operations: [{
|
|
31
|
-
version:
|
|
31
|
+
version: A2UI_VERSION,
|
|
32
32
|
createSurface: {
|
|
33
33
|
surfaceId,
|
|
34
34
|
catalogId: catalog
|
|
@@ -46,7 +46,7 @@ function createSurfaceWriter(emit) {
|
|
|
46
46
|
});
|
|
47
47
|
return {
|
|
48
48
|
setRoot: (node) => append({
|
|
49
|
-
version:
|
|
49
|
+
version: A2UI_VERSION,
|
|
50
50
|
updateComponents: {
|
|
51
51
|
surfaceId,
|
|
52
52
|
components: [{
|
|
@@ -56,14 +56,14 @@ function createSurfaceWriter(emit) {
|
|
|
56
56
|
}
|
|
57
57
|
}),
|
|
58
58
|
upsert: (...nodes) => append({
|
|
59
|
-
version:
|
|
59
|
+
version: A2UI_VERSION,
|
|
60
60
|
updateComponents: {
|
|
61
61
|
surfaceId,
|
|
62
62
|
components: nodes
|
|
63
63
|
}
|
|
64
64
|
}),
|
|
65
65
|
updateData: (path, value) => append({
|
|
66
|
-
version:
|
|
66
|
+
version: A2UI_VERSION,
|
|
67
67
|
updateDataModel: {
|
|
68
68
|
surfaceId,
|
|
69
69
|
path,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface-writer.mjs","names":[],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"sourcesContent":["import { EventType } from \"@ag-ui/client\";\nimport type { BaseEvent } from \"@ag-ui/client\";\nimport {\n GENERATIVE_UI_ACTIVITY_TYPE,\n GENERATIVE_UI_ROOT_ID,\n generativeUISurfaceMessageId,\n} from \"@copilotkit/shared\";\nimport type {\n A2UIComponentNode,\n A2UIOperation,\n GenerativeUISurfaceContent,\n} from \"@copilotkit/shared\";\n\nexport interface GenerativeUISurfaceWriter {\n setRoot(node: Omit<A2UIComponentNode, \"id\">): void;\n upsert(...nodes: A2UIComponentNode[]): void;\n /** Sets `value` at `path`. A `null` value deletes the key at `path`. */\n updateData(path: string, value: unknown): void;\n close(): void;\n}\n\n/**\n * Experimental. Programmatic façade for custom agents and workflows: emits the\n * same `generative-ui-surface` activity events as `render_ui`, one per call.\n * Every operation is A2UI v1.0.\n * Does not validate against the browser manifest; the client still validates\n * every operation before applying it.\n */\nexport function createSurfaceWriter(emit: (event: BaseEvent) => void) {\n return {\n openSurface({\n target,\n surfaceId,\n catalog,\n }: {\n target: string;\n surfaceId: string;\n catalog: string;\n }): GenerativeUISurfaceWriter {\n const messageId = generativeUISurfaceMessageId(surfaceId);\n const patch = (ops: unknown[]) =>\n emit({\n type: EventType.ACTIVITY_DELTA,\n messageId,\n activityType: GENERATIVE_UI_ACTIVITY_TYPE,\n patch: ops,\n });\n const append = (op: A2UIOperation) =>\n patch([{ op: \"add\", path: \"/operations/-\", value: op }]);\n const content: GenerativeUISurfaceContent = {\n surfaceId,\n target,\n catalogId: catalog,\n operations: [\n {
|
|
1
|
+
{"version":3,"file":"surface-writer.mjs","names":[],"sources":["../../../src/runtime/generative-ui/surface-writer.ts"],"sourcesContent":["import { EventType } from \"@ag-ui/client\";\nimport type { BaseEvent } from \"@ag-ui/client\";\nimport {\n A2UI_VERSION,\n GENERATIVE_UI_ACTIVITY_TYPE,\n GENERATIVE_UI_ROOT_ID,\n generativeUISurfaceMessageId,\n} from \"@copilotkit/shared\";\nimport type {\n A2UIComponentNode,\n A2UIOperation,\n GenerativeUISurfaceContent,\n} from \"@copilotkit/shared\";\n\nexport interface GenerativeUISurfaceWriter {\n setRoot(node: Omit<A2UIComponentNode, \"id\">): void;\n upsert(...nodes: A2UIComponentNode[]): void;\n /** Sets `value` at `path`. A `null` value deletes the key at `path`. */\n updateData(path: string, value: unknown): void;\n close(): void;\n}\n\n/**\n * Experimental. Programmatic façade for custom agents and workflows: emits the\n * same `generative-ui-surface` activity events as `render_ui`, one per call.\n * Every operation is A2UI v1.0.\n * Does not validate against the browser manifest; the client still validates\n * every operation before applying it.\n */\nexport function createSurfaceWriter(emit: (event: BaseEvent) => void) {\n return {\n openSurface({\n target,\n surfaceId,\n catalog,\n }: {\n target: string;\n surfaceId: string;\n catalog: string;\n }): GenerativeUISurfaceWriter {\n const messageId = generativeUISurfaceMessageId(surfaceId);\n const patch = (ops: unknown[]) =>\n emit({\n type: EventType.ACTIVITY_DELTA,\n messageId,\n activityType: GENERATIVE_UI_ACTIVITY_TYPE,\n patch: ops,\n });\n const append = (op: A2UIOperation) =>\n patch([{ op: \"add\", path: \"/operations/-\", value: op }]);\n const content: GenerativeUISurfaceContent = {\n surfaceId,\n target,\n catalogId: catalog,\n operations: [\n {\n version: A2UI_VERSION,\n createSurface: { surfaceId, catalogId: catalog },\n },\n ],\n status: \"streaming\",\n rejected: [],\n };\n emit({\n type: EventType.ACTIVITY_SNAPSHOT,\n messageId,\n activityType: GENERATIVE_UI_ACTIVITY_TYPE,\n content,\n replace: true,\n });\n return {\n setRoot: (node) =>\n append({\n version: A2UI_VERSION,\n updateComponents: {\n surfaceId,\n components: [\n { ...node, id: GENERATIVE_UI_ROOT_ID } as A2UIComponentNode,\n ],\n },\n }),\n upsert: (...nodes) =>\n append({\n version: A2UI_VERSION,\n updateComponents: { surfaceId, components: nodes },\n }),\n updateData: (path, value) =>\n append({\n version: A2UI_VERSION,\n updateDataModel: { surfaceId, path, value },\n }),\n close: () =>\n patch([{ op: \"replace\", path: \"/status\", value: \"ready\" }]),\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AA6BA,SAAgB,oBAAoB,MAAkC;AACpE,QAAO,EACL,YAAY,EACV,QACA,WACA,WAK4B;EAC5B,MAAM,YAAY,6BAA6B,UAAU;EACzD,MAAM,SAAS,QACb,KAAK;GACH,MAAM,UAAU;GAChB;GACA,cAAc;GACd,OAAO;GACR,CAAC;EACJ,MAAM,UAAU,OACd,MAAM,CAAC;GAAE,IAAI;GAAO,MAAM;GAAiB,OAAO;GAAI,CAAC,CAAC;EAC1D,MAAM,UAAsC;GAC1C;GACA;GACA,WAAW;GACX,YAAY,CACV;IACE,SAAS;IACT,eAAe;KAAE;KAAW,WAAW;KAAS;IACjD,CACF;GACD,QAAQ;GACR,UAAU,EAAE;GACb;AACD,OAAK;GACH,MAAM,UAAU;GAChB;GACA,cAAc;GACd;GACA,SAAS;GACV,CAAC;AACF,SAAO;GACL,UAAU,SACR,OAAO;IACL,SAAS;IACT,kBAAkB;KAChB;KACA,YAAY,CACV;MAAE,GAAG;MAAM,IAAI;MAAuB,CACvC;KACF;IACF,CAAC;GACJ,SAAS,GAAG,UACV,OAAO;IACL,SAAS;IACT,kBAAkB;KAAE;KAAW,YAAY;KAAO;IACnD,CAAC;GACJ,aAAa,MAAM,UACjB,OAAO;IACL,SAAS;IACT,iBAAiB;KAAE;KAAW;KAAM;KAAO;IAC5C,CAAC;GACJ,aACE,MAAM,CAAC;IAAE,IAAI;IAAW,MAAM;IAAW,OAAO;IAAS,CAAC,CAAC;GAC9D;IAEJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/runtime",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@ai-sdk/openai": "^3.0.36",
|
|
66
66
|
"@cfworker/json-schema": "^4.1.1",
|
|
67
67
|
"@copilotkit/license-verifier": "~0.5.0",
|
|
68
|
-
"@copilotkit/shared": "2.0.0-rc.
|
|
68
|
+
"@copilotkit/shared": "2.0.0-rc.16",
|
|
69
69
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
70
70
|
"@remix-run/node-fetch-server": "^0.13.0",
|
|
71
71
|
"ai": "^6.0.104",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"hono": "^4.11.4",
|
|
102
102
|
"@hono/node-server": "^1.13.5",
|
|
103
103
|
"ws": "^8.18.0",
|
|
104
|
-
"
|
|
104
|
+
"@copilotkit/typescript-config": "1.55.0-next.8",
|
|
105
105
|
"@copilotkit/channels": "0.12.0"
|
|
106
106
|
},
|
|
107
107
|
"nx": {
|