feat(archy): wire archyBridge into app, base-aware API paths, nginx config
- Create useArchy composable wrapping archyBridge with reactive Vue state - Initialize bridge in App.vue when ?embedded=true detected - Inject Archy node context (apps, system, network) into AI system prompt - Make API paths base-aware (import.meta.env.BASE_URL) for /aiui/ deployment - Add nginx-archy.conf for production Anthropic API proxy with SSE support - Fix archyBridge.ts typecheck error, export ActionResponse type Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f0eb4383bd
commit
89885269f0
@@ -0,0 +1,61 @@
|
||||
# AIUI nginx config for Archipelago deployment
|
||||
# Include this in your Archy nginx server block.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - AIUI built and placed in /opt/archipelago/web-ui/aiui/
|
||||
# - Set $anthropic_api_key in nginx or via env (see below)
|
||||
#
|
||||
# Usage in nginx.conf:
|
||||
# include /opt/archipelago/web-ui/aiui/nginx-archy.conf;
|
||||
|
||||
# Serve AIUI SPA
|
||||
location /aiui/ {
|
||||
alias /opt/archipelago/web-ui/aiui/;
|
||||
try_files $uri $uri/ /aiui/index.html;
|
||||
|
||||
# Cache static assets aggressively
|
||||
location ~* /aiui/assets/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
# Proxy Claude API requests from AIUI iframe
|
||||
# AIUI fetches /api/claude/v1/messages → proxied to Anthropic API
|
||||
location /aiui/api/claude/ {
|
||||
# Rewrite: strip /aiui/api/claude prefix, forward to Anthropic
|
||||
rewrite ^/aiui/api/claude/(.*)$ /$1 break;
|
||||
|
||||
proxy_pass https://api.anthropic.com;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_set_header Host api.anthropic.com;
|
||||
proxy_set_header x-api-key $anthropic_api_key;
|
||||
proxy_set_header anthropic-version "2023-06-01";
|
||||
proxy_set_header Content-Type "application/json";
|
||||
|
||||
# SSE streaming support
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 300s;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
|
||||
# Security: only allow from same origin (AIUI iframe)
|
||||
# The iframe has sandbox="allow-same-origin" so requests come from Archy's origin
|
||||
}
|
||||
|
||||
# Proxy OpenRouter API requests (optional, for multi-model support)
|
||||
location /aiui/api/openrouter/ {
|
||||
rewrite ^/aiui/api/openrouter/(.*)$ /api/v1/chat/completions break;
|
||||
|
||||
proxy_pass https://openrouter.ai;
|
||||
proxy_ssl_server_name on;
|
||||
proxy_set_header Host openrouter.ai;
|
||||
proxy_set_header Content-Type "application/json";
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 300s;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
}
|
||||
Reference in New Issue
Block a user