diff --git a/cockpit/deep-agents/filesystem/angular/project.json b/cockpit/deep-agents/filesystem/angular/project.json
index a60898d46..77ab4b9ae 100644
--- a/cockpit/deep-agents/filesystem/angular/project.json
+++ b/cockpit/deep-agents/filesystem/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-deep-agents-filesystem-angular",
"$schema": "../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/deep-agents/filesystem/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/deep-agents/filesystem/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/deep-agents/filesystem/angular",
- "main": "cockpit/deep-agents/filesystem/angular/src/index.ts",
- "tsConfig": "cockpit/deep-agents/filesystem/angular/tsconfig.json"
- }
+ "index": "cockpit/deep-agents/filesystem/angular/src/index.html",
+ "browser": "cockpit/deep-agents/filesystem/angular/src/main.ts",
+ "tsConfig": "cockpit/deep-agents/filesystem/angular/tsconfig.app.json",
+ "styles": ["cockpit/deep-agents/filesystem/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/deep-agents/filesystem/angular/src/environments/environment.ts",
+ "with": "cockpit/deep-agents/filesystem/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4311,
+ "proxyConfig": "cockpit/deep-agents/filesystem/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-deep-agents-filesystem-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-deep-agents-filesystem-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/deep-agents/filesystem/angular/proxy.conf.json b/cockpit/deep-agents/filesystem/angular/proxy.conf.json
index b406fbb2b..578c65888 100644
--- a/cockpit/deep-agents/filesystem/angular/proxy.conf.json
+++ b/cockpit/deep-agents/filesystem/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8132",
+ "target": "http://localhost:8141",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/deep-agents/filesystem/angular/src/app.component.ts b/cockpit/deep-agents/filesystem/angular/src/app.component.ts
deleted file mode 100644
index 1c9ea78ac..000000000
--- a/cockpit/deep-agents/filesystem/angular/src/app.component.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatDebugComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-filesystem',
- standalone: true,
- imports: [ChatDebugComponent],
- template: `
-
-
-
-
- `,
-})
-export class FilesystemAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'filesystem_agent' });
- });
- }
-}
diff --git a/cockpit/deep-agents/filesystem/angular/src/app.config.ts b/cockpit/deep-agents/filesystem/angular/src/app.config.ts
deleted file mode 100644
index d64820e1e..000000000
--- a/cockpit/deep-agents/filesystem/angular/src/app.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-import { provideRender } from '@cacheplane/render';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- provideRender({}),
- ],
-};
diff --git a/cockpit/deep-agents/filesystem/angular/src/app/app.config.ts b/cockpit/deep-agents/filesystem/angular/src/app/app.config.ts
index f3845b19f..08e9180d0 100644
--- a/cockpit/deep-agents/filesystem/angular/src/app/app.config.ts
+++ b/cockpit/deep-agents/filesystem/angular/src/app/app.config.ts
@@ -1,18 +1,14 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
+import { provideRender } from '@cacheplane/render';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the Deep Agents Filesystem demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
+ provideRender({}),
],
};
diff --git a/cockpit/deep-agents/filesystem/angular/src/app/filesystem.component.ts b/cockpit/deep-agents/filesystem/angular/src/app/filesystem.component.ts
index c909d7e5f..7603d956e 100644
--- a/cockpit/deep-agents/filesystem/angular/src/app/filesystem.component.ts
+++ b/cockpit/deep-agents/filesystem/angular/src/app/filesystem.component.ts
@@ -1,89 +1,18 @@
-import { Component, computed } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
+import { ChatDebugComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-interface ToolCallEntry {
- name: string;
- args: string;
- result?: string;
-}
-
-/**
- * FilesystemComponent demonstrates agent file operations.
- *
- * The agent can read and write files using tool calls. The sidebar
- * shows a real-time log of each file operation as it happens.
- *
- * Key integration points:
- * - `stream.messages()` contains all messages including tool call results
- * - `computed()` derives tool call entries from AI messages
- * - Tool calls update reactively as the agent performs file operations
- */
@Component({
selector: 'app-filesystem',
standalone: true,
- imports: [ChatComponent],
- template: `
-
-
- File Operations
- @for (entry of toolCallEntries(); track $index) {
-
-
- {{ entry.name === 'read_file' ? 'π' : 'βοΈ' }}
-
-
-
- {{ getFilePath(entry.args) }}
-
-
- {{ entry.name === 'read_file' ? 'read' : 'write' }}
- {{ entry.result ? ' Β· done' : ' Β· runningβ¦' }}
-
-
-
- }
- @empty {
- Ask the agent to read or write a file.
- }
-
-
- `,
+ imports: [ChatDebugComponent],
+ template: ``,
})
export class FilesystemComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- toolCallEntries = computed(() => {
- const msg = this.stream.messages();
- const calls: ToolCallEntry[] = [];
- for (const m of msg) {
- if ((m as any).tool_calls) {
- for (const tc of (m as any).tool_calls) {
- calls.push({ name: tc.name, args: JSON.stringify(tc.args), result: tc.output });
- }
- }
- }
- return calls;
- });
-
- getFilePath(args: string): string {
- try {
- const parsed = JSON.parse(args);
- return parsed.path ?? args;
- } catch {
- return args;
- }
- }
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/deep-agents/filesystem/angular/src/environments/environment.development.ts b/cockpit/deep-agents/filesystem/angular/src/environments/environment.development.ts
index 5b01daa5e..f76d58c7f 100644
--- a/cockpit/deep-agents/filesystem/angular/src/environments/environment.development.ts
+++ b/cockpit/deep-agents/filesystem/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4311/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'filesystem',
};
diff --git a/cockpit/deep-agents/filesystem/angular/src/index.html b/cockpit/deep-agents/filesystem/angular/src/index.html
index 20be6aea4..f385242c9 100644
--- a/cockpit/deep-agents/filesystem/angular/src/index.html
+++ b/cockpit/deep-agents/filesystem/angular/src/index.html
@@ -2,11 +2,12 @@
- Filesystem - Deep Agents Angular Example
+ Filesystem β Deep Agents Angular
+
-
+
diff --git a/cockpit/deep-agents/filesystem/angular/src/main.ts b/cockpit/deep-agents/filesystem/angular/src/main.ts
index af525927a..3ff5c10b4 100644
--- a/cockpit/deep-agents/filesystem/angular/src/main.ts
+++ b/cockpit/deep-agents/filesystem/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { FilesystemAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { FilesystemComponent } from './app/filesystem.component';
-bootstrapApplication(FilesystemAppComponent, appConfig).catch(console.error);
+bootstrapApplication(FilesystemComponent, appConfig).catch(console.error);
diff --git a/cockpit/deep-agents/filesystem/angular/tsconfig.app.json b/cockpit/deep-agents/filesystem/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/deep-agents/filesystem/angular/tsconfig.app.json
+++ b/cockpit/deep-agents/filesystem/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/deep-agents/filesystem/angular/tsconfig.json b/cockpit/deep-agents/filesystem/angular/tsconfig.json
index 90497de60..d9e29392d 100644
--- a/cockpit/deep-agents/filesystem/angular/tsconfig.json
+++ b/cockpit/deep-agents/filesystem/angular/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "../../../../../../tsconfig.base.json",
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "preserve"
},
diff --git a/cockpit/deep-agents/memory/angular/project.json b/cockpit/deep-agents/memory/angular/project.json
index 6d8960f96..8dab77f3d 100644
--- a/cockpit/deep-agents/memory/angular/project.json
+++ b/cockpit/deep-agents/memory/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-deep-agents-memory-angular",
"$schema": "../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/deep-agents/memory/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/deep-agents/memory/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/deep-agents/memory/angular",
- "main": "cockpit/deep-agents/memory/angular/src/index.ts",
- "tsConfig": "cockpit/deep-agents/memory/angular/tsconfig.json"
- }
+ "index": "cockpit/deep-agents/memory/angular/src/index.html",
+ "browser": "cockpit/deep-agents/memory/angular/src/main.ts",
+ "tsConfig": "cockpit/deep-agents/memory/angular/tsconfig.app.json",
+ "styles": ["cockpit/deep-agents/memory/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/deep-agents/memory/angular/src/environments/environment.ts",
+ "with": "cockpit/deep-agents/memory/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4313,
+ "proxyConfig": "cockpit/deep-agents/memory/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-deep-agents-memory-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-deep-agents-memory-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/deep-agents/memory/angular/proxy.conf.json b/cockpit/deep-agents/memory/angular/proxy.conf.json
index d03db391c..10f842806 100644
--- a/cockpit/deep-agents/memory/angular/proxy.conf.json
+++ b/cockpit/deep-agents/memory/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8134",
+ "target": "http://localhost:8143",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/deep-agents/memory/angular/src/app.component.ts b/cockpit/deep-agents/memory/angular/src/app.component.ts
deleted file mode 100644
index d30c0fc8d..000000000
--- a/cockpit/deep-agents/memory/angular/src/app.component.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatDebugComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-memory',
- standalone: true,
- imports: [ChatDebugComponent],
- template: `
-
-
-
-
- `,
-})
-export class MemoryAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'memory_agent' });
- });
- }
-}
diff --git a/cockpit/deep-agents/memory/angular/src/app.config.ts b/cockpit/deep-agents/memory/angular/src/app.config.ts
deleted file mode 100644
index d64820e1e..000000000
--- a/cockpit/deep-agents/memory/angular/src/app.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-import { provideRender } from '@cacheplane/render';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- provideRender({}),
- ],
-};
diff --git a/cockpit/deep-agents/memory/angular/src/app/app.config.ts b/cockpit/deep-agents/memory/angular/src/app/app.config.ts
index 7e2215715..08e9180d0 100644
--- a/cockpit/deep-agents/memory/angular/src/app/app.config.ts
+++ b/cockpit/deep-agents/memory/angular/src/app/app.config.ts
@@ -1,18 +1,14 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
+import { provideRender } from '@cacheplane/render';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the Deep Agents Memory demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
+ provideRender({}),
],
};
diff --git a/cockpit/deep-agents/memory/angular/src/app/memory.component.ts b/cockpit/deep-agents/memory/angular/src/app/memory.component.ts
index cbccb77e3..8d644d50d 100644
--- a/cockpit/deep-agents/memory/angular/src/app/memory.component.ts
+++ b/cockpit/deep-agents/memory/angular/src/app/memory.component.ts
@@ -1,57 +1,18 @@
-import { Component, computed } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
+import { ChatDebugComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * MemoryComponent demonstrates persistent agent memory across sessions.
- *
- * The agent extracts facts about the user from each conversation turn
- * and stores them in `agent_memory` state. The sidebar shows all learned
- * facts in real time as the agent updates its memory.
- *
- * Key integration points:
- * - `stream.value()` contains the agent state including `agent_memory`
- * - `computed()` derives key/value pairs for the sidebar
- * - Memory entries update reactively as the agent learns new facts
- */
@Component({
selector: 'app-da-memory',
standalone: true,
- imports: [ChatComponent],
- template: `
-
-
- Learned Facts
- @for (entry of memoryEntries(); track entry[0]) {
-
-
{{ entry[0] }}
-
{{ entry[1] }}
-
- }
- @empty {
- Tell the agent something about yourself to see it remember.
- }
-
-
- `,
+ imports: [ChatDebugComponent],
+ template: ``,
})
export class MemoryComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- memoryEntries = computed(() => {
- const val = this.stream.value() as { agent_memory?: Record } | undefined;
- return Object.entries(val?.agent_memory ?? {});
- });
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/deep-agents/memory/angular/src/environments/environment.development.ts b/cockpit/deep-agents/memory/angular/src/environments/environment.development.ts
index 7b02d4419..a93d56296 100644
--- a/cockpit/deep-agents/memory/angular/src/environments/environment.development.ts
+++ b/cockpit/deep-agents/memory/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4313/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'da-memory',
};
diff --git a/cockpit/deep-agents/memory/angular/src/index.html b/cockpit/deep-agents/memory/angular/src/index.html
index b9a5a9c10..2c0da9ab7 100644
--- a/cockpit/deep-agents/memory/angular/src/index.html
+++ b/cockpit/deep-agents/memory/angular/src/index.html
@@ -2,11 +2,12 @@
- Memory - Deep Agents Angular Example
+ Memory β Deep Agents Angular
+
-
-
+
+
diff --git a/cockpit/deep-agents/memory/angular/src/main.ts b/cockpit/deep-agents/memory/angular/src/main.ts
index 180df289a..e53854a71 100644
--- a/cockpit/deep-agents/memory/angular/src/main.ts
+++ b/cockpit/deep-agents/memory/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { MemoryAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { MemoryComponent } from './app/memory.component';
-bootstrapApplication(MemoryAppComponent, appConfig).catch(console.error);
+bootstrapApplication(MemoryComponent, appConfig).catch(console.error);
diff --git a/cockpit/deep-agents/memory/angular/tsconfig.app.json b/cockpit/deep-agents/memory/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/deep-agents/memory/angular/tsconfig.app.json
+++ b/cockpit/deep-agents/memory/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/deep-agents/memory/angular/tsconfig.json b/cockpit/deep-agents/memory/angular/tsconfig.json
index 90497de60..d9e29392d 100644
--- a/cockpit/deep-agents/memory/angular/tsconfig.json
+++ b/cockpit/deep-agents/memory/angular/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "../../../../../../tsconfig.base.json",
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "preserve"
},
diff --git a/cockpit/deep-agents/planning/angular/project.json b/cockpit/deep-agents/planning/angular/project.json
index 6410ab68e..6dff8ce2f 100644
--- a/cockpit/deep-agents/planning/angular/project.json
+++ b/cockpit/deep-agents/planning/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-deep-agents-planning-angular",
"$schema": "../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/deep-agents/planning/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/deep-agents/planning/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/deep-agents/planning/angular",
- "main": "cockpit/deep-agents/planning/angular/src/index.ts",
- "tsConfig": "cockpit/deep-agents/planning/angular/tsconfig.json"
- }
+ "index": "cockpit/deep-agents/planning/angular/src/index.html",
+ "browser": "cockpit/deep-agents/planning/angular/src/main.ts",
+ "tsConfig": "cockpit/deep-agents/planning/angular/tsconfig.app.json",
+ "styles": ["cockpit/deep-agents/planning/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/deep-agents/planning/angular/src/environments/environment.ts",
+ "with": "cockpit/deep-agents/planning/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4310,
+ "proxyConfig": "cockpit/deep-agents/planning/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-deep-agents-planning-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-deep-agents-planning-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/deep-agents/planning/angular/proxy.conf.json b/cockpit/deep-agents/planning/angular/proxy.conf.json
index d89393efe..2a7969d46 100644
--- a/cockpit/deep-agents/planning/angular/proxy.conf.json
+++ b/cockpit/deep-agents/planning/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8131",
+ "target": "http://localhost:8140",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/deep-agents/planning/angular/src/app.component.ts b/cockpit/deep-agents/planning/angular/src/app.component.ts
deleted file mode 100644
index 69585febe..000000000
--- a/cockpit/deep-agents/planning/angular/src/app.component.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatDebugComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-planning',
- standalone: true,
- imports: [ChatDebugComponent],
- template: `
-
-
-
-
- `,
-})
-export class PlanningAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'planning_agent' });
- });
- }
-}
diff --git a/cockpit/deep-agents/planning/angular/src/app.config.ts b/cockpit/deep-agents/planning/angular/src/app.config.ts
deleted file mode 100644
index d64820e1e..000000000
--- a/cockpit/deep-agents/planning/angular/src/app.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-import { provideRender } from '@cacheplane/render';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- provideRender({}),
- ],
-};
diff --git a/cockpit/deep-agents/planning/angular/src/app/app.config.ts b/cockpit/deep-agents/planning/angular/src/app/app.config.ts
index 75dca3bf3..08e9180d0 100644
--- a/cockpit/deep-agents/planning/angular/src/app/app.config.ts
+++ b/cockpit/deep-agents/planning/angular/src/app/app.config.ts
@@ -1,18 +1,14 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
+import { provideRender } from '@cacheplane/render';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the Deep Agents Planning demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
+ provideRender({}),
],
};
diff --git a/cockpit/deep-agents/planning/angular/src/app/planning.component.ts b/cockpit/deep-agents/planning/angular/src/app/planning.component.ts
index b2deedcd7..6a802b7e1 100644
--- a/cockpit/deep-agents/planning/angular/src/app/planning.component.ts
+++ b/cockpit/deep-agents/planning/angular/src/app/planning.component.ts
@@ -1,65 +1,18 @@
-import { Component, computed } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
+import { ChatDebugComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-interface PlanStep {
- title: string;
- status: 'pending' | 'running' | 'complete';
-}
-
-/**
- * PlanningComponent demonstrates agent task decomposition.
- *
- * The agent receives a complex task, breaks it into ordered steps,
- * and executes them. The sidebar shows each step's status in real time.
- *
- * Key integration points:
- * - `stream.value()` contains the plan state with step list
- * - `computed()` derives the plan steps for the sidebar
- * - Steps update reactively as the agent works through them
- */
@Component({
selector: 'app-planning',
standalone: true,
- imports: [ChatComponent],
- template: `
-
-
- Task Plan
- @for (step of planSteps(); track $index) {
-
-
-
- {{ step.title }}
-
-
- }
- @empty {
- Ask a complex question to see the plan.
- }
-
-
- `,
+ imports: [ChatDebugComponent],
+ template: ``,
})
export class PlanningComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- planSteps = computed(() => {
- const val = this.stream.value() as { plan?: PlanStep[] } | undefined;
- return val?.plan ?? [];
- });
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/deep-agents/planning/angular/src/environments/environment.development.ts b/cockpit/deep-agents/planning/angular/src/environments/environment.development.ts
index b0133086b..839f63cfa 100644
--- a/cockpit/deep-agents/planning/angular/src/environments/environment.development.ts
+++ b/cockpit/deep-agents/planning/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4310/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'planning',
};
diff --git a/cockpit/deep-agents/planning/angular/src/index.html b/cockpit/deep-agents/planning/angular/src/index.html
index cc6217adc..564ce18e9 100644
--- a/cockpit/deep-agents/planning/angular/src/index.html
+++ b/cockpit/deep-agents/planning/angular/src/index.html
@@ -2,11 +2,12 @@
- Planning - Deep Agents Angular Example
+ Planning β Deep Agents Angular
+
-
+
diff --git a/cockpit/deep-agents/planning/angular/src/main.ts b/cockpit/deep-agents/planning/angular/src/main.ts
index cdeac74d0..33851aef1 100644
--- a/cockpit/deep-agents/planning/angular/src/main.ts
+++ b/cockpit/deep-agents/planning/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { PlanningAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { PlanningComponent } from './app/planning.component';
-bootstrapApplication(PlanningAppComponent, appConfig).catch(console.error);
+bootstrapApplication(PlanningComponent, appConfig).catch(console.error);
diff --git a/cockpit/deep-agents/planning/angular/tsconfig.app.json b/cockpit/deep-agents/planning/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/deep-agents/planning/angular/tsconfig.app.json
+++ b/cockpit/deep-agents/planning/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/deep-agents/planning/angular/tsconfig.json b/cockpit/deep-agents/planning/angular/tsconfig.json
index 90497de60..d9e29392d 100644
--- a/cockpit/deep-agents/planning/angular/tsconfig.json
+++ b/cockpit/deep-agents/planning/angular/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "../../../../../../tsconfig.base.json",
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "preserve"
},
diff --git a/cockpit/deep-agents/sandboxes/angular/project.json b/cockpit/deep-agents/sandboxes/angular/project.json
index e36edfe37..ec70bd648 100644
--- a/cockpit/deep-agents/sandboxes/angular/project.json
+++ b/cockpit/deep-agents/sandboxes/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-deep-agents-sandboxes-angular",
"$schema": "../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/deep-agents/sandboxes/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/deep-agents/sandboxes/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/deep-agents/sandboxes/angular",
- "main": "cockpit/deep-agents/sandboxes/angular/src/index.ts",
- "tsConfig": "cockpit/deep-agents/sandboxes/angular/tsconfig.json"
- }
+ "index": "cockpit/deep-agents/sandboxes/angular/src/index.html",
+ "browser": "cockpit/deep-agents/sandboxes/angular/src/main.ts",
+ "tsConfig": "cockpit/deep-agents/sandboxes/angular/tsconfig.app.json",
+ "styles": ["cockpit/deep-agents/sandboxes/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/deep-agents/sandboxes/angular/src/environments/environment.ts",
+ "with": "cockpit/deep-agents/sandboxes/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4315,
+ "proxyConfig": "cockpit/deep-agents/sandboxes/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-deep-agents-sandboxes-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-deep-agents-sandboxes-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/deep-agents/sandboxes/angular/proxy.conf.json b/cockpit/deep-agents/sandboxes/angular/proxy.conf.json
index 7cef15fe7..e9267a7bd 100644
--- a/cockpit/deep-agents/sandboxes/angular/proxy.conf.json
+++ b/cockpit/deep-agents/sandboxes/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8136",
+ "target": "http://localhost:8145",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/deep-agents/sandboxes/angular/src/app.component.ts b/cockpit/deep-agents/sandboxes/angular/src/app.component.ts
deleted file mode 100644
index 408dd027a..000000000
--- a/cockpit/deep-agents/sandboxes/angular/src/app.component.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatDebugComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-sandboxes',
- standalone: true,
- imports: [ChatDebugComponent],
- template: `
-
-
-
-
- `,
-})
-export class SandboxesAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'sandbox_agent' });
- });
- }
-}
diff --git a/cockpit/deep-agents/sandboxes/angular/src/app.config.ts b/cockpit/deep-agents/sandboxes/angular/src/app.config.ts
deleted file mode 100644
index d64820e1e..000000000
--- a/cockpit/deep-agents/sandboxes/angular/src/app.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-import { provideRender } from '@cacheplane/render';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- provideRender({}),
- ],
-};
diff --git a/cockpit/deep-agents/sandboxes/angular/src/app/app.config.ts b/cockpit/deep-agents/sandboxes/angular/src/app/app.config.ts
index c92129d5c..08e9180d0 100644
--- a/cockpit/deep-agents/sandboxes/angular/src/app/app.config.ts
+++ b/cockpit/deep-agents/sandboxes/angular/src/app/app.config.ts
@@ -1,18 +1,14 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
+import { provideRender } from '@cacheplane/render';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the Deep Agents Sandboxes demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
+ provideRender({}),
],
};
diff --git a/cockpit/deep-agents/sandboxes/angular/src/app/sandboxes.component.ts b/cockpit/deep-agents/sandboxes/angular/src/app/sandboxes.component.ts
index 47f63a985..a07ae694e 100644
--- a/cockpit/deep-agents/sandboxes/angular/src/app/sandboxes.component.ts
+++ b/cockpit/deep-agents/sandboxes/angular/src/app/sandboxes.component.ts
@@ -1,96 +1,18 @@
-import { Component, computed } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
+import { ChatDebugComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-interface ExecutionLog {
- code: string;
- stdout: string;
- exitStatus: number;
-}
-
-/**
- * SandboxesComponent demonstrates a coding agent that executes Python code.
- *
- * The agent writes and runs code snippets to solve problems using a
- * `run_code` tool. The sidebar shows execution logs β code input, stdout
- * output, and exit status β for each sandbox execution.
- *
- * Key integration points:
- * - `stream.messages()` contains all messages including tool call results
- * - `computed()` derives execution log entries from tool calls in AI messages
- * - Logs update reactively as the agent writes and runs code
- */
@Component({
selector: 'app-sandboxes',
standalone: true,
- imports: [ChatComponent],
- template: `
-
-
- Execution Logs
- @for (log of executionLogs(); track $index) {
-
-
-
- exit {{ log.exitStatus }}
-
-
-
{{ log.code }}
- @if (log.stdout) {
-
stdout
-
{{ log.stdout }}
- }
-
- }
- @empty {
- Ask the agent to write and run Python code.
- }
-
-
- `,
+ imports: [ChatDebugComponent],
+ template: ``,
})
export class SandboxesComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- executionLogs = computed(() => {
- const msgs = this.stream.messages();
- const logs: ExecutionLog[] = [];
- for (const m of msgs) {
- if ((m as any).tool_calls) {
- for (const tc of (m as any).tool_calls) {
- if (tc.name === 'run_code' && tc.output) {
- try {
- const parsed = JSON.parse(tc.output);
- logs.push({
- code: tc.args?.code ?? '',
- stdout: parsed.stdout ?? '',
- exitStatus: parsed.exit_status ?? 0,
- });
- } catch {
- logs.push({
- code: tc.args?.code ?? '',
- stdout: tc.output,
- exitStatus: 0,
- });
- }
- }
- }
- }
- }
- return logs;
- });
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/deep-agents/sandboxes/angular/src/environments/environment.development.ts b/cockpit/deep-agents/sandboxes/angular/src/environments/environment.development.ts
index b727a59a3..64828de16 100644
--- a/cockpit/deep-agents/sandboxes/angular/src/environments/environment.development.ts
+++ b/cockpit/deep-agents/sandboxes/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4315/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'sandboxes',
};
diff --git a/cockpit/deep-agents/sandboxes/angular/src/index.html b/cockpit/deep-agents/sandboxes/angular/src/index.html
index 36bcecc82..a6a5ba118 100644
--- a/cockpit/deep-agents/sandboxes/angular/src/index.html
+++ b/cockpit/deep-agents/sandboxes/angular/src/index.html
@@ -2,11 +2,12 @@
- Sandboxes - Deep Agents Angular Example
+ Sandboxes β Deep Agents Angular
+
-
+
diff --git a/cockpit/deep-agents/sandboxes/angular/src/main.ts b/cockpit/deep-agents/sandboxes/angular/src/main.ts
index 6ea997dcb..0175071cb 100644
--- a/cockpit/deep-agents/sandboxes/angular/src/main.ts
+++ b/cockpit/deep-agents/sandboxes/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { SandboxesAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { SandboxesComponent } from './app/sandboxes.component';
-bootstrapApplication(SandboxesAppComponent, appConfig).catch(console.error);
+bootstrapApplication(SandboxesComponent, appConfig).catch(console.error);
diff --git a/cockpit/deep-agents/sandboxes/angular/tsconfig.app.json b/cockpit/deep-agents/sandboxes/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/deep-agents/sandboxes/angular/tsconfig.app.json
+++ b/cockpit/deep-agents/sandboxes/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/deep-agents/sandboxes/angular/tsconfig.json b/cockpit/deep-agents/sandboxes/angular/tsconfig.json
index 90497de60..d9e29392d 100644
--- a/cockpit/deep-agents/sandboxes/angular/tsconfig.json
+++ b/cockpit/deep-agents/sandboxes/angular/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "../../../../../../tsconfig.base.json",
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "preserve"
},
diff --git a/cockpit/deep-agents/skills/angular/project.json b/cockpit/deep-agents/skills/angular/project.json
index 4f85e59a5..7bdf63a8d 100644
--- a/cockpit/deep-agents/skills/angular/project.json
+++ b/cockpit/deep-agents/skills/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-deep-agents-skills-angular",
"$schema": "../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/deep-agents/skills/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/deep-agents/skills/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/deep-agents/skills/angular",
- "main": "cockpit/deep-agents/skills/angular/src/index.ts",
- "tsConfig": "cockpit/deep-agents/skills/angular/tsconfig.json"
- }
+ "index": "cockpit/deep-agents/skills/angular/src/index.html",
+ "browser": "cockpit/deep-agents/skills/angular/src/main.ts",
+ "tsConfig": "cockpit/deep-agents/skills/angular/tsconfig.app.json",
+ "styles": ["cockpit/deep-agents/skills/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/deep-agents/skills/angular/src/environments/environment.ts",
+ "with": "cockpit/deep-agents/skills/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4314,
+ "proxyConfig": "cockpit/deep-agents/skills/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-deep-agents-skills-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-deep-agents-skills-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/deep-agents/skills/angular/proxy.conf.json b/cockpit/deep-agents/skills/angular/proxy.conf.json
index 4dfc6c35a..c83583dc7 100644
--- a/cockpit/deep-agents/skills/angular/proxy.conf.json
+++ b/cockpit/deep-agents/skills/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8135",
+ "target": "http://localhost:8144",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/deep-agents/skills/angular/src/app.component.ts b/cockpit/deep-agents/skills/angular/src/app.component.ts
deleted file mode 100644
index 249563587..000000000
--- a/cockpit/deep-agents/skills/angular/src/app.component.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatDebugComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-skills',
- standalone: true,
- imports: [ChatDebugComponent],
- template: `
-
-
-
-
- `,
-})
-export class SkillsAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'skills_agent' });
- });
- }
-}
diff --git a/cockpit/deep-agents/skills/angular/src/app.config.ts b/cockpit/deep-agents/skills/angular/src/app.config.ts
deleted file mode 100644
index d64820e1e..000000000
--- a/cockpit/deep-agents/skills/angular/src/app.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-import { provideRender } from '@cacheplane/render';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- provideRender({}),
- ],
-};
diff --git a/cockpit/deep-agents/skills/angular/src/app/app.config.ts b/cockpit/deep-agents/skills/angular/src/app/app.config.ts
index 0a688b9c2..08e9180d0 100644
--- a/cockpit/deep-agents/skills/angular/src/app/app.config.ts
+++ b/cockpit/deep-agents/skills/angular/src/app/app.config.ts
@@ -1,18 +1,14 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
+import { provideRender } from '@cacheplane/render';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the Deep Agents Skills demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
+ provideRender({}),
],
};
diff --git a/cockpit/deep-agents/skills/angular/src/app/skills.component.ts b/cockpit/deep-agents/skills/angular/src/app/skills.component.ts
index ffa41616a..c2a65c2f7 100644
--- a/cockpit/deep-agents/skills/angular/src/app/skills.component.ts
+++ b/cockpit/deep-agents/skills/angular/src/app/skills.component.ts
@@ -1,92 +1,18 @@
-import { Component, computed } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
+import { ChatDebugComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-interface SkillInvocation {
- skillName: string;
- args: string;
- result?: string;
-}
-
-/**
- * SkillsComponent demonstrates a multi-skill agent with specialized tools.
- *
- * The agent can calculate math expressions, count words, and summarize text
- * by selecting the appropriate skill tool for each user request. The sidebar
- * shows each skill invocation as a card with the skill name, input args,
- * and result.
- *
- * Key integration points:
- * - `stream.messages()` contains all messages including tool call data
- * - `computed()` derives skill invocation cards from tool calls in AI messages
- * - Invocations update reactively as the agent calls and receives tool results
- */
@Component({
selector: 'app-skills',
standalone: true,
- imports: [ChatComponent],
- template: `
-
-
- Skill Invocations
- @for (inv of skillInvocations(); track $index) {
-
-
-
- {{ inv.skillName }}
-
- @if (inv.result) {
- done
- } @else {
- runningβ¦
- }
-
-
- {{ inv.args }}
-
- @if (inv.result) {
-
- {{ inv.result }}
-
- }
-
- }
- @empty {
- Ask the agent to calculate, count words, or summarize text.
- }
-
-
- `,
+ imports: [ChatDebugComponent],
+ template: ``,
})
export class SkillsComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- skillInvocations = computed(() => {
- const msgs = this.stream.messages();
- const invocations: SkillInvocation[] = [];
- for (const m of msgs) {
- if ((m as any).tool_calls) {
- for (const tc of (m as any).tool_calls) {
- invocations.push({
- skillName: tc.name,
- args: JSON.stringify(tc.args),
- result: tc.output,
- });
- }
- }
- }
- return invocations;
- });
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/deep-agents/skills/angular/src/environments/environment.development.ts b/cockpit/deep-agents/skills/angular/src/environments/environment.development.ts
index da7ba04a9..36224d46c 100644
--- a/cockpit/deep-agents/skills/angular/src/environments/environment.development.ts
+++ b/cockpit/deep-agents/skills/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4314/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'skills',
};
diff --git a/cockpit/deep-agents/skills/angular/src/index.html b/cockpit/deep-agents/skills/angular/src/index.html
index bcd6ec7f5..1565f3166 100644
--- a/cockpit/deep-agents/skills/angular/src/index.html
+++ b/cockpit/deep-agents/skills/angular/src/index.html
@@ -2,11 +2,12 @@
- Skills - Deep Agents Angular Example
+ Skills β Deep Agents Angular
+
-
+
diff --git a/cockpit/deep-agents/skills/angular/src/main.ts b/cockpit/deep-agents/skills/angular/src/main.ts
index eb3fab282..86bcf6de8 100644
--- a/cockpit/deep-agents/skills/angular/src/main.ts
+++ b/cockpit/deep-agents/skills/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { SkillsAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { SkillsComponent } from './app/skills.component';
-bootstrapApplication(SkillsAppComponent, appConfig).catch(console.error);
+bootstrapApplication(SkillsComponent, appConfig).catch(console.error);
diff --git a/cockpit/deep-agents/skills/angular/tsconfig.app.json b/cockpit/deep-agents/skills/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/deep-agents/skills/angular/tsconfig.app.json
+++ b/cockpit/deep-agents/skills/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/deep-agents/skills/angular/tsconfig.json b/cockpit/deep-agents/skills/angular/tsconfig.json
index 90497de60..d9e29392d 100644
--- a/cockpit/deep-agents/skills/angular/tsconfig.json
+++ b/cockpit/deep-agents/skills/angular/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "../../../../../../tsconfig.base.json",
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "preserve"
},
diff --git a/cockpit/deep-agents/subagents/angular/project.json b/cockpit/deep-agents/subagents/angular/project.json
index 255d66722..7e8e2f20b 100644
--- a/cockpit/deep-agents/subagents/angular/project.json
+++ b/cockpit/deep-agents/subagents/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-deep-agents-subagents-angular",
"$schema": "../../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/deep-agents/subagents/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/deep-agents/subagents/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/deep-agents/subagents/angular",
- "main": "cockpit/deep-agents/subagents/angular/src/index.ts",
- "tsConfig": "cockpit/deep-agents/subagents/angular/tsconfig.json"
- }
+ "index": "cockpit/deep-agents/subagents/angular/src/index.html",
+ "browser": "cockpit/deep-agents/subagents/angular/src/main.ts",
+ "tsConfig": "cockpit/deep-agents/subagents/angular/tsconfig.app.json",
+ "styles": ["cockpit/deep-agents/subagents/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/deep-agents/subagents/angular/src/environments/environment.ts",
+ "with": "cockpit/deep-agents/subagents/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4312,
+ "proxyConfig": "cockpit/deep-agents/subagents/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-deep-agents-subagents-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-deep-agents-subagents-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/deep-agents/subagents/angular/proxy.conf.json b/cockpit/deep-agents/subagents/angular/proxy.conf.json
index e7220a509..79df6bcdc 100644
--- a/cockpit/deep-agents/subagents/angular/proxy.conf.json
+++ b/cockpit/deep-agents/subagents/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8133",
+ "target": "http://localhost:8142",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/deep-agents/subagents/angular/src/app.component.ts b/cockpit/deep-agents/subagents/angular/src/app.component.ts
deleted file mode 100644
index bd285ad7e..000000000
--- a/cockpit/deep-agents/subagents/angular/src/app.component.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatDebugComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-subagents',
- standalone: true,
- imports: [ChatDebugComponent],
- template: `
-
-
-
-
- `,
-})
-export class SubagentsAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'orchestrator_agent' });
- });
- }
-}
diff --git a/cockpit/deep-agents/subagents/angular/src/app.config.ts b/cockpit/deep-agents/subagents/angular/src/app.config.ts
deleted file mode 100644
index d64820e1e..000000000
--- a/cockpit/deep-agents/subagents/angular/src/app.config.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-import { provideRender } from '@cacheplane/render';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- provideRender({}),
- ],
-};
diff --git a/cockpit/deep-agents/subagents/angular/src/app/app.config.ts b/cockpit/deep-agents/subagents/angular/src/app/app.config.ts
index a76914e8e..08e9180d0 100644
--- a/cockpit/deep-agents/subagents/angular/src/app/app.config.ts
+++ b/cockpit/deep-agents/subagents/angular/src/app/app.config.ts
@@ -1,18 +1,14 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
+import { provideRender } from '@cacheplane/render';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the Deep Agents Subagents demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
+ provideRender({}),
],
};
diff --git a/cockpit/deep-agents/subagents/angular/src/app/subagents.component.ts b/cockpit/deep-agents/subagents/angular/src/app/subagents.component.ts
index 18cd9ca91..4dd419283 100644
--- a/cockpit/deep-agents/subagents/angular/src/app/subagents.component.ts
+++ b/cockpit/deep-agents/subagents/angular/src/app/subagents.component.ts
@@ -1,67 +1,18 @@
-import { Component, computed } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
+import { ChatDebugComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * SubagentsComponent demonstrates the Deep Agents subagent delegation pattern.
- *
- * The orchestrator agent receives a task and delegates subtasks to specialist
- * subagents via tool calls. Each tool call spawns a child agent that streams
- * its own progress independently.
- *
- * Key integration points:
- * - `stream.subagents()` returns a Map
- * - `subagentEntries` derives a sorted array for sidebar rendering
- * - Each entry shows the tool call ID (truncated), status badge, and message count
- * - Subagent statuses update reactively: pending β running β complete
- */
@Component({
selector: 'app-subagents',
standalone: true,
- imports: [ChatComponent],
- template: `
-
-
- Subagents
- @for (entry of subagentEntries(); track entry[0]) {
-
-
-
- {{ entry[1].status() }}
-
-
- {{ entry[0].slice(0, 8) }}β¦
-
-
-
- {{ entry[1].messages().length }} message{{ entry[1].messages().length === 1 ? '' : 's' }}
-
-
- }
- @empty {
- Ask a question to see subagent activity.
- }
-
-
- `,
+ imports: [ChatDebugComponent],
+ template: ``,
})
export class SubagentsComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- subagentEntries = computed(() => Array.from(this.stream.subagents().entries()));
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/deep-agents/subagents/angular/src/environments/environment.development.ts b/cockpit/deep-agents/subagents/angular/src/environments/environment.development.ts
index 9c8246785..2fb0e4bed 100644
--- a/cockpit/deep-agents/subagents/angular/src/environments/environment.development.ts
+++ b/cockpit/deep-agents/subagents/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4312/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'subagents',
};
diff --git a/cockpit/deep-agents/subagents/angular/src/index.html b/cockpit/deep-agents/subagents/angular/src/index.html
index caa1129f2..412e312c3 100644
--- a/cockpit/deep-agents/subagents/angular/src/index.html
+++ b/cockpit/deep-agents/subagents/angular/src/index.html
@@ -2,11 +2,12 @@
- Subagents - Deep Agents Angular Example
+ Subagents β Deep Agents Angular
+
-
+
diff --git a/cockpit/deep-agents/subagents/angular/src/main.ts b/cockpit/deep-agents/subagents/angular/src/main.ts
index e51976092..869cb2212 100644
--- a/cockpit/deep-agents/subagents/angular/src/main.ts
+++ b/cockpit/deep-agents/subagents/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { SubagentsAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { SubagentsComponent } from './app/subagents.component';
-bootstrapApplication(SubagentsAppComponent, appConfig).catch(console.error);
+bootstrapApplication(SubagentsComponent, appConfig).catch(console.error);
diff --git a/cockpit/deep-agents/subagents/angular/tsconfig.app.json b/cockpit/deep-agents/subagents/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/deep-agents/subagents/angular/tsconfig.app.json
+++ b/cockpit/deep-agents/subagents/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/deep-agents/subagents/angular/tsconfig.json b/cockpit/deep-agents/subagents/angular/tsconfig.json
index 90497de60..d9e29392d 100644
--- a/cockpit/deep-agents/subagents/angular/tsconfig.json
+++ b/cockpit/deep-agents/subagents/angular/tsconfig.json
@@ -1,5 +1,5 @@
{
- "extends": "../../../../../../tsconfig.base.json",
+ "extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "preserve"
},
diff --git a/cockpit/langgraph/deployment-runtime/angular/project.json b/cockpit/langgraph/deployment-runtime/angular/project.json
index 7eb4b9fac..6a8f11507 100644
--- a/cockpit/langgraph/deployment-runtime/angular/project.json
+++ b/cockpit/langgraph/deployment-runtime/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-langgraph-deployment-runtime-angular",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/langgraph/deployment-runtime/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/langgraph/deployment-runtime/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/langgraph/deployment-runtime/angular",
- "main": "cockpit/langgraph/deployment-runtime/angular/src/index.ts",
- "tsConfig": "cockpit/langgraph/deployment-runtime/angular/tsconfig.json"
- }
+ "index": "cockpit/langgraph/deployment-runtime/angular/src/index.html",
+ "browser": "cockpit/langgraph/deployment-runtime/angular/src/main.ts",
+ "tsConfig": "cockpit/langgraph/deployment-runtime/angular/tsconfig.app.json",
+ "styles": ["cockpit/langgraph/deployment-runtime/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/langgraph/deployment-runtime/angular/src/environments/environment.ts",
+ "with": "cockpit/langgraph/deployment-runtime/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4307,
+ "proxyConfig": "cockpit/langgraph/deployment-runtime/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-langgraph-deployment-runtime-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-langgraph-deployment-runtime-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/app.component.ts b/cockpit/langgraph/deployment-runtime/angular/src/app.component.ts
deleted file mode 100644
index a043b8cc5..000000000
--- a/cockpit/langgraph/deployment-runtime/angular/src/app.component.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { Component, inject, Injector, InjectionToken, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-/** Provide via environment.ts / environment.prod.ts for zero-code env switching. */
-export const LANGGRAPH_CONFIG = new InjectionToken<{
- apiUrl: string;
- assistantId: string;
-}>('LANGGRAPH_CONFIG', {
- factory: () => ({
- apiUrl: 'http://localhost:2024',
- assistantId: 'chat_agent',
- }),
-});
-
-@Component({
- selector: 'app-deployment-runtime',
- standalone: true,
- imports: [ChatComponent],
- template: `
-
-
-
-
- `,
-})
-export class DeploymentRuntimeAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- private readonly config = inject(LANGGRAPH_CONFIG);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({
- apiUrl: this.config.apiUrl,
- assistantId: this.config.assistantId,
- });
- });
- }
-}
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/app.config.ts b/cockpit/langgraph/deployment-runtime/angular/src/app.config.ts
deleted file mode 100644
index 6ac3b924c..000000000
--- a/cockpit/langgraph/deployment-runtime/angular/src/app.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- ],
-};
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/app/app.config.ts b/cockpit/langgraph/deployment-runtime/angular/src/app/app.config.ts
index 9ae6eaaf5..b52a916ac 100644
--- a/cockpit/langgraph/deployment-runtime/angular/src/app/app.config.ts
+++ b/cockpit/langgraph/deployment-runtime/angular/src/app/app.config.ts
@@ -1,19 +1,12 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the LangGraph Deployment Runtime demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * In production this URL points to a LangGraph Cloud deployment.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
],
};
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/app/deployment-runtime.component.ts b/cockpit/langgraph/deployment-runtime/angular/src/app/deployment-runtime.component.ts
index cd8f0a6d6..05410c24f 100644
--- a/cockpit/langgraph/deployment-runtime/angular/src/app/deployment-runtime.component.ts
+++ b/cockpit/langgraph/deployment-runtime/angular/src/app/deployment-runtime.component.ts
@@ -1,90 +1,18 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { Component } from '@angular/core';
import { ChatComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * DeploymentRuntimeComponent demonstrates production deployment patterns.
- *
- * Shows how streamResource() connects to a deployed LangGraph Cloud
- * instance. The sidebar displays connection info and deployment status.
- */
@Component({
selector: 'app-deployment-runtime',
standalone: true,
imports: [ChatComponent],
- template: `
-
-
- Deployment
-
-
-
API URL
-
- {{ apiUrl }}
-
-
-
-
-
Assistant ID
-
- {{ assistantId }}
-
-
-
-
-
Status
-
- {{ stream.status() }}
-
-
-
- @if (currentThreadId) {
-
-
Thread ID
-
- {{ currentThreadId }}
-
-
- }
-
-
- `,
+ template: ``,
})
export class DeploymentRuntimeComponent {
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.deploymentRuntimeAssistantId,
- onThreadId: (id: string) => {
- this.currentThreadId = id;
- },
});
-
- readonly apiUrl = environment.langGraphApiUrl;
- readonly assistantId = environment.deploymentRuntimeAssistantId;
- currentThreadId = '';
-
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
-
- statusBadgeBackground(): string {
- const status = this.stream.status();
- if (status === 'loading') return 'rgba(0,160,80,0.12)';
- if (status === 'error') return 'rgba(200,40,40,0.1)';
- return 'rgba(0,64,144,0.08)';
- }
-
- statusBadgeColor(): string {
- const status = this.stream.status();
- if (status === 'loading') return '#00802a';
- if (status === 'error') return '#c82828';
- return '#004090';
- }
}
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/environments/environment.development.ts b/cockpit/langgraph/deployment-runtime/angular/src/environments/environment.development.ts
index 14f57678a..9dfed1292 100644
--- a/cockpit/langgraph/deployment-runtime/angular/src/environments/environment.development.ts
+++ b/cockpit/langgraph/deployment-runtime/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4307/api',
+ langGraphApiUrl: '/api',
deploymentRuntimeAssistantId: 'deployment-runtime',
};
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/index.html b/cockpit/langgraph/deployment-runtime/angular/src/index.html
index fde252ce3..5290cf4af 100644
--- a/cockpit/langgraph/deployment-runtime/angular/src/index.html
+++ b/cockpit/langgraph/deployment-runtime/angular/src/index.html
@@ -2,11 +2,12 @@
- Deployment Runtime - LangGraph Angular Example
+ LangGraph Deployment & Runtime β Angular
+
-
+
diff --git a/cockpit/langgraph/deployment-runtime/angular/src/main.ts b/cockpit/langgraph/deployment-runtime/angular/src/main.ts
index 57d8f1c7f..45a47e1ed 100644
--- a/cockpit/langgraph/deployment-runtime/angular/src/main.ts
+++ b/cockpit/langgraph/deployment-runtime/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { DeploymentRuntimeAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { DeploymentRuntimeComponent } from './app/deployment-runtime.component';
-bootstrapApplication(DeploymentRuntimeAppComponent, appConfig).catch(console.error);
+bootstrapApplication(DeploymentRuntimeComponent, appConfig).catch(console.error);
diff --git a/cockpit/langgraph/deployment-runtime/angular/tsconfig.app.json b/cockpit/langgraph/deployment-runtime/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/langgraph/deployment-runtime/angular/tsconfig.app.json
+++ b/cockpit/langgraph/deployment-runtime/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/langgraph/durable-execution/angular/project.json b/cockpit/langgraph/durable-execution/angular/project.json
index dbc9cc575..a98d4b82a 100644
--- a/cockpit/langgraph/durable-execution/angular/project.json
+++ b/cockpit/langgraph/durable-execution/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-langgraph-durable-execution-angular",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/langgraph/durable-execution/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/langgraph/durable-execution/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/langgraph/durable-execution/angular",
- "main": "cockpit/langgraph/durable-execution/angular/src/index.ts",
- "tsConfig": "cockpit/langgraph/durable-execution/angular/tsconfig.json"
- }
+ "index": "cockpit/langgraph/durable-execution/angular/src/index.html",
+ "browser": "cockpit/langgraph/durable-execution/angular/src/main.ts",
+ "tsConfig": "cockpit/langgraph/durable-execution/angular/tsconfig.app.json",
+ "styles": ["cockpit/langgraph/durable-execution/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/langgraph/durable-execution/angular/src/environments/environment.ts",
+ "with": "cockpit/langgraph/durable-execution/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4306,
+ "proxyConfig": "cockpit/langgraph/durable-execution/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-langgraph-durable-execution-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-langgraph-durable-execution-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/langgraph/durable-execution/angular/proxy.conf.json b/cockpit/langgraph/durable-execution/angular/proxy.conf.json
index 36c6b6749..4b45f71fb 100644
--- a/cockpit/langgraph/durable-execution/angular/proxy.conf.json
+++ b/cockpit/langgraph/durable-execution/angular/proxy.conf.json
@@ -1,6 +1,6 @@
{
"/api": {
- "target": "http://localhost:8127",
+ "target": "http://localhost:8129",
"secure": false,
"changeOrigin": true,
"pathRewrite": { "^/api": "" },
diff --git a/cockpit/langgraph/durable-execution/angular/src/app.component.ts b/cockpit/langgraph/durable-execution/angular/src/app.component.ts
deleted file mode 100644
index af24a6ac6..000000000
--- a/cockpit/langgraph/durable-execution/angular/src/app.component.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { ChatComponent, ChatErrorComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-durable-execution',
- standalone: true,
- imports: [ChatComponent, ChatErrorComponent],
- template: `
-
-
-
-
-
-
- `,
-})
-export class DurableExecutionAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({
- assistantId: 'chat_agent',
- retry: { maxAttempts: 5, baseDelayMs: 500 },
- });
- });
- }
-}
diff --git a/cockpit/langgraph/durable-execution/angular/src/app.config.ts b/cockpit/langgraph/durable-execution/angular/src/app.config.ts
deleted file mode 100644
index 6ac3b924c..000000000
--- a/cockpit/langgraph/durable-execution/angular/src/app.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- ],
-};
diff --git a/cockpit/langgraph/durable-execution/angular/src/app/app.config.ts b/cockpit/langgraph/durable-execution/angular/src/app/app.config.ts
index 3ef0ea1e9..b52a916ac 100644
--- a/cockpit/langgraph/durable-execution/angular/src/app/app.config.ts
+++ b/cockpit/langgraph/durable-execution/angular/src/app/app.config.ts
@@ -1,18 +1,12 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the LangGraph Durable Execution demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
],
};
diff --git a/cockpit/langgraph/durable-execution/angular/src/app/durable-execution.component.ts b/cockpit/langgraph/durable-execution/angular/src/app/durable-execution.component.ts
index e4cb26b4a..784eafcb8 100644
--- a/cockpit/langgraph/durable-execution/angular/src/app/durable-execution.component.ts
+++ b/cockpit/langgraph/durable-execution/angular/src/app/durable-execution.component.ts
@@ -1,96 +1,18 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { Component } from '@angular/core';
import { ChatComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * DurableExecutionComponent demonstrates fault-tolerant multi-step execution
- * with `streamResource()`.
- *
- * This example shows how a graph checkpoints at each node, enabling it to
- * resume after failures. The sidebar shows execution status in real time:
- * - `stream.status()` as a badge (idle/loading/resolved/error)
- * - `stream.hasValue()` indicator for received data
- * - A "Retry" button that calls `stream.reload()` when `stream.error()` is set
- *
- * The backend processes each request through three nodes:
- * analyze β plan β generate
- * Each node updates `state.step` so the UI can track progress.
- */
@Component({
selector: 'app-durable-execution',
standalone: true,
imports: [ChatComponent],
- template: `
-
-
- Execution Status
-
-
-
Status
-
-
- {{ stream.status() }}
-
-
-
-
-
-
Data Received
-
-
- {{ stream.hasValue() ? 'Yes' : 'No' }}
-
-
-
- @if (stream.error()) {
-
-
Execution Failed
-
-
- }
-
-
- `,
+ template: ``,
})
export class DurableExecutionComponent {
- /**
- * The streaming resource backing this durable-execution demo.
- *
- * The graph runs three nodes (analyze β plan β generate), checkpointing
- * after each one. If the graph fails partway through, `stream.reload()`
- * re-submits the last input so the run can resume from the last checkpoint.
- */
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- /**
- * Submit a message to be processed through the multi-node graph.
- */
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
-
- /**
- * Returns a colour for the status badge based on the current stream status.
- */
- statusBadgeColor(): string {
- switch (this.stream.status()) {
- case 'loading':
- case 'reloading': return '#2563eb';
- case 'resolved': return '#16a34a';
- case 'error': return '#dc2626';
- default: return '#6b7280';
- }
- }
}
diff --git a/cockpit/langgraph/durable-execution/angular/src/environments/environment.development.ts b/cockpit/langgraph/durable-execution/angular/src/environments/environment.development.ts
index 3e05fdd69..3fd5889eb 100644
--- a/cockpit/langgraph/durable-execution/angular/src/environments/environment.development.ts
+++ b/cockpit/langgraph/durable-execution/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4304/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'durable-execution',
};
diff --git a/cockpit/langgraph/durable-execution/angular/src/index.html b/cockpit/langgraph/durable-execution/angular/src/index.html
index 35a132130..014c5c510 100644
--- a/cockpit/langgraph/durable-execution/angular/src/index.html
+++ b/cockpit/langgraph/durable-execution/angular/src/index.html
@@ -2,11 +2,12 @@
- Durable Execution - LangGraph Angular Example
+ LangGraph Durable Execution β Angular
+
-
+
diff --git a/cockpit/langgraph/durable-execution/angular/src/main.ts b/cockpit/langgraph/durable-execution/angular/src/main.ts
index b4e7384ec..d309624fb 100644
--- a/cockpit/langgraph/durable-execution/angular/src/main.ts
+++ b/cockpit/langgraph/durable-execution/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { DurableExecutionAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { DurableExecutionComponent } from './app/durable-execution.component';
-bootstrapApplication(DurableExecutionAppComponent, appConfig).catch(console.error);
+bootstrapApplication(DurableExecutionComponent, appConfig).catch(console.error);
diff --git a/cockpit/langgraph/durable-execution/angular/tsconfig.app.json b/cockpit/langgraph/durable-execution/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/langgraph/durable-execution/angular/tsconfig.app.json
+++ b/cockpit/langgraph/durable-execution/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/langgraph/interrupts/angular/project.json b/cockpit/langgraph/interrupts/angular/project.json
index c34cc71a0..94f888503 100644
--- a/cockpit/langgraph/interrupts/angular/project.json
+++ b/cockpit/langgraph/interrupts/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-langgraph-interrupts-angular",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/langgraph/interrupts/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/langgraph/interrupts/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/langgraph/interrupts/angular",
- "main": "cockpit/langgraph/interrupts/angular/src/index.ts",
- "tsConfig": "cockpit/langgraph/interrupts/angular/tsconfig.json"
- }
+ "index": "cockpit/langgraph/interrupts/angular/src/index.html",
+ "browser": "cockpit/langgraph/interrupts/angular/src/main.ts",
+ "tsConfig": "cockpit/langgraph/interrupts/angular/tsconfig.app.json",
+ "styles": ["cockpit/langgraph/interrupts/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/langgraph/interrupts/angular/src/environments/environment.ts",
+ "with": "cockpit/langgraph/interrupts/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4302,
+ "proxyConfig": "cockpit/langgraph/interrupts/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-langgraph-interrupts-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-langgraph-interrupts-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/langgraph/interrupts/angular/src/app.component.ts b/cockpit/langgraph/interrupts/angular/src/app.component.ts
deleted file mode 100644
index 9e55364ff..000000000
--- a/cockpit/langgraph/interrupts/angular/src/app.component.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import {
- ChatComponent,
- ChatInterruptPanelComponent,
-} from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-interrupts',
- standalone: true,
- imports: [ChatComponent, ChatInterruptPanelComponent],
- template: `
-
-
-
-
-
-
- `,
-})
-export class InterruptsAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'interrupt_agent' });
- });
- }
-}
diff --git a/cockpit/langgraph/interrupts/angular/src/app.config.ts b/cockpit/langgraph/interrupts/angular/src/app.config.ts
deleted file mode 100644
index 6ac3b924c..000000000
--- a/cockpit/langgraph/interrupts/angular/src/app.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- ],
-};
diff --git a/cockpit/langgraph/interrupts/angular/src/app/app.config.ts b/cockpit/langgraph/interrupts/angular/src/app/app.config.ts
index b9b7bea96..b52a916ac 100644
--- a/cockpit/langgraph/interrupts/angular/src/app/app.config.ts
+++ b/cockpit/langgraph/interrupts/angular/src/app/app.config.ts
@@ -1,18 +1,12 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the LangGraph Interrupts demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
],
};
diff --git a/cockpit/langgraph/interrupts/angular/src/app/interrupts.component.ts b/cockpit/langgraph/interrupts/angular/src/app/interrupts.component.ts
index 96c9225ae..c7bb89986 100644
--- a/cockpit/langgraph/interrupts/angular/src/app/interrupts.component.ts
+++ b/cockpit/langgraph/interrupts/angular/src/app/interrupts.component.ts
@@ -1,83 +1,18 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { Component } from '@angular/core';
import { ChatComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * InterruptsComponent demonstrates human-in-the-loop with `streamResource()`.
- *
- * The LangGraph backend pauses execution when it needs human approval.
- * The `stream.interrupt()` signal provides the interrupt data, and
- * `stream.submit()` resumes execution with the human's decision.
- *
- * Key integration points:
- * - `stream.interrupt()` β current pause data
- * - `stream.submit({ resume: true })` β resume after approval
- * - The graph uses LangGraph's `interrupt()` function to pause
- */
@Component({
selector: 'app-interrupts',
standalone: true,
imports: [ChatComponent],
- template: `
-
-
- Approvals
- @if (stream.interrupt()) {
-
-
{{ stream.interrupt() }}
-
-
-
- } @else {
- No pending approvals
- }
-
-
- `,
+ template: ``,
})
export class InterruptsComponent {
- /**
- * The streaming resource with interrupt support.
- *
- * When the LangGraph backend calls `interrupt()`, the `stream.interrupt()`
- * signal emits the interrupt payload for display in the sidebar.
- */
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- /**
- * Submit a message to the assistant.
- */
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
-
- /**
- * Approve the pending action and resume execution.
- * Submitting null continues the graph (LangGraph convention).
- */
- approve(): void {
- this.stream.submit(null);
- }
-
- /**
- * Reject the pending action. Sends a resume value of false
- * so the graph can handle rejection logic.
- */
- reject(): void {
- this.stream.submit({ resume: false });
- }
}
diff --git a/cockpit/langgraph/interrupts/angular/src/environments/environment.development.ts b/cockpit/langgraph/interrupts/angular/src/environments/environment.development.ts
index eb08a2bc6..f897735e1 100644
--- a/cockpit/langgraph/interrupts/angular/src/environments/environment.development.ts
+++ b/cockpit/langgraph/interrupts/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4302/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'interrupts',
};
diff --git a/cockpit/langgraph/interrupts/angular/src/index.html b/cockpit/langgraph/interrupts/angular/src/index.html
index 850914943..d32fdb39e 100644
--- a/cockpit/langgraph/interrupts/angular/src/index.html
+++ b/cockpit/langgraph/interrupts/angular/src/index.html
@@ -2,11 +2,12 @@
- Interrupts - LangGraph Angular Example
+ LangGraph Interrupts β Angular
+
-
+
diff --git a/cockpit/langgraph/interrupts/angular/src/main.ts b/cockpit/langgraph/interrupts/angular/src/main.ts
index aad2c72e0..16589a6b1 100644
--- a/cockpit/langgraph/interrupts/angular/src/main.ts
+++ b/cockpit/langgraph/interrupts/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { InterruptsAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { InterruptsComponent } from './app/interrupts.component';
-bootstrapApplication(InterruptsAppComponent, appConfig).catch(console.error);
+bootstrapApplication(InterruptsComponent, appConfig).catch(console.error);
diff --git a/cockpit/langgraph/interrupts/angular/tsconfig.app.json b/cockpit/langgraph/interrupts/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/langgraph/interrupts/angular/tsconfig.app.json
+++ b/cockpit/langgraph/interrupts/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/langgraph/memory/angular/project.json b/cockpit/langgraph/memory/angular/project.json
index bf746a477..8f9ed1a7f 100644
--- a/cockpit/langgraph/memory/angular/project.json
+++ b/cockpit/langgraph/memory/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-langgraph-memory-angular",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/langgraph/memory/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/langgraph/memory/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/langgraph/memory/angular",
- "main": "cockpit/langgraph/memory/angular/src/index.ts",
- "tsConfig": "cockpit/langgraph/memory/angular/tsconfig.json"
- }
+ "index": "cockpit/langgraph/memory/angular/src/index.html",
+ "browser": "cockpit/langgraph/memory/angular/src/main.ts",
+ "tsConfig": "cockpit/langgraph/memory/angular/tsconfig.app.json",
+ "styles": ["cockpit/langgraph/memory/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/langgraph/memory/angular/src/environments/environment.ts",
+ "with": "cockpit/langgraph/memory/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4303,
+ "proxyConfig": "cockpit/langgraph/memory/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-langgraph-memory-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-langgraph-memory-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/langgraph/memory/angular/src/app.component.ts b/cockpit/langgraph/memory/angular/src/app.component.ts
deleted file mode 100644
index b61309b77..000000000
--- a/cockpit/langgraph/memory/angular/src/app.component.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { Component, inject, Injector, OnInit, signal } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ChatComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-interface Thread {
- id: string;
- label: string;
-}
-
-@Component({
- selector: 'app-memory',
- standalone: true,
- imports: [CommonModule, ChatComponent],
- template: `
-
-
-
-
-
-
-
-
-
- `,
-})
-export class MemoryAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- /** Stable user identity so the memory store scopes memories correctly. */
- private readonly userId = 'demo-user';
-
- chat!: StreamResourceRef;
- threads = signal([
- { id: 'thread-1', label: 'Session 1' },
- { id: 'thread-2', label: 'Session 2' },
- ]);
- activeThreadId = signal('thread-1');
-
- ngOnInit(): void {
- this.initChat(this.activeThreadId());
- }
-
- selectThread(threadId: string): void {
- this.activeThreadId.set(threadId);
- this.initChat(threadId);
- }
-
- newThread(): void {
- const id = `thread-${Date.now()}`;
- this.threads.update((ts) => [
- ...ts,
- { id, label: `Session ${ts.length + 1}` },
- ]);
- this.selectThread(id);
- }
-
- private initChat(threadId: string): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({
- assistantId: 'memory_agent',
- threadId,
- metadata: { userId: this.userId },
- });
- });
- }
-}
diff --git a/cockpit/langgraph/memory/angular/src/app.config.ts b/cockpit/langgraph/memory/angular/src/app.config.ts
deleted file mode 100644
index 6ac3b924c..000000000
--- a/cockpit/langgraph/memory/angular/src/app.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- ],
-};
diff --git a/cockpit/langgraph/memory/angular/src/app/app.config.ts b/cockpit/langgraph/memory/angular/src/app/app.config.ts
index 0fb41954c..b52a916ac 100644
--- a/cockpit/langgraph/memory/angular/src/app/app.config.ts
+++ b/cockpit/langgraph/memory/angular/src/app/app.config.ts
@@ -1,18 +1,12 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the LangGraph Memory demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
],
};
diff --git a/cockpit/langgraph/memory/angular/src/app/memory.component.ts b/cockpit/langgraph/memory/angular/src/app/memory.component.ts
index 8f3bb9b89..0c6c171ca 100644
--- a/cockpit/langgraph/memory/angular/src/app/memory.component.ts
+++ b/cockpit/langgraph/memory/angular/src/app/memory.component.ts
@@ -1,82 +1,18 @@
-import { Component, computed } from '@angular/core';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
import { ChatComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * MemoryComponent demonstrates cross-thread persistent context with `streamResource()`.
- *
- * This example shows how an agent can learn and remember facts about the user
- * across separate conversations. The graph maintains a `memory` dict in its
- * state that is updated as new facts are extracted from the conversation.
- *
- * Key integration points:
- * - `stream.value()` exposes the full graph state, including the `memory` field
- * - `memory()` signal is derived from `stream.value()` for reactive sidebar rendering
- * - Facts appear in the sidebar as the agent learns them during conversation
- */
@Component({
selector: 'app-memory',
standalone: true,
imports: [ChatComponent],
- template: `
-
-
- Agent Memory
- @if (memoryEntries().length === 0) {
-
- No facts learned yet. Start chatting!
-
- }
- @for (entry of memoryEntries(); track entry.key) {
-
-
- {{ entry.key }}
-
-
- {{ entry.value }}
-
-
- }
-
-
- `,
+ template: ``,
})
export class MemoryComponent {
- /**
- * The streaming resource connected to the memory graph.
- *
- * The graph returns a `memory` dict alongside messages in its state.
- * We expose it via `stream.value()` and derive a reactive signal for display.
- */
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
});
-
- /**
- * Reactive list of key-value memory entries derived from the graph state.
- *
- * The graph updates `memory` as it learns facts from the conversation.
- * This signal re-computes whenever the stream state changes.
- */
- protected readonly memoryEntries = computed(() => {
- const state = this.stream.value() as { memory?: Record } | null;
- const memory = state?.memory ?? {};
- return Object.entries(memory).map(([key, value]) => ({
- key,
- value: typeof value === 'string' ? value : JSON.stringify(value),
- }));
- });
-
- /**
- * Submit a message to the agent.
- */
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
}
diff --git a/cockpit/langgraph/memory/angular/src/environments/environment.development.ts b/cockpit/langgraph/memory/angular/src/environments/environment.development.ts
index 4524766dd..42fd0147d 100644
--- a/cockpit/langgraph/memory/angular/src/environments/environment.development.ts
+++ b/cockpit/langgraph/memory/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4303/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'memory',
};
diff --git a/cockpit/langgraph/memory/angular/src/index.html b/cockpit/langgraph/memory/angular/src/index.html
index f78ad2ca0..ffaedb18d 100644
--- a/cockpit/langgraph/memory/angular/src/index.html
+++ b/cockpit/langgraph/memory/angular/src/index.html
@@ -2,11 +2,12 @@
- Memory - LangGraph Angular Example
+ LangGraph Memory β Angular
+
-
+
diff --git a/cockpit/langgraph/memory/angular/src/main.ts b/cockpit/langgraph/memory/angular/src/main.ts
index 180df289a..e53854a71 100644
--- a/cockpit/langgraph/memory/angular/src/main.ts
+++ b/cockpit/langgraph/memory/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { MemoryAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { MemoryComponent } from './app/memory.component';
-bootstrapApplication(MemoryAppComponent, appConfig).catch(console.error);
+bootstrapApplication(MemoryComponent, appConfig).catch(console.error);
diff --git a/cockpit/langgraph/memory/angular/tsconfig.app.json b/cockpit/langgraph/memory/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/langgraph/memory/angular/tsconfig.app.json
+++ b/cockpit/langgraph/memory/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/langgraph/persistence/angular/project.json b/cockpit/langgraph/persistence/angular/project.json
index 0c363e462..44aa263c8 100644
--- a/cockpit/langgraph/persistence/angular/project.json
+++ b/cockpit/langgraph/persistence/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-langgraph-persistence-angular",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/langgraph/persistence/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/langgraph/persistence/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/langgraph/persistence/angular",
- "main": "cockpit/langgraph/persistence/angular/src/index.ts",
- "tsConfig": "cockpit/langgraph/persistence/angular/tsconfig.json"
- }
+ "index": "cockpit/langgraph/persistence/angular/src/index.html",
+ "browser": "cockpit/langgraph/persistence/angular/src/main.ts",
+ "tsConfig": "cockpit/langgraph/persistence/angular/tsconfig.app.json",
+ "styles": ["cockpit/langgraph/persistence/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/langgraph/persistence/angular/src/environments/environment.ts",
+ "with": "cockpit/langgraph/persistence/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4301,
+ "proxyConfig": "cockpit/langgraph/persistence/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-langgraph-persistence-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-langgraph-persistence-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/langgraph/persistence/angular/src/app.component.ts b/cockpit/langgraph/persistence/angular/src/app.component.ts
deleted file mode 100644
index 7d22076cb..000000000
--- a/cockpit/langgraph/persistence/angular/src/app.component.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-import { Component, inject, Injector, OnInit, signal } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ChatComponent } from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-interface Thread {
- id: string;
- label: string;
-}
-
-@Component({
- selector: 'app-persistence',
- standalone: true,
- imports: [CommonModule, ChatComponent],
- template: `
-
-
-
-
-
-
-
-
-
- `,
-})
-export class PersistenceAppComponent implements OnInit {
- private readonly injector = inject(Injector);
-
- chat!: StreamResourceRef;
- threads = signal([
- { id: 'thread-1', label: 'Conversation 1' },
- { id: 'thread-2', label: 'Conversation 2' },
- ]);
- activeThreadId = signal('thread-1');
-
- ngOnInit(): void {
- this.initChat(this.activeThreadId());
- }
-
- selectThread(threadId: string): void {
- this.activeThreadId.set(threadId);
- this.initChat(threadId);
- }
-
- newThread(): void {
- const id = `thread-${Date.now()}`;
- this.threads.update((ts) => [
- ...ts,
- { id, label: `Conversation ${ts.length + 1}` },
- ]);
- this.selectThread(id);
- }
-
- private initChat(threadId: string): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'chat_agent', threadId });
- });
- }
-}
diff --git a/cockpit/langgraph/persistence/angular/src/app.config.ts b/cockpit/langgraph/persistence/angular/src/app.config.ts
deleted file mode 100644
index 6ac3b924c..000000000
--- a/cockpit/langgraph/persistence/angular/src/app.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- ],
-};
diff --git a/cockpit/langgraph/persistence/angular/src/app/app.config.ts b/cockpit/langgraph/persistence/angular/src/app/app.config.ts
index cb72fb5ee..b52a916ac 100644
--- a/cockpit/langgraph/persistence/angular/src/app/app.config.ts
+++ b/cockpit/langgraph/persistence/angular/src/app/app.config.ts
@@ -1,18 +1,12 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the LangGraph Persistence demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
],
};
diff --git a/cockpit/langgraph/persistence/angular/src/app/persistence.component.ts b/cockpit/langgraph/persistence/angular/src/app/persistence.component.ts
index ad9e87d79..2318a4363 100644
--- a/cockpit/langgraph/persistence/angular/src/app/persistence.component.ts
+++ b/cockpit/langgraph/persistence/angular/src/app/persistence.component.ts
@@ -1,88 +1,18 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { Component } from '@angular/core';
import { ChatComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * PersistenceComponent demonstrates thread persistence with `streamResource()`.
- *
- * This example shows how conversations persist across browser refreshes.
- * Each thread has a unique ID that can be stored and resumed later.
- * Use `stream.switchThread(id)` to load a previous conversation,
- * or `stream.switchThread(null)` to start fresh.
- *
- * Key integration points:
- * - `onThreadId` callback captures new thread IDs for storage
- * - `stream.switchThread(id)` resumes a previous conversation
- * - `stream.messages()` loads the full history when switching threads
- */
@Component({
selector: 'app-persistence',
standalone: true,
imports: [ChatComponent],
- template: `
-
-
- Threads
- @for (id of threadIds; track id) {
-
- }
-
-
-
- `,
+ template: ``,
})
export class PersistenceComponent {
- /**
- * The streaming resource with thread persistence.
- *
- * The `onThreadId` callback fires when a new thread is created,
- * allowing us to track thread IDs for the sidebar picker.
- */
protected readonly stream = streamResource({
apiUrl: environment.langGraphApiUrl,
assistantId: environment.streamingAssistantId,
- onThreadId: (id: string) => {
- this.currentThreadId = id;
- if (!this.threadIds.includes(id)) this.threadIds.push(id);
- },
});
-
- threadIds: string[] = [];
- currentThreadId = '';
-
- /**
- * Submit a message to the current thread.
- */
- send(text: string): void {
- this.stream.submit({ messages: [{ role: 'human', content: text }] });
- }
-
- /**
- * Switch to an existing thread, loading its full message history.
- */
- selectThread(id: string): void {
- this.currentThreadId = id;
- this.stream.switchThread(id);
- }
-
- /**
- * Start a new conversation thread.
- */
- newThread(): void {
- this.currentThreadId = '';
- this.stream.switchThread(null);
- }
}
diff --git a/cockpit/langgraph/persistence/angular/src/environments/environment.development.ts b/cockpit/langgraph/persistence/angular/src/environments/environment.development.ts
index 5eb9e480c..f7f36ff36 100644
--- a/cockpit/langgraph/persistence/angular/src/environments/environment.development.ts
+++ b/cockpit/langgraph/persistence/angular/src/environments/environment.development.ts
@@ -6,6 +6,6 @@
*/
export const environment = {
production: false,
- langGraphApiUrl: 'http://localhost:4301/api',
+ langGraphApiUrl: '/api',
streamingAssistantId: 'persistence',
};
diff --git a/cockpit/langgraph/persistence/angular/src/index.html b/cockpit/langgraph/persistence/angular/src/index.html
index fe09aaa9e..60367d98e 100644
--- a/cockpit/langgraph/persistence/angular/src/index.html
+++ b/cockpit/langgraph/persistence/angular/src/index.html
@@ -2,11 +2,12 @@
- Persistence - LangGraph Angular Example
+ LangGraph Persistence β Angular
+
-
+
diff --git a/cockpit/langgraph/persistence/angular/src/main.ts b/cockpit/langgraph/persistence/angular/src/main.ts
index 8ac088e84..0e464b52c 100644
--- a/cockpit/langgraph/persistence/angular/src/main.ts
+++ b/cockpit/langgraph/persistence/angular/src/main.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { bootstrapApplication } from '@angular/platform-browser';
-import { appConfig } from './app.config';
-import { PersistenceAppComponent } from './app.component';
+import { appConfig } from './app/app.config';
+import { PersistenceComponent } from './app/persistence.component';
-bootstrapApplication(PersistenceAppComponent, appConfig).catch(console.error);
+bootstrapApplication(PersistenceComponent, appConfig).catch(console.error);
diff --git a/cockpit/langgraph/persistence/angular/tsconfig.app.json b/cockpit/langgraph/persistence/angular/tsconfig.app.json
index 5d05a9e61..64731b107 100644
--- a/cockpit/langgraph/persistence/angular/tsconfig.app.json
+++ b/cockpit/langgraph/persistence/angular/tsconfig.app.json
@@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
- "types": []
+ "lib": ["es2022", "dom"],
+ "types": [],
+ "emitDeclarationOnly": false
},
"files": ["src/main.ts"],
"include": ["src/**/*.ts"]
diff --git a/cockpit/langgraph/subgraphs/angular/project.json b/cockpit/langgraph/subgraphs/angular/project.json
index dec341cfa..27870cd91 100644
--- a/cockpit/langgraph/subgraphs/angular/project.json
+++ b/cockpit/langgraph/subgraphs/angular/project.json
@@ -2,16 +2,51 @@
"name": "cockpit-langgraph-subgraphs-angular",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "cockpit/langgraph/subgraphs/angular/src",
- "projectType": "library",
+ "projectType": "application",
"targets": {
"build": {
- "executor": "@nx/js:tsc",
- "outputs": ["{workspaceRoot}/dist/cockpit/langgraph/subgraphs/angular"],
+ "executor": "@angular-devkit/build-angular:application",
+ "outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/cockpit/langgraph/subgraphs/angular",
- "main": "cockpit/langgraph/subgraphs/angular/src/index.ts",
- "tsConfig": "cockpit/langgraph/subgraphs/angular/tsconfig.json"
- }
+ "index": "cockpit/langgraph/subgraphs/angular/src/index.html",
+ "browser": "cockpit/langgraph/subgraphs/angular/src/main.ts",
+ "tsConfig": "cockpit/langgraph/subgraphs/angular/tsconfig.app.json",
+ "styles": ["cockpit/langgraph/subgraphs/angular/src/styles.css"]
+ },
+ "configurations": {
+ "production": {
+ "outputHashing": "all"
+ },
+ "development": {
+ "optimization": false,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "fileReplacements": [
+ {
+ "replace": "cockpit/langgraph/subgraphs/angular/src/environments/environment.ts",
+ "with": "cockpit/langgraph/subgraphs/angular/src/environments/environment.development.ts"
+ }
+ ]
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "executor": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "port": 4305,
+ "proxyConfig": "cockpit/langgraph/subgraphs/angular/proxy.conf.json"
+ },
+ "configurations": {
+ "production": {
+ "buildTarget": "cockpit-langgraph-subgraphs-angular:build:production"
+ },
+ "development": {
+ "buildTarget": "cockpit-langgraph-subgraphs-angular:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
},
"smoke": {
"executor": "nx:run-commands",
diff --git a/cockpit/langgraph/subgraphs/angular/src/app.component.ts b/cockpit/langgraph/subgraphs/angular/src/app.component.ts
deleted file mode 100644
index 9582d1972..000000000
--- a/cockpit/langgraph/subgraphs/angular/src/app.component.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Component, inject, Injector, OnInit } from '@angular/core';
-import { runInInjectionContext } from '@angular/core';
-import {
- ChatComponent,
- ChatSubagentCardComponent,
-} from '@cacheplane/chat';
-import { streamResource, StreamResourceRef } from '@cacheplane/stream-resource';
-
-@Component({
- selector: 'app-subgraphs',
- standalone: true,
- imports: [ChatComponent, ChatSubagentCardComponent],
- template: `
-
-
-
-
-
-
- `,
-})
-export class SubgraphsAppComponent implements OnInit {
- private readonly injector = inject(Injector);
- chat!: StreamResourceRef;
-
- ngOnInit(): void {
- runInInjectionContext(this.injector, () => {
- this.chat = streamResource({ assistantId: 'orchestrator_agent' });
- });
- }
-}
diff --git a/cockpit/langgraph/subgraphs/angular/src/app.config.ts b/cockpit/langgraph/subgraphs/angular/src/app.config.ts
deleted file mode 100644
index 6ac3b924c..000000000
--- a/cockpit/langgraph/subgraphs/angular/src/app.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
-import { ApplicationConfig } from '@angular/core';
-import { provideStreamResource } from '@cacheplane/stream-resource';
-import { provideChat } from '@cacheplane/chat';
-
-export const appConfig: ApplicationConfig = {
- providers: [
- provideStreamResource({
- apiUrl: 'http://localhost:2024',
- }),
- provideChat({}),
- ],
-};
diff --git a/cockpit/langgraph/subgraphs/angular/src/app/app.config.ts b/cockpit/langgraph/subgraphs/angular/src/app/app.config.ts
index 7ab539a84..b52a916ac 100644
--- a/cockpit/langgraph/subgraphs/angular/src/app/app.config.ts
+++ b/cockpit/langgraph/subgraphs/angular/src/app/app.config.ts
@@ -1,18 +1,12 @@
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
import { ApplicationConfig } from '@angular/core';
import { provideStreamResource } from '@cacheplane/stream-resource';
+import { provideChat } from '@cacheplane/chat';
import { environment } from '../environments/environment';
-/**
- * Application configuration for the LangGraph Subgraphs demo.
- *
- * Uses `provideStreamResource()` to set the global LangGraph API URL.
- * All `streamResource()` calls in this app inherit this URL unless
- * overridden at the call site.
- */
export const appConfig: ApplicationConfig = {
providers: [
- provideStreamResource({
- apiUrl: environment.langGraphApiUrl,
- }),
+ provideStreamResource({ apiUrl: environment.langGraphApiUrl }),
+ provideChat({}),
],
};
diff --git a/cockpit/langgraph/subgraphs/angular/src/app/subgraphs.component.ts b/cockpit/langgraph/subgraphs/angular/src/app/subgraphs.component.ts
index 647acf0a9..42be99684 100644
--- a/cockpit/langgraph/subgraphs/angular/src/app/subgraphs.component.ts
+++ b/cockpit/langgraph/subgraphs/angular/src/app/subgraphs.component.ts
@@ -1,66 +1,18 @@
-import { Component, computed } from '@angular/core';
+// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
+import { Component } from '@angular/core';
import { ChatComponent } from '@cacheplane/chat';
import { streamResource } from '@cacheplane/stream-resource';
import { environment } from '../environments/environment';
-/**
- * SubgraphsComponent demonstrates nested agent delegation with `streamResource()`.
- *
- * This example shows how a parent orchestrator delegates tasks to child subgraphs.
- * The sidebar tracks active subagents in real time using `stream.subagents()`,
- * a Map of running child graph executions and their current status.
- *
- * Key integration points:
- * - `stream.subagents()` returns a Map of active subagents
- * - Each entry has a unique run ID (key) and a `status()` signal ('running' | 'done' | 'error')
- * - `subagentEntries` is a `computed()` signal derived from the map for iteration in the template
- */
@Component({
selector: 'app-subgraphs',
standalone: true,
imports: [ChatComponent],
- template: `
-
-
- Subagents
- @for (entry of subagentEntries(); track entry[0]) {
-
- {{ entry[0].substring(0, 8) }}: {{ entry[1].status() }}
-
- }
- @empty {
- No active subagents
- }
-
-
- `,
+ template: ``,
})
export class SubgraphsComponent {
- /**
- * The streaming resource that tracks subgraph (child agent) activity.
- *
- * `stream.subagents()` is a Signal