@copilotkit/runtime 2.0.0-rc.15 → 2.0.0-rc.17

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.
@@ -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.15";
4
+ const RUNTIME_PACKAGE_VERSION = "2.0.0-rc.17";
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.15";
3
+ const RUNTIME_PACKAGE_VERSION = "2.0.0-rc.17";
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: "v1.0",
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: "v1.0",
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: "v1.0",
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: "v1.0",
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 { version: \"v1.0\", createSurface: { surfaceId, catalogId: catalog } },\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: \"v1.0\",\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: \"v1.0\",\n updateComponents: { surfaceId, components: nodes },\n }),\n updateData: (path, value) =>\n append({\n version: \"v1.0\",\n updateDataModel: { surfaceId, path, value },\n }),\n close: () =>\n patch([{ op: \"replace\", path: \"/status\", value: \"ready\" }]),\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AA4BA,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;IAAE,SAAS;IAAQ,eAAe;KAAE;KAAW,WAAW;KAAS;IAAE,CACtE;GACD,QAAQ;GACR,UAAU,EAAE;GACb;AACD,OAAK;GACH,MAAMD,wBAAU;GAChB;GACA,cAAcC;GACd;GACA,SAAS;GACV,CAAC;AACF,SAAO;GACL,UAAU,SACR,OAAO;IACL,SAAS;IACT,kBAAkB;KAChB;KACA,YAAY,CACV;MAAE,GAAG;MAAM,IAAIC;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"}
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":";;;;UAaiB,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
+ {"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":";;;;UAaiB,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
+ {"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: "v1.0",
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: "v1.0",
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: "v1.0",
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: "v1.0",
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 { version: \"v1.0\", createSurface: { surfaceId, catalogId: catalog } },\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: \"v1.0\",\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: \"v1.0\",\n updateComponents: { surfaceId, components: nodes },\n }),\n updateData: (path, value) =>\n append({\n version: \"v1.0\",\n updateDataModel: { surfaceId, path, value },\n }),\n close: () =>\n patch([{ op: \"replace\", path: \"/status\", value: \"ready\" }]),\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AA4BA,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;IAAE,SAAS;IAAQ,eAAe;KAAE;KAAW,WAAW;KAAS;IAAE,CACtE;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"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"disclosure.cjs","names":[],"sources":["../../../src/runtime/telemetry/disclosure.ts"],"sourcesContent":["// Runtime-side telemetry disclosure log.\n//\n// The runtime has shipped telemetry for some time (see `./telemetry-client.ts`).\n// Sends are anonymous by default but can carry a configured standalone or\n// legacy identity. This file surfaces a neutral one-line pointer to the opt-out\n// docs on first instantiation so the disclosure stays true for every identity\n// mode. It pairs with the inspector's first-run console disclosure.\n//\n// Fires at most once per process — runtime instances may be constructed\n// multiple times (tests, hot-reload), but the disclosure is informational\n// and a single line is enough.\n\nimport { processEnv } from \"@copilotkit/shared\";\n\n// Canonical telemetry docs page on main.\n// Mirror constant: packages/web-inspector/src/lib/telemetry.ts\nconst TELEMETRY_DOCS_URL = \"https://docs.copilotkit.ai/telemetry\";\n\nfunction isTelemetryDisabled(): boolean {\n const env = processEnv();\n return (\n env.COPILOTKIT_TELEMETRY_DISABLED === \"true\" ||\n env.COPILOTKIT_TELEMETRY_DISABLED === \"1\" ||\n env.DO_NOT_TRACK === \"true\" ||\n env.DO_NOT_TRACK === \"1\"\n );\n}\n\nlet disclosureLogged = false;\n\n/**\n * Logs a one-line telemetry notice on Runtime startup. No-op when telemetry is\n * disabled via `COPILOTKIT_TELEMETRY_DISABLED` or `DO_NOT_TRACK`, or when\n * already logged once in this process.\n *\n * Idempotent — safe to call from multiple constructor paths.\n */\nexport function logRuntimeTelemetryDisclosure(): void {\n if (disclosureLogged) return;\n if (isTelemetryDisabled()) return;\n disclosureLogged = true;\n // eslint-disable-next-line no-console\n console.info(\n `[CopilotKit Runtime] telemetry enabled — see ${TELEMETRY_DOCS_URL} to opt out (set COPILOTKIT_TELEMETRY_DISABLED=true).`,\n );\n}\n\n// Test-only reset hook so the once-per-process guard doesn't leak between\n// test cases. Not part of the public package surface — used by the runtime\n// disclosure tests.\nexport function _resetRuntimeTelemetryDisclosureForTesting(): void {\n disclosureLogged = false;\n}\n"],"mappings":";;;AAgBA,MAAM,qBAAqB;AAE3B,SAAS,sBAA+B;CACtC,MAAM,0CAAkB;AACxB,QACE,IAAI,kCAAkC,UACtC,IAAI,kCAAkC,OACtC,IAAI,iBAAiB,UACrB,IAAI,iBAAiB;;AAIzB,IAAI,mBAAmB;;;;;;;;AASvB,SAAgB,gCAAsC;AACpD,KAAI,iBAAkB;AACtB,KAAI,qBAAqB,CAAE;AAC3B,oBAAmB;AAEnB,SAAQ,KACN,gDAAgD,mBAAmB,uDACpE"}
1
+ {"version":3,"file":"disclosure.cjs","names":[],"sources":["../../../src/runtime/telemetry/disclosure.ts"],"sourcesContent":["// Runtime-side telemetry disclosure log.\n//\n// The runtime has shipped telemetry for some time (see `./telemetry-client.ts`).\n// Sends are anonymous by default but can carry a configured standalone or\n// legacy identity. This file surfaces a neutral one-line pointer to the opt-out\n// docs on first instantiation so the disclosure stays true for every identity\n// mode. It pairs with the inspector's first-run console disclosure.\n//\n// Fires at most once per process — runtime instances may be constructed\n// multiple times (tests, hot-reload), but the disclosure is informational\n// and a single line is enough.\n\nimport { processEnv } from \"@copilotkit/shared\";\n\n// Canonical telemetry docs page on main.\n// Mirror constant: packages/web-inspector/src/shared/telemetry/privacy.ts\nconst TELEMETRY_DOCS_URL = \"https://docs.copilotkit.ai/telemetry\";\n\nfunction isTelemetryDisabled(): boolean {\n const env = processEnv();\n return (\n env.COPILOTKIT_TELEMETRY_DISABLED === \"true\" ||\n env.COPILOTKIT_TELEMETRY_DISABLED === \"1\" ||\n env.DO_NOT_TRACK === \"true\" ||\n env.DO_NOT_TRACK === \"1\"\n );\n}\n\nlet disclosureLogged = false;\n\n/**\n * Logs a one-line telemetry notice on Runtime startup. No-op when telemetry is\n * disabled via `COPILOTKIT_TELEMETRY_DISABLED` or `DO_NOT_TRACK`, or when\n * already logged once in this process.\n *\n * Idempotent — safe to call from multiple constructor paths.\n */\nexport function logRuntimeTelemetryDisclosure(): void {\n if (disclosureLogged) return;\n if (isTelemetryDisabled()) return;\n disclosureLogged = true;\n // eslint-disable-next-line no-console\n console.info(\n `[CopilotKit Runtime] telemetry enabled — see ${TELEMETRY_DOCS_URL} to opt out (set COPILOTKIT_TELEMETRY_DISABLED=true).`,\n );\n}\n\n// Test-only reset hook so the once-per-process guard doesn't leak between\n// test cases. Not part of the public package surface — used by the runtime\n// disclosure tests.\nexport function _resetRuntimeTelemetryDisclosureForTesting(): void {\n disclosureLogged = false;\n}\n"],"mappings":";;;AAgBA,MAAM,qBAAqB;AAE3B,SAAS,sBAA+B;CACtC,MAAM,0CAAkB;AACxB,QACE,IAAI,kCAAkC,UACtC,IAAI,kCAAkC,OACtC,IAAI,iBAAiB,UACrB,IAAI,iBAAiB;;AAIzB,IAAI,mBAAmB;;;;;;;;AASvB,SAAgB,gCAAsC;AACpD,KAAI,iBAAkB;AACtB,KAAI,qBAAqB,CAAE;AAC3B,oBAAmB;AAEnB,SAAQ,KACN,gDAAgD,mBAAmB,uDACpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"disclosure.mjs","names":[],"sources":["../../../src/runtime/telemetry/disclosure.ts"],"sourcesContent":["// Runtime-side telemetry disclosure log.\n//\n// The runtime has shipped telemetry for some time (see `./telemetry-client.ts`).\n// Sends are anonymous by default but can carry a configured standalone or\n// legacy identity. This file surfaces a neutral one-line pointer to the opt-out\n// docs on first instantiation so the disclosure stays true for every identity\n// mode. It pairs with the inspector's first-run console disclosure.\n//\n// Fires at most once per process — runtime instances may be constructed\n// multiple times (tests, hot-reload), but the disclosure is informational\n// and a single line is enough.\n\nimport { processEnv } from \"@copilotkit/shared\";\n\n// Canonical telemetry docs page on main.\n// Mirror constant: packages/web-inspector/src/lib/telemetry.ts\nconst TELEMETRY_DOCS_URL = \"https://docs.copilotkit.ai/telemetry\";\n\nfunction isTelemetryDisabled(): boolean {\n const env = processEnv();\n return (\n env.COPILOTKIT_TELEMETRY_DISABLED === \"true\" ||\n env.COPILOTKIT_TELEMETRY_DISABLED === \"1\" ||\n env.DO_NOT_TRACK === \"true\" ||\n env.DO_NOT_TRACK === \"1\"\n );\n}\n\nlet disclosureLogged = false;\n\n/**\n * Logs a one-line telemetry notice on Runtime startup. No-op when telemetry is\n * disabled via `COPILOTKIT_TELEMETRY_DISABLED` or `DO_NOT_TRACK`, or when\n * already logged once in this process.\n *\n * Idempotent — safe to call from multiple constructor paths.\n */\nexport function logRuntimeTelemetryDisclosure(): void {\n if (disclosureLogged) return;\n if (isTelemetryDisabled()) return;\n disclosureLogged = true;\n // eslint-disable-next-line no-console\n console.info(\n `[CopilotKit Runtime] telemetry enabled — see ${TELEMETRY_DOCS_URL} to opt out (set COPILOTKIT_TELEMETRY_DISABLED=true).`,\n );\n}\n\n// Test-only reset hook so the once-per-process guard doesn't leak between\n// test cases. Not part of the public package surface — used by the runtime\n// disclosure tests.\nexport function _resetRuntimeTelemetryDisclosureForTesting(): void {\n disclosureLogged = false;\n}\n"],"mappings":";;;AAgBA,MAAM,qBAAqB;AAE3B,SAAS,sBAA+B;CACtC,MAAM,MAAM,YAAY;AACxB,QACE,IAAI,kCAAkC,UACtC,IAAI,kCAAkC,OACtC,IAAI,iBAAiB,UACrB,IAAI,iBAAiB;;AAIzB,IAAI,mBAAmB;;;;;;;;AASvB,SAAgB,gCAAsC;AACpD,KAAI,iBAAkB;AACtB,KAAI,qBAAqB,CAAE;AAC3B,oBAAmB;AAEnB,SAAQ,KACN,gDAAgD,mBAAmB,uDACpE"}
1
+ {"version":3,"file":"disclosure.mjs","names":[],"sources":["../../../src/runtime/telemetry/disclosure.ts"],"sourcesContent":["// Runtime-side telemetry disclosure log.\n//\n// The runtime has shipped telemetry for some time (see `./telemetry-client.ts`).\n// Sends are anonymous by default but can carry a configured standalone or\n// legacy identity. This file surfaces a neutral one-line pointer to the opt-out\n// docs on first instantiation so the disclosure stays true for every identity\n// mode. It pairs with the inspector's first-run console disclosure.\n//\n// Fires at most once per process — runtime instances may be constructed\n// multiple times (tests, hot-reload), but the disclosure is informational\n// and a single line is enough.\n\nimport { processEnv } from \"@copilotkit/shared\";\n\n// Canonical telemetry docs page on main.\n// Mirror constant: packages/web-inspector/src/shared/telemetry/privacy.ts\nconst TELEMETRY_DOCS_URL = \"https://docs.copilotkit.ai/telemetry\";\n\nfunction isTelemetryDisabled(): boolean {\n const env = processEnv();\n return (\n env.COPILOTKIT_TELEMETRY_DISABLED === \"true\" ||\n env.COPILOTKIT_TELEMETRY_DISABLED === \"1\" ||\n env.DO_NOT_TRACK === \"true\" ||\n env.DO_NOT_TRACK === \"1\"\n );\n}\n\nlet disclosureLogged = false;\n\n/**\n * Logs a one-line telemetry notice on Runtime startup. No-op when telemetry is\n * disabled via `COPILOTKIT_TELEMETRY_DISABLED` or `DO_NOT_TRACK`, or when\n * already logged once in this process.\n *\n * Idempotent — safe to call from multiple constructor paths.\n */\nexport function logRuntimeTelemetryDisclosure(): void {\n if (disclosureLogged) return;\n if (isTelemetryDisabled()) return;\n disclosureLogged = true;\n // eslint-disable-next-line no-console\n console.info(\n `[CopilotKit Runtime] telemetry enabled — see ${TELEMETRY_DOCS_URL} to opt out (set COPILOTKIT_TELEMETRY_DISABLED=true).`,\n );\n}\n\n// Test-only reset hook so the once-per-process guard doesn't leak between\n// test cases. Not part of the public package surface — used by the runtime\n// disclosure tests.\nexport function _resetRuntimeTelemetryDisclosureForTesting(): void {\n disclosureLogged = false;\n}\n"],"mappings":";;;AAgBA,MAAM,qBAAqB;AAE3B,SAAS,sBAA+B;CACtC,MAAM,MAAM,YAAY;AACxB,QACE,IAAI,kCAAkC,UACtC,IAAI,kCAAkC,OACtC,IAAI,iBAAiB,UACrB,IAAI,iBAAiB;;AAIzB,IAAI,mBAAmB;;;;;;;;AASvB,SAAgB,gCAAsC;AACpD,KAAI,iBAAkB;AACtB,KAAI,qBAAqB,CAAE;AAC3B,oBAAmB;AAEnB,SAAQ,KACN,gDAAgD,mBAAmB,uDACpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/runtime",
3
- "version": "2.0.0-rc.15",
3
+ "version": "2.0.0-rc.17",
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.15",
68
+ "@copilotkit/shared": "2.0.0-rc.17",
69
69
  "@modelcontextprotocol/sdk": "^1.29.0",
70
70
  "@remix-run/node-fetch-server": "^0.13.0",
71
71
  "ai": "^6.0.104",
@@ -73,8 +73,8 @@
73
73
  "phoenix": "^1.8.4",
74
74
  "rxjs": "7.8.1",
75
75
  "zod": "^4.2.0",
76
- "@copilotkit/channels-core": "^0.12.0",
77
- "@copilotkit/channels-intelligence": "^0.12.0"
76
+ "@copilotkit/channels-intelligence": "^0.12.0",
77
+ "@copilotkit/channels-core": "^0.12.0"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@copilotkit/aimock": "latest",
@@ -101,8 +101,8 @@
101
101
  "hono": "^4.11.4",
102
102
  "@hono/node-server": "^1.13.5",
103
103
  "ws": "^8.18.0",
104
- "@copilotkit/channels": "0.12.0",
105
- "@copilotkit/typescript-config": "1.55.0-next.8"
104
+ "@copilotkit/typescript-config": "1.55.0-next.8",
105
+ "@copilotkit/channels": "0.12.0"
106
106
  },
107
107
  "nx": {
108
108
  "targets": {