@copilotkit/angular 0.1.2 → 0.3.0
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 +146 -6
- package/dist/README.md +146 -6
- package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs +821 -0
- package/dist/fesm2022/copilotkit-angular-mcp-apps.mjs.map +1 -0
- package/dist/fesm2022/copilotkit-angular.mjs +4317 -1070
- package/dist/fesm2022/copilotkit-angular.mjs.map +1 -1
- package/dist/{types/copilotkit-angular.d.ts → index.d.ts} +1653 -374
- package/dist/mcp-apps/index.d.ts +343 -0
- package/dist/styles.css +8 -5
- package/package.json +71 -34
- package/scripts/normalize-package-exports.mjs +17 -0
- package/tsconfig.json +1 -0
- package/vitest.config.mts +3 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
4
|
+
import { AbstractAgent } from '@ag-ui/client';
|
|
5
|
+
import { ActivityRenderer, RenderActivityMessageConfig } from '@copilotkit/angular';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Content schema for `activityType: "mcp-apps"` activity messages: a snapshot
|
|
9
|
+
* of an MCP Apps tool call, carrying the middleware server hash, optional
|
|
10
|
+
* stable server id, the ui:// resource to render, and its tool exchange.
|
|
11
|
+
*
|
|
12
|
+
* Kept local and declared with the `zod/v4` API so the Angular browser bundle
|
|
13
|
+
* validates protocol data without taking a direct MCP client SDK dependency.
|
|
14
|
+
*/
|
|
15
|
+
declare const mcpAppsSnapshotContentSchema: z.ZodObject<{
|
|
16
|
+
serverHash: z.ZodString;
|
|
17
|
+
serverId: z.ZodOptional<z.ZodString>;
|
|
18
|
+
resourceUri: z.ZodString;
|
|
19
|
+
result: z.ZodObject<{
|
|
20
|
+
content: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"text">;
|
|
22
|
+
text: z.ZodString;
|
|
23
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
24
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
25
|
+
user: "user";
|
|
26
|
+
assistant: "assistant";
|
|
27
|
+
}>>>;
|
|
28
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$loose>>;
|
|
31
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"image">;
|
|
33
|
+
data: z.ZodString;
|
|
34
|
+
mimeType: z.ZodString;
|
|
35
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
37
|
+
user: "user";
|
|
38
|
+
assistant: "assistant";
|
|
39
|
+
}>>>;
|
|
40
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<"audio">;
|
|
45
|
+
data: z.ZodString;
|
|
46
|
+
mimeType: z.ZodString;
|
|
47
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
49
|
+
user: "user";
|
|
50
|
+
assistant: "assistant";
|
|
51
|
+
}>>>;
|
|
52
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$loose>>;
|
|
55
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"resource">;
|
|
57
|
+
resource: z.ZodUnion<readonly [z.ZodObject<{
|
|
58
|
+
uri: z.ZodString;
|
|
59
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
60
|
+
text: z.ZodString;
|
|
61
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
62
|
+
uri: z.ZodString;
|
|
63
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
64
|
+
blob: z.ZodString;
|
|
65
|
+
}, z.core.$loose>]>;
|
|
66
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
68
|
+
user: "user";
|
|
69
|
+
assistant: "assistant";
|
|
70
|
+
}>>>;
|
|
71
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$loose>>;
|
|
74
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"resource_link">;
|
|
76
|
+
uri: z.ZodString;
|
|
77
|
+
name: z.ZodString;
|
|
78
|
+
description: z.ZodOptional<z.ZodString>;
|
|
79
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
80
|
+
annotations: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
82
|
+
user: "user";
|
|
83
|
+
assistant: "assistant";
|
|
84
|
+
}>>>;
|
|
85
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
lastModified: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$loose>>;
|
|
88
|
+
}, z.core.$loose>]>>>;
|
|
89
|
+
structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
90
|
+
isError: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
_meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
92
|
+
}, z.core.$loose>;
|
|
93
|
+
toolInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
94
|
+
}, z.core.$loose>;
|
|
95
|
+
/** Parsed content of an `mcp-apps` activity message. */
|
|
96
|
+
type MCPAppsSnapshotContent = z.infer<typeof mcpAppsSnapshotContentSchema>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Renders one MCP App snapshot through the same agent-mediated protocol used
|
|
100
|
+
* by the other CopilotKit frontends. Each instance owns its queued work and
|
|
101
|
+
* sandbox listener, while requests remain serialized per agent thread.
|
|
102
|
+
*/
|
|
103
|
+
declare class CopilotMCPAppsWidget {
|
|
104
|
+
private readonly config;
|
|
105
|
+
private readonly copilotKit;
|
|
106
|
+
private readonly platformId;
|
|
107
|
+
private readonly ownerId;
|
|
108
|
+
private readonly queue;
|
|
109
|
+
private renderVersion;
|
|
110
|
+
readonly data: _angular_core.InputSignal<{
|
|
111
|
+
[x: string]: unknown;
|
|
112
|
+
serverHash: string;
|
|
113
|
+
resourceUri: string;
|
|
114
|
+
result: {
|
|
115
|
+
[x: string]: unknown;
|
|
116
|
+
content: ({
|
|
117
|
+
[x: string]: unknown;
|
|
118
|
+
type: "text";
|
|
119
|
+
text: string;
|
|
120
|
+
annotations?: {
|
|
121
|
+
[x: string]: unknown;
|
|
122
|
+
audience?: ("user" | "assistant")[];
|
|
123
|
+
priority?: number;
|
|
124
|
+
lastModified?: string;
|
|
125
|
+
};
|
|
126
|
+
} | {
|
|
127
|
+
[x: string]: unknown;
|
|
128
|
+
type: "image";
|
|
129
|
+
data: string;
|
|
130
|
+
mimeType: string;
|
|
131
|
+
annotations?: {
|
|
132
|
+
[x: string]: unknown;
|
|
133
|
+
audience?: ("user" | "assistant")[];
|
|
134
|
+
priority?: number;
|
|
135
|
+
lastModified?: string;
|
|
136
|
+
};
|
|
137
|
+
} | {
|
|
138
|
+
[x: string]: unknown;
|
|
139
|
+
type: "audio";
|
|
140
|
+
data: string;
|
|
141
|
+
mimeType: string;
|
|
142
|
+
annotations?: {
|
|
143
|
+
[x: string]: unknown;
|
|
144
|
+
audience?: ("user" | "assistant")[];
|
|
145
|
+
priority?: number;
|
|
146
|
+
lastModified?: string;
|
|
147
|
+
};
|
|
148
|
+
} | {
|
|
149
|
+
[x: string]: unknown;
|
|
150
|
+
type: "resource";
|
|
151
|
+
resource?: {
|
|
152
|
+
[x: string]: unknown;
|
|
153
|
+
uri: string;
|
|
154
|
+
text: string;
|
|
155
|
+
mimeType?: string;
|
|
156
|
+
} | {
|
|
157
|
+
[x: string]: unknown;
|
|
158
|
+
uri: string;
|
|
159
|
+
blob: string;
|
|
160
|
+
mimeType?: string;
|
|
161
|
+
};
|
|
162
|
+
annotations?: {
|
|
163
|
+
[x: string]: unknown;
|
|
164
|
+
audience?: ("user" | "assistant")[];
|
|
165
|
+
priority?: number;
|
|
166
|
+
lastModified?: string;
|
|
167
|
+
};
|
|
168
|
+
} | {
|
|
169
|
+
[x: string]: unknown;
|
|
170
|
+
type: "resource_link";
|
|
171
|
+
uri: string;
|
|
172
|
+
name: string;
|
|
173
|
+
description?: string;
|
|
174
|
+
mimeType?: string;
|
|
175
|
+
annotations?: {
|
|
176
|
+
[x: string]: unknown;
|
|
177
|
+
audience?: ("user" | "assistant")[];
|
|
178
|
+
priority?: number;
|
|
179
|
+
lastModified?: string;
|
|
180
|
+
};
|
|
181
|
+
})[];
|
|
182
|
+
structuredContent?: Record<string, unknown>;
|
|
183
|
+
isError?: boolean;
|
|
184
|
+
_meta?: Record<string, unknown>;
|
|
185
|
+
};
|
|
186
|
+
serverId?: string;
|
|
187
|
+
toolInput?: Record<string, unknown>;
|
|
188
|
+
}>;
|
|
189
|
+
readonly agent: _angular_core.InputSignal<AbstractAgent>;
|
|
190
|
+
private readonly renderSession;
|
|
191
|
+
private readonly appFrame;
|
|
192
|
+
protected readonly loading: _angular_core.WritableSignal<boolean>;
|
|
193
|
+
protected readonly error: _angular_core.WritableSignal<string>;
|
|
194
|
+
constructor();
|
|
195
|
+
private renderApp;
|
|
196
|
+
private connectSandbox;
|
|
197
|
+
private handleMessage;
|
|
198
|
+
private handleUIMessage;
|
|
199
|
+
private handleOpenLink;
|
|
200
|
+
private handleToolCall;
|
|
201
|
+
private sendResponse;
|
|
202
|
+
private sendError;
|
|
203
|
+
private sendNotification;
|
|
204
|
+
private fail;
|
|
205
|
+
private resetFrame;
|
|
206
|
+
private throwIfStale;
|
|
207
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotMCPAppsWidget, never>;
|
|
208
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotMCPAppsWidget, "copilot-mcp-apps-widget", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "agent": { "alias": "agent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Activity renderer for `mcp-apps` snapshots. Renders the referenced MCP App
|
|
213
|
+
* inline via {@link CopilotMCPAppsWidget}. Resource and tool requests are
|
|
214
|
+
* proxied through the activity's selected AG-UI agent.
|
|
215
|
+
*/
|
|
216
|
+
declare class CopilotMCPAppsActivityRenderer implements ActivityRenderer<MCPAppsSnapshotContent> {
|
|
217
|
+
readonly activityType: _angular_core.InputSignal<string>;
|
|
218
|
+
readonly content: _angular_core.InputSignal<{
|
|
219
|
+
[x: string]: unknown;
|
|
220
|
+
serverHash: string;
|
|
221
|
+
resourceUri: string;
|
|
222
|
+
result: {
|
|
223
|
+
[x: string]: unknown;
|
|
224
|
+
content: ({
|
|
225
|
+
[x: string]: unknown;
|
|
226
|
+
type: "text";
|
|
227
|
+
text: string;
|
|
228
|
+
annotations?: {
|
|
229
|
+
[x: string]: unknown;
|
|
230
|
+
audience?: ("user" | "assistant")[];
|
|
231
|
+
priority?: number;
|
|
232
|
+
lastModified?: string;
|
|
233
|
+
};
|
|
234
|
+
} | {
|
|
235
|
+
[x: string]: unknown;
|
|
236
|
+
type: "image";
|
|
237
|
+
data: string;
|
|
238
|
+
mimeType: string;
|
|
239
|
+
annotations?: {
|
|
240
|
+
[x: string]: unknown;
|
|
241
|
+
audience?: ("user" | "assistant")[];
|
|
242
|
+
priority?: number;
|
|
243
|
+
lastModified?: string;
|
|
244
|
+
};
|
|
245
|
+
} | {
|
|
246
|
+
[x: string]: unknown;
|
|
247
|
+
type: "audio";
|
|
248
|
+
data: string;
|
|
249
|
+
mimeType: string;
|
|
250
|
+
annotations?: {
|
|
251
|
+
[x: string]: unknown;
|
|
252
|
+
audience?: ("user" | "assistant")[];
|
|
253
|
+
priority?: number;
|
|
254
|
+
lastModified?: string;
|
|
255
|
+
};
|
|
256
|
+
} | {
|
|
257
|
+
[x: string]: unknown;
|
|
258
|
+
type: "resource";
|
|
259
|
+
resource?: {
|
|
260
|
+
[x: string]: unknown;
|
|
261
|
+
uri: string;
|
|
262
|
+
text: string;
|
|
263
|
+
mimeType?: string;
|
|
264
|
+
} | {
|
|
265
|
+
[x: string]: unknown;
|
|
266
|
+
uri: string;
|
|
267
|
+
blob: string;
|
|
268
|
+
mimeType?: string;
|
|
269
|
+
};
|
|
270
|
+
annotations?: {
|
|
271
|
+
[x: string]: unknown;
|
|
272
|
+
audience?: ("user" | "assistant")[];
|
|
273
|
+
priority?: number;
|
|
274
|
+
lastModified?: string;
|
|
275
|
+
};
|
|
276
|
+
} | {
|
|
277
|
+
[x: string]: unknown;
|
|
278
|
+
type: "resource_link";
|
|
279
|
+
uri: string;
|
|
280
|
+
name: string;
|
|
281
|
+
description?: string;
|
|
282
|
+
mimeType?: string;
|
|
283
|
+
annotations?: {
|
|
284
|
+
[x: string]: unknown;
|
|
285
|
+
audience?: ("user" | "assistant")[];
|
|
286
|
+
priority?: number;
|
|
287
|
+
lastModified?: string;
|
|
288
|
+
};
|
|
289
|
+
})[];
|
|
290
|
+
structuredContent?: Record<string, unknown>;
|
|
291
|
+
isError?: boolean;
|
|
292
|
+
_meta?: Record<string, unknown>;
|
|
293
|
+
};
|
|
294
|
+
serverId?: string;
|
|
295
|
+
toolInput?: Record<string, unknown>;
|
|
296
|
+
}>;
|
|
297
|
+
readonly message: _angular_core.InputSignal<{
|
|
298
|
+
role: "activity";
|
|
299
|
+
content: Record<string, any>;
|
|
300
|
+
id: string;
|
|
301
|
+
activityType: string;
|
|
302
|
+
}>;
|
|
303
|
+
readonly agent: _angular_core.InputSignal<AbstractAgent>;
|
|
304
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CopilotMCPAppsActivityRenderer, never>;
|
|
305
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CopilotMCPAppsActivityRenderer, "copilot-mcp-apps-activity-renderer", never, { "activityType": { "alias": "activityType"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "agent": { "alias": "agent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Ready-to-register render config for `mcp-apps` activity messages. Pass it
|
|
309
|
+
* to `provideCopilotKit({ renderActivityMessages: [...] })`.
|
|
310
|
+
*/
|
|
311
|
+
declare const mcpAppsActivityRendererConfig: RenderActivityMessageConfig<MCPAppsSnapshotContent>;
|
|
312
|
+
|
|
313
|
+
interface MCPAppsHostInfo {
|
|
314
|
+
name: string;
|
|
315
|
+
version: string;
|
|
316
|
+
}
|
|
317
|
+
interface MCPAppsConfig {
|
|
318
|
+
/** Maximum time to wait for a busy agent before a queued request fails. */
|
|
319
|
+
idleTimeoutMs?: number;
|
|
320
|
+
/** Maximum time to wait for the sandbox proxy initialization handshake. */
|
|
321
|
+
initializationTimeoutMs?: number;
|
|
322
|
+
/** Host identity announced during the MCP Apps initialization handshake. */
|
|
323
|
+
hostInfo?: MCPAppsHostInfo;
|
|
324
|
+
/** Additional protocol capabilities announced to embedded MCP Apps. */
|
|
325
|
+
hostCapabilities?: Record<string, unknown>;
|
|
326
|
+
/** Additional non-secret UI context announced to embedded MCP Apps. */
|
|
327
|
+
hostContext?: Record<string, unknown>;
|
|
328
|
+
}
|
|
329
|
+
declare const DEFAULT_MCP_APPS_CONFIG: Readonly<Required<MCPAppsConfig>>;
|
|
330
|
+
/** Holds renderer behavior configuration registered via `provideMCPApps`. */
|
|
331
|
+
declare const MCP_APPS_CONFIG: InjectionToken<Required<MCPAppsConfig>>;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Configures and registers the built-in MCP Apps renderer.
|
|
335
|
+
*
|
|
336
|
+
* MCP resource and tool requests always travel through the selected AG-UI
|
|
337
|
+
* agent. Server URLs deliberately are not accepted by this browser provider.
|
|
338
|
+
* Application renderers retain precedence over this built-in registration.
|
|
339
|
+
*/
|
|
340
|
+
declare function provideMCPApps(config?: MCPAppsConfig): EnvironmentProviders;
|
|
341
|
+
|
|
342
|
+
export { CopilotMCPAppsActivityRenderer, CopilotMCPAppsWidget, DEFAULT_MCP_APPS_CONFIG, MCP_APPS_CONFIG, mcpAppsActivityRendererConfig, mcpAppsSnapshotContentSchema, provideMCPApps };
|
|
343
|
+
export type { MCPAppsConfig, MCPAppsHostInfo, MCPAppsSnapshotContent };
|
package/dist/styles.css
CHANGED
|
@@ -188,6 +188,9 @@
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
@layer utilities {
|
|
191
|
+
.cpk\:\@container {
|
|
192
|
+
container-type: inline-size;
|
|
193
|
+
}
|
|
191
194
|
.cpk\:pointer-events-auto {
|
|
192
195
|
pointer-events: auto;
|
|
193
196
|
}
|
|
@@ -1606,11 +1609,6 @@
|
|
|
1606
1609
|
gap: calc(var(--cpk-spacing) * 2);
|
|
1607
1610
|
}
|
|
1608
1611
|
}
|
|
1609
|
-
.cpk\:sm\:px-0 {
|
|
1610
|
-
@media (width >= 40rem) {
|
|
1611
|
-
padding-inline: calc(var(--cpk-spacing) * 0);
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
1612
|
.cpk\:sm\:px-3 {
|
|
1615
1613
|
@media (width >= 40rem) {
|
|
1616
1614
|
padding-inline: calc(var(--cpk-spacing) * 3);
|
|
@@ -1638,6 +1636,11 @@
|
|
|
1638
1636
|
margin-left: calc(var(--cpk-spacing) * 4);
|
|
1639
1637
|
}
|
|
1640
1638
|
}
|
|
1639
|
+
.cpk\:\@3xl\:px-0 {
|
|
1640
|
+
@container (width >= 48rem) {
|
|
1641
|
+
padding-inline: calc(var(--cpk-spacing) * 0);
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1641
1644
|
.cpk\:dark\:border-\[\#404040\] {
|
|
1642
1645
|
&:is(.dark *) {
|
|
1643
1646
|
border-color: #404040;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Angular library for CopilotKit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -9,60 +9,84 @@
|
|
|
9
9
|
"directory": "packages/angular"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
12
13
|
"main": "dist/fesm2022/copilotkit-angular.mjs",
|
|
13
14
|
"module": "dist/fesm2022/copilotkit-angular.mjs",
|
|
14
|
-
"types": "dist/
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"import": {
|
|
18
|
-
"types": "./dist/
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
19
20
|
"default": "./dist/fesm2022/copilotkit-angular.mjs"
|
|
20
21
|
}
|
|
21
22
|
},
|
|
23
|
+
"./mcp-apps": {
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./dist/mcp-apps/index.d.ts",
|
|
26
|
+
"default": "./dist/fesm2022/copilotkit-angular-mcp-apps.mjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
22
29
|
"./styles.css": "./dist/styles.css"
|
|
23
30
|
},
|
|
24
31
|
"publishConfig": {
|
|
25
32
|
"access": "public"
|
|
26
33
|
},
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
"copilotkit": {
|
|
35
|
+
"angularSupport": {
|
|
36
|
+
"compilerMajor": 20,
|
|
37
|
+
"rxjs": "^7.8.0",
|
|
38
|
+
"testedRxjs": "7.8.1",
|
|
39
|
+
"supportedMajors": [
|
|
40
|
+
{
|
|
41
|
+
"angular": "20.3.26",
|
|
42
|
+
"cdk": "20.2.14",
|
|
43
|
+
"major": 20,
|
|
44
|
+
"typescript": "5.9.3"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"angular": "21.2.18",
|
|
48
|
+
"cdk": "21.2.14",
|
|
49
|
+
"major": 21,
|
|
50
|
+
"typescript": "5.9.3"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"angular": "22.0.7",
|
|
54
|
+
"cdk": "22.0.5",
|
|
55
|
+
"major": 22,
|
|
56
|
+
"typescript": "6.0.3"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
37
60
|
},
|
|
38
61
|
"dependencies": {
|
|
39
62
|
"@ag-ui/client": "0.0.57",
|
|
40
63
|
"@ag-ui/core": "0.0.57",
|
|
41
|
-
"@copilotkit/a2ui-renderer": "^1.60.2",
|
|
42
|
-
"@copilotkit/core": "^1.60.2",
|
|
43
|
-
"@copilotkit/shared": "^1.60.2",
|
|
44
64
|
"@jetbrains/websandbox": "^1.1.3",
|
|
45
65
|
"clsx": "^2.1.1",
|
|
46
66
|
"highlight.js": "^11.11.1",
|
|
47
67
|
"katex": "^0.16.22",
|
|
48
|
-
"lucide-angular": "^0.540.0",
|
|
49
68
|
"marked": "^16.2.0",
|
|
50
69
|
"rxjs": "^7.8.1",
|
|
51
70
|
"tailwind-merge": "^2.6.0",
|
|
52
71
|
"tslib": "^2.6.0",
|
|
53
|
-
"zod
|
|
72
|
+
"zod": "^3.25.75",
|
|
73
|
+
"zod-to-json-schema": "^3.24.5",
|
|
74
|
+
"@copilotkit/core": "1.63.2",
|
|
75
|
+
"@copilotkit/a2ui-renderer": "1.63.2",
|
|
76
|
+
"@copilotkit/web-components": "1.63.2",
|
|
77
|
+
"@copilotkit/shared": "1.63.2"
|
|
54
78
|
},
|
|
55
79
|
"devDependencies": {
|
|
56
|
-
"@analogjs/vite-plugin-angular": "
|
|
57
|
-
"@analogjs/vitest-angular": "
|
|
58
|
-
"@angular/
|
|
59
|
-
"@angular/
|
|
60
|
-
"@angular/
|
|
61
|
-
"@angular/compiler
|
|
62
|
-
"@angular/
|
|
63
|
-
"@angular/
|
|
64
|
-
"@angular/platform-browser
|
|
65
|
-
"@
|
|
80
|
+
"@analogjs/vite-plugin-angular": "1.20.2",
|
|
81
|
+
"@analogjs/vitest-angular": "1.20.2",
|
|
82
|
+
"@angular-devkit/architect": "0.2003.26",
|
|
83
|
+
"@angular/cdk": "20.2.14",
|
|
84
|
+
"@angular/common": "20.3.26",
|
|
85
|
+
"@angular/compiler": "20.3.26",
|
|
86
|
+
"@angular/compiler-cli": "20.3.26",
|
|
87
|
+
"@angular/core": "20.3.26",
|
|
88
|
+
"@angular/platform-browser": "20.3.26",
|
|
89
|
+
"@angular/platform-browser-dynamic": "20.3.26",
|
|
66
90
|
"@tailwindcss/cli": "^4.1.11",
|
|
67
91
|
"@tailwindcss/postcss": "^4.1.11",
|
|
68
92
|
"@tailwindcss/typography": "^0.5.16",
|
|
@@ -70,9 +94,11 @@
|
|
|
70
94
|
"@types/node": "^22.5.1",
|
|
71
95
|
"@vitest/ui": "^3.2.4",
|
|
72
96
|
"autoprefixer": "^10.4.16",
|
|
97
|
+
"axe-core": "4.11.1",
|
|
98
|
+
"chokidar": "4.0.3",
|
|
73
99
|
"concurrently": "^9.1.0",
|
|
74
100
|
"jsdom": "^24.0.0",
|
|
75
|
-
"ng-packagr": "
|
|
101
|
+
"ng-packagr": "20.3.2",
|
|
76
102
|
"postcss": "^8.4.31",
|
|
77
103
|
"reflect-metadata": "^0.2.2",
|
|
78
104
|
"rimraf": "^6.0.1",
|
|
@@ -83,12 +109,23 @@
|
|
|
83
109
|
"typescript": "5.9.3",
|
|
84
110
|
"vite": "^7.1.4",
|
|
85
111
|
"vitest": "^3.2.4",
|
|
86
|
-
"
|
|
112
|
+
"@copilotkit/typescript-config": "1.55.0-next.8"
|
|
87
113
|
},
|
|
88
114
|
"peerDependencies": {
|
|
89
|
-
"@angular/cdk": "^
|
|
90
|
-
"@angular/common": "^
|
|
91
|
-
"@angular/core": "^
|
|
115
|
+
"@angular/cdk": "^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
116
|
+
"@angular/common": "^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
117
|
+
"@angular/core": "^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
92
118
|
"rxjs": "^7.8.0"
|
|
119
|
+
},
|
|
120
|
+
"scripts": {
|
|
121
|
+
"build": "ng-packagr -p ng-package.json && node scripts/normalize-package-exports.mjs && npm run build:css",
|
|
122
|
+
"build:css": "tailwindcss -i ./src/styles/globals.css -o ./src/styles/generated.css && node scripts/scope-preflight.mjs ./src/styles/generated.css && node -e \"const fs=require('fs');fs.mkdirSync('./dist',{recursive:true});fs.cpSync('./src/styles/generated.css','./dist/styles.css')\"",
|
|
123
|
+
"dev": "concurrently \"ng-packagr -p ng-package.json --watch\" \"npm run dev:css\"",
|
|
124
|
+
"dev:css": "tailwindcss -i ./src/styles/globals.css -o ./src/styles/generated.css --watch",
|
|
125
|
+
"check-types": "tsc --noEmit",
|
|
126
|
+
"test": "vitest run",
|
|
127
|
+
"test:watch": "vitest --watch",
|
|
128
|
+
"publint": "publint .",
|
|
129
|
+
"attw": "attw --pack . --profile node16"
|
|
93
130
|
}
|
|
94
|
-
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
|
|
3
|
+
const manifestUrl = new URL("../dist/package.json", import.meta.url);
|
|
4
|
+
const manifest = JSON.parse(await readFile(manifestUrl, "utf8"));
|
|
5
|
+
|
|
6
|
+
for (const entry of Object.values(manifest.exports ?? {})) {
|
|
7
|
+
if (
|
|
8
|
+
entry &&
|
|
9
|
+
typeof entry === "object" &&
|
|
10
|
+
"types" in entry &&
|
|
11
|
+
"default" in entry
|
|
12
|
+
) {
|
|
13
|
+
delete entry.import;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
await writeFile(manifestUrl, `${JSON.stringify(manifest, null, 2)}\n`);
|
package/tsconfig.json
CHANGED
package/vitest.config.mts
CHANGED
|
@@ -10,6 +10,9 @@ const r = (...p: string[]) => resolve(__dirname, ...p);
|
|
|
10
10
|
export default defineConfig(({ mode }) => ({
|
|
11
11
|
plugins: [angular()],
|
|
12
12
|
resolve: {
|
|
13
|
+
alias: {
|
|
14
|
+
"@copilotkit/angular": r("src/public-api.ts"),
|
|
15
|
+
},
|
|
13
16
|
dedupe: [
|
|
14
17
|
"@angular/core",
|
|
15
18
|
"@angular/common",
|