{"name":"Syte Deployment API","version":"0.9.5","description":"Deploy Next.js websites on a Linux server. Follow design_contract for all UI generation. Deploy via issue_deploy only.","base_url":"https://sycord.site/api","documentation":"https://sycord.site/api/","authentication":{"type":"api_key","header":"X-API-Key","alternative":"Authorization: Bearer <token>","token_prefix":"syte_","create_token":"POST /api/tokens with {\"name\": \"my-agent\"} — no auth required (GUI/local). Token shown once.","example_header":"X-API-Key: syte_xxxxxxxxxxxxxxxx"},"system_prompt":"You are building a production website on Syte. Follow the Sycord Design Contract for every UI decision (Next.js + shadcn/ui + Tailwind + Lucide + Inter).\n\n# Sycord Design Contract\n### Mandatory design rules for every AI-generated website (Next.js + shadcn/ui + Tailwind)\n\n## 1. Framework & Component Rules\n- Always use **shadcn/ui** components (Button, Card, Badge, Input, etc.) — never raw unstyled div buttons.\n- Always use **Lucide React** (`lucide-react`) for icons. Never emoji, never inline hand-drawn SVG icons.\n- Icons at natural size (`h-4 w-4` to `h-6 w-6`) — **never wrap icons in a colored circle background**.\n- All interactive elements must come from `components/ui/*`.\n\n## 2. Font Rules\n- Primary font: **Inter** via `next/font/google`.\n- CSS variable MUST be `--font-sans` wired into `body { font-family: var(--font-sans), system-ui, sans-serif }`.\n- JetBrains Mono only for code blocks — never for body copy.\n\n## 3. Color Pattern Rules\n- Base theme from official shadcn preset (Zinc, Slate, Stone, Gray, or Neutral) + ONE accent.\n- Max **2 non-neutral hues** per viewport.\n- `--card` ≠ `--background` in light AND dark mode.\n- `--border` visible against `--background`.\n- Dark mode mandatory with toggle; default from `prefers-color-scheme`.\n\n## 4. Shape & Component Styling\n- Border radius via `--radius` token (`rounded-lg`, `rounded-md`, `rounded-sm`).\n- No colored left-border accent bars on cards — use elevation or neutral border.\n- Soft tone-matched shadows, never pure black.\n\n## 5. Imagery & Backgrounds\n- Real stock images (Unsplash/Pexels) or AI-generated — no gray placeholders.\n- Hero sections need at least one real image (except pure dashboard tools).\n- **Gradient below hero** (primary/accent at 0.15–0.3 opacity):\n  `background: radial-gradient(ellipse 80% 60% at 50% -10%, hsl(var(--primary) / 0.25), transparent);`\n- Every `<img>` needs `alt`, `width`, `height`, `loading=\"lazy\"`.\n\n## 6. Layout Rules\n- Avoid generic 3-column icon-in-circle as the only feature layout.\n- Left-align body copy; center only short hero headlines.\n- Vary section padding; mobile-first (375px + 1280px+).\n\n## 7. Pre-Flight Checklist\n- [ ] `--font-sans` on body\n- [ ] `--card` ≠ `--background` (light + dark)\n- [ ] shadcn preset colors, not arbitrary HSL\n- [ ] Max 2 non-neutral hues per viewport\n- [ ] Lucide icons, never in colored circles\n- [ ] Hero gradient transition (opacity 0.15–0.3+)\n- [ ] All images resolve\n- [ ] `--radius` consistent\n- [ ] Dark mode toggle works\n- [ ] WCAG AA contrast\n\n\n## Deploy Rules (mandatory)\n- NEVER run `npm run build`, `yarn build`, `next build`, or similar via execute_command.\n- Use execute_command only for scaffolding, npm install, and `npm run lint` (bug testing).\n- Deploy ONLY via: POST /api/issue_deploy {\"uuid\": \"...\"}\n  This runs git pull + docker build (build happens inside Dockerfile) + restart.\n- After generating files, run POST /api/validate_design?uuid= to check the contract.\n","design_contract":{"version":"1.0","title":"Sycord Design Contract","framework":"Next.js + shadcn/ui + Tailwind CSS","markdown":"# Sycord Design Contract\n### Mandatory design rules for every AI-generated website (Next.js + shadcn/ui + Tailwind)\n\n## 1. Framework & Component Rules\n- Always use **shadcn/ui** components (Button, Card, Badge, Input, etc.) — never raw unstyled div buttons.\n- Always use **Lucide React** (`lucide-react`) for icons. Never emoji, never inline hand-drawn SVG icons.\n- Icons at natural size (`h-4 w-4` to `h-6 w-6`) — **never wrap icons in a colored circle background**.\n- All interactive elements must come from `components/ui/*`.\n\n## 2. Font Rules\n- Primary font: **Inter** via `next/font/google`.\n- CSS variable MUST be `--font-sans` wired into `body { font-family: var(--font-sans), system-ui, sans-serif }`.\n- JetBrains Mono only for code blocks — never for body copy.\n\n## 3. Color Pattern Rules\n- Base theme from official shadcn preset (Zinc, Slate, Stone, Gray, or Neutral) + ONE accent.\n- Max **2 non-neutral hues** per viewport.\n- `--card` ≠ `--background` in light AND dark mode.\n- `--border` visible against `--background`.\n- Dark mode mandatory with toggle; default from `prefers-color-scheme`.\n\n## 4. Shape & Component Styling\n- Border radius via `--radius` token (`rounded-lg`, `rounded-md`, `rounded-sm`).\n- No colored left-border accent bars on cards — use elevation or neutral border.\n- Soft tone-matched shadows, never pure black.\n\n## 5. Imagery & Backgrounds\n- Real stock images (Unsplash/Pexels) or AI-generated — no gray placeholders.\n- Hero sections need at least one real image (except pure dashboard tools).\n- **Gradient below hero** (primary/accent at 0.15–0.3 opacity):\n  `background: radial-gradient(ellipse 80% 60% at 50% -10%, hsl(var(--primary) / 0.25), transparent);`\n- Every `<img>` needs `alt`, `width`, `height`, `loading=\"lazy\"`.\n\n## 6. Layout Rules\n- Avoid generic 3-column icon-in-circle as the only feature layout.\n- Left-align body copy; center only short hero headlines.\n- Vary section padding; mobile-first (375px + 1280px+).\n\n## 7. Pre-Flight Checklist\n- [ ] `--font-sans` on body\n- [ ] `--card` ≠ `--background` (light + dark)\n- [ ] shadcn preset colors, not arbitrary HSL\n- [ ] Max 2 non-neutral hues per viewport\n- [ ] Lucide icons, never in colored circles\n- [ ] Hero gradient transition (opacity 0.15–0.3+)\n- [ ] All images resolve\n- [ ] `--radius` consistent\n- [ ] Dark mode toggle works\n- [ ] WCAG AA contrast\n","rules":{"components":"shadcn/ui only; Lucide icons; no icon-in-circle pattern","fonts":"Inter via next/font/google; CSS var --font-sans on body","colors":"shadcn preset base + one accent; card != background; dark mode required","imagery":"real images; hero gradient below hero section","layout":"avoid generic 3-col icon circles; mobile-first","file_paths":"Syte workspace root is app/ — Next.js App Router files go in app/app/page.tsx, app/app/layout.tsx (double app/ is correct)"},"preflight_checklist":["Font variable is --font-sans and applied to body","--card != --background in light AND dark mode","Theme colors from a named shadcn preset","Max 2 non-neutral hues per viewport","All icons are Lucide, never in colored circles","Hero has gradient transition below (opacity 0.15-0.3 minimum)","All images resolve (no broken/placeholder images)","Border radius consistent via --radius token","Dark mode toggle present and functional","WCAG AA contrast on text/background pairs"],"deploy_rules":{"summary":"Never run npm/yarn/next build via execute_command. All builds happen inside Docker during issue_deploy.","deploy_endpoint":"POST /api/issue_deploy","deploy_body":{"uuid":"<project-uuid>"},"deploy_does":"Git pull (if configured) + docker build (includes npm run build in Dockerfile) + container start","forbidden_execute_commands":["npm run build","yarn build","pnpm build","next build","npx next build"],"allowed_testing_commands":["npm run lint","npm install","npx create-next-app@latest . --yes","mkdir -p src/components","ls -la"],"workflow":["1. POST /api/create_project {name} → uuid","2. POST /api/write_file — scaffold Next.js + shadcn/ui per design_contract","3. POST /api/execute_command — npm install, npm run lint (testing only, NOT build)","4. POST /api/issue_deploy {uuid} — git pull + docker build + start","5. GET /api/get_logs?uuid= — verify deploy","6. POST /api/validate_design?uuid= — run design contract linter"]}},"deploy_rules":{"summary":"Never run npm/yarn/next build via execute_command. All builds happen inside Docker during issue_deploy.","deploy_endpoint":"POST /api/issue_deploy","deploy_body":{"uuid":"<project-uuid>"},"deploy_does":"Git pull (if configured) + docker build (includes npm run build in Dockerfile) + container start","forbidden_execute_commands":["npm run build","yarn build","pnpm build","next build","npx next build"],"allowed_testing_commands":["npm run lint","npm install","npx create-next-app@latest . --yes","mkdir -p src/components","ls -la"],"workflow":["1. POST /api/create_project {name} → uuid","2. POST /api/write_file — scaffold Next.js + shadcn/ui per design_contract","3. POST /api/execute_command — npm install, npm run lint (testing only, NOT build)","4. POST /api/issue_deploy {uuid} — git pull + docker build + start","5. GET /api/get_logs?uuid= — verify deploy","6. POST /api/validate_design?uuid= — run design contract linter"]},"errors":{"401_missing_api_key":"Send X-API-Key or Authorization: Bearer header","401_invalid_api_key":"Token revoked or incorrect","400_invalid_path":"File path escapes workspace sandbox","400_create_failed":"Duplicate UUID or validation error","400_build_forbidden":"npm run build blocked — use POST /api/issue_deploy instead","404_not_found":"Project UUID does not exist"},"workflow_create_website_from_git":["1. POST /api/tokens → save token","2. POST /api/create_project {name, git_url, branch} → uuid (do NOT set deploy:true)","3. POST /api/issue_deploy {uuid} → git pull + docker build + start","4. GET /api/projects/{uuid}/logs/stream?live=1 (SSE) → watch deploy","5. GET /api/workspace_get?uuid= → confirm url, ssl.active, and running=true","6. POST /api/validate_design?uuid= → design contract linter","7. POST /api/set_domain {uuid, domain} → optional custom HTTPS domain (auto-assigned on deploy if omitted)"],"workflow_create_website_from_scratch":["1. Read system_prompt + design_contract — follow Sycord Design Contract","2. POST /api/create_project {name} only → uuid + execute_command.body","3. POST /api/write_file — scaffold Next.js + shadcn/ui + Tailwind per design_contract","4. POST /api/execute_command — npm install, npm run lint (testing ONLY, never npm run build)","5. POST /api/start_preview {uuid} → live HMR preview in seconds (preview_url)","6. POST /api/write_file — iterate; preview hot-reloads automatically","7. POST /api/validate_design?uuid= → check design contract","8. POST /api/issue_deploy {uuid} → production docker build + start","9. POST /api/stop_preview {uuid} → stop dev server when done"],"workflow_live_preview":["1. Set preview_base_domain (e.g. sycord.site) + Cloudflare token in Settings; wildcard DNS *.sycord.site → server","2. POST /api/start_preview {uuid} → preview_url e.g. https://previewk-mysite.sycord.site","3. GET /api/preview_status?uuid= → poll until preview_ready=true; check ssl.preview.active","4. Open preview_url — HMR live; POST /api/write_file edits hot-reload","5. GET /api/projects/{uuid}/preview/logs/stream?live=1 → dev server logs","6. POST /api/stop_preview {uuid} when finished"],"preview_api":{"description":"Fast live preview via next dev/vite — HTTPS on wildcard GUI zone","domain_format":"preview{random_letter}-{appname}.sycord.site (e.g. previewk-mysite.sycord.site)","domain_rules":{"pattern":"preview{a-z}-{appname-slug}.{gui-zone}","example":"https://previewk-mysite.sycord.site","ssl":"Automatic via wildcard *.sycord.site — no per-preview DNS","vite_allowed_hosts":"Auto: patches vite.config.* with server.allowedHosts: true on start_preview","nextjs_origins":"Auto: allowedDevOrigins patched in next.config on start_preview","iframe_embed":"frame-ancestors * — preview embeddable in iframes on sycord.com or any website","preview_base_domain":"Settings preview_base_domain — separate wildcard zone for preview URLs (default: GUI zone)","preview_host_pattern":"preview{a-z}-{appname}.{preview_zone}","not_used":"No preview.app.example.com third-level subdomains","no_gui_domain":"preview_url = preview_direct_url (http://IP:4000+)"},"endpoints":{"start":"POST /api/start_preview {\"uuid\":\"...\"}","status":"GET /api/preview_status?uuid=...","stop":"POST /api/stop_preview {\"uuid\":\"...\"}","logs":"GET /api/projects/{uuid}/preview/logs/stream?live=1"},"response_fields":["preview_url","preview_domain","preview_domain_url","preview_direct_url","preview_ready","preview_running","preview_port","preview_stream_url","preview_dns_hint","ssl.preview","ssl.badge","ssl.badge_label","iframe.all_ok","iframe.items","iframe.frame_csp"],"iframe_debug":"GET /api/projects/{uuid}/preview/iframe-check"},"production_ssl":{"description":"Production HTTPS via wildcard zone or per-host Caddy auto-HTTPS","domain_format":"{app-slug}.{zone} (e.g. mysite.sycord.site) — auto-assigned on issue_deploy when no domain set","domain_rules":{"auto_assign":"On successful deploy, Syte assigns {slug}.{preview_zone} when projects.domain is empty","custom":"POST /api/set_domain overrides auto-assigned hostname","ssl":"Automatic via wildcard *.{zone} when Cloudflare token configured","no_zone":"url = http://{public_ip}:{port} until preview zone is configured"},"response_fields":["url","domain","domain_url","ssl.production","ssl.badge","ssl.badge_label"]},"endpoints":[{"method":"GET","path":"/api/server_info","auth":true,"description":"Server IP, version, URLs"},{"method":"GET","path":"/api/ai.json","auth":false,"description":"This spec + design_contract + system_prompt"},{"method":"GET","path":"/api/validate_design?uuid=","auth":true,"description":"Run design contract linter on project"},{"method":"GET","path":"/api/workspace_list","auth":true,"description":"List all projects"},{"method":"GET","path":"/api/workspace_get?uuid=","auth":true,"description":"Single project details + URLs"},{"method":"GET","path":"/api/list_files?uuid=&path=","auth":true,"description":"List files in workspace"},{"method":"POST","path":"/api/read_file","auth":true,"body":{"uuid":"str","path":"str"}},{"method":"POST","path":"/api/write_file","auth":true,"body":{"uuid":"str","path":"str","content":"str"}},{"method":"POST","path":"/api/upload_file","auth":true,"body":"multipart: uuid, path, file"},{"method":"POST","path":"/api/delete_file","auth":true,"body":{"uuid":"str","path":"str"}},{"method":"POST","path":"/api/execute_command","auth":true,"body":{"uuid":"str","command":"shell cmd (no build)","cwd":"app","timeout":300,"env":{}},"note":"npm run build FORBIDDEN — use issue_deploy"},{"method":"POST","path":"/api/execute_commands","auth":true,"body":{"uuid":"str","commands":[{"command":"str","cwd":"app"}]}},{"method":"POST","path":"/api/set_env","auth":true,"body":{"uuid":"str","env_vars":{},"merge":true}},{"method":"POST","path":"/api/create_project","auth":true,"body":{"name":"str (required)","uuid":"optional","git_url":"optional","git_provider":"optional","branch":"main","start_command":"optional","domain":"optional","env_vars":{},"deploy":"bool, default false — prefer issue_deploy"},"response_includes":"uuid, execute_command.body, issue_deploy.body, design_contract_url"},{"method":"POST","path":"/api/issue_deploy","auth":true,"body":{"uuid":"str"},"description":"Git pull + docker build + restart — production deploy"},{"method":"POST","path":"/api/start_preview","auth":true,"body":{"uuid":"str"},"description":"Fast dev preview (next dev/vite, HMR, ~5s)"},{"method":"POST","path":"/api/stop_preview","auth":true,"body":{"uuid":"str"}},{"method":"GET","path":"/api/preview_status?uuid=","auth":true,"description":"preview_url, preview_ready, preview_running"},{"method":"GET","path":"/api/projects/{uuid}/preview/logs/stream?live=1","auth":"optional","description":"SSE preview dev server logs"},{"method":"POST","path":"/api/start_service","auth":true,"body":{"uuid":"str"}},{"method":"POST","path":"/api/stop_service","auth":true,"body":{"uuid":"str"}},{"method":"POST","path":"/api/set_domain","auth":true,"body":{"uuid":"str","domain":"app.example.com"}},{"method":"POST","path":"/api/delete_project","auth":true,"body":{"uuid":"str"}},{"method":"GET","path":"/api/get_logs?uuid=&lines=200","auth":true,"description":"Snapshot of deploy/runtime logs"},{"method":"GET","path":"/api/projects/{uuid}/logs/stream?live=1","auth":"optional","description":"SSE live deploy logs"},{"method":"GET","path":"/api/agent_status?uuid=","auth":true,"description":"Continue agent status + agent_proxy_url"},{"method":"POST","path":"/api/agent_start","auth":true,"body":{"uuid":"str"},"description":"Start Continue cn serve agent"},{"method":"POST","path":"/api/agent_stop","auth":true,"body":{"uuid":"str"}},{"method":"POST","path":"/api/agent_restart","auth":true,"body":{"uuid":"str"}},{"method":"POST","path":"/api/agent_settings","auth":true,"body":{"uuid":"str","model_profile":"syra-nano|syra-base|syra-havy"}},{"method":"GET","path":"/api/agent_logs?uuid=&lines=200","auth":true,"description":"Continue serve log snapshot"},{"method":"GET","path":"/api/agent_dashboard","auth":true,"description":"DPFA/MNOA metrics + onboarding state"},{"method":"POST","path":"/api/agent_test","auth":true,"body":{"uuid":"str"},"description":"Probe CLI + bridge + communicate"},{"method":"POST","path":"/api/agent_communicate","auth":true,"body":{"uuid":"str","message":"str","model_profile":"optional"}},{"method":"POST","path":"/api/agent_change","auth":true,"body":{"uuid":"str","message":"str","model_name":"optional"},"description":"sycord.com code change request"},{"method":"GET","path":"/api/agent_activity?uuid=&since_id=0","auth":true,"description":"Agent activity snapshot (Cursor-like chat events)"},{"method":"GET","path":"/api/agent_activity_catalog","auth":false,"description":"Full activity event catalog (Continue.dev aligned)"},{"method":"GET","path":"/api/projects/{uuid}/agent/activity/stream?live=1","auth":"optional","description":"SSE real-time agent activity for sycord.com UI"},{"method":"GET","path":"/api/projects/{uuid}/agent/logs/stream?live=1","auth":"optional","description":"SSE Continue agent logs"},{"method":"POST","path":"/api/tokens","auth":false,"body":{"name":"str"},"description":"Create API key (GUI)"}],"agent_session":{"description":"Per-project Continue cn serve runtime for long-lived AI coding sessions. Independent from preview/deploy.","documentation":"https://sycord.site/api/#agent","model_profiles":{"syra-nano":"Fast — Gemini Flash class","syra-base":"Balanced — DeepSeek chat class","syra-havy":"Capable — Gemini Pro class"},"gui_configuration":"Syte GUI → AI tab — internal secret + per-profile Verted/DeepSeek API keys","metrics":{"dpfa":"Dedicated Performance For Agents — CPU percent on VM","mnoa":"Maximum Number Of Agents — running agents vs configured max"},"sycord_change_flow":["1. User requests code change on sycord.com","2. sycord.com opens SSE GET /api/internal/projects/{uuid}/agent/activity/stream?live=1","3. sycord.com POST /api/internal/projects/{uuid}/agent/change {message, model_name}","4. Syte streams activity events (thinking, file edits, commands) to the SSE client","5. Syte matches UUID → workspace, starts cn serve if needed","6. Syte POST http://127.0.0.1:{port}/message {message}","7. Poll GET /state until idle, emit request_completed, return reply to sycord.com"],"activity_api":{"description":"Real-time Cursor-like feed of Continue cn serve activity. Parse session.history from GET /state and Syte workspace actions.","continue_reference":"https://docs.continue.dev/guides/cli","snapshot":"GET /api/agent_activity?uuid=&since_id=0","stream":"GET /api/projects/{uuid}/agent/activity/stream?live=1&since_id=0","internal_stream":"GET /api/internal/projects/{uuid}/agent/activity/stream?live=1","sse_types":{"activity":"Structured event object (persisted)","processing":"Ephemeral working indicator while isProcessing=true","session":"Stream connected","ping":"Keepalive with since_id"},"event_fields":["id","project_id","event_type","role","title","detail","payload","source","created_at"],"event_types":["session_started","session_finished","agent_started","agent_stopped","agent_restarted","request_started","request_completed","request_failed","processing","user_message","assistant_message","thinking","plan","asking_user","tool_call","tool_result","mcp_tool_call","skill_invoked","command_run","file_created","file_modified","file_deleted","file_read","status"],"catalog":[{"event_type":"session_started","role":"system","title":"Session started","description":"Continue cn serve session opened for this project.","continue_aligned":"agent loop start"},{"event_type":"session_finished","role":"system","title":"Session finished","description":"Agent finished processing and returned to idle.","continue_aligned":"isProcessing=false"},{"event_type":"agent_started","role":"system","description":"cn serve process started on allocated localhost port."},{"event_type":"agent_stopped","role":"system","description":"cn serve process stopped."},{"event_type":"agent_restarted","role":"system","description":"Agent stopped and started again (config reload)."},{"event_type":"request_started","role":"user","description":"User/API message sent via POST /message or agent/change.","continue_aligned":"POST /message"},{"event_type":"request_completed","role":"assistant","description":"Agent finished request; reply available."},{"event_type":"request_failed","role":"system","description":"Request failed (HTTP error, timeout, provider error)."},{"event_type":"processing","role":"system","description":"Agent is working (isProcessing=true). Ephemeral in SSE; may not persist.","continue_aligned":"GET /state isProcessing"},{"event_type":"user_message","role":"user","description":"User message from session.history."},{"event_type":"assistant_message","role":"assistant","description":"Assistant text from session.history."},{"event_type":"thinking","role":"assistant","description":"Model reasoning / redacted thinking blocks.","continue_aligned":"thinking content parts"},{"event_type":"plan","role":"assistant","description":"Agent planning steps before tool use.","continue_aligned":"plan / todo tools"},{"event_type":"asking_user","role":"assistant","description":"Agent asks a clarifying question."},{"event_type":"tool_call","role":"assistant","description":"Generic tool invocation.","continue_aligned":"tool_use / function_call"},{"event_type":"tool_result","role":"tool","description":"Result returned from a tool execution.","continue_aligned":"role=tool messages"},{"event_type":"mcp_tool_call","role":"assistant","description":"MCP server tool invoked (from mcpServers in config.yaml).","continue_aligned":"mcpServers tools"},{"event_type":"skill_invoked","role":"assistant","description":"Continue Skills tool read a SKILL.md file.","continue_aligned":".continue/skills/SKILL.md"},{"event_type":"command_run","role":"assistant","description":"Shell/terminal command executed."},{"event_type":"file_created","role":"assistant","description":"File created in workspace."},{"event_type":"file_modified","role":"assistant","description":"File edited in workspace."},{"event_type":"file_deleted","role":"assistant","description":"File deleted from workspace."},{"event_type":"file_read","role":"assistant","description":"File read by agent."},{"event_type":"status","role":"system","description":"Informational status line."}],"sources":["agent","api","sycord","gui","internal"]},"mcp_and_skills":{"mcp_servers_setting":"continue_mcp_servers — JSON array merged into config.yaml mcpServers","rules_setting":"continue_rules — one rule path or inline string per line","workspace_mcp":"Optional YAML files in app/.continue/mcpServers/*.yaml","skills_paths":["workspaces/{uuid}/app/.continue/skills/SKILL.md","workspaces/{uuid}/data/continue/home/.continue/skills/SKILL.md"],"continue_docs":{"mcp":"https://docs.continue.dev/reference#mcpservers","cli":"https://docs.continue.dev/guides/cli"}},"workflow":["1. GET /api/agent_status?uuid= — check agent_status and agent_proxy_url","2. POST /api/agent_start {uuid} — start if stopped","3. Use agent_proxy_url for Continue HTTP API (not raw localhost port)","4. POST /api/agent_settings {uuid, model_profile} — switch profile mid-session","5. GET /api/agent_logs?uuid= or GET /api/projects/{uuid}/agent/logs/stream?live=1","6. POST /api/agent_stop {uuid} — tear down session"],"status_fields":["agent_status","agent_running","agent_port","agent_proxy_url","agent_model_profile","agent_backend","agent_workspace_path","agent_log_path","agent_last_error"],"internal_routes":{"description":"sycord.com server-to-server — X-Syra-Internal-Secret header","base":"https://sycord.site/api/internal","endpoints":["GET /projects/{uuid}/agent","POST /projects/{uuid}/agent/start","POST /projects/{uuid}/agent/stop","POST /projects/{uuid}/agent/restart","POST /projects/{uuid}/agent/change","POST /projects/{uuid}/agent/communicate","POST /projects/{uuid}/agent/test","GET /projects/{uuid}/agent/logs","GET /projects/{uuid}/agent/activity","GET /projects/{uuid}/agent/activity/stream?live=1","GET|POST /projects/{uuid}/agent/proxy[/{path}]"]},"errors":{"agent_not_running":"Start agent before communicate/proxy","agent_start_failed":"Continue CLI not installed or config invalid","backend_unreachable":"Bridge API base not reachable","cli_not_installed":"npm install -g @continuedev/cli","internal_secret_not_configured":"Set syra_internal_secret in Settings → Keys"}},"create_project_response":{"description":"AI agents: use execute_command for lint/install only; deploy via issue_deploy.body","fields":{"uuid":"project id for all subsequent API calls","design_contract":"GET /api/ai.json → design_contract — mandatory UI rules","system_prompt":"GET /api/ai.json → system_prompt — inject as AI system instruction","execute_command":"scaffolding + npm install + npm run lint ONLY","issue_deploy":"POST /api/issue_deploy — git pull + docker build + start","validate_design":"GET /api/validate_design?uuid= — run after generation"},"example":{"ok":true,"uuid":"my-site-a1b2c3","status":"created","execute_command":{"method":"POST","path":"/api/execute_command","body":{"uuid":"my-site-a1b2c3","command":"npm run lint","cwd":"app","timeout":300}},"issue_deploy":{"method":"POST","path":"/api/issue_deploy","body":{"uuid":"my-site-a1b2c3"}}}},"execute_command_examples":[{"command":"npm install","cwd":"app","purpose":"install dependencies"},{"command":"npm run lint","cwd":"app","purpose":"bug testing — allowed"},{"command":"ls -la","cwd":"app","purpose":"inspect files"},{"command":"mkdir -p src/components/ui","cwd":"app","purpose":"scaffold"},{"command":"npx create-next-app@latest . --yes","cwd":"app","purpose":"scaffold Next.js"}],"execute_command_forbidden":["npm run build","yarn build","pnpm build","next build","Use POST /api/issue_deploy {uuid} for all builds"],"sycord_api":{"description":"Separate integration API for Sycord websites and external projects. project_connect returns uuid — your app MUST persist it before any other call.","base_url":"https://sycord.site/sycord/api","documentation":"https://sycord.site/sycord/api/","integration_guide":"https://sycord.site/sycord/api/integration.json","spec":"https://sycord.site/sycord/api/spec.json","uuid_persistence":{"required":true,"response_field":"uuid","also_in":["persist.uuid","project.uuid","next_steps.save_uuid"],"instruction":"Save uuid in your database after project_connect. Required for upload, preview, issue_deployment, container_get, domain.","optional_custom_uuid":"Pass body.uuid on project_connect to use your own id"},"stacks":["nextjs","python","javascript","html5"],"workflow":["1. POST /sycord/api/project_connect {name, stack} → SAVE response.uuid","2. POST /sycord/api/upload — multipart file upload (uuid required)","3. POST /sycord/api/preview_start {uuid} — fast dev preview with HMR","4. GET /sycord/api/preview_status?uuid= — poll until preview_ready=true","5. POST /sycord/api/issue_deployment {uuid} — docker build + deploy","6. GET /sycord/api/container_get?uuid= — container status","7. POST /sycord/api/domain {uuid, domain} — optional custom domain"],"project_connect_response":{"save":"uuid","example_fields":["uuid","persist","project","next_steps.save_uuid"]},"endpoints":[{"method":"POST","path":"/sycord/api/project_connect","auth":true,"returns_uuid":true},{"method":"GET","path":"/sycord/api/container_get?uuid=","auth":true},{"method":"POST","path":"/sycord/api/upload","auth":true},{"method":"POST","path":"/sycord/api/preview_start","auth":true},{"method":"GET","path":"/sycord/api/preview_status?uuid=","auth":true},{"method":"POST","path":"/sycord/api/preview_stop","auth":true},{"method":"POST","path":"/sycord/api/domain","auth":true},{"method":"POST","path":"/sycord/api/issue_deployment","auth":true},{"method":"GET","path":"/sycord/api/spec.json","auth":false}]}}