Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions skills/rig/rig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,15 +476,25 @@ export function defineTool<T = unknown>(name: string, config: ToolConfig<T>): To
}

export type AgentSpec<Input extends Schema = StringSchema, Output extends Schema = StringSchema> = {
/** Human-readable name used in error messages and JSONL event logs. Defaults to `"agent"`. */
name?: string;
/** Natural-language task description rendered into the `<instructions>` prompt section. */
instructions?: string | PromptBuilder;
/** Schema describing the agent's input value. Defaults to `s.string`. */
input?: Input;
/** Schema describing the agent's expected output. The harness validates and retries until it matches. Defaults to `s.string`. */
output?: Output;
/** Model identifier passed to the engine, e.g. `"mini"`, `"gpt-5"`, `"claude-sonnet"`. Defaults to `"gpt-4.1"`. */
model?: string;
/** Maximum number of turns (initial + repair retries). Defaults to `4`. */
maxTurns?: number;
/** Middleware addons that wrap each turn's ask/response cycle, e.g. `repair`, `steering`. */
addons?: AgentAddon | AgentAddon[];
/** Named sub-agents available for delegation from this agent's prompt. */
agents?: Record<string, AgentFn<any, any>>;
/** Optional system message forwarded to the underlying engine session. */
systemMessage?: unknown;
/** Tool definitions exposed to the engine session for function-calling. */
tools?: Tool<any>[];
};
/** Internal normalized variant with a guaranteed resolved name. */
Expand Down
Loading