Commit Graph
19 Commits
Author SHA1 Message Date
gongzhiyongandClaude Opus 4.6 251c6586f4 feat: Phase 1 — ReAct loop + Markdown rendering + Docker deployment
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 1m52s
Deploy LangGraph Server to Azure Web App / build-and-deploy (push) Failing after 26s
Backend:
- Enterprise Agent refactored from single-round to ReAct multi-turn loop
- New agent.ts (LLM decision node) + tool-executor.ts (tool execution + Gen-UI)
- tool-defs.ts extracted for shared tool schemas
- MAX_ITERATIONS=6 safeguard against infinite loops

Frontend:
- MessageBubble: Markdown + code highlighting + LaTeX + tables
- ThemeToggle: light/dark/system theme cycling
- chart-result Gen-UI card: recharts bar/line/pie/area charts

Infrastructure:
- Docker Compose (lightweight): only LangGraph + Frontend, Azure cloud for PG/Redis/Blob
- Dockerfiles for dev (hot reload) and prod
- Makefile with dev/prod/down/logs commands
- Updated CLAUDE.md and agent definitions for LangGraph.js architecture

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 01:29:56 +08:00
gongzhiyongandClaude Sonnet 4.6 3263b15554 perf(deploy): pre-install node_modules in CI and enable always-on to fix slow cold start
- CI now runs pnpm install and includes node_modules in the zip artifact
- startup.sh simplified: removed pnpm install fallback, uses direct bin path instead of npx
- Azure Web App always-on enabled to prevent cold starts

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:55:38 +08:00
gongzhiyongandClaude Sonnet 4.6 370726c811 fix(deploy): use Azure-injected PORT instead of hardcoded 2024
- startup.sh now reads ${PORT:-8080} so Azure App Service can inject
  the correct port via its PORT environment variable
- Removed obsolete deploy-backend.yml and deploy-frontend.yml workflows
  (old Python backend and Next.js frontend pipelines)
- Removed WEBSITES_PORT=2024 from soc-langgraph Azure config

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:49:56 +08:00
gongzhiyongandClaude Opus 4.6 45685e8b4a fix: resolve Web App startup timeout — exclude node_modules from zip, add startup.sh, increase timeout to 600s
- Remove node_modules from deploy zip (302MB -> ~1MB), let Oryx build on Azure
- Add startup.sh: creates .env/.langgraph_api prereqs, installs pnpm, runs langgraphjs dev
- Azure config: WEBSITES_CONTAINER_START_TIME_LIMIT=600, SCM_DO_BUILD_DURING_DEPLOYMENT=true, ENABLE_ORYX_BUILD=true, PRE_BUILD_COMMAND="npm install -g pnpm@10"
- Delete auto-generated main_soc-langgraph.yml (conflicts with deploy-langgraph.yml)
- Enable Always On to avoid cold starts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:17:47 +08:00
Fasthei 092c6fe600 Add or update the Azure App Service build and deployment workflow config 2026-04-10 06:12:14 +08:00
gongzhiyongandClaude Opus 4.6 32f83d714e refactor: migrate LangGraph server from Container App to Azure Web App
## Changes
- Delete Dockerfile and .dockerignore (no longer needed)
- Rewrite deploy-langgraph.yml: zip deploy to Web App (not ACR build)
- Update deploy-langgraph-ui.yml: VITE_LANGGRAPH_URL → soc-langgraph.azurewebsites.net

## Azure Resources
- CREATED: soc-langgraph Web App (Node.js 20, B1 Linux, southeastasia)
- CREATED: soc-langgraph-plan (App Service Plan, B1, southeastasia)
- DELETED: soc-langgraph Container App
- DELETED: soc-cae Container App Environment
- DELETED: socsocacr ACR
- All env vars migrated to Web App
- Startup: npx langgraphjs dev --host 0.0.0.0 --port 2024 --no-browser
- WEBSITES_PORT=2024

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 05:47:32 +08:00
gongzhiyong f8a73e461c fix(ci): point app_location directly to langgraph/dist for SWA upload 2026-04-10 04:44:57 +08:00
gongzhiyong 14a7e79792 fix(ci): use pnpm vite build then SWA upload from repo root with langgraph/dist 2026-04-10 04:43:02 +08:00
gongzhiyong 3edeafa062 fix(ci): let SWA action handle Vite build instead of manual pnpm build 2026-04-10 04:40:14 +08:00
gongzhiyongandClaude Sonnet 4.6 7a3cc140b0 refactor: replace SOC system with LangGraph.js gen-ui — full cleanup
## Removed (old SOC system)
- backend/ — Python FastAPI + LangGraph Python ReAct agent
- frontend/ — Next.js Gemini-style UI
- config/, doc/ — old documentation
- .github/workflows/deploy-backend.yml
- .github/workflows/deploy-frontend.yml

## Added (new LangGraph.js system)
- langgraph/src/agent/enterprise/ — enterprise agent with 6 tools
  - kb_search → KnowledgeResultCard
  - ticket_list/detail → TicketSummaryCard / TicketDetailCard
  - web_search (Jina Search+Reader) → SearchResultCard
  - sandbox_run (Daytona REST) → SandboxResultCard
- langgraph/src/agent-uis/enterprise/ — UI card components
- .github/workflows/deploy-langgraph-ui.yml — Vite SPA → Azure Static Web App

## Azure Resources
- soc-backend webapp: DELETED
- soc-frontend Static Web App (eastasia): DELETED
- soc-langgraph-ui Static Web App (eastasia): CREATED
  URL: salmon-mushroom-0d8872e00.7.azurestaticapps.net

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 04:23:51 +08:00
gongzhiyongandClaude Sonnet 4.6 ac388b3c07 feat: add langgraph/ — LangGraph.js gen-ui server with CI/CD to Azure Container App
## Azure Resources Created
- ACR: socsocacr.azurecr.io (Operation, southeastasia)
- Container App Environment: soc-cae (Operation, southeastasia)
- Container App: soc-langgraph (Operation, southeastasia, port 2024)
  - Scale: 0-2 replicas, 0.5 vCPU / 1GB
  - Registry: socsocacr.azurecr.io (system-assigned managed identity)
- OIDC: oidc-msi-8ac6 granted Contributor on Operation resource group

## What's included
- Full langgraphjs-gen-ui-examples codebase under langgraph/
- Dockerfile: node:20-slim + pnpm, exposes port 2024
- .dockerignore, .gitignore
- GitHub Actions: .github/workflows/deploy-langgraph.yml
  - Trigger: push to main, paths langgraph/**
  - Uses az acr build (cloud build, no local Docker needed)
  - Deploys to soc-langgraph Container App

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 04:01:06 +08:00
gongzhiyongandClaude Opus 4.6 3869be3ccc feat: add Azure Static Web App deployment for frontend
Create deploy-frontend.yml workflow using Azure/static-web-apps-deploy@v1.
Add output: 'export' to next.config.mjs for static site generation.
Static Web App created in Operation resource group (soc-frontend, Free tier).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:53:54 +08:00
gongzhiyongandClaude Opus 4.6 6423750f08 fix: add startup.sh with explicit PYTHONPATH for bundled packages
Azure Oryx could not find packages installed to .python_packages/.
Add a startup.sh script that sets PYTHONPATH to include the bundled
package directory before launching gunicorn. Update workflow to set
the Web App startup command to use startup.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:58:07 +08:00
gongzhiyongandClaude Opus 4.6 f2f6efd0ff fix: use Oryx server-side build instead of pre-bundled packages
The previous workflow installed dependencies with pip --target and zipped
them into the deployment package. Azure Oryx runtime could not find
the packages because it looks for antenv/ or __oryx_packages__/, not
.python_packages/. Switch to deploying source-only zip with az webapp
deploy, letting SCM_DO_BUILD_DURING_DEPLOYMENT=true trigger Oryx to
run pip install on the server and create the antenv virtualenv.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:51:25 +08:00
gongzhiyongandClaude Opus 4.6 f4d3e1655a fix: add id-token permission and fix zip package root path
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:42:50 +08:00
gongzhiyongandClaude Opus 4.6 41727c52f4 fix: switch to OIDC auth for Azure deploy, remove duplicate workflow
- Use azure/login@v2 with OIDC (Federated Identity) instead of publish-profile
- Remove auto-generated main_soc-backend.yml (wrong paths)
- Fix deployment package to include backend/ directory properly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:41:34 +08:00
gongzhiyongandClaude Opus 4.6 cc571afc88 fix: downgrade webapps-deploy to v2 for publish-profile support
v3 was failing with "No credentials found" despite publish-profile being set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:39:28 +08:00
Fasthei 8c92b576be Add or update the Azure App Service build and deployment workflow config 2026-04-08 13:37:13 +08:00
gongzhiyongandClaude Opus 4.6 efb3c53623 feat: add backend service and Azure deployment workflow
- Add complete Python backend (Litestar + LangGraph) with chat, conversations, tickets APIs
- Add GitHub Actions workflow for auto-deploying backend to Azure Web App (soc-backend)
- Add gunicorn to requirements.txt for production serving
- Update CLAUDE.md and EXTERNAL_SERVICES.md with latest config
- Remove obsolete claudehd.md (merged into gpthd.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:31:00 +08:00