import type { ToolDefinition } from "@sheason/pi-coding-agent";
import { type Static, Type } from "typebox";
declare const childExtendsSchema: Type.TObject<{
    mcp: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TArray<Type.TString>]>>;
    sources: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TArray<Type.TString>]>>;
}>;
declare const nodeContainerExecutorSchema: Type.TObject<{
    id: Type.TString;
    type: Type.TLiteral<"node-container">;
    peerId: Type.TString;
    image: Type.TOptional<Type.TString>;
    command: Type.TArray<Type.TString>;
    env: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
    workdir: Type.TOptional<Type.TString>;
    containerName: Type.TOptional<Type.TString>;
}>;
declare const createChildSchema: Type.TObject<{
    mode: Type.TUnion<[Type.TLiteral<"spawn">, Type.TLiteral<"fork">]>;
    name: Type.TOptional<Type.TString>;
    description: Type.TOptional<Type.TString>;
    background: Type.TOptional<Type.TString>;
    instructions: Type.TOptional<Type.TString>;
    extends: Type.TOptional<Type.TObject<{
        mcp: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TArray<Type.TString>]>>;
        sources: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TArray<Type.TString>]>>;
    }>>;
    hubExecutor: Type.TOptional<Type.TUnion<[Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
    executors: Type.TOptional<Type.TArray<Type.TObject<{
        id: Type.TString;
        type: Type.TLiteral<"node-container">;
        peerId: Type.TString;
        image: Type.TOptional<Type.TString>;
        command: Type.TArray<Type.TString>;
        env: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
        workdir: Type.TOptional<Type.TString>;
        containerName: Type.TOptional<Type.TString>;
    }>>>;
    temporary: Type.TOptional<Type.TBoolean>;
    reportResult: Type.TOptional<Type.TBoolean>;
    model: Type.TOptional<Type.TObject<{
        provider: Type.TString;
        modelId: Type.TString;
    }>>;
}>;
declare const createTemporaryChildSchema: Type.TObject<{
    name: Type.TOptional<Type.TString>;
    description: Type.TOptional<Type.TString>;
    background: Type.TString;
    extends: Type.TOptional<Type.TObject<{
        mcp: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TArray<Type.TString>]>>;
        sources: Type.TOptional<Type.TUnion<[Type.TLiteral<true>, Type.TArray<Type.TString>]>>;
    }>>;
    reportResult: Type.TOptional<Type.TBoolean>;
    model: Type.TOptional<Type.TObject<{
        provider: Type.TString;
        modelId: Type.TString;
    }>>;
}>;
declare const createGuestAgentSchema: Type.TObject<{
    name: Type.TOptional<Type.TString>;
    description: Type.TOptional<Type.TString>;
}>;
declare const childLifecycleSchema: Type.TObject<{
    agentId: Type.TString;
}>;
declare const modifyChildSchema: Type.TObject<{
    action: Type.TUnion<[Type.TLiteral<"update">, Type.TLiteral<"rename">, Type.TLiteral<"stop">, Type.TLiteral<"start">, Type.TLiteral<"remove">]>;
    agentId: Type.TString;
    newAgentId: Type.TOptional<Type.TString>;
    name: Type.TOptional<Type.TString>;
    description: Type.TOptional<Type.TString>;
    hubExecutor: Type.TOptional<Type.TUnion<[Type.TLiteral<"enabled">, Type.TLiteral<"disabled">]>>;
    executors: Type.TOptional<Type.TArray<Type.TObject<{
        id: Type.TString;
        type: Type.TLiteral<"node-container">;
        peerId: Type.TString;
        image: Type.TOptional<Type.TString>;
        command: Type.TArray<Type.TString>;
        env: Type.TOptional<Type.TRecord<"^.*$", Type.TString>>;
        workdir: Type.TOptional<Type.TString>;
        containerName: Type.TOptional<Type.TString>;
    }>>>;
    deleteFiles: Type.TOptional<Type.TBoolean>;
}>;
declare const searchMemorySchema: Type.TObject<{
    query: Type.TString;
    agentId: Type.TOptional<Type.TString>;
    limit: Type.TOptional<Type.TNumber>;
    includeToolResults: Type.TOptional<Type.TBoolean>;
}>;
declare const listMemorySchema: Type.TObject<{
    memoryIds: Type.TArray<Type.TString>;
    contextBefore: Type.TOptional<Type.TNumber>;
    contextAfter: Type.TOptional<Type.TNumber>;
}>;
export type ChildResourceExtends = Static<typeof childExtendsSchema> | undefined;
export type SpawnChildToolInput = {
    name?: string;
    description?: string;
    background: string;
    extends?: ChildResourceExtends;
    temporary?: boolean;
    reportResult?: boolean;
    hubExecutor?: "enabled" | "disabled";
    executors?: Static<typeof nodeContainerExecutorSchema>[];
    model?: {
        provider: string;
        modelId: string;
    };
};
export type ForkChildToolInput = {
    name?: string;
    description?: string;
    instructions?: string;
    extends?: ChildResourceExtends;
    hubExecutor?: "enabled" | "disabled";
    executors?: Static<typeof nodeContainerExecutorSchema>[];
    model?: {
        provider: string;
        modelId: string;
    };
};
export type CreateChildToolInput = Static<typeof createChildSchema>;
export type CreateGuestAgentToolInput = Static<typeof createGuestAgentSchema>;
export type CreateTemporaryChildToolInput = Static<typeof createTemporaryChildSchema>;
export type UpdateChildToolInput = Static<typeof modifyChildSchema>;
export type RenameChildToolInput = Static<typeof modifyChildSchema>;
export type StopChildToolInput = Static<typeof childLifecycleSchema>;
export type StartChildToolInput = Static<typeof childLifecycleSchema>;
export type RemoveChildToolInput = {
    agentId: string;
    deleteFiles?: boolean;
};
export type ModifyChildToolInput = Static<typeof modifyChildSchema>;
export type SearchMemoryToolInput = Static<typeof searchMemorySchema>;
export type ListMemoryToolInput = Static<typeof listMemorySchema>;
/**
 * Host surface (implemented by `HubRuntime`) for main-only child management tools. Kept as an interface to avoid
 * circular runtime imports in tool executors.
 */
export interface ChildAgentToolHost {
    createChildAgent(callerAgentId: string, input: CreateChildToolInput): Promise<string>;
    createGuestAgent(callerAgentId: string, input: CreateGuestAgentToolInput): Promise<string>;
    createTemporaryChildAgent(callerAgentId: string, input: CreateTemporaryChildToolInput): Promise<string>;
    updateChildAgent(callerAgentId: string, input: UpdateChildToolInput): Promise<string>;
    renameChildAgent(callerAgentId: string, input: RenameChildToolInput): Promise<string>;
    stopChildAgent(callerAgentId: string, input: StopChildToolInput): Promise<string>;
    startChildAgent(callerAgentId: string, input: StartChildToolInput): Promise<string>;
    removeChildAgent(callerAgentId: string, input: RemoveChildToolInput): Promise<string>;
    searchMemoryText(callerAgentId: string, input: SearchMemoryToolInput): Promise<string>;
    listMemoryText(callerAgentId: string, input: ListMemoryToolInput): Promise<string>;
}
export declare function createChildAgentToolDefinitions(getHost: () => ChildAgentToolHost, callerAgentId: string): ToolDefinition[];
export {};
//# sourceMappingURL=child-agent-tools.d.ts.map