@@ -2265,30 +2265,31 @@ if (import.meta.url === `file://${process.argv[1]}`) {
22652265 } ;
22662266
22672267 // Optional: in-process Anthropic ↔ OpenAI translator proxy. When
2268- // LYZR_PROXY_ENABLED =1 we boot @computeragent/llm-proxy-openai on
2269- // 127.0.0.1:<port> so claude-agent-sdk / deepagents can target Lyzr (or
2270- // any OpenAI-Chat-Completions backend) by setting `envs.ANTHROPIC_BASE_URL`
2268+ // PROXY_ENABLED =1 we boot @computeragent/llm-proxy-openai on
2269+ // 127.0.0.1:<port> so claude-agent-sdk / deepagents can target any
2270+ // OpenAI-Chat-Completions backend by setting `envs.ANTHROPIC_BASE_URL`
22712271 // = "http://127.0.0.1:<port>" on a /run or sandbox chat. Substrates
22722272 // running on the same host can reach the proxy via loopback (bwrap and
22732273 // local share the host's network namespace; e2b cannot — it would need
22742274 // a publicly routable proxy URL, out of scope here).
22752275 //
22762276 // gitagent doesn't need this proxy at all — gitclaw natively speaks OpenAI
22772277 // Chat Completions via GITCLAW_MODEL_BASE_URL + provider:model@baseUrl.
2278- let lyzrProxyHandle : { port : number ; close : ( ) => Promise < void > } | null = null ;
2279- if ( process . env . LYZR_PROXY_ENABLED === "1" ) {
2278+ let proxyHandle : { port : number ; close : ( ) => Promise < void > } | null = null ;
2279+ if ( process . env . PROXY_ENABLED === "1" ) {
22802280 const { startProxy } = await import ( "@computeragent/llm-proxy-openai" ) ;
2281- const proxyToken = process . env . LYZR_UPSTREAM_TOKEN ;
2282- if ( ! proxyToken ) {
2283- console . error ( "[lyzr-proxy] LYZR_PROXY_ENABLED=1 but LYZR_UPSTREAM_TOKEN is not set — skipping" ) ;
2281+ const proxyToken = process . env . UPSTREAM_TOKEN ;
2282+ const proxyBase = process . env . UPSTREAM_BASE ;
2283+ if ( ! proxyToken || ! proxyBase ) {
2284+ console . error ( "[proxy] PROXY_ENABLED=1 but UPSTREAM_TOKEN or UPSTREAM_BASE is not set — skipping" ) ;
22842285 } else {
2285- lyzrProxyHandle = await startProxy ( {
2286- port : intEnv ( "LYZR_PROXY_PORT " , 8788 ) ,
2286+ proxyHandle = await startProxy ( {
2287+ port : intEnv ( "PROXY_PORT " , 8788 ) ,
22872288 upstream : {
2288- base : process . env . LYZR_UPSTREAM_BASE ?? "https://agent-dev.test.studio.lyzr.ai" ,
2289- path : process . env . LYZR_UPSTREAM_PATH ?? "/v4 /chat/completions" ,
2289+ base : proxyBase ,
2290+ path : process . env . UPSTREAM_PATH ?? "/v1 /chat/completions" ,
22902291 token : proxyToken ,
2291- ...( process . env . LYZR_UPSTREAM_MODEL ? { modelOverride : process . env . LYZR_UPSTREAM_MODEL } : { } ) ,
2292+ ...( process . env . UPSTREAM_MODEL ? { modelOverride : process . env . UPSTREAM_MODEL } : { } ) ,
22922293 } ,
22932294 } ) ;
22942295 }
@@ -2329,7 +2330,7 @@ if (import.meta.url === `file://${process.argv[1]}`) {
23292330 // ── Optional: Slack bots — mount under /slack/{bot}/events.
23302331 //
23312332 // Two bots exposed when SLACK_BOTS_ENABLED=1:
2332- // /slack/claudebot/events → claude-agent-sdk + (optional) LYZR proxy
2333+ // /slack/claudebot/events → claude-agent-sdk + (optional) translator proxy
23332334 // /slack/gitagent/events → gitagent direct
23342335 //
23352336 // Each bot maps a Slack thread to a warm /sandboxes instance with
@@ -2360,8 +2361,8 @@ if (import.meta.url === `file://${process.argv[1]}`) {
23602361 server . mount ( slackApp ) ;
23612362 slackBotNames = bots . map ( ( b ) => b . name ) ;
23622363
2363- // AgentOS control-panel API — backs the private dashboard at
2364- // agentos.clawagent.sh. Mounted at /agentos/api/*, stays behind Basic Auth.
2364+ // AgentOS control-panel API — backs the AgentOS dashboard. Mounted
2365+ // at /agentos/api/*, stays behind Basic Auth.
23652366 //
23662367 // Agents = the Slack bots (mapped) + web-only agents (Claude Code, Deep
23672368 // Agent) that drive the same general-agent repo on different harnesses.
@@ -2379,15 +2380,16 @@ if (import.meta.url === `file://${process.argv[1]}`) {
23792380 } ) ) ;
23802381 const generalAgentSource = process . env . AGENTOS_GENERAL_SOURCE
23812382 ?? bots . find ( ( b ) => b . name === "gitagent" ) ?. source
2382- ?? "github.com/shreyas-lyzr /general-agent" ;
2383+ ?? "github.com/open-gitagent /general-agent" ;
23832384 const githubToken = process . env . GITHUB_TOKEN ;
23842385 // claude-agent-sdk + deepagents speak the Anthropic Messages API. Route
2385- // them through the in-process Lyzr proxy when enabled (same backend as
2386- // GitAgent — the proxy overrides the model), else use a real Anthropic key.
2386+ // them through the in-process translator proxy when enabled (same backend
2387+ // as GitAgent — the proxy overrides the model), else use a real Anthropic
2388+ // key.
23872389 let anthropicEnvs : Record < string , string > | null = null ;
2388- if ( process . env . LYZR_PROXY_ENABLED === "1" ) {
2389- const port = process . env . LYZR_PROXY_PORT ?? "8788" ;
2390- anthropicEnvs = { ANTHROPIC_BASE_URL : `http://127.0.0.1:${ port } ` , ANTHROPIC_API_KEY : "lyzr- via-proxy" } ;
2390+ if ( process . env . PROXY_ENABLED === "1" ) {
2391+ const port = process . env . PROXY_PORT ?? "8788" ;
2392+ anthropicEnvs = { ANTHROPIC_BASE_URL : `http://127.0.0.1:${ port } ` , ANTHROPIC_API_KEY : "via-proxy" } ;
23912393 } else if ( process . env . ANTHROPIC_API_KEY ) {
23922394 anthropicEnvs = { ANTHROPIC_API_KEY : process . env . ANTHROPIC_API_KEY } ;
23932395 }
@@ -2429,58 +2431,58 @@ if (import.meta.url === `file://${process.argv[1]}`) {
24292431 }
24302432 // GAP Promoter — gitagent (gitclaw) agent that converts repos to the
24312433 // GitAgent Protocol, opens PRs, and submits to the Open GAP registry.
2432- // Runs on gitagent via the Lyzr -direct path (openai:<model> + gitclaw
2434+ // Runs on gitagent via the OpenAI -direct path (openai:<model> + gitclaw
24332435 // base url), with a GitHub token in its sandbox (GH_TOKEN/GITHUB_TOKEN).
24342436 if ( ! agentDefs . some ( ( a ) => a . name === "gap-promoter" ) ) {
24352437 const promoterToken = process . env . GAP_PROMOTER_GITHUB_TOKEN ?? githubToken ;
2436- const lyzrBase = process . env . LYZR_UPSTREAM_BASE ;
2437- const lyzrToken = process . env . LYZR_UPSTREAM_TOKEN ;
2438- const lyzrModel = process . env . LYZR_UPSTREAM_MODEL ;
2438+ const upstreamBase = process . env . UPSTREAM_BASE ;
2439+ const upstreamToken = process . env . UPSTREAM_TOKEN ;
2440+ const upstreamModel = process . env . UPSTREAM_MODEL ;
24392441 const gitEnvs : Record < string , string > = { } ;
2440- if ( lyzrBase && lyzrToken ) {
2441- gitEnvs . GITCLAW_MODEL_BASE_URL = lyzrBase . replace ( / \/ + $ / , "" ) + "/v4" ;
2442- gitEnvs . OPENAI_API_KEY = lyzrToken ;
2442+ if ( upstreamBase && upstreamToken ) {
2443+ gitEnvs . GITCLAW_MODEL_BASE_URL = upstreamBase . replace ( / \/ + $ / , "" ) + "/v4" ;
2444+ gitEnvs . OPENAI_API_KEY = upstreamToken ;
24432445 }
24442446 if ( promoterToken ) { gitEnvs . GITHUB_TOKEN = promoterToken ; gitEnvs . GH_TOKEN = promoterToken ; }
24452447 agentDefs . push ( {
24462448 name : "gap-promoter" , label : "GitAgent" , harness : "gitagent" ,
24472449 source : process . env . GAP_PROMOTER_SOURCE ?? "github.com/open-gitagent/gap-promoter" ,
2448- model : lyzrModel ? `openai:${ lyzrModel } ` : undefined ,
2450+ model : upstreamModel ? `openai:${ upstreamModel } ` : undefined ,
24492451 envs : gitEnvs ,
24502452 gitToken : promoterToken ,
24512453 } ) ;
24522454 }
24532455 // Framework Translator — translates AI-agent code across frameworks
2454- // (LangGraph, CrewAI, OpenAI Agents SDK, AutoGen, …, Lyzr ADK ).
2455- // Runs on the gitagent (gitclaw) harness via the Lyzr -direct path
2456- // (GITCLAW_MODEL_BASE_URL + OPENAI_API_KEY + model openai:<lyzrModel >),
2456+ // (LangGraph, CrewAI, OpenAI Agents SDK, AutoGen, …).
2457+ // Runs on the gitagent (gitclaw) harness via the OpenAI -direct path
2458+ // (GITCLAW_MODEL_BASE_URL + OPENAI_API_KEY + model openai:<upstreamModel >),
24572459 // same wiring as gap-promoter — NOT the Anthropic proxy. gitagent reads
2458- // agent.yaml runtime.max_turns (4000) and is built for the Lyzr model's
2460+ // agent.yaml runtime.max_turns (4000) and is built for an OpenAI-compatible
24592461 // tool-use loop. Keeps EXA_API_KEY (exa-research). Uses the GAP_PROMOTER
24602462 // PAT (shared with gap-promoter, per explicit request) so it can push the
24612463 // translated code / open PRs; falls back to the shared GITHUB_TOKEN.
24622464 if ( ! agentDefs . some ( ( a ) => a . name === "framework-translator" ) ) {
2463- const lyzrBase = process . env . LYZR_UPSTREAM_BASE ;
2464- const lyzrToken = process . env . LYZR_UPSTREAM_TOKEN ;
2465- const lyzrModel = process . env . LYZR_UPSTREAM_MODEL ;
2465+ const upstreamBase = process . env . UPSTREAM_BASE ;
2466+ const upstreamToken = process . env . UPSTREAM_TOKEN ;
2467+ const upstreamModel = process . env . UPSTREAM_MODEL ;
24662468 const ftGitToken = process . env . GAP_PROMOTER_GITHUB_TOKEN ?? githubToken ;
24672469 const ftEnvs : Record < string , string > = { } ;
2468- if ( lyzrBase && lyzrToken ) {
2469- ftEnvs . GITCLAW_MODEL_BASE_URL = lyzrBase . replace ( / \/ + $ / , "" ) + "/v4" ;
2470- ftEnvs . OPENAI_API_KEY = lyzrToken ;
2470+ if ( upstreamBase && upstreamToken ) {
2471+ ftEnvs . GITCLAW_MODEL_BASE_URL = upstreamBase . replace ( / \/ + $ / , "" ) + "/v4" ;
2472+ ftEnvs . OPENAI_API_KEY = upstreamToken ;
24712473 }
24722474 if ( process . env . EXA_API_KEY ) ftEnvs . EXA_API_KEY = process . env . EXA_API_KEY ;
24732475 if ( ftGitToken ) { ftEnvs . GITHUB_TOKEN = ftGitToken ; ftEnvs . GH_TOKEN = ftGitToken ; }
24742476 agentDefs . push ( {
24752477 name : "framework-translator" , label : "GitAgent" , harness : "gitagent" ,
2476- source : process . env . FRAMEWORK_TRANSLATOR_SOURCE ?? "github.com/shreyas-lyzr /framework-translator-agent" ,
2477- model : lyzrModel ? `openai:${ lyzrModel } ` : undefined ,
2478+ source : process . env . FRAMEWORK_TRANSLATOR_SOURCE ?? "github.com/open-gitagent /framework-translator-agent" ,
2479+ model : upstreamModel ? `openai:${ upstreamModel } ` : undefined ,
24782480 envs : ftEnvs ,
24792481 gitToken : ftGitToken ,
24802482 } ) ;
24812483 }
24822484 } else {
2483- console . warn ( "[agentos] no LYZR proxy or ANTHROPIC_API_KEY — Claude Code / Deep Agent not registered" ) ;
2485+ console . warn ( "[agentos] no translator proxy or ANTHROPIC_API_KEY — Claude Code / Deep Agent not registered" ) ;
24842486 }
24852487 const onlyEnv = process . env . AGENTOS_AGENTS_ONLY ;
24862488 const filteredAgentDefs = onlyEnv
@@ -2505,17 +2507,17 @@ if (import.meta.url === `file://${process.argv[1]}`) {
25052507 process . on ( sig , ( ) => {
25062508 void ( async ( ) => {
25072509 if ( auditSink ) await shutdownOtel ( 2_000 ) . catch ( ( ) => { } ) ;
2508- await lyzrProxyHandle ?. close ( ) . catch ( ( ) => { } ) ;
2510+ await proxyHandle ?. close ( ) . catch ( ( ) => { } ) ;
25092511 await server . close ( ) . catch ( ( ) => { } ) ;
25102512 process . exit ( 0 ) ;
25112513 } ) ( ) ;
25122514 } ) ;
25132515 }
25142516 const { host, port } = await server . listen ( ) ;
25152517 console . log ( `ComputerAgentServer listening on http://${ host } :${ port } ` ) ;
2516- if ( lyzrProxyHandle ) {
2517- console . log ( `Anthropic↔OpenAI proxy listening on http://127.0.0.1:${ lyzrProxyHandle . port } ` ) ;
2518- console . log ( ` → use envs.ANTHROPIC_BASE_URL=http://127.0.0.1:${ lyzrProxyHandle . port } on /run for claude-agent-sdk + deepagents` ) ;
2518+ if ( proxyHandle ) {
2519+ console . log ( `Anthropic↔OpenAI proxy listening on http://127.0.0.1:${ proxyHandle . port } ` ) ;
2520+ console . log ( ` → use envs.ANTHROPIC_BASE_URL=http://127.0.0.1:${ proxyHandle . port } on /run for claude-agent-sdk + deepagents` ) ;
25192521 }
25202522 if ( slackBotNames . length > 0 ) {
25212523 console . log ( `Slack bots active: ${ slackBotNames . join ( ", " ) } ` ) ;
@@ -2555,7 +2557,7 @@ if (import.meta.url === `file://${process.argv[1]}`) {
25552557 console . log ( " curl -N -X POST http://" + host + ":" + port + "/run \\" ) ;
25562558 console . log ( " -H 'content-type: application/json' \\" ) ;
25572559 console . log ( " -d '{" ) ;
2558- console . log ( ' "source": "github.com/shreyas-lyzr/ pdf-agent",' ) ;
2560+ console . log ( ' "source": "github.com/open-gitagent/example- pdf-agent",' ) ;
25592561 console . log ( ' "harness": "claude-agent-sdk",' ) ;
25602562 console . log ( ' "runtime": "local",' ) ;
25612563 console . log ( ' "options": { "permissionMode": "bypassPermissions", "settingSources": ["project"] },' ) ;
0 commit comments