Files
copilotkit__copilotkit/examples/v2/vue/demo/server/utils/endpoints.ts
Ran Shem Tov 5693a60625 feat(vue-demo): add A2UI catalog-on-provider demo + fix DemoButtonAgent
Adds /a2ui-catalog page and a runtime endpoint with NO a2ui config, so
A2UI switches on purely from the provider's a2ui.catalog (the #5774
path). Also fixes DemoButtonAgent, which never actually rendered: it
emitted the wrong activity content key (operations -> a2ui_operations)
and a non-canonical operation/component format. Rewritten to the A2UI
v0.9 wire format (createSurface/updateComponents, flat components, root
id "root") so the surface paints and the Confirm round-trip works.
2026-06-30 16:33:24 +02:00

35 lines
909 B
TypeScript

import {
createCopilotEndpoint,
createCopilotEndpointSingleRoute,
} from "@copilotkit/runtime/v2";
import {
createCatalogOnlyRuntime,
createDefaultRuntime,
createMcpRuntime,
} from "./runtime";
const defaultRuntime = createDefaultRuntime();
const singleRuntime = createDefaultRuntime();
const mcpRuntime = createMcpRuntime();
const catalogOnlyRuntime = createCatalogOnlyRuntime();
export const copilotEndpoint = createCopilotEndpoint({
runtime: defaultRuntime,
basePath: "/api/copilotkit",
});
export const copilotSingleEndpoint = createCopilotEndpointSingleRoute({
runtime: singleRuntime,
basePath: "/api/copilotkit-single",
});
export const copilotMcpEndpoint = createCopilotEndpoint({
runtime: mcpRuntime,
basePath: "/api/copilotkit-mcp",
});
export const copilotCatalogEndpoint = createCopilotEndpoint({
runtime: catalogOnlyRuntime,
basePath: "/api/copilotkit-catalog",
});