mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 09:01:17 +00:00
Use vanilla Rivet routing in Foundry backend
This commit is contained in:
parent
4bccd5fc8d
commit
940e49fcfa
5 changed files with 26 additions and 83 deletions
|
|
@ -8,24 +8,6 @@ import { project } from "./project/index.js";
|
|||
import { sandboxInstance } from "./sandbox-instance/index.js";
|
||||
import { workspace } from "./workspace/index.js";
|
||||
|
||||
export function resolveManagerPort(): number {
|
||||
const raw = process.env.HF_RIVET_MANAGER_PORT ?? process.env.RIVETKIT_MANAGER_PORT;
|
||||
if (!raw) {
|
||||
return 7750;
|
||||
}
|
||||
|
||||
const parsed = Number(raw);
|
||||
if (!Number.isInteger(parsed) || parsed <= 0 || parsed > 65535) {
|
||||
throw new Error(`Invalid HF_RIVET_MANAGER_PORT/RIVETKIT_MANAGER_PORT: ${raw}`);
|
||||
}
|
||||
return parsed;
|
||||
}
|
||||
|
||||
function resolveManagerHost(): string {
|
||||
const raw = process.env.HF_RIVET_MANAGER_HOST ?? process.env.RIVETKIT_MANAGER_HOST;
|
||||
return raw && raw.trim().length > 0 ? raw.trim() : "0.0.0.0";
|
||||
}
|
||||
|
||||
export const registry = setup({
|
||||
use: {
|
||||
workspace,
|
||||
|
|
@ -37,8 +19,6 @@ export const registry = setup({
|
|||
projectBranchSync,
|
||||
taskStatusSync,
|
||||
},
|
||||
managerPort: resolveManagerPort(),
|
||||
managerHost: resolveManagerHost(),
|
||||
});
|
||||
|
||||
export * from "./context.js";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue