Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cockpit/cockpit-e2e-wiring.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('cockpit e2e wiring', () => {
if (capability.pythonPort !== undefined && capability.pythonPort !== wiring.langgraphPort) {
errors.push(`${wiring.project}: registry pythonPort ${capability.pythonPort} != global setup langgraphPort ${wiring.langgraphPort}`);
}
if (capability.pythonDir !== wiring.langgraphCwd) {
if (capability.pythonDir !== undefined && capability.pythonDir !== wiring.langgraphCwd) {
errors.push(`${wiring.project}: registry pythonDir ${capability.pythonDir} != global setup langgraphCwd ${wiring.langgraphCwd}`);
}

Expand Down
10 changes: 7 additions & 3 deletions apps/cockpit/scripts/capability-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
*/
export interface Capability {
id: string;
product: 'langgraph' | 'deep-agents' | 'render' | 'chat';
product: 'langgraph' | 'deep-agents' | 'render' | 'chat' | 'ag-ui';
topic: string;
angularProject: string;
port: number;
pythonPort?: number;
pythonDir: string;
graphName: string;
/** Optional — ag-ui caps run in-process via FakeAgent and have no Python backend. */
pythonDir?: string;
/** Optional — see pythonDir. */
graphName?: string;
}

export const capabilities: readonly Capability[] = [
Expand Down Expand Up @@ -47,6 +49,8 @@ export const capabilities: readonly Capability[] = [
{ id: 'c-debug', product: 'chat', topic: 'debug', angularProject: 'cockpit-chat-debug-angular', port: 4509, pythonPort: 5509, pythonDir: 'cockpit/chat/debug/python', graphName: 'c-debug' },
{ id: 'c-theming', product: 'chat', topic: 'theming', angularProject: 'cockpit-chat-theming-angular', port: 4510, pythonPort: 5510, pythonDir: 'cockpit/chat/theming/python', graphName: 'c-theming' },
{ id: 'c-a2ui', product: 'chat', topic: 'a2ui', angularProject: 'cockpit-chat-a2ui-angular', port: 4511, pythonPort: 5511, pythonDir: 'cockpit/chat/a2ui/python', graphName: 'c-a2ui' },
// AG-UI capabilities (in-process FakeAgent; no Python backend, not deployed to LangSmith)
{ id: 'ag-ui-streaming', product: 'ag-ui', topic: 'streaming', angularProject: 'cockpit-ag-ui-streaming-angular', port: 4600 },
] as const;

export function findCapability(id: string): Capability | undefined {
Expand Down
3 changes: 3 additions & 0 deletions apps/cockpit/scripts/generate-combined-langgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function normalizeEntrypoint(pythonDir: string, graphName: string): string {
const graphs: Record<string, string> = {};
const dependencies = new Set<string>();
for (const c of capabilities) {
if (!c.pythonDir || !c.graphName) {
continue; // ag-ui (in-process) and other no-Python caps
}
graphs[c.graphName] = `./${c.pythonDir}/${normalizeEntrypoint(c.pythonDir, c.graphName)}`;
dependencies.add(`./${c.pythonDir}`);
}
Expand Down
9 changes: 7 additions & 2 deletions apps/cockpit/scripts/serve-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ if (allMode) {
const cap = findCapability(capabilityArg!);
if (!cap) { console.error(`Unknown: ${capabilityArg}`); process.exit(1); }
run(cap.id, `npx nx run ${cap.angularProject}:serve:cockpit --port ${cap.port}`, '33');
run(`${cap.id}-py`, `cd ${cap.pythonDir} && source $HOME/.local/bin/env 2>/dev/null; uv sync && uv run langgraph dev --port 8123`, '35');
console.log(`\n🚀 ${cap.id}: cockpit=4201 angular=${cap.port} langgraph=8123\n`);
if (cap.pythonDir) {
run(`${cap.id}-py`, `cd ${cap.pythonDir} && source $HOME/.local/bin/env 2>/dev/null; uv sync && uv run langgraph dev --port 8123`, '35');
console.log(`\n🚀 ${cap.id}: cockpit=4201 angular=${cap.port} langgraph=8123\n`);
} else {
// ag-ui (in-process) and other no-Python caps have no langgraph backend.
console.log(`\n🚀 ${cap.id}: cockpit=4201 angular=${cap.port} (no langgraph backend)\n`);
}
}
Loading
Loading