Commit b37f558
committed
fix(agentos-api): chat-sandbox + /run fall back to Mongo registry
Previously /agents/:name/chat-sandbox and /agents/:name/run looked up the
target only in the in-memory list (opts.agents). Agents registered via the
dashboard or via MongoTelemetry returned 404 UNKNOWN_AGENT — even though
the dashboard listed them and showed their logs.
Adds a resolveAgent() helper that tries in-memory first, then reads from
agent_registry. Registry agents have no envs/gitToken persisted; the
server's own env (forwarded by inheritEssentialHostEnv) supplies
ANTHROPIC_API_KEY etc, so the harness boots normally.
Smoke verified against the deployed enterprise.clawagent.sh: registering
a new agent + clicking chat now returns HTTP 200 with a valid sandboxId.1 parent d19ada7 commit b37f558
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
424 | 448 | | |
425 | | - | |
| 449 | + | |
426 | 450 | | |
427 | 451 | | |
428 | 452 | | |
| |||
450 | 474 | | |
451 | 475 | | |
452 | 476 | | |
453 | | - | |
| 477 | + | |
454 | 478 | | |
455 | 479 | | |
456 | 480 | | |
| |||
0 commit comments