mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 06:56:44 +00:00
fix: backfill runtime api server key (#9)
This commit is contained in:
parent
c626c555db
commit
e08e40f62b
1 changed files with 5 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ import {
|
||||||
const SUPABASE_URL = Deno.env.get("SUPABASE_URL")!;
|
const SUPABASE_URL = Deno.env.get("SUPABASE_URL")!;
|
||||||
const SUPABASE_SERVICE_ROLE_KEY = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!;
|
const SUPABASE_SERVICE_ROLE_KEY = Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!;
|
||||||
const RAILWAY_API_TOKEN = Deno.env.get("RAILWAY_API_TOKEN") ?? "";
|
const RAILWAY_API_TOKEN = Deno.env.get("RAILWAY_API_TOKEN") ?? "";
|
||||||
|
const HERMES_API_SERVER_KEY = Deno.env.get("HERMES_API_SERVER_KEY") ?? "";
|
||||||
const INTERNAL_FUNCTION_SECRET = Deno.env.get("INTERNAL_FUNCTION_SECRET") ?? "";
|
const INTERNAL_FUNCTION_SECRET = Deno.env.get("INTERNAL_FUNCTION_SECRET") ?? "";
|
||||||
const HERMES_RUNTIME_IMAGE =
|
const HERMES_RUNTIME_IMAGE =
|
||||||
Deno.env.get("HERMES_RUNTIME_IMAGE") ?? "ghcr.io/domfelipe/hermes-agent-custom:latest";
|
Deno.env.get("HERMES_RUNTIME_IMAGE") ?? "ghcr.io/domfelipe/hermes-agent-custom:latest";
|
||||||
|
|
@ -44,6 +45,7 @@ function buildBackfillEnv(agentInstanceId: string): Record<string, string> {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
AGENT_INSTANCE_ID: agentInstanceId,
|
AGENT_INSTANCE_ID: agentInstanceId,
|
||||||
|
API_SERVER_KEY: HERMES_API_SERVER_KEY,
|
||||||
API_SERVER_PORT: "8765",
|
API_SERVER_PORT: "8765",
|
||||||
HERMES_AGENT_INSTANCE_ID: agentInstanceId,
|
HERMES_AGENT_INSTANCE_ID: agentInstanceId,
|
||||||
HERMES_CREATE_CRONJOB_URL: createCronjobUrl,
|
HERMES_CREATE_CRONJOB_URL: createCronjobUrl,
|
||||||
|
|
@ -77,6 +79,9 @@ Deno.serve(async (req) => {
|
||||||
if (!RAILWAY_API_TOKEN) {
|
if (!RAILWAY_API_TOKEN) {
|
||||||
return jsonResponse(500, { error: "RAILWAY_API_TOKEN not configured" });
|
return jsonResponse(500, { error: "RAILWAY_API_TOKEN not configured" });
|
||||||
}
|
}
|
||||||
|
if (!HERMES_API_SERVER_KEY) {
|
||||||
|
return jsonResponse(500, { error: "HERMES_API_SERVER_KEY not configured" });
|
||||||
|
}
|
||||||
|
|
||||||
let body: { dry_run?: boolean; agent_instance_id?: string } = {};
|
let body: { dry_run?: boolean; agent_instance_id?: string } = {};
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue