Skip to content
Draft
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
99 changes: 0 additions & 99 deletions .github/workflows/codeql.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/ios.yml

This file was deleted.

29 changes: 17 additions & 12 deletions simple_seismic_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,22 @@
"crystallization_status": "CRYSTALLINE"
}

STATIC_ROOT_RESPONSE = json.dumps({
"service": "Genesis Seismic Log",
"version": "1.0.0",
"status": "operational",
"protocol": "S-ToT (Seismic Tree-of-Thoughts)",
"endpoints": {
"live": "/api/bench/live",
"health": "/api/health",
"seismic": "/api/seismic/status"
}
}, separators=(',', ':')).encode()

class SeismicHandler(BaseHTTPRequestHandler):
def do_GET(self):
if self.path == "/":
self.send_json({
"service": "Genesis Seismic Log",
"version": "1.0.0",
"status": "operational",
"protocol": "S-ToT (Seismic Tree-of-Thoughts)",
"endpoints": {
"live": "/api/bench/live",
"health": "/api/health",
"seismic": "/api/seismic/status"
}
})
self.send_json(STATIC_ROOT_RESPONSE)
elif self.path == "/api/health":
self.send_json({
"status": "healthy",
Expand Down Expand Up @@ -112,7 +114,10 @@ def send_json(self, data):
self.send_header('Content-Type', 'application/json')
self.send_header('Access-Control-Allow-Origin', '*')
self.end_headers()
self.wfile.write(json.dumps(data, separators=(',', ':')).encode())
if isinstance(data, bytes):
self.wfile.write(data)
else:
self.wfile.write(json.dumps(data, separators=(',', ':')).encode())
Comment thread
igor-holt marked this conversation as resolved.

def log_message(self, format, *args):
"""Override to customize logging"""
Expand Down
Loading