Interface TaskInterface

Base entity interface for all platform resources

All entities in the Mosaia platform extend this interface to provide consistent base properties across all resource types. This ensures that all entities have common fields for identification, status, and integration capabilities.

const entity: BaseEntity = {
id: 'entity-123',
active: true,
external_id: 'external-system-id',
extensors: {
custom_field: 'custom_value'
}
};
interface TaskInterface {
    record_history?: RecordHistory;
    id?: string;
    plan?: string | { id?: string; [key: string]: any };
    agent?: string | { id?: string; [key: string]: any };
    log?: string | { id?: string; [key: string]: any };
    parent_log?: string | { id?: string; [key: string]: any };
    org?: string | { id?: string; [key: string]: any };
    user?: string | { id?: string; [key: string]: any };
    dependencies?: string[];
    name?: string;
    content?: string;
    metadata?: {
        type?: string;
        priority?: number;
        tags?: string[];
        dependencies?: string[];
        [key: string]: any;
    };
    status?: TaskStatus;
    active?: boolean;
    keywords?: string[];
    tags?: string[];
    external_id?: string;
    attempt_count?: number;
    max_attempts?: number;
    failure_reason?: string;
    extensors?: Record<string, any>;
}

Hierarchy (View Summary)

Properties

record_history?: RecordHistory

Record history tracking information

id?: string

Unique identifier for the entity

plan?: string | { id?: string; [key: string]: any }

Parent plan reference (optional)

agent?: string | { id?: string; [key: string]: any }

Agent reference (optional)

log?: string | { id?: string; [key: string]: any }

Agent log reference for this task (optional)

parent_log?: string | { id?: string; [key: string]: any }

AgentLog reference when this task was created (optional)

org?: string | { id?: string; [key: string]: any }

Organization reference (optional)

user?: string | { id?: string; [key: string]: any }

User reference (optional)

dependencies?: string[]

Task IDs that must complete before this task can run

name?: string
content?: string

Markdown content defining the task (required on create)

metadata?: {
    type?: string;
    priority?: number;
    tags?: string[];
    dependencies?: string[];
    [key: string]: any;
}

Parsed metadata from markdown (type, priority, tags, dependencies)

status?: TaskStatus
active?: boolean

Whether the entity is active

keywords?: string[]
tags?: string[]
external_id?: string

External system identifier for integration with third-party systems

attempt_count?: number

Attempt count (failures); used with max_attempts

max_attempts?: number

Max attempts before marking FAILED

failure_reason?: string

Reason for last failure

extensors?: Record<string, any>

Extended properties for custom integrations