feat(remote)!: make remote serve WebSocket-only and refuse older clients with CLIENT_OUTDATED

This commit is contained in:
imSp4rky
2026-12-05 09:47:22 -07:00
parent 641623590d
commit 00ad15527c
62 changed files with 657 additions and 2098 deletions
@@ -558,184 +558,6 @@
},
"status": 403
},
"GET /api/session/{session_id}/logs no key": {
"body": {
"message": "Secret Key is Empty.",
"status": 401
},
"content_type": "application/json",
"leading_newlines": false,
"log": [],
"stats": {
"error": null,
"late_status": null
},
"status": 401
},
"GET /api/session/{session_id}/logs plain before the handler's try": {
"body": {
"details": {
"operation": "session_logs"
},
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/logs service=- user=test\u2026: An unexpected error occurred: pinned failure"
],
"stats": {
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"GET /api/session/{session_id}/logs unknown session": {
"body": {
"details": {
"session_id": "pinned-session"
},
"error_code": "SESSION_NOT_FOUND",
"message": "Session not found or expired: pinned-session (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session/logs service=- user=test\u2026: Session not found or expired: pinned-session"
],
"stats": {
"error": {
"code": "SESSION_NOT_FOUND",
"message": "Session not found or expired: pinned-session",
"ref": "REF"
},
"late_status": null
},
"status": 404
},
"GET /api/session/{session_id}/logs wrong owner": {
"body": {
"error_code": "FORBIDDEN",
"message": "Session access denied (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session/logs service=EXAMPLE user=test\u2026: Session access denied"
],
"stats": {
"error": {
"code": "FORBIDDEN",
"message": "Session access denied",
"ref": "REF"
},
"late_status": null
},
"status": 403
},
"GET /api/session/{session_id}/prompt no key": {
"body": {
"message": "Secret Key is Empty.",
"status": 401
},
"content_type": "application/json",
"leading_newlines": false,
"log": [],
"stats": {
"error": null,
"late_status": null
},
"status": 401
},
"GET /api/session/{session_id}/prompt plain before the handler's try": {
"body": {
"details": {
"operation": "session_prompt_get"
},
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/prompt service=- user=test\u2026: An unexpected error occurred: pinned failure"
],
"stats": {
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"GET /api/session/{session_id}/prompt unknown session": {
"body": {
"details": {
"session_id": "pinned-session"
},
"error_code": "SESSION_NOT_FOUND",
"message": "Session not found or expired: pinned-session (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: SESSION_NOT_FOUND 404 GET /api/session/pinned-session/prompt service=- user=test\u2026: Session not found or expired: pinned-session"
],
"stats": {
"error": {
"code": "SESSION_NOT_FOUND",
"message": "Session not found or expired: pinned-session",
"ref": "REF"
},
"late_status": null
},
"status": 404
},
"GET /api/session/{session_id}/prompt wrong owner": {
"body": {
"error_code": "FORBIDDEN",
"message": "Session access denied (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: FORBIDDEN 403 GET /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: Session access denied"
],
"stats": {
"error": {
"code": "FORBIDDEN",
"message": "Session access denied",
"ref": "REF"
},
"late_status": null
},
"status": 403
},
"GET /api/session/{session_id}/titles no key": {
"body": {
"message": "Secret Key is Empty.",
@@ -1942,144 +1764,6 @@
},
"status": 403
},
"POST /api/session/{session_id}/prompt no key": {
"body": {
"message": "Secret Key is Empty.",
"status": 401
},
"content_type": "application/json",
"leading_newlines": false,
"log": [],
"stats": {
"error": null,
"late_status": null
},
"status": 401
},
"POST /api/session/{session_id}/prompt not an object": {
"body": {
"error_code": "INVALID_INPUT",
"message": "The request body must be a JSON object (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/prompt service=- user=test\u2026: The request body must be a JSON object"
],
"stats": {
"error": {
"code": "INVALID_INPUT",
"message": "The request body must be a JSON object",
"ref": "REF"
},
"late_status": null
},
"status": 400
},
"POST /api/session/{session_id}/prompt not json": {
"body": {
"details": {
"error": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"
},
"error_code": "INVALID_INPUT",
"message": "Invalid JSON request body (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INVALID_INPUT 400 POST /api/session/pinned-session/prompt service=- user=test\u2026: Invalid JSON request body"
],
"stats": {
"error": {
"code": "INVALID_INPUT",
"message": "Invalid JSON request body",
"ref": "REF"
},
"late_status": null
},
"status": 400
},
"POST /api/session/{session_id}/prompt plain before the handler's try": {
"body": {
"details": {
"operation": "session_prompt_submit"
},
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/prompt service=- user=test\u2026: An unexpected error occurred: pinned failure"
],
"stats": {
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"POST /api/session/{session_id}/prompt unknown session": {
"body": {
"details": {
"session_id": "pinned-session"
},
"error_code": "SESSION_NOT_FOUND",
"message": "Session not found or expired: pinned-session (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: SESSION_NOT_FOUND 404 POST /api/session/pinned-session/prompt service=- user=test\u2026: Session not found or expired: pinned-session"
],
"stats": {
"error": {
"code": "SESSION_NOT_FOUND",
"message": "Session not found or expired: pinned-session",
"ref": "REF"
},
"late_status": null
},
"status": 404
},
"POST /api/session/{session_id}/prompt wrong owner": {
"body": {
"error_code": "FORBIDDEN",
"message": "Session access denied (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: FORBIDDEN 403 POST /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: Session access denied"
],
"stats": {
"error": {
"code": "FORBIDDEN",
"message": "Session access denied",
"ref": "REF"
},
"late_status": null
},
"status": 403
},
"POST /api/session/{session_id}/samples no key": {
"body": {
"message": "Secret Key is Empty.",
@@ -3025,219 +2709,6 @@
},
"status": 422
},
"logs api": {
"body": {
"details": {
"pinned": true
},
"error_code": "SERVICE_ERROR",
"message": "pinned refusal (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/logs service=EXAMPLE user=test\u2026: pinned refusal"
],
"stats": {
"error": {
"code": "SERVICE_ERROR",
"message": "pinned refusal",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"logs exit": {
"body": {
"details": {
"reason": "service_exit"
},
"error_code": "SERVICE_ERROR",
"message": "Service exited (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [],
"stats": {
"raised": true
},
"status": 422
},
"logs plain": {
"body": {
"details": {
"operation": "session_logs"
},
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/logs service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure"
],
"stats": {
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"prompt get api": {
"body": {
"details": {
"pinned": true
},
"error_code": "SERVICE_ERROR",
"message": "pinned refusal (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: SERVICE_ERROR 422 GET /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: pinned refusal"
],
"stats": {
"error": {
"code": "SERVICE_ERROR",
"message": "pinned refusal",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"prompt get exit": {
"body": {
"details": {
"reason": "service_exit"
},
"error_code": "SERVICE_ERROR",
"message": "Service exited (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [],
"stats": {
"raised": true
},
"status": 422
},
"prompt get plain": {
"body": {
"details": {
"operation": "session_prompt_get"
},
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INTERNAL_ERROR 422 GET /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure"
],
"stats": {
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"prompt submit api": {
"body": {
"details": {
"pinned": true
},
"error_code": "SERVICE_ERROR",
"message": "pinned refusal (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: SERVICE_ERROR 422 POST /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: pinned refusal"
],
"stats": {
"error": {
"code": "SERVICE_ERROR",
"message": "pinned refusal",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"prompt submit exit": {
"body": {
"details": {
"reason": "service_exit"
},
"error_code": "SERVICE_ERROR",
"message": "Service exited (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [],
"stats": {
"raised": true
},
"status": 422
},
"prompt submit plain": {
"body": {
"details": {
"operation": "session_prompt_submit"
},
"error_code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: INTERNAL_ERROR 422 POST /api/session/pinned-session/prompt service=EXAMPLE user=test\u2026: An unexpected error occurred: pinned failure"
],
"stats": {
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred: pinned failure",
"ref": "REF"
},
"late_status": null
},
"status": 422
},
"samples api": {
"body": {
"details": {
@@ -3879,6 +3350,29 @@
},
"status": 422
},
"session create no session id": {
"body": {
"error_code": "CLIENT_OUTDATED",
"message": "This client is older than the server accepts: update unshackle to the current dev build (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: CLIENT_OUTDATED 426 POST /api/session/create service=EXAMPLE user=test\u2026: This client is older than the server accepts: update unshackle to the current dev build"
],
"stats": {
"error": {
"code": "CLIENT_OUTDATED",
"message": "This client is older than the server accepts: update unshackle to the current dev build",
"ref": "REF"
},
"late_status": null
},
"status": 426
},
"session create no title": {
"body": {
"error_code": "INVALID_INPUT",
@@ -4118,6 +3612,29 @@
},
"status": 200
},
"titles no channel": {
"body": {
"error_code": "CLIENT_OUTDATED",
"message": "This client is older than the server accepts: update unshackle to the current dev build (ref REF)",
"ref": "REF",
"status": "error",
"timestamp": "TIMESTAMP"
},
"content_type": "application/json",
"leading_newlines": false,
"log": [
"Error ref REF: CLIENT_OUTDATED 426 GET /api/session/pinned-session/titles service=EXAMPLE user=test\u2026: This client is older than the server accepts: update unshackle to the current dev build"
],
"stats": {
"error": {
"code": "CLIENT_OUTDATED",
"message": "This client is older than the server accepts: update unshackle to the current dev build",
"ref": "REF"
},
"late_status": null
},
"status": 426
},
"titles plain": {
"body": {
"details": {