You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Express/WS bootstrap + localhost/LAN opt-in 보안 가드 + base route 13개 + src/routes/* 12개 registrar 등록.
현재 라이브 surface는 총 134개 route handler이며, 이 중 /를 제외한 API 엔드포인트는 133개다.
mutation route(POST/PUT/DELETE)는 총 71개고 모두 requireAuth를 거친다. 단, requireAuth()는 loopback 요청을 토큰 없이 통과시키고, lanAllowed()가 true일 때 private IP도 LAN bypass로 통과시킨다.
GET /api/auth/token은 Bearer bootstrap 전용이며 Sec-Fetch-Site가 same-origin 또는 none이 아닐 때 403을 반환한다.
Route Module Architecture
Module
Lines
Routes
역할
server.ts
741L
13
Helmet/CORS/Host/rate-limit/WS/bootstrap + base routes + module registration
POST /api/uploadPOST /api/file/openPOST /api/voicePOST /api/telegram/sendPOST /api/channel/sendPOST /api/discord/send
Avatar
GET /api/avatarPOST /api/avatar/:target/uploadDELETE /api/avatar/:target/imageGET /api/avatar/:target/image
Traces
GET /api/traces/:runIdGET /api/traces/:runId/eventsGET /api/traces/:runId/events/:seq
i18n
GET /api/i18n/languagesGET /api/i18n/:lang
실제 코드(server.ts + src/routes/*.ts)에서 추출한 총 134개 route handler 기준이다. 이 중 API 엔드포인트는 133개이고, 나머지 1개는 / 엔트리이다. Browser API 41개는 src/routes/browser.ts에서 등록된다. 이 중 POST/PUT/DELETE mutation endpoint 74개는 모두 requireAuth 보호를 받고, GET /api/auth/token은 Sec-Fetch-Site가 same-origin|none이 아닐 때 403을 반환한다.
최근 surface drift
jaw-memory는 이제 flush, soul read/write, soul/activate, POST /api/soul/bootstrap까지 포함한 11개 route다.
avatar API가 registerAvatarRoutes()로 연결되어 agent/user custom image를 관리한다.
/api/session/reset이 base route로 추가되어 /clear와 의미가 분리됐다.
orchestrate API는 queue cancel / queue hold / queue steer / worker result 조회까지 포함한 11개 route이며, 이전 continue route는 현재 코드 표면에 없다.
PUT은 applyRuntimeSettingsPatch()를 거치며 perCli, activeOverrides, telegram, discord, memory, stt, tui, messaging, network 같은 nested object는 merge semantics를 따른다.
showReasoning은 top-level scalar setting이며 /thought command와 Gemini thought visibility가 이 값을 공유한다.
/api/cli-registry / /api/cli-status
/api/cli-registry는 src/cli/registry.ts의 CLI_REGISTRY를 그대로 내려준다. AGY는 top-level key agy이며 ai-e.providers에는 포함되지 않는다.
/api/cli-status는 src/core/config.ts의 detectAllCli() 결과를 내려준다. AGY는 registry binary agy 기준으로 설치 상태가 표시되고, auth hint는 frontend가 "run time check"로 렌더한다. 자동 기본 CLI 선정은 별도 src/cli/readiness.ts의 installed/authenticated tier를 쓴다.
/api/message
submitMessage()를 통해 idle 즉시 실행 / busy 큐잉 / reset/continue intent 분기를 공통 처리한다.
reject 시 409 busy 또는 400 reason을 반환한다.
/api/clear vs /api/session/reset
/api/clear: UI-only clear broadcast. DB 메시지 삭제 없음.
/api/session/reset: clearMainSessionState() 호출. 메시지 삭제 + session cleared.
/api/file/open
:line[:col] suffix가 붙은 문서형 경로를 허용한다.
exact path가 없을 때만 suffix를 strip 해 fallback 해석한다.
문서형 확장자는 reveal, 일반 파일은 상위 폴더 open, 디렉터리는 디렉터리 자체 open 전략을 쓴다.
/api/heartbeat
PUT은 jobs 배열 전체를 검증한다.
invalid schedule이면 400과 함께 code, detail, index, jobId를 포함해 반환한다.
claude-e는 underlying Claude quota/auth를, codex-app은 underlying Codex quota/auth를, ai-e는 현재 선택 provider의 quota/auth를 delegated metadata와 함께 반환한다.
agy와 opencode는 현재 { authenticated:true, quotaCapable:false } status-only 응답이다.
grok는 grok models 기반 auth/status-only 응답이다. Grok CLI는 남은 할당량을 노출하지 않으므로 quotaCapable:false, quotaSource:'not-exposed-by-grok-cli', displayTier:'Grok Heavy'를 반환하고, 있으면 최신 ~/.grok/sessions/**/signals.json의 세션 context 사용량만 best-effort로 붙인다.
AGY는 현 runtime에서 quota/auth API가 분리되어 있지 않아 real quota window를 만들지 않는다. 상태 표시는 /api/cli-status 설치 상태와 /api/quota의 not-exposed-by-agy-cli metadata가 함께 담당한다.
/api/orchestrate/dispatch
boss-scoped x-jaw-boss-token이 필수다. employee spawn 환경에서는 이 토큰이 제거되므로 직원이 다시 dispatch하는 흐름은 서버에서 403으로 막힌다.
PABCD A/B/C 상태에서는 phase가 각각 Plan Audit/Verifier 쪽으로 매핑된다. 특히 B phase에서는 implementation wording을 delegation guard가 차단하고, worker는 READ-ONLY verifier로만 동작해야 한다.
현재 plan이 있으면 dispatch body 상단에 ## Approved Plan으로 자동 주입된다. worker에게 별도 plan 파일을 읽으라고 지시하지 않는다.
PABCD Approved Plan 자동 주입 블록에는 Project root: <absolute path>와 path guard가 포함된다. A/B dispatch 예시도 task body 첫 줄에 Project root를 명시해 ~/.cli-jaw*/JAW_HOME/employee temp cwd를 repo root로 착각하지 않게 한다.
WebSocket Events
연결 시 서버는 현재 상태 스냅샷을 먼저 보낸다: agent_status, queue_update, 비-IDLE orc_state. 현재 브로드캐스트되는 WebSocket 이벤트는 23종이다.
jaw dashboard serve가 띄우는 별도 manager 서버(src/manager/server.ts)는 core server.ts route count에 포함하지 않는다. 현재 manager 전용 API는 scan/proxy/lifecycle 외에 board, notes, schedule, reminders를 함께 제공한다.
Surface
Endpoints
Manager health/scan
GET /api/dashboard/healthGET /api/dashboard/instancesGET /api/dashboard/instances/:port
Notes
GET /api/dashboard/notes/infoGET /api/dashboard/notes/versionGET /api/dashboard/notes/treeGET /api/dashboard/notes/indexGET /api/dashboard/notes/capabilitiesGET /api/dashboard/notes/searchGET/POST/PUT /api/dashboard/notes/filePOST /api/dashboard/notes/asset
Board
GET/POST/PATCH/DELETE /api/dashboard/board/tasks and lane/task ordering routes under /api/dashboard/board
Schedule
GET/POST/PATCH/DELETE /api/dashboard/schedule plus schedule runner-backed dispatch
Reminders
GET /api/dashboard/remindersPOST /api/dashboard/remindersPOST /api/dashboard/reminders/from-messagePATCH /api/dashboard/reminders/:id
Desktop/Electron
GET /api/dashboard/desktop-statusGET/POST /api/dashboard/electron-metrics
Memory federation
GET /api/dashboard/memory/searchGET /api/dashboard/memory/instancesGET /api/dashboard/memory/read
Memory embedding
GET /api/dashboard/memory/embed-configPOST /api/dashboard/memory/embed-configGET /api/dashboard/memory/embed-stateGET /api/dashboard/memory/embed-estimateGET /api/dashboard/memory/reindex-stream (SSE) POST /api/dashboard/memory/reindex
Memory embedding routes are served by src/manager/routes/dashboard-memory.ts. The embed-config POST doubles as connection test when body.test=true. The reindex-stream returns SSE events ({done,total} progress, {complete:true} on finish, {error} on failure). Auto-sync triggers on memory save broadcasts with 2s debounce, plus a 30-minute background catchall sync.
Reminders are backed by src/manager/reminders/store.ts and normalized through src/manager/reminders/api.ts. The scheduler checks due reminders, dispatches channel notifications, and records notificationStatus/attempt metadata.