@iqai/adk-cli
Version:
CLI tool for creating, running, and testing ADK-TS agents
29 lines • 899 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeGuards = void 0;
class TypeGuards {
isLikelyAgentInstance(obj) {
return (obj != null &&
typeof obj === "object" &&
typeof obj.name === "string" &&
typeof obj.runAsync === "function");
}
isAgentBuilder(obj) {
return (obj != null &&
typeof obj === "object" &&
typeof obj.build === "function" &&
typeof obj.withModel === "function");
}
isBuiltAgent(obj) {
return (obj != null &&
typeof obj === "object" &&
"agent" in obj &&
"runner" in obj &&
"session" in obj);
}
isPrimitive(v) {
return v == null || ["string", "number", "boolean"].includes(typeof v);
}
}
exports.TypeGuards = TypeGuards;
//# sourceMappingURL=type-guards.js.map