From dc60308799be961b86cb1ad185f139268837bca7 Mon Sep 17 00:00:00 2001 From: Markus Ecker Date: Tue, 9 Sep 2025 12:46:34 +0200 Subject: [PATCH 1/4] wip --- TODO.md | 9 ++ apps/angular/demo/tsconfig.json | 16 +-- packages/angular/README.md | 110 ++++++++++++++++++ .../components/chat/copilot-chat.component.ts | 55 ++++----- .../core/__tests__/copilotkit.service.spec.ts | 2 +- packages/angular/src/index.ts | 2 +- .../src/utils/__tests__/agent.utils.spec.ts | 47 ++++++-- packages/angular/src/utils/agent.utils.ts | 60 ++++++---- 8 files changed, 224 insertions(+), 77 deletions(-) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 00000000..aff06b55 --- /dev/null +++ b/TODO.md @@ -0,0 +1,9 @@ +# Angular TODOs — Remaining Items + +## Component Cleanup (Optional) +- [ ] Consider removing explicit `ngOnDestroy` unsubscribe in `CopilotChatComponent` (cleanup is handled via `DestroyRef` inside `watchAgent`). Keep if you prefer immediate teardown semantics. +- [ ] Optional typing cleanup: use `watcher?: ReturnType` to avoid importing `AgentWatchResult`. + +## Verify +- [ ] Run build, lint, and Angular unit tests for the package. +- [ ] Confirm `CopilotChatComponent` connects once and updates `threadId` correctly. diff --git a/apps/angular/demo/tsconfig.json b/apps/angular/demo/tsconfig.json index 8b90a657..6e5cf18f 100644 --- a/apps/angular/demo/tsconfig.json +++ b/apps/angular/demo/tsconfig.json @@ -13,18 +13,18 @@ "baseUrl": ".", "paths": { "@copilotkitnext/angular": [ - "../../packages/angular/dist/index.d.ts", - "../../packages/angular/dist/fesm2022/copilotkit-angular.mjs" + "../../../packages/angular/dist/index.d.ts", + "../../../packages/angular/dist/fesm2022/copilotkit-angular.mjs" ], "@copilotkitnext/core": [ - "../../packages/core/dist/index.d.ts", - "../../packages/core/dist/index.mjs", - "../../packages/core/src/index.ts" + "../../../packages/core/dist/index.d.ts", + "../../../packages/core/dist/index.mjs", + "../../../packages/core/src/index.ts" ], "@copilotkitnext/shared": [ - "../../packages/shared/dist/index.d.ts", - "../../packages/shared/dist/index.mjs", - "../../packages/shared/src/index.ts" + "../../../packages/shared/dist/index.d.ts", + "../../../packages/shared/dist/index.mjs", + "../../../packages/shared/src/index.ts" ] } }, diff --git a/packages/angular/README.md b/packages/angular/README.md index e7b40c44..a00ade7c 100644 --- a/packages/angular/README.md +++ b/packages/angular/README.md @@ -205,6 +205,116 @@ console.log( - **`provideCopilotKit(...)`**: Set runtime URL, headers, properties, agents, tools, human-in-the-loop handlers - **`provideCopilotChatConfiguration(...)`**: Set UI labels and behavior for chat input/view +## Headless Usage: Building Custom Chat UIs + +For advanced use cases where you need full control over the chat UI, you can use the `watchAgent` utility directly to build a custom chat component. + +### Using `watchAgent` for Custom Components + +The `watchAgent` function provides reactive signals for agent state, making it easy to build custom chat interfaces: + +```typescript +import { Component, effect } from "@angular/core"; +import { watchAgent } from "@copilotkitnext/angular"; + +@Component({ + selector: "my-custom-chat", + template: ` +
+
+ {{ msg.content }} +
+ +
+ `, +}) +export class MyCustomChatComponent { + protected agent!: ReturnType["agent"]; + protected messages!: ReturnType["messages"]; + protected isRunning!: ReturnType["isRunning"]; + + constructor() { + const w = watchAgent({ agentId: "custom" }); + this.agent = w.agent; + this.messages = w.messages; + this.isRunning = w.isRunning; + + // React to agent changes + effect(() => { + const currentAgent = this.agent(); + if (currentAgent) { + console.log("Agent ready:", currentAgent.id); + } + }); + } + + async sendMessage(event: Event) { + const input = event.target as HTMLInputElement; + const content = input.value.trim(); + if (!content || !this.agent()) return; + + // Add user message and run agent + this.agent()!.addMessage({ role: "user", content }); + input.value = ""; + await this.agent()!.runAgent(); + } +} +``` + +### Switching Agents at Runtime + +Use `watchAgentWith` when you need to switch agents dynamically outside of the constructor: + +```typescript +import { Component, Injector } from "@angular/core"; +import { watchAgent, watchAgentWith } from "@copilotkitnext/angular"; + +@Component({ + selector: "agent-switcher", + template: ` + + +
Current Agent: {{ agent()?.id || 'None' }}
+ `, +}) +export class AgentSwitcherComponent { + protected agent!: ReturnType["agent"]; + protected messages!: ReturnType["messages"]; + protected isRunning!: ReturnType["isRunning"]; + private watcher?: ReturnType; + + constructor(private injector: Injector) { + // Initialize with default agent + this.switchToAgent("default"); + } + + switchToAgent(agentId: string) { + // Clean up previous watcher + this.watcher?.unsubscribe(); + + // Create new watcher with the ergonomic helper + const w = watchAgentWith(this.injector, { agentId }); + + // Update component signals + this.agent = w.agent; + this.messages = w.messages; + this.isRunning = w.isRunning; + this.watcher = w; + } +} +``` + +### Key Benefits of Headless Usage + +- **Full control**: Build any UI you need without constraints +- **Reactive signals**: Automatically update UI when agent state changes +- **Type safety**: Full TypeScript support with AG-UI types +- **Memory efficient**: Automatic cleanup via Angular's DestroyRef +- **Framework agnostic**: Works with any AG-UI compatible agent + ## End-to-End: Running the Demo From the repo root: diff --git a/packages/angular/src/components/chat/copilot-chat.component.ts b/packages/angular/src/components/chat/copilot-chat.component.ts index d6fd1774..86fc5454 100644 --- a/packages/angular/src/components/chat/copilot-chat.component.ts +++ b/packages/angular/src/components/chat/copilot-chat.component.ts @@ -3,7 +3,6 @@ import { Input, OnInit, OnChanges, - OnDestroy, SimpleChanges, ChangeDetectionStrategy, ViewEncapsulation, @@ -12,7 +11,6 @@ import { ChangeDetectorRef, Signal, Injector, - runInInjectionContext, Optional, SkipSelf, } from "@angular/core"; @@ -23,8 +21,7 @@ import { COPILOT_CHAT_INITIAL_CONFIG, CopilotChatConfiguration, } from "../../core/chat-configuration/chat-configuration.types"; -import { watchAgent } from "../../utils/agent.utils"; -import { AgentWatchResult } from "../../core/copilotkit.types"; +import { watchAgent, watchAgentWith } from "../../utils/agent.utils"; import { DEFAULT_AGENT_ID, randomUUID } from "@copilotkitnext/shared"; import { Message, AbstractAgent } from "@ag-ui/client"; @@ -66,7 +63,7 @@ import { Message, AbstractAgent } from "@ag-ui/client"; `, }) -export class CopilotChatComponent implements OnInit, OnChanges, OnDestroy { +export class CopilotChatComponent implements OnInit, OnChanges { @Input() agentId?: string; @Input() threadId?: string; @@ -101,22 +98,15 @@ export class CopilotChatComponent implements OnInit, OnChanges, OnDestroy { ); } - // Signals from watchAgent - using direct references instead of assignment - protected agent: Signal = signal< - AbstractAgent | undefined - >(undefined).asReadonly() as unknown as Signal; - protected messages: Signal = signal( - [] - ).asReadonly() as unknown as Signal; - protected isRunning: Signal = signal( - false - ).asReadonly() as unknown as Signal; + // Signals from watchAgent - destructured from watcher + protected agent!: Signal; + protected messages!: Signal; + protected isRunning!: Signal; protected showCursor = signal(false); private generatedThreadId: string = randomUUID(); - private agentWatcher?: AgentWatchResult; + private watcher?: ReturnType; private hasConnectedOnce = false; - private lastAgentId?: string; ngOnInit(): void { this.setupChatHandlers(); @@ -216,26 +206,21 @@ export class CopilotChatComponent implements OnInit, OnChanges, OnDestroy { }); } - ngOnDestroy(): void { - if (this.agentWatcher?.unsubscribe) { - this.agentWatcher.unsubscribe(); - } - } private createWatcher(desiredAgentId: string) { - // Tear down previous watcher if it exists - if (this.agentWatcher?.unsubscribe) { - this.agentWatcher.unsubscribe(); - this.agentWatcher = undefined; - } - // Setup watcher for desired agent - ensure injection context - this.agentWatcher = runInInjectionContext(this.injector, () => - watchAgent({ agentId: desiredAgentId }) - ); - this.agent = this.agentWatcher.agent; - this.messages = this.agentWatcher.messages; - this.isRunning = this.agentWatcher.isRunning; + // Tear down previous watcher if it exists to prevent parallel subscriptions + this.watcher?.unsubscribe(); + + // Create new watcher using the ergonomic helper + const w = watchAgentWith(this.injector, { agentId: desiredAgentId }); + + // Destructure signals directly to class fields + this.agent = w.agent; + this.messages = w.messages; + this.isRunning = w.isRunning; + this.watcher = w; + + // Reset connection state for new agent this.hasConnectedOnce = false; - this.lastAgentId = desiredAgentId; } } diff --git a/packages/angular/src/core/__tests__/copilotkit.service.spec.ts b/packages/angular/src/core/__tests__/copilotkit.service.spec.ts index d7e96e38..95c78feb 100644 --- a/packages/angular/src/core/__tests__/copilotkit.service.spec.ts +++ b/packages/angular/src/core/__tests__/copilotkit.service.spec.ts @@ -660,7 +660,7 @@ describe("CopilotKitService - Human-in-the-Loop", () => { ); expect(confirmRender).toBeDefined(); expect(confirmRender?.render).toBe(ConfirmComponent); - expect(confirmRender?.args).toBe(confirmTool.parameters); + // ToolCallRender doesn't have an args property - parameters are passed through tool execution }); it("should warn when human-in-the-loop array changes", () => { diff --git a/packages/angular/src/index.ts b/packages/angular/src/index.ts index 3aeb414d..cbd3918c 100644 --- a/packages/angular/src/index.ts +++ b/packages/angular/src/index.ts @@ -13,9 +13,9 @@ export * from "./utils/frontend-tool.utils"; // Export all except AgentWatchResult which is already exported from copilotkit.types export { watchAgent, + watchAgentWith, getAgent, subscribeToAgent, - registerAgentWatcher, } from "./utils/agent.utils"; export * from "./utils/human-in-the-loop.utils"; export * from "./utils/chat-config.utils"; diff --git a/packages/angular/src/utils/__tests__/agent.utils.spec.ts b/packages/angular/src/utils/__tests__/agent.utils.spec.ts index af30e113..65b1738b 100644 --- a/packages/angular/src/utils/__tests__/agent.utils.spec.ts +++ b/packages/angular/src/utils/__tests__/agent.utils.spec.ts @@ -1,11 +1,6 @@ import { TestBed } from "@angular/core/testing"; -import { Component, OnInit, DestroyRef, inject } from "@angular/core"; -import { - watchAgent, - getAgent, - subscribeToAgent, - registerAgentWatcher, -} from "../agent.utils"; +import { Component, OnInit, DestroyRef, inject, Injector } from "@angular/core"; +import { watchAgent, watchAgentWith, getAgent, subscribeToAgent } from "../agent.utils"; import { CopilotKitService } from "../../core/copilotkit.service"; import { provideCopilotKit } from "../../core/copilotkit.providers"; import { AbstractAgent } from "@ag-ui/client"; @@ -201,26 +196,58 @@ describe("Agent Utilities", () => { }); }); - describe("registerAgentWatcher", () => { - it("should be an alias for watchAgent", () => { + describe("watchAgentWith", () => { + it("should create agent watcher with injector context", () => { @Component({ template: "", standalone: true, providers: [provideCopilotKit({})], }) class TestComponent { - agentState = registerAgentWatcher({ agentId: "test-agent" }); + agentState: any; + injector = inject(Injector); + + switchAgent(agentId: string) { + // Use watchAgentWith outside of constructor + this.agentState = watchAgentWith(this.injector, { agentId }); + } } const fixture = TestBed.createComponent(TestComponent); fixture.detectChanges(); + // Call switchAgent method to test watchAgentWith + fixture.componentInstance.switchAgent("test-agent"); + expect(fixture.componentInstance.agentState).toBeDefined(); expect(fixture.componentInstance.agentState.agent).toBeDefined(); expect(fixture.componentInstance.agentState.messages).toBeDefined(); expect(fixture.componentInstance.agentState.isRunning).toBeDefined(); expect(mockCopilotKitCore.getAgent).toHaveBeenCalledWith("test-agent"); }); + + it("should handle default agent ID when not provided", () => { + @Component({ + template: "", + standalone: true, + providers: [provideCopilotKit({})], + }) + class TestComponent { + agentState: any; + injector = inject(Injector); + + constructor() { + // Use watchAgentWith without agentId + this.agentState = watchAgentWith(this.injector); + } + } + + const fixture = TestBed.createComponent(TestComponent); + fixture.detectChanges(); + + expect(fixture.componentInstance.agentState).toBeDefined(); + expect(mockCopilotKitCore.getAgent).toHaveBeenCalledWith(DEFAULT_AGENT_ID); + }); }); describe("CopilotKitService.getAgent", () => { diff --git a/packages/angular/src/utils/agent.utils.ts b/packages/angular/src/utils/agent.utils.ts index 87aedd51..59a1ba29 100644 --- a/packages/angular/src/utils/agent.utils.ts +++ b/packages/angular/src/utils/agent.utils.ts @@ -1,4 +1,11 @@ -import { DestroyRef, inject, signal, computed } from "@angular/core"; +import { + DestroyRef, + inject, + signal, + computed, + Injector, + runInInjectionContext, +} from "@angular/core"; import { toObservable } from "@angular/core/rxjs-interop"; import { CopilotKitService } from "../core/copilotkit.service"; import { @@ -163,6 +170,36 @@ export function getAgent( // Re-export the type for convenience (the actual type is in copilotkit.types) export type { AgentWatchResult } from "../core/copilotkit.types"; +/** + * Convenience wrapper for watchAgent that handles injection context. + * Useful when you need to call watchAgent outside of a constructor or field initializer. + * + * @param injector - The Angular Injector to use for injection context + * @param config - Optional configuration with agentId + * @returns Object with agent, messages, and isRunning signals plus observables + * + * @example + * ```typescript + * export class MyComponent { + * constructor(private injector: Injector) {} + * + * switchAgent(newAgentId: string) { + * // Can call outside of constructor using watchAgentWith + * const watcher = watchAgentWith(this.injector, { agentId: newAgentId }); + * this.agent = watcher.agent; + * this.messages = watcher.messages; + * this.isRunning = watcher.isRunning; + * } + * } + * ``` + */ +export function watchAgentWith( + injector: Injector, + config?: { agentId?: string } +): AgentWatchResult { + return runInInjectionContext(injector, () => watchAgent(config)); +} + /** * Subscribes to an agent's events with custom callbacks. * Returns a cleanup function that should be called to unsubscribe. @@ -216,24 +253,3 @@ export function subscribeToAgent( return () => subscription.unsubscribe(); } - -/** - * Registers an agent watcher that automatically cleans up on component destroy. - * This is an alias for watchAgent with a more explicit name. - * Must be called within an injection context. - * - * @param config - Optional configuration with agentId - * @returns Object with agent, messages, and isRunning signals plus observables - * - * @example - * ```typescript - * export class MyComponent { - * agentState = registerAgentWatcher({ agentId: 'my-agent' }); - * } - * ``` - */ -export function registerAgentWatcher(config?: { - agentId?: string; -}): AgentWatchResult { - return watchAgent(config); -} From 57866e32c60de98cb18f3371a0f84a5e6ce1ecc9 Mon Sep 17 00:00:00 2001 From: Markus Ecker Date: Tue, 9 Sep 2025 12:47:56 +0200 Subject: [PATCH 2/4] undo changes --- apps/angular/demo/tsconfig.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/angular/demo/tsconfig.json b/apps/angular/demo/tsconfig.json index 6e5cf18f..8b90a657 100644 --- a/apps/angular/demo/tsconfig.json +++ b/apps/angular/demo/tsconfig.json @@ -13,18 +13,18 @@ "baseUrl": ".", "paths": { "@copilotkitnext/angular": [ - "../../../packages/angular/dist/index.d.ts", - "../../../packages/angular/dist/fesm2022/copilotkit-angular.mjs" + "../../packages/angular/dist/index.d.ts", + "../../packages/angular/dist/fesm2022/copilotkit-angular.mjs" ], "@copilotkitnext/core": [ - "../../../packages/core/dist/index.d.ts", - "../../../packages/core/dist/index.mjs", - "../../../packages/core/src/index.ts" + "../../packages/core/dist/index.d.ts", + "../../packages/core/dist/index.mjs", + "../../packages/core/src/index.ts" ], "@copilotkitnext/shared": [ - "../../../packages/shared/dist/index.d.ts", - "../../../packages/shared/dist/index.mjs", - "../../../packages/shared/src/index.ts" + "../../packages/shared/dist/index.d.ts", + "../../packages/shared/dist/index.mjs", + "../../packages/shared/src/index.ts" ] } }, From 47cc92b09883c62836249229f3f28f3e7984069e Mon Sep 17 00:00:00 2001 From: Markus Ecker Date: Tue, 9 Sep 2025 15:03:18 +0200 Subject: [PATCH 3/4] add headless demo --- apps/angular/demo-server/package.json | 4 +- apps/angular/demo-server/src/index.ts | 7 +- apps/angular/demo-server/src/openai.ts | 1 - apps/angular/demo/src/app/app.component.ts | 49 +++- apps/angular/demo/src/app/app.config.ts | 10 +- .../demo/src/app/headless-chat.component.ts | 91 ++++++++ apps/react/demo/package.json | 2 +- .../app/api/copilotkit/[[...slug]]/openai.ts | 2 +- package.json | 6 +- .../package.json | 2 +- packages/demo-agents/src/index.ts | 2 + .../index.ts => demo-agents/src/openai.ts} | 2 +- .../src/slow-tool-call-streaming.ts | 135 +++++++++++ .../tsconfig.json | 0 .../tsup.config.ts | 0 .../vitest.config.ts | 0 pnpm-lock.yaml | 220 ++++++++++-------- 17 files changed, 417 insertions(+), 116 deletions(-) delete mode 100644 apps/angular/demo-server/src/openai.ts create mode 100644 apps/angular/demo/src/app/headless-chat.component.ts rename packages/{openai-agent => demo-agents}/package.json (94%) create mode 100644 packages/demo-agents/src/index.ts rename packages/{openai-agent/src/index.ts => demo-agents/src/openai.ts} (99%) create mode 100644 packages/demo-agents/src/slow-tool-call-streaming.ts rename packages/{openai-agent => demo-agents}/tsconfig.json (100%) rename packages/{openai-agent => demo-agents}/tsup.config.ts (100%) rename packages/{openai-agent => demo-agents}/vitest.config.ts (100%) diff --git a/apps/angular/demo-server/package.json b/apps/angular/demo-server/package.json index ebe873b8..cd034d1a 100644 --- a/apps/angular/demo-server/package.json +++ b/apps/angular/demo-server/package.json @@ -4,13 +4,13 @@ "type": "module", "version": "0.0.0", "scripts": { - "dev": "nodemon --verbose --cwd ../../../ --watch packages/core/dist/** --watch packages/shared/dist/** --watch packages/runtime/dist/** --watch packages/openai-agent/dist/** --watch apps/angular/demo-server/src/** --ext mjs,js,json,ts --delay 800ms --signal SIGTERM --exec \"tsx --env-file=apps/angular/demo-server/.env apps/angular/demo-server/src/index.ts\"", + "dev": "nodemon --verbose --cwd ../../../ --watch packages/core/dist/** --watch packages/shared/dist/** --watch packages/runtime/dist/** --watch packages/demo-agents/dist/** --watch apps/angular/demo-server/src/** --ext mjs,js,json,ts --delay 800ms --signal SIGTERM --exec \"tsx --env-file=apps/angular/demo-server/.env apps/angular/demo-server/src/index.ts\"", "start": "node --env-file=.env --loader tsx src/index.ts" }, "dependencies": { "@ag-ui/client": "0.0.36-alpha.1", "@ag-ui/langgraph": "^0.0.11", - "@copilotkitnext/openai-agent": "workspace:^", + "@copilotkitnext/demo-agents": "workspace:^", "@copilotkitnext/runtime": "workspace:^", "@hono/node-server": "^1.13.6", "hono": "^4.6.11", diff --git a/apps/angular/demo-server/src/index.ts b/apps/angular/demo-server/src/index.ts index 4e187b96..9f93ae6a 100644 --- a/apps/angular/demo-server/src/index.ts +++ b/apps/angular/demo-server/src/index.ts @@ -6,12 +6,15 @@ import { createCopilotEndpoint, InMemoryAgentRunner, } from "@copilotkitnext/runtime"; -import { OpenAIAgent } from "./openai.js"; +import { + OpenAIAgent, + SlowToolCallStreamingAgent, +} from "@copilotkitnext/demo-agents"; const runtime = new CopilotRuntime({ agents: { // @ts-ignore - default: new OpenAIAgent(), + default: new SlowToolCallStreamingAgent(), }, runner: new InMemoryAgentRunner(), }); diff --git a/apps/angular/demo-server/src/openai.ts b/apps/angular/demo-server/src/openai.ts deleted file mode 100644 index 4bb1f0f4..00000000 --- a/apps/angular/demo-server/src/openai.ts +++ /dev/null @@ -1 +0,0 @@ -export { OpenAIAgent } from "@copilotkitnext/openai-agent"; diff --git a/apps/angular/demo/src/app/app.component.ts b/apps/angular/demo/src/app/app.component.ts index ce56214c..e5d2df60 100644 --- a/apps/angular/demo/src/app/app.component.ts +++ b/apps/angular/demo/src/app/app.component.ts @@ -1,22 +1,65 @@ -import { Component } from "@angular/core"; +import { Component, Input } from "@angular/core"; import { CopilotKitConfigDirective, CopilotChatComponent, } from "@copilotkitnext/angular"; +import { HeadlessChatComponent } from "./headless-chat.component"; +import { CommonModule } from "@angular/common"; + +// WildcardToolRender component for unmatched tools +@Component({ + standalone: true, + imports: [CommonModule], + template: ` +
+
+ đź”§ Tool Execution +
+
+
{{ argsJson }}
+
+
Output: {{ result }}
+
+ `, +}) +export class WildcardToolRenderComponent { + @Input({ required: true }) name!: string; + @Input({ required: true }) args!: any; + @Input({ required: true }) status!: any; + @Input() result?: string; + + get argsJson() { + return JSON.stringify(this.args, null, 2); + } +} @Component({ selector: "app-root", standalone: true, - imports: [CopilotKitConfigDirective, CopilotChatComponent], + imports: [ + CommonModule, + CopilotKitConfigDirective, + CopilotChatComponent, + HeadlessChatComponent, + ], template: `
- + + + + + +
`, }) export class AppComponent { runtimeUrl = "http://localhost:3001/api/copilotkit"; + isHeadless = + typeof window !== "undefined" && window.location?.pathname === "/headless"; } diff --git a/apps/angular/demo/src/app/app.config.ts b/apps/angular/demo/src/app/app.config.ts index 9ed2ceeb..d0847231 100644 --- a/apps/angular/demo/src/app/app.config.ts +++ b/apps/angular/demo/src/app/app.config.ts @@ -4,11 +4,19 @@ import { provideCopilotKit, provideCopilotChatConfiguration, } from "@copilotkitnext/angular"; +import { WildcardToolRenderComponent } from "./app.component"; export const appConfig: ApplicationConfig = { providers: [ importProvidersFrom(BrowserModule), - ...provideCopilotKit({}), + ...provideCopilotKit({ + renderToolCalls: [ + { + name: "*", + render: WildcardToolRenderComponent, + }, + ], + }), provideCopilotChatConfiguration({ labels: { chatInputPlaceholder: "Ask me anything...", diff --git a/apps/angular/demo/src/app/headless-chat.component.ts b/apps/angular/demo/src/app/headless-chat.component.ts new file mode 100644 index 00000000..1b1673cf --- /dev/null +++ b/apps/angular/demo/src/app/headless-chat.component.ts @@ -0,0 +1,91 @@ +import { Component, ChangeDetectionStrategy } from "@angular/core"; +import { CommonModule } from "@angular/common"; +import { FormsModule } from "@angular/forms"; +import { watchAgent } from "@copilotkitnext/angular"; +import { CopilotChatToolCallsViewComponent } from "@copilotkitnext/angular"; + +@Component({ + selector: "headless-chat", + standalone: true, + imports: [CommonModule, FormsModule, CopilotChatToolCallsViewComponent], + changeDetection: ChangeDetectionStrategy.OnPush, + template: ` +
+
+
+
+ {{ m.role | titlecase }} +
+
{{ m.content }}
+ + + +
+
+ Thinking… +
+
+ +
+ + +
+
+ `, +}) +export class HeadlessChatComponent { + // Signals populated from a single watcher in the constructor + protected agent!: ReturnType["agent"]; + protected messages!: ReturnType["messages"]; + protected isRunning!: ReturnType["isRunning"]; + + inputValue = ""; + + constructor() { + ({ + agent: this.agent, + messages: this.messages, + isRunning: this.isRunning, + } = watchAgent()); + } + + async send() { + const content = this.inputValue.trim(); + const agent = this.agent(); + if (!agent || !content) return; + + agent.addMessage({ id: crypto.randomUUID(), role: "user", content } as any); + this.inputValue = ""; + + try { + await agent.runAgent(); + } catch (e) { + console.error("Agent run error", e); + } + } +} diff --git a/apps/react/demo/package.json b/apps/react/demo/package.json index dcc9c32b..f5b8c46d 100644 --- a/apps/react/demo/package.json +++ b/apps/react/demo/package.json @@ -11,7 +11,7 @@ "dependencies": { "@ag-ui/client": "0.0.36-alpha.1", "@copilotkitnext/core": "workspace:*", - "@copilotkitnext/openai-agent": "workspace:*", + "@copilotkitnext/demo-agents": "workspace:*", "@copilotkitnext/react": "workspace:*", "@copilotkitnext/runtime": "workspace:*", "@copilotkitnext/shared": "workspace:*", diff --git a/apps/react/demo/src/app/api/copilotkit/[[...slug]]/openai.ts b/apps/react/demo/src/app/api/copilotkit/[[...slug]]/openai.ts index 4bb1f0f4..3392008b 100644 --- a/apps/react/demo/src/app/api/copilotkit/[[...slug]]/openai.ts +++ b/apps/react/demo/src/app/api/copilotkit/[[...slug]]/openai.ts @@ -1 +1 @@ -export { OpenAIAgent } from "@copilotkitnext/openai-agent"; +export { OpenAIAgent } from "@copilotkitnext/demo-agents"; diff --git a/package.json b/package.json index 9ad703ab..64e07b9c 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "CopilotKitNext", "private": true, "scripts": { - "predev": "turbo run build --filter='@copilotkitnext/core' --filter='@copilotkitnext/shared' --filter='@copilotkitnext/react' --filter='@copilotkitnext/angular' --filter='@copilotkitnext/openai-agent'", + "predev": "turbo run build --filter='@copilotkitnext/core' --filter='@copilotkitnext/shared' --filter='@copilotkitnext/react' --filter='@copilotkitnext/angular' --filter='@copilotkitnext/demo-agents'", "build": "turbo run build", "clean": "turbo run clean", - "dev": "turbo run dev --filter='@copilotkitnext/core' --filter='@copilotkitnext/shared' --filter='@copilotkitnext/runtime' --filter='@copilotkitnext/react' --filter='@copilotkitnext/angular' --filter='@copilotkitnext/openai-agent' --concurrency=15", - "dev:packages": "turbo run dev --filter='@copilotkitnext/core' --filter='@copilotkitnext/shared' --filter='@copilotkitnext/runtime' --filter='@copilotkitnext/react' --filter='@copilotkitnext/angular' --filter='@copilotkitnext/openai-agent'", + "dev": "turbo run dev --filter='@copilotkitnext/core' --filter='@copilotkitnext/shared' --filter='@copilotkitnext/runtime' --filter='@copilotkitnext/react' --filter='@copilotkitnext/angular' --filter='@copilotkitnext/demo-agents' --concurrency=15", + "dev:packages": "turbo run dev --filter='@copilotkitnext/core' --filter='@copilotkitnext/shared' --filter='@copilotkitnext/runtime' --filter='@copilotkitnext/react' --filter='@copilotkitnext/angular' --filter='@copilotkitnext/demo-agents'", "demo:angular": "turbo run dev --filter='@copilotkitnext/angular-demo-server' --filter='@copilotkitnext/angular-demo'", "storybook:angular": "pnpm -C apps/angular/storybook dev", "demo:react": "pnpm -C apps/react/demo dev", diff --git a/packages/openai-agent/package.json b/packages/demo-agents/package.json similarity index 94% rename from packages/openai-agent/package.json rename to packages/demo-agents/package.json index 3b55384a..c0ae507b 100644 --- a/packages/openai-agent/package.json +++ b/packages/demo-agents/package.json @@ -1,5 +1,5 @@ { - "name": "@copilotkitnext/openai-agent", + "name": "@copilotkitnext/demo-agents", "version": "0.0.0", "private": true, "main": "dist/index.js", diff --git a/packages/demo-agents/src/index.ts b/packages/demo-agents/src/index.ts new file mode 100644 index 00000000..14a6ff72 --- /dev/null +++ b/packages/demo-agents/src/index.ts @@ -0,0 +1,2 @@ +export { OpenAIAgent } from "./openai"; +export { SlowToolCallStreamingAgent } from "./slow-tool-call-streaming"; diff --git a/packages/openai-agent/src/index.ts b/packages/demo-agents/src/openai.ts similarity index 99% rename from packages/openai-agent/src/index.ts rename to packages/demo-agents/src/openai.ts index 492d2492..8183b637 100644 --- a/packages/openai-agent/src/index.ts +++ b/packages/demo-agents/src/openai.ts @@ -96,4 +96,4 @@ export class OpenAIAgent extends AbstractAgent { }); }); } -} +} \ No newline at end of file diff --git a/packages/demo-agents/src/slow-tool-call-streaming.ts b/packages/demo-agents/src/slow-tool-call-streaming.ts new file mode 100644 index 00000000..8d3530c1 --- /dev/null +++ b/packages/demo-agents/src/slow-tool-call-streaming.ts @@ -0,0 +1,135 @@ +import { + AbstractAgent, + RunAgentInput, + EventType, + BaseEvent, + ToolCallResultEvent, +} from "@ag-ui/client"; +import { Observable } from "rxjs"; + +export class SlowToolCallStreamingAgent extends AbstractAgent { + private delay = 200; // 0.2 seconds delay between chunks + + constructor(delayMs: number = 200) { + super(); + this.delay = delayMs; + } + + clone(): SlowToolCallStreamingAgent { + return new SlowToolCallStreamingAgent(this.delay); + } + + private sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + protected run(input: RunAgentInput): Observable { + return new Observable((observer) => { + let cancelled = false; + + const runAsync = async () => { + try { + const messageId = Date.now().toString(); + const toolCallId = `call_${Date.now()}`; + + // Start the run + observer.next({ + type: EventType.RUN_STARTED, + threadId: input.threadId, + runId: input.runId, + } as BaseEvent); + + // Stream the initial text message + const textMessage = + "I'll check the weather for you. Let me fetch that information."; + const chunks = textMessage.split(" "); + + for (let i = 0; i < chunks.length; i++) { + if (cancelled) return; + observer.next({ + type: EventType.TEXT_MESSAGE_CHUNK, + messageId, + delta: (i > 0 ? " " : "") + chunks[i], + } as BaseEvent); + await this.sleep(this.delay); + } + + // Stream the tool call + const toolCallArgs = JSON.stringify({ + location: "San Francisco", + unit: "celsius", + }); + const toolCallChunks: string[] = []; + for (let i = 0; i < toolCallArgs.length; i += 5) { + toolCallChunks.push(toolCallArgs.slice(i, i + 5)); + } + + for (let i = 0; i < toolCallChunks.length; i++) { + if (cancelled) return; + if (i === 0) { + // First chunk includes tool name + observer.next({ + type: EventType.TOOL_CALL_CHUNK, + toolCallId, + toolCallName: "getWeather", + parentMessageId: messageId, + delta: toolCallChunks[0], + } as BaseEvent); + } else { + // Subsequent chunks only include arguments + observer.next({ + type: EventType.TOOL_CALL_CHUNK, + toolCallId, + parentMessageId: messageId, + delta: toolCallChunks[i], + } as BaseEvent); + } + await this.sleep(this.delay); + } + + // Send tool result + if (cancelled) return; + observer.next({ + type: EventType.TOOL_CALL_RESULT, + toolCallId, + content: JSON.stringify({ + temperature: 18, + unit: "celsius", + condition: "partly cloudy", + humidity: 65, + windSpeed: 12, + }), + messageId, + } as ToolCallResultEvent); + + // Complete the run + if (cancelled) return; + observer.next({ + type: EventType.RUN_FINISHED, + threadId: input.threadId, + runId: input.runId, + } as BaseEvent); + observer.complete(); + } catch (error) { + if (!cancelled) { + observer.next({ + type: EventType.RUN_ERROR, + message: + error instanceof Error + ? error.message + : "Unknown error occurred", + } as BaseEvent); + observer.error(error); + } + } + }; + + runAsync(); + + // Cleanup function + return () => { + cancelled = true; + }; + }); + } +} diff --git a/packages/openai-agent/tsconfig.json b/packages/demo-agents/tsconfig.json similarity index 100% rename from packages/openai-agent/tsconfig.json rename to packages/demo-agents/tsconfig.json diff --git a/packages/openai-agent/tsup.config.ts b/packages/demo-agents/tsup.config.ts similarity index 100% rename from packages/openai-agent/tsup.config.ts rename to packages/demo-agents/tsup.config.ts diff --git a/packages/openai-agent/vitest.config.ts b/packages/demo-agents/vitest.config.ts similarity index 100% rename from packages/openai-agent/vitest.config.ts rename to packages/demo-agents/vitest.config.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dad2cd97..b97e00ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,7 +71,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^18.2.0 - version: 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tslib@2.8.1)(typescript@5.4.5))(typescript@5.4.5) + version: 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(@types/node@22.15.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tslib@2.8.1)(typescript@5.4.5))(typescript@5.4.5) '@angular/cli': specifier: ^18.2.0 version: 18.2.20(chokidar@3.6.0) @@ -96,9 +96,9 @@ importers: '@ag-ui/langgraph': specifier: ^0.0.11 version: 0.0.11(@opentelemetry/api@1.9.0)(openai@4.104.0(encoding@0.1.13)(ws@8.18.3)(zod@3.25.75))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - '@copilotkitnext/openai-agent': + '@copilotkitnext/demo-agents': specifier: workspace:^ - version: link:../../../packages/openai-agent + version: link:../../../packages/demo-agents '@copilotkitnext/runtime': specifier: workspace:^ version: link:../../../packages/runtime @@ -246,9 +246,9 @@ importers: '@copilotkitnext/core': specifier: workspace:* version: link:../../../packages/core - '@copilotkitnext/openai-agent': + '@copilotkitnext/demo-agents': specifier: workspace:* - version: link:../../../packages/openai-agent + version: link:../../../packages/demo-agents '@copilotkitnext/react': specifier: workspace:* version: link:../../../packages/react @@ -545,6 +545,40 @@ importers: specifier: ^3.2.4 version: 3.2.4(@types/debug@4.1.12)(@types/node@22.15.3)(@vitest/ui@3.2.4)(jiti@2.5.1)(jsdom@26.1.0)(less@4.4.1)(lightningcss@1.30.1)(sass@1.90.0)(terser@5.43.1)(tsx@4.20.5)(yaml@2.8.0) + packages/demo-agents: + dependencies: + '@ag-ui/client': + specifier: '*' + version: 0.0.36 + openai: + specifier: ^4.73.1 + version: 4.104.0(encoding@0.1.13)(ws@8.18.3)(zod@3.25.75) + rxjs: + specifier: ^7.8.1 + version: 7.8.1 + devDependencies: + '@copilotkitnext/eslint-config': + specifier: workspace:* + version: link:../eslint-config + '@copilotkitnext/typescript-config': + specifier: workspace:* + version: link:../typescript-config + '@types/node': + specifier: ^22.10.5 + version: 22.15.3 + eslint: + specifier: ^9.17.0 + version: 9.30.0(jiti@2.5.1) + tsup: + specifier: ^8.0.1 + version: 8.5.0(@swc/core@1.12.11)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.5)(typescript@5.8.2)(yaml@2.8.0) + typescript: + specifier: ^5.8.2 + version: 5.8.2 + vitest: + specifier: ^2.1.8 + version: 2.1.9(@types/node@22.15.3)(@vitest/ui@2.1.9)(jsdom@26.1.0)(less@4.4.1)(lightningcss@1.30.1)(sass@1.90.0)(terser@5.43.1) + packages/eslint-config: devDependencies: '@eslint/js': @@ -581,40 +615,6 @@ importers: specifier: ^8.35.0 version: 8.35.0(eslint@9.30.0(jiti@2.5.1))(typescript@5.8.2) - packages/openai-agent: - dependencies: - '@ag-ui/client': - specifier: '*' - version: 0.0.36 - openai: - specifier: ^4.73.1 - version: 4.104.0(encoding@0.1.13)(ws@8.18.3)(zod@3.25.75) - rxjs: - specifier: ^7.8.1 - version: 7.8.1 - devDependencies: - '@copilotkitnext/eslint-config': - specifier: workspace:* - version: link:../eslint-config - '@copilotkitnext/typescript-config': - specifier: workspace:* - version: link:../typescript-config - '@types/node': - specifier: ^22.10.5 - version: 22.15.3 - eslint: - specifier: ^9.17.0 - version: 9.30.0(jiti@2.5.1) - tsup: - specifier: ^8.0.1 - version: 8.5.0(@swc/core@1.12.11)(jiti@2.5.1)(postcss@8.5.6)(tsx@4.20.5)(typescript@5.8.2)(yaml@2.8.0) - typescript: - specifier: ^5.8.2 - version: 5.8.2 - vitest: - specifier: ^2.1.8 - version: 2.1.9(@types/node@22.15.3)(@vitest/ui@2.1.9)(jsdom@26.1.0)(less@4.4.1)(lightningcss@1.30.1)(sass@1.90.0)(terser@5.43.1) - packages/react: dependencies: '@ag-ui/client': @@ -11849,13 +11849,13 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(@types/node@22.15.3)(chokidar@4.0.3)(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tailwindcss@4.1.11)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@4.1.11)(typescript@5.4.5)': + '@angular-devkit/build-angular@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(@types/node@22.15.3)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tslib@2.8.1)(typescript@5.4.5))(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1802.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) - '@angular-devkit/core': 18.2.20(chokidar@4.0.3) - '@angular/build': 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@4.0.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5) + '@angular-devkit/architect': 0.1802.20(chokidar@3.6.0) + '@angular-devkit/build-webpack': 0.1802.20(chokidar@3.6.0)(webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) + '@angular-devkit/core': 18.2.20(chokidar@3.6.0) + '@angular/build': 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(terser@5.31.6)(typescript@5.4.5) '@angular/compiler-cli': 18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5) '@babel/core': 7.26.10 '@babel/generator': 7.26.10 @@ -11908,15 +11908,14 @@ snapshots: tslib: 2.6.3 typescript: 5.4.5 watchpack: 2.4.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) webpack-dev-middleware: 7.4.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) webpack-dev-server: 5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) webpack-merge: 6.0.1 - webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) + webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) optionalDependencies: esbuild: 0.23.0 ng-packagr: 18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tailwindcss@4.1.11)(tslib@2.8.1)(typescript@5.4.5) - tailwindcss: 4.1.11 transitivePeerDependencies: - '@rspack/core' - '@swc/core' @@ -11934,15 +11933,14 @@ snapshots: - uglify-js - utf-8-validate - webpack-cli - optional: true - '@angular-devkit/build-angular@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(@types/node@22.15.3)(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tailwindcss@4.1.11)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@4.1.11)(typescript@5.4.5)': + '@angular-devkit/build-angular@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(@types/node@22.15.3)(chokidar@4.0.3)(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tailwindcss@4.1.11)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@4.1.11)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1802.20(webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) + '@angular-devkit/build-webpack': 0.1802.20(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) '@angular-devkit/core': 18.2.20(chokidar@4.0.3) - '@angular/build': 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5) + '@angular/build': 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@4.0.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5) '@angular/compiler-cli': 18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5) '@babel/core': 7.26.10 '@babel/generator': 7.26.10 @@ -11995,9 +11993,9 @@ snapshots: tslib: 2.6.3 typescript: 5.4.5 watchpack: 2.4.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) webpack-dev-middleware: 7.4.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) - webpack-dev-server: 5.2.2(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)) + webpack-dev-server: 5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) optionalDependencies: @@ -12021,14 +12019,15 @@ snapshots: - uglify-js - utf-8-validate - webpack-cli + optional: true - '@angular-devkit/build-angular@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(chokidar@3.6.0)(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tslib@2.8.1)(typescript@5.4.5))(typescript@5.4.5)': + '@angular-devkit/build-angular@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@swc/core@1.12.11)(@types/node@22.15.3)(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(lightningcss@1.30.1)(ng-packagr@18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tailwindcss@4.1.11)(tslib@2.8.1)(typescript@5.4.5))(tailwindcss@4.1.11)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1802.20(chokidar@3.6.0) - '@angular-devkit/build-webpack': 0.1802.20(chokidar@3.6.0)(webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) - '@angular-devkit/core': 18.2.20(chokidar@3.6.0) - '@angular/build': 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(terser@5.31.6)(typescript@5.4.5) + '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) + '@angular-devkit/build-webpack': 0.1802.20(webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) + '@angular-devkit/core': 18.2.20(chokidar@4.0.3) + '@angular/build': 18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5) '@angular/compiler-cli': 18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5) '@babel/core': 7.26.10 '@babel/generator': 7.26.10 @@ -12081,7 +12080,7 @@ snapshots: tslib: 2.6.3 typescript: 5.4.5 watchpack: 2.4.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) webpack-dev-middleware: 7.4.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) webpack-dev-server: 5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) webpack-merge: 6.0.1 @@ -12089,6 +12088,7 @@ snapshots: optionalDependencies: esbuild: 0.23.0 ng-packagr: 18.2.1(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(tailwindcss@4.1.11)(tslib@2.8.1)(typescript@5.4.5) + tailwindcss: 4.1.11 transitivePeerDependencies: - '@rspack/core' - '@swc/core' @@ -12111,7 +12111,7 @@ snapshots: dependencies: '@angular-devkit/architect': 0.1802.20(chokidar@3.6.0) rxjs: 7.8.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) webpack-dev-server: 5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) transitivePeerDependencies: - chokidar @@ -12120,7 +12120,7 @@ snapshots: dependencies: '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) rxjs: 7.8.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) webpack-dev-server: 5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) transitivePeerDependencies: - chokidar @@ -12130,8 +12130,8 @@ snapshots: dependencies: '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) rxjs: 7.8.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) - webpack-dev-server: 5.2.2(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) + webpack-dev-server: 5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) transitivePeerDependencies: - chokidar @@ -12193,10 +12193,10 @@ snapshots: '@angular/core': 18.2.13(rxjs@7.8.1)(zone.js@0.14.10) tslib: 2.8.1 - '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@4.0.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5)': + '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(terser@5.31.6)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) + '@angular-devkit/architect': 0.1802.20(chokidar@3.6.0) '@angular/compiler-cli': 18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5) '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 @@ -12225,7 +12225,6 @@ snapshots: optionalDependencies: less: 4.2.0 postcss: 8.4.41 - tailwindcss: 4.1.11 transitivePeerDependencies: - '@types/node' - chokidar @@ -12235,9 +12234,8 @@ snapshots: - sugarss - supports-color - terser - optional: true - '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@4.0.3)(less@4.4.1)(lightningcss@1.30.1)(postcss@8.5.6)(tailwindcss@4.1.11)(terser@5.43.1)(typescript@5.4.5)': + '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@4.0.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) @@ -12247,7 +12245,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.25.2) '@inquirer/confirm': 3.1.22 - '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.19(@types/node@22.15.3)(less@4.4.1)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.43.1)) + '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.19(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.31.6)) browserslist: 4.25.1 critters: 0.0.24 esbuild: 0.23.0 @@ -12264,11 +12262,11 @@ snapshots: sass: 1.77.6 semver: 7.6.3 typescript: 5.4.5 - vite: 5.4.19(@types/node@22.15.3)(less@4.4.1)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.43.1) + vite: 5.4.19(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.31.6) watchpack: 2.4.1 optionalDependencies: - less: 4.4.1 - postcss: 8.5.6 + less: 4.2.0 + postcss: 8.4.41 tailwindcss: 4.1.11 transitivePeerDependencies: - '@types/node' @@ -12281,7 +12279,7 @@ snapshots: - terser optional: true - '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5)': + '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(chokidar@4.0.3)(less@4.4.1)(lightningcss@1.30.1)(postcss@8.5.6)(tailwindcss@4.1.11)(terser@5.43.1)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) @@ -12291,7 +12289,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/plugin-syntax-import-attributes': 7.24.7(@babel/core@7.25.2) '@inquirer/confirm': 3.1.22 - '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.19(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.31.6)) + '@vitejs/plugin-basic-ssl': 1.1.0(vite@5.4.19(@types/node@22.15.3)(less@4.4.1)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.43.1)) browserslist: 4.25.1 critters: 0.0.24 esbuild: 0.23.0 @@ -12308,11 +12306,11 @@ snapshots: sass: 1.77.6 semver: 7.6.3 typescript: 5.4.5 - vite: 5.4.19(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.31.6) + vite: 5.4.19(@types/node@22.15.3)(less@4.4.1)(lightningcss@1.30.1)(sass@1.77.6)(terser@5.43.1) watchpack: 2.4.1 optionalDependencies: - less: 4.2.0 - postcss: 8.4.41 + less: 4.4.1 + postcss: 8.5.6 tailwindcss: 4.1.11 transitivePeerDependencies: - '@types/node' @@ -12323,11 +12321,12 @@ snapshots: - sugarss - supports-color - terser + optional: true - '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(chokidar@3.6.0)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(terser@5.31.6)(typescript@5.4.5)': + '@angular/build@18.2.20(@angular/compiler-cli@18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5))(@types/node@22.15.3)(less@4.2.0)(lightningcss@1.30.1)(postcss@8.4.41)(tailwindcss@4.1.11)(terser@5.31.6)(typescript@5.4.5)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.1802.20(chokidar@3.6.0) + '@angular-devkit/architect': 0.1802.20(chokidar@4.0.3) '@angular/compiler-cli': 18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5) '@babel/core': 7.25.2 '@babel/helper-annotate-as-pure': 7.24.7 @@ -12356,6 +12355,7 @@ snapshots: optionalDependencies: less: 4.2.0 postcss: 8.4.41 + tailwindcss: 4.1.11 transitivePeerDependencies: - '@types/node' - chokidar @@ -15356,7 +15356,7 @@ snapshots: dependencies: '@angular/compiler-cli': 18.2.13(@angular/compiler@18.2.13(@angular/core@18.2.13(rxjs@7.8.1)(zone.js@0.14.10)))(typescript@5.4.5) typescript: 5.4.5 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) '@nodelib/fs.scandir@2.1.5': dependencies: @@ -18103,7 +18103,7 @@ snapshots: '@babel/core': 7.26.10 find-cache-dir: 4.0.0 schema-utils: 4.3.2 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) babel-loader@9.2.1(@babel/core@7.28.0)(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)): dependencies: @@ -18652,7 +18652,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.3.2 serialize-javascript: 6.0.2 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) core-js-compat@3.44.0: dependencies: @@ -18790,7 +18790,7 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.7.2 optionalDependencies: - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) css-select@4.3.0: dependencies: @@ -20465,6 +20465,17 @@ snapshots: optionalDependencies: webpack: 5.100.0(@swc/core@1.12.11)(esbuild@0.25.6) + html-webpack-plugin@5.6.3(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): + dependencies: + '@types/html-minifier-terser': 6.1.0 + html-minifier-terser: 6.1.0 + lodash: 4.17.21 + pretty-error: 4.0.0 + tapable: 2.2.2 + optionalDependencies: + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) + optional: true + htmlparser2@6.1.0: dependencies: domelementtype: 2.3.0 @@ -21182,7 +21193,7 @@ snapshots: dependencies: less: 4.2.0 optionalDependencies: - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) less@4.2.0: dependencies: @@ -21225,7 +21236,7 @@ snapshots: dependencies: webpack-sources: 3.3.3 optionalDependencies: - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) lightningcss-darwin-arm64@1.30.1: optional: true @@ -21985,7 +21996,7 @@ snapshots: dependencies: schema-utils: 4.3.2 tapable: 2.2.2 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) minimalistic-assert@1.0.1: {} @@ -22888,7 +22899,7 @@ snapshots: postcss: 8.4.41 semver: 7.7.2 optionalDependencies: - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) transitivePeerDependencies: - typescript @@ -23728,7 +23739,7 @@ snapshots: neo-async: 2.6.2 optionalDependencies: sass: 1.77.6 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) sass@1.77.6: dependencies: @@ -24131,7 +24142,7 @@ snapshots: dependencies: iconv-lite: 0.6.3 source-map-js: 1.2.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) source-map-support@0.5.21: dependencies: @@ -24520,26 +24531,26 @@ snapshots: dependencies: memoizerific: 1.11.3 - terser-webpack-plugin@5.3.14(@swc/core@1.12.11)(esbuild@0.23.0)(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): + terser-webpack-plugin@5.3.14(@swc/core@1.12.11)(esbuild@0.25.6)(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)): dependencies: '@jridgewell/trace-mapping': 0.3.29 jest-worker: 27.5.1 schema-utils: 4.3.2 serialize-javascript: 6.0.2 terser: 5.43.1 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.100.0(@swc/core@1.12.11)(esbuild@0.25.6) optionalDependencies: '@swc/core': 1.12.11 - esbuild: 0.23.0 + esbuild: 0.25.6 - terser-webpack-plugin@5.3.14(@swc/core@1.12.11)(esbuild@0.25.6)(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)): + terser-webpack-plugin@5.3.14(@swc/core@1.12.11)(esbuild@0.25.6)(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): dependencies: '@jridgewell/trace-mapping': 0.3.29 jest-worker: 27.5.1 schema-utils: 4.3.2 serialize-javascript: 6.0.2 terser: 5.43.1 - webpack: 5.100.0(@swc/core@1.12.11)(esbuild@0.25.6) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) optionalDependencies: '@swc/core': 1.12.11 esbuild: 0.25.6 @@ -25426,6 +25437,7 @@ snapshots: schema-utils: 4.3.2 optionalDependencies: webpack: 5.100.0(@swc/core@1.12.11)(esbuild@0.25.6) + optional: true webpack-dev-middleware@7.4.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): dependencies: @@ -25436,7 +25448,7 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.3.2 optionalDependencies: - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) webpack-dev-server@5.2.2(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)): dependencies: @@ -25475,6 +25487,7 @@ snapshots: - debug - supports-color - utf-8-validate + optional: true webpack-dev-server@5.2.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): dependencies: @@ -25504,10 +25517,10 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 7.4.2(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)) + webpack-dev-middleware: 7.4.2(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) ws: 8.18.3 optionalDependencies: - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) transitivePeerDependencies: - bufferutil - debug @@ -25531,10 +25544,17 @@ snapshots: webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): dependencies: typed-assert: 1.0.9 - webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.23.0) + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) optionalDependencies: html-webpack-plugin: 5.6.3(webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6)) + webpack-subresource-integrity@5.1.0(html-webpack-plugin@5.6.3(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)))(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)): + dependencies: + typed-assert: 1.0.9 + webpack: 5.94.0(@swc/core@1.12.11)(esbuild@0.25.6) + optionalDependencies: + html-webpack-plugin: 5.6.3(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) + webpack-virtual-modules@0.6.2: {} webpack@5.100.0(@swc/core@1.12.11)(esbuild@0.25.6): @@ -25569,7 +25589,7 @@ snapshots: - esbuild - uglify-js - webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0): + webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.25.6): dependencies: '@types/estree': 1.0.8 '@webassemblyjs/ast': 1.14.1 @@ -25591,7 +25611,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.2 - terser-webpack-plugin: 5.3.14(@swc/core@1.12.11)(esbuild@0.23.0)(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) + terser-webpack-plugin: 5.3.14(@swc/core@1.12.11)(esbuild@0.25.6)(webpack@5.94.0(@swc/core@1.12.11)(esbuild@0.23.0)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: From 7349fea9b6eab56d4c178acc1fa4a1d3e74f04ff Mon Sep 17 00:00:00 2001 From: Markus Ecker Date: Tue, 9 Sep 2025 15:06:42 +0200 Subject: [PATCH 4/4] update message ID --- packages/demo-agents/src/slow-tool-call-streaming.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/demo-agents/src/slow-tool-call-streaming.ts b/packages/demo-agents/src/slow-tool-call-streaming.ts index 8d3530c1..63807b95 100644 --- a/packages/demo-agents/src/slow-tool-call-streaming.ts +++ b/packages/demo-agents/src/slow-tool-call-streaming.ts @@ -89,6 +89,7 @@ export class SlowToolCallStreamingAgent extends AbstractAgent { // Send tool result if (cancelled) return; + const toolResultMessageId = `${Date.now()}_tool_result`; observer.next({ type: EventType.TOOL_CALL_RESULT, toolCallId, @@ -99,7 +100,7 @@ export class SlowToolCallStreamingAgent extends AbstractAgent { humidity: 65, windSpeed: 12, }), - messageId, + messageId: toolResultMessageId, } as ToolCallResultEvent); // Complete the run