adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
106 lines (105 loc) • 3.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlanningAgent = exports.ReasoningAgent = void 0;
const BaseAgent_1 = require("./BaseAgent");
const Event_1 = require("../events/Event");
/**
* Legacy agent implementation that extends BaseAgent rather than implementing
* a partial interface. This ensures we meet all the required interface requirements.
* @deprecated Use the new agent architecture instead
*/
class ReasoningAgent extends BaseAgent_1.BaseAgent {
constructor(config) {
super('reasoning_agent', config);
}
/**
* Run the agent with a specific task
* @param task The task description or query
* @returns Result of the agent's execution
*/
async run(task) {
// Legacy implementation
return { status: 'reasoning agent pending implementation', task };
}
/**
* Required abstract method implementation
*/
async *runAsyncImpl() {
yield new Event_1.Event({
author: this.name,
content: {
role: 'assistant',
parts: [{ text: 'reasoning agent pending implementation' }]
}
});
}
/**
* Required abstract method implementation
*/
async *runLiveImpl() {
yield new Event_1.Event({
author: this.name,
content: {
role: 'assistant',
parts: [{ text: 'reasoning agent pending implementation' }]
}
});
}
/**
* Required abstract method implementation
*/
setUserContent(content, invocationContext) {
// No-op implementation
}
}
exports.ReasoningAgent = ReasoningAgent;
/**
* Legacy agent implementation that extends BaseAgent rather than implementing
* a partial interface. This ensures we meet all the required interface requirements.
* @deprecated Use the new agent architecture instead
*/
class PlanningAgent extends BaseAgent_1.BaseAgent {
constructor(config) {
super('planning_agent', config);
}
/**
* Run the agent with a specific task
* @param task The task description or query
* @returns Result of the agent's execution
*/
async run(task) {
// Legacy implementation
return { status: 'planning agent pending implementation', task };
}
/**
* Required abstract method implementation
*/
async *runAsyncImpl() {
yield new Event_1.Event({
author: this.name,
content: {
role: 'assistant',
parts: [{ text: 'planning agent pending implementation' }]
}
});
}
/**
* Required abstract method implementation
*/
async *runLiveImpl() {
yield new Event_1.Event({
author: this.name,
content: {
role: 'assistant',
parts: [{ text: 'planning agent pending implementation' }]
}
});
}
/**
* Required abstract method implementation
*/
setUserContent(content, invocationContext) {
// No-op implementation
}
}
exports.PlanningAgent = PlanningAgent;