Interface SelfImprovementToolDeps

Dependencies required to construct the four self-improvement tools.

Callers provide runtime hooks for personality access, skill management, tool execution, and optional memory storage. The engine uses these to wire each tool without hard-coupling to specific service implementations.

interface SelfImprovementToolDeps {
    getPersonality: (() => Record<string, number>);
    setPersonality: ((trait, value) => void);
    mutationStore?: PersonalityMutationStore;
    getActiveSkills: ((context?) => {
        skillId: string;
        name: string;
        category: string;
    }[]);
    getLockedSkills: (() => string[]);
    loadSkill: ((id, context?) => Promise<{
        skillId: string;
        name: string;
        category: string;
    }>);
    unloadSkill: ((id, context?) => void);
    searchSkills: ((query, context?) => {
        skillId: string;
        name: string;
        category: string;
        description: string;
    }[]);
    executeTool: ((name, args, context?) => Promise<unknown>);
    listTools: (() => string[]);
    storeMemory?: ((trace) => Promise<void>);
    getSessionParam?: ((param, context) => unknown);
    setSessionParam?: ((param, value, context) => void);
}

Properties

getPersonality: (() => Record<string, number>)

Returns the current HEXACO personality trait values as a trait→value map.

Type declaration

    • (): Record<string, number>
    • Returns Record<string, number>

setPersonality: ((trait, value) => void)

Sets a single HEXACO personality trait to the given value (already clamped).

Type declaration

    • (trait, value): void
    • Parameters

      • trait: string
      • value: number

      Returns void

mutationStore?: PersonalityMutationStore

Durable store for personality mutations (used by AdaptPersonalityTool for persistence).

getActiveSkills: ((context?) => {
    skillId: string;
    name: string;
    category: string;
}[])

Returns the agent's currently active skills.

Type declaration

    • (context?): {
          skillId: string;
          name: string;
          category: string;
      }[]
    • Parameters

      Returns {
          skillId: string;
          name: string;
          category: string;
      }[]

getLockedSkills: (() => string[])

Returns skill IDs that may not be disabled (core skills).

Type declaration

    • (): string[]
    • Returns string[]

loadSkill: ((id, context?) => Promise<{
    skillId: string;
    name: string;
    category: string;
}>)

Dynamically loads a skill by ID and returns its metadata.

Type declaration

    • (id, context?): Promise<{
          skillId: string;
          name: string;
          category: string;
      }>
    • Parameters

      Returns Promise<{
          skillId: string;
          name: string;
          category: string;
      }>

unloadSkill: ((id, context?) => void)

Unloads (disables) a previously loaded skill.

Type declaration

searchSkills: ((query, context?) => {
    skillId: string;
    name: string;
    category: string;
    description: string;
}[])

Searches the skill registry by query string, returning matching skill metadata.

Type declaration

    • (query, context?): {
          skillId: string;
          name: string;
          category: string;
          description: string;
      }[]
    • Parameters

      Returns {
          skillId: string;
          name: string;
          category: string;
          description: string;
      }[]

executeTool: ((name, args, context?) => Promise<unknown>)

Executes a registered tool by name with the given arguments.

Type declaration

    • (name, args, context?): Promise<unknown>
    • Parameters

      Returns Promise<unknown>

listTools: (() => string[])

Returns the names of all currently registered tools.

Type declaration

    • (): string[]
    • Returns string[]

storeMemory?: ((trace) => Promise<void>)

Optional callback for persisting self-improvement trace memories.

Type declaration

    • (trace): Promise<void>
    • Parameters

      • trace: {
            type: string;
            scope: string;
            content: string;
            tags: string[];
        }
        • type: string
        • scope: string
        • content: string
        • tags: string[]

      Returns Promise<void>

getSessionParam?: ((param, context) => unknown)

Optional host-level getter for session-scoped runtime params such as temperature.

Type declaration

setSessionParam?: ((param, value, context) => void)

Optional host-level setter for session-scoped runtime params such as temperature.

Type declaration

    • (param, value, context): void
    • Parameters

      Returns void