Skip to content

Commit 32ef627

Browse files
committed
chore: ecosystem-wide sync of uncommitted changes
1 parent f458b9b commit 32ef627

48 files changed

Lines changed: 12645 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@
66
*.whatif.txt
77
infra/main.json
88

9+
10+
.tmp-gh-*.ps1
11+
12+
.tmp-venv*/
13+
14+
TestResults/

.planning/phases/06-PLAN.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Implementation Plan: Phase 06 - Elite Graphical Console
2+
3+
## Objective
4+
Implement an Enterprise-Grade Next.js Visual Orchestrator for the CAS Swarm in strict adherence to the `06-UI-SPEC.md` design contract and the GSD Verifier-Led SDLC.
5+
6+
## Breakdown
7+
8+
### Step 1: Initialize Verified React Environment
9+
- Purge any existing unverified UI code in `cas-platform/src/graphical-console` to prevent context contamination.
10+
- Re-initialize a Next.js 16 app with TypeScript, Tailwind, and strict ESLint routing.
11+
- Install dependencies: `@xyflow/react`, `dagre`, `framer-motion`, `lucide-react`, `react-syntax-highlighter`.
12+
- **Verifier Gate**: `npm run build` must pass. `npm run lint` must return 0 errors.
13+
14+
### Step 2: Implement Core Components
15+
- `AgentNode.tsx`: A custom React Flow node component implementing glassmorphism, pulsing indicators, and the typography defined in the UI-SPEC.
16+
- `TelemetryDrawer.tsx`: A Framer Motion side panel to display the selected edge's raw JSON payload.
17+
- `SwarmGraph.tsx`: The main React Flow orchestration component. It must use the `dagre` auto-layout engine to route nodes top-to-bottom.
18+
- **Verifier Gate**: Jest unit tests must cover component rendering.
19+
20+
### Step 3: Implement Telemetry Pipeline
21+
- Implement a robust `EventSource` hook to consume the `/api/swarm/events` SSE stream from the Autogen backend.
22+
- Parse incoming `snapshot`, `node_created`, and `edge_created` frames to dynamically update the React Flow state.
23+
- **Verifier Gate**: A dedicated integration test (or mock API harness) to verify the SSE parser correctly maps frames to DAG states.
24+
25+
### Step 4: Red Team Audit (Verification)
26+
- Spawn a `qa-automation-engineer` subagent to perform an adversarial review of the codebase.
27+
- Verify adherence to `06-UI-SPEC.md`.
28+
- Ensure no hardcoded dummy data remains.
29+
30+
## Acceptance Criteria
31+
- [ ] Dagre layout properly aligns dynamically generated nodes.
32+
- [ ] Framer motion drawer smoothly triggers on Edge click.
33+
- [ ] Next.js app builds flawlessly.
34+
- [ ] 100% of Verifier Gates passed.

.planning/phases/06-UI-SPEC.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# UI Design Contract: Phase 06 - Elite Graphical Console
2+
3+
## 1. Visual Identity
4+
- **Theme**: Ultra-dark modern interface (`bg-[#0f0f13]`).
5+
- **Typography**:
6+
- Primary UI text: `Inter`
7+
- Telemetry / Code / Payloads: `JetBrains Mono`
8+
- **Component Style**: Glassmorphism with deep backdrop blurs (`backdrop-blur-xl`) and hyper-thin colored borders (`border-purple-500/50`).
9+
10+
## 2. Layout & Interactions
11+
- **DAG Engine**: Dagre Auto-Layout must be used for deterministic node routing (Top-to-Bottom).
12+
- **Node Anatomy**: Custom React Flow nodes. Must include a status indicator, icon, and dynamic pulsing shadows based on active state.
13+
- **Edge Anatomy**: Animated SVG paths. Must be clickable.
14+
- **Side Panel Drawer**: Triggered by clicking an edge. Slides from the right using `framer-motion`. Displays raw A2A JSON payload with syntax highlighting.
15+
16+
## 3. Required Verification Gates
17+
- 100% test coverage requirement.
18+
- Must include a `SmokeTest` to verify the Next.js app mounts without hydration errors.
19+
- Must include a `ContractTest` to verify the `EventSource` parser correctly interprets the Autogen SSE schema.
20+
21+
## 4. Subagent Routing
22+
- **Implementer**: `personas/frontend-engineer.md`
23+
- **Verifier**: `personas/qa-automation-engineer.md`

infra/modules/functions.bicep

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
targetScope = 'resourceGroup'
2+
3+
@description('Short workload name.')
4+
param workloadName string
5+
6+
@description('Deployment environment.')
7+
param environment string
8+
9+
@description('Azure region.')
10+
param location string
11+
12+
@description('Deterministic uniqueness suffix.')
13+
param suffix string
14+
15+
@description('Non-secret Application Insights connection string injected by the platform.')
16+
param applicationInsightsConnectionString string
17+
18+
@description('Log Analytics workspace identifier for diagnostic settings.')
19+
param logAnalyticsWorkspaceId string
20+
21+
@description('Common Azure resource tags.')
22+
param tags object
23+
24+
resource storageAccount 'Microsoft.Storage/storageAccounts@2025-01-01' = {
25+
name: 'st${workloadName}${environment}${suffix}'
26+
location: location
27+
tags: tags
28+
sku: {
29+
name: 'Standard_LRS'
30+
}
31+
kind: 'StorageV2'
32+
properties: {
33+
minimumTlsVersion: 'TLS1_2'
34+
allowBlobPublicAccess: false
35+
supportsHttpsTrafficOnly: true
36+
}
37+
}
38+
39+
resource hostingPlan 'Microsoft.Web/serverfarms@2025-03-01' = {
40+
name: 'plan-${workloadName}-${environment}-${suffix}'
41+
location: location
42+
tags: tags
43+
sku: {
44+
name: 'FC1'
45+
tier: 'FlexConsumption'
46+
}
47+
properties: {
48+
reserved: true
49+
}
50+
}
51+
52+
resource functionApp 'Microsoft.Web/sites@2025-03-01' = {
53+
name: 'func-${workloadName}-${environment}-${suffix}'
54+
location: location
55+
tags: tags
56+
kind: 'functionapp,linux'
57+
identity: {
58+
type: 'SystemAssigned'
59+
}
60+
properties: {
61+
serverFarmId: hostingPlan.id
62+
siteConfig: {
63+
linuxFxVersion: 'PYTHON|3.12'
64+
appSettings: [
65+
{
66+
name: 'AzureWebJobsStorage'
67+
value: 'DefaultEndpointsProtocol=https;AccountName=${storageAccount.name};AccountKey=${storageAccount.listKeys().keys[0].value};EndpointSuffix=core.windows.net'
68+
}
69+
{
70+
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
71+
value: applicationInsightsConnectionString
72+
}
73+
{
74+
name: 'FUNCTIONS_EXTENSION_VERSION'
75+
value: '~4'
76+
}
77+
{
78+
name: 'FUNCTIONS_WORKER_RUNTIME'
79+
value: 'python'
80+
}
81+
]
82+
}
83+
httpsOnly: true
84+
}
85+
}
86+
87+
#disable-next-line use-recent-api-versions
88+
resource appDiagnostics 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
89+
name: 'send-to-log-analytics'
90+
scope: functionApp
91+
properties: {
92+
workspaceId: logAnalyticsWorkspaceId
93+
logs: [
94+
{
95+
categoryGroup: 'allLogs'
96+
enabled: true
97+
}
98+
]
99+
metrics: [
100+
{
101+
category: 'AllMetrics'
102+
enabled: true
103+
}
104+
]
105+
}
106+
}
107+
108+
@description('Function App identifier.')
109+
output functionAppId string = functionApp.id
110+
111+
@description('System-assigned managed identity principal identifier.')
112+
output workloadPrincipalId string = functionApp.identity.principalId

src/graphical-console/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

src/graphical-console/AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- BEGIN:nextjs-agent-rules -->
2+
# This is NOT the Next.js you know
3+
4+
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
5+
<!-- END:nextjs-agent-rules -->

src/graphical-console/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

src/graphical-console/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import nextVitals from "eslint-config-next/core-web-vitals";
3+
import nextTs from "eslint-config-next/typescript";
4+
5+
const eslintConfig = defineConfig([
6+
...nextVitals,
7+
...nextTs,
8+
// Override default ignores of eslint-config-next.
9+
globalIgnores([
10+
// Default ignores of eslint-config-next:
11+
".next/**",
12+
"out/**",
13+
"build/**",
14+
"next-env.d.ts",
15+
]),
16+
]);
17+
18+
export default eslintConfig;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;

0 commit comments

Comments
 (0)