hataraku
Version:
An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.
83 lines • 2.87 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_CODE_REVIEWER = exports.DEFAULT_CODE_ASSISTANT = exports.AgentConfigSchema = exports.ModelConfigSchema = exports.ModelParametersSchema = void 0;
const zod_1 = require("zod");
/**
* Schema for model parameters configuration
* Defines common parameters for language models
*/
exports.ModelParametersSchema = zod_1.z.object({
temperature: zod_1.z.number().min(0).max(1).optional(),
maxTokens: zod_1.z.number().positive().int().optional(),
topP: zod_1.z.number().min(0).max(1).optional(),
topK: zod_1.z.number().positive().int().optional(),
presencePenalty: zod_1.z.number().optional(),
frequencyPenalty: zod_1.z.number().optional(),
stopSequences: zod_1.z.array(zod_1.z.string()).optional(),
}).optional();
/**
* Schema for model configuration
* Defines the language model to use with an agent
*/
exports.ModelConfigSchema = zod_1.z.object({
provider: zod_1.z.string(),
name: zod_1.z.string(),
parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional()
});
/**
* Schema for agent configuration
* Defines the structure for an agent configuration file
*/
exports.AgentConfigSchema = zod_1.z.object({
name: zod_1.z.string(),
description: zod_1.z.string(),
role: zod_1.z.string(),
model: exports.ModelConfigSchema,
tools: zod_1.z.array(zod_1.z.string()).optional(),
maxSteps: zod_1.z.number().int().positive().optional(),
maxRetries: zod_1.z.number().int().positive().optional(),
verbose: zod_1.z.boolean().optional(),
enableCaching: zod_1.z.boolean().optional().default(true)
});
/**
* Default agent configuration
* Basic code assistant with Claude model
*/
exports.DEFAULT_CODE_ASSISTANT = {
name: "Code Assistant",
description: "A general purpose coding assistant",
role: "You are a helpful coding assistant. You help users write, debug, and understand code.",
model: {
provider: "anthropic",
name: "claude-3-7-sonnet-20250219",
parameters: {
temperature: 0.7,
maxTokens: 4000
}
},
tools: ["hataraku"], // Includes all built-in Hataraku tools
maxSteps: 5,
maxRetries: 3,
enableCaching: true
};
/**
* Default review agent configuration
* Specialized agent for code reviews
*/
exports.DEFAULT_CODE_REVIEWER = {
name: "Code Reviewer",
description: "Expert code review agent",
role: "You are an expert code reviewer. You analyze code for bugs, security issues, and best practices.",
model: {
provider: "anthropic",
name: "claude-3-7-sonnet-20250219",
parameters: {
temperature: 0.3,
maxTokens: 8000
}
},
tools: ["hataraku"],
maxSteps: 10,
maxRetries: 3
};
//# sourceMappingURL=agent-config.js.map