@tepa/types
v0.1.1
Published
Shared TypeScript type definitions for the Tepa agent pipeline
Downloads
259
Maintainers
Readme
@tepa/types
Shared TypeScript interfaces for the Tepa agent pipeline. Zero runtime dependencies — this package contains only type definitions.
Install
npm install @tepa/typesUsage
This package is primarily for custom tool authors who need to implement the ToolDefinition interface without depending on the full Tepa engine:
import type { ToolDefinition } from "@tepa/types";
export const myTool: ToolDefinition = {
name: "my_tool",
description: "Does something useful",
parameters: {
input: { type: "string", description: "Input value", required: true },
},
execute: async ({ input }) => {
return { result: `processed: ${input}` };
},
};Exported Types
Core Pipeline
TepaPrompt— Input prompt with goal, context, and expected outputTepaConfig— Pipeline configuration (models, limits, logging)TepaResult— Final pipeline output (status, cycles, tokens, logs)Plan,PlanStep— Structured execution planExecutionResult— Result from a single execution stepEvaluationResult— Evaluator verdict (pass/fail with feedback)
Tools
ToolDefinition— Tool contract (name, description, parameters, execute function)ParameterDef— Tool parameter schemaToolRegistry— Interface for tool storage and lookupToolSchema— Serializable tool schema for LLM context
LLM Provider
LLMProvider— Abstract provider interface (completemethod)LLMMessage— Chat message (role + content)LLMResponse— Provider response (text, tokens, finish reason, tool use blocks)LLMToolUseBlock— A structured tool call returned by the LLM (id, name, input)LLMRequestOptions— Request options (model, temperature, system prompt, tool schemas)
Events
EventName— The 8 event hook pointsEventCallback— Callback function signatureEventRegistration— Callback withcontinueOnErroroptionEventMap— Map of event names to callback arraysCycleMetadata— Cycle number, total cycles, tokens used
Config
ModelConfig— Per-component model assignmentLimitsConfig— Max cycles, token budget, timeoutsLoggingConfig— Log level and output pathDeepPartial<T>— Deep partial utility type
