This commit is contained in:
2026-05-17 12:43:53 -07:00
commit 7c8def0aaa
7507 changed files with 1419399 additions and 0 deletions

34
dist/agents/registry.js vendored Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AGENTS = void 0;
exports.registerAgent = registerAgent;
exports.getAgent = getAgent;
exports.allAgents = allAgents;
exports.pick = pick;
const tools_1 = require("../tools");
const _registry = new Map();
function registerAgent(config) {
_registry.set(config.name, config);
}
function getAgent(name) {
return _registry.get(name);
}
function allAgents() {
return [..._registry.values()];
}
/**
* Backwards-compatible AGENTS object — populated as agents register.
* server.ts uses AGENTS[name] and Object.values(AGENTS).
*/
exports.AGENTS = new Proxy({}, {
get(_target, prop) { return _registry.get(prop); },
ownKeys() { return [..._registry.keys()]; },
getOwnPropertyDescriptor(_target, prop) {
const v = _registry.get(prop);
return v ? { configurable: true, enumerable: true, value: v } : undefined;
}
});
/** Pick tools from ALL_TOOLS by name. */
function pick(names) {
return tools_1.ALL_TOOLS.filter(t => names.includes(t.name));
}