Skip to content
Closed
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
3 changes: 3 additions & 0 deletions Web/apps/hyperloom/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_CLAW_BASE_URL=/claw-api/v1
VITE_MCP_TRACELENS_URL=/mcp/tracelens
VITE_MCP_GEAK_URL=/mcp/geak
16 changes: 16 additions & 0 deletions Web/apps/hyperloom/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# HyperLoom Environment Variables
# Copy to .env.development.local for local overrides

# Proxy targets (Vite dev server, not exposed to browser)
PROXY_API_TARGET=https://oci-slc.primus-safe.amd.com
PROXY_MCP_TARGET=https://oci-slc.primus-safe.amd.com

# Frontend: Claw Service
VITE_CLAW_BASE_URL=/claw-api/v1

# Frontend: MCP Agents
VITE_MCP_TRACELENS_URL=/mcp/tracelens
VITE_MCP_GEAK_URL=/mcp/geak

# GEAK Agent requires Bearer token (apply from SaFE platform)
VITE_MCP_GEAK_API_KEY=
12 changes: 12 additions & 0 deletions Web/apps/hyperloom/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY . .
RUN npm config set registry https://registry.npmjs.org/ \
&& npm install \
&& npm run build

FROM nginx:1.25-alpine AS runtime
COPY --from=builder /app/dist /app/dist/
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx"]
14 changes: 14 additions & 0 deletions Web/apps/hyperloom/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/hyperloom/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HyperLoom — GPU Performance Intelligence</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.7/dist/chart.umd.min.js"></script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
105 changes: 105 additions & 0 deletions Web/apps/hyperloom/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
daemon off;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65;

large_client_header_buffers 4 32k;

gzip on;
gzip_types text/plain application/javascript application/x-javascript text/css application/json;
gzip_min_length 1024;

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
server_name _;

root /app/dist/;
index index.html;

# PrimusClaw SSE streaming
location ~* ^/claw-api/v1/chat/sessions/.+/messages {
proxy_pass http://primus-safe-apiserver.primus-safe:8088;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_buffering off;
proxy_cache off;
gzip off;
add_header Cache-Control "no-cache";
add_header X-Accel-Buffering "no";
chunked_transfer_encoding on;

proxy_connect_timeout 75s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}

# PrimusClaw REST
location ^~ /claw-api/ {
proxy_pass http://primus-safe-apiserver.primus-safe:8088;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 30s;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
}

# Tools service
location ^~ /tools/ {
proxy_pass http://primus-safe-apiserver.primus-safe:8088;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

# SaFE API for auth verification
location /api/v1/ {
proxy_pass http://primus-safe-apiserver.primus-safe:8088;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Cookie "Token=$cookie_Token; userId=$cookie_userId; userType=$cookie_userType";
proxy_connect_timeout 30s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
}

# HyperLoom SPA
location /hyperloom {
alias /app/dist;
try_files $uri $uri/ /hyperloom/index.html;

location ~ \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|mp4|webm)$ {
expires 7d;
access_log off;
}
}

location = / {
return 301 /hyperloom/;
}
}
}
36 changes: 36 additions & 0 deletions Web/apps/hyperloom/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@primus/hyperloom",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",
"axios": "^1.10.0",
"chart.js": "^4.4.9",
"element-plus": "^2.10.4",
"marked": "^17.0.5",
"pinia": "^3.0.4",
"pinia-plugin-persistedstate": "^4.7.1",
"vue": "^3.5.17",
"vue-router": "^4.5.1"
},
"devDependencies": {
"@iconify-json/ep": "^1.2.2",
"@types/node": "^22.15.32",
"@unocss/preset-icons": "^66.3.3",
"@unocss/preset-uno": "^66.3.3",
"@vitejs/plugin-vue": "^5.0.4",
"sass": "^1.89.2",
"typescript": "^5.8.3",
"unocss": "^66.3.3",
"vite": "^5.2.0",
"vitest": "^3.2.1"
}
}
Loading
Loading