{"version":3,"file":"schema.d.cts","names":["JSONSchema7","Optional","T","RunStatus","ThreadStatus","MultitaskStrategy","CancelAction","Config","GraphSchema","Subgraphs","Record","Metadata","AssistantBase","AssistantVersion","Assistant","AssistantGraph","Array","Interrupt","TValue","Thread","DefaultValues","ValuesType","Cron","ThreadState","Checkpoint","ThreadTask","Run","ListNamespaceResponse","Item","SearchItem","SearchItemsResponse","CronCreateResponse","CronCreateForThreadResponse","Omit","AssistantSortBy","ThreadSortBy","CronSortBy","SortOrder","AssistantSelectField","ThreadSelectField","RunSelectField","CronSelectField"],"sources":["../src/schema.d.ts"],"sourcesContent":["import type { JSONSchema7 } from \"json-schema\";\ntype Optional<T> = T | null | undefined;\nexport type RunStatus = \"pending\" | \"running\" | \"error\" | \"success\" | \"timeout\" | \"interrupted\";\nexport type ThreadStatus = \"idle\" | \"busy\" | \"interrupted\" | \"error\";\ntype MultitaskStrategy = \"reject\" | \"interrupt\" | \"rollback\" | \"enqueue\";\nexport type CancelAction = \"interrupt\" | \"rollback\";\nexport type Config = {\n    /**\n     * Tags for this call and any sub-calls (eg. a Chain calling an LLM).\n     * You can use these to filter calls.\n     */\n    tags?: string[];\n    /**\n     * Maximum number of times a call can recurse.\n     * If not provided, defaults to 25.\n     */\n    recursion_limit?: number;\n    /**\n     * Runtime values for attributes previously made configurable on this Runnable.\n     */\n    configurable?: {\n        /**\n         * ID of the thread\n         */\n        thread_id?: Optional<string>;\n        /**\n         * Timestamp of the state checkpoint\n         */\n        checkpoint_id?: Optional<string>;\n        [key: string]: unknown;\n    };\n};\nexport interface GraphSchema {\n    /**\n     * The ID of the graph.\n     */\n    graph_id: string;\n    /**\n     * The schema for the input state.\n     * Missing if unable to generate JSON schema from graph.\n     */\n    input_schema?: JSONSchema7 | null | undefined;\n    /**\n     * The schema for the output state.\n     * Missing if unable to generate JSON schema from graph.\n     */\n    output_schema?: JSONSchema7 | null | undefined;\n    /**\n     * The schema for the graph state.\n     * Missing if unable to generate JSON schema from graph.\n     */\n    state_schema?: JSONSchema7 | null | undefined;\n    /**\n     * The schema for the graph config.\n     * Missing if unable to generate JSON schema from graph.\n     */\n    config_schema?: JSONSchema7 | null | undefined;\n    /**\n     * The schema for the graph context.\n     * Missing if unable to generate JSON schema from graph.\n     */\n    context_schema?: JSONSchema7 | null | undefined;\n}\nexport type Subgraphs = Record<string, GraphSchema>;\nexport type Metadata = Optional<{\n    source?: \"input\" | \"loop\" | \"update\" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types\n    step?: number;\n    writes?: Record<string, unknown> | null;\n    parents?: Record<string, string>;\n    [key: string]: unknown;\n}>;\nexport interface AssistantBase {\n    /** The ID of the assistant. */\n    assistant_id: string;\n    /** The ID of the graph. */\n    graph_id: string;\n    /** The assistant config. */\n    config: Config;\n    /** The assistant context. */\n    context: unknown;\n    /** The time the assistant was created. */\n    created_at: string;\n    /** The assistant metadata. */\n    metadata: Metadata;\n    /** The version of the assistant. */\n    version: number;\n    /** The name of the assistant */\n    name: string;\n    /** The description of the assistant */\n    description?: string;\n}\nexport interface AssistantVersion extends AssistantBase {\n}\nexport interface Assistant extends AssistantBase {\n    /** The last time the assistant was updated. */\n    updated_at: string;\n}\nexport interface AssistantGraph {\n    nodes: Array<{\n        id: string | number;\n        name?: string;\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        data?: Record<string, any> | string;\n        metadata?: unknown;\n    }>;\n    edges: Array<{\n        source: string;\n        target: string;\n        data?: string;\n        conditional?: boolean;\n    }>;\n}\n/**\n * An interrupt thrown inside a thread.\n */\nexport interface Interrupt<TValue = unknown> {\n    /**\n     * The ID of the interrupt.\n     */\n    id?: string;\n    /**\n     * The value of the interrupt.\n     */\n    value?: TValue;\n    /**\n     * Will be deprecated in the future.\n     * @deprecated Will be removed in the future.\n     */\n    when?: \"during\" | (string & {}); // eslint-disable-line @typescript-eslint/ban-types\n    /**\n     * Whether the interrupt can be resumed.\n     * @deprecated Will be removed in the future.\n     */\n    resumable?: boolean;\n    /**\n     * The namespace of the interrupt.\n     * @deprecated Replaced by `interrupt_id`\n     */\n    ns?: string[];\n}\nexport interface Thread<ValuesType = DefaultValues> {\n    /** The ID of the thread. */\n    thread_id: string;\n    /** The time the thread was created. */\n    created_at: string;\n    /** The last time the thread was updated. */\n    updated_at: string;\n    /** The thread metadata. */\n    metadata: Metadata;\n    /** The status of the thread */\n    status: ThreadStatus;\n    /** The current state of the thread. */\n    values: ValuesType;\n    /** Interrupts which were thrown in this thread */\n    interrupts: Record<string, Array<Interrupt>>;\n}\nexport interface Cron {\n    /** The ID of the cron */\n    cron_id: string;\n    /** The ID of the assistant */\n    assistant_id: string;\n    /** The ID of the thread */\n    thread_id: Optional<string>;\n    /** The end date to stop running the cron. */\n    end_time: Optional<string>;\n    /** The schedule to run, cron format. */\n    schedule: string;\n    /** The time the cron was created. */\n    created_at: string;\n    /** The last time the cron was updated. */\n    updated_at: string;\n    /** The run payload to use for creating new run. */\n    payload: Record<string, unknown>;\n    /** The user ID of the cron */\n    user_id: Optional<string>;\n    /** The next run date of the cron */\n    next_run_date: Optional<string>;\n    /** The metadata of the cron */\n    metadata: Record<string, unknown>;\n}\nexport type DefaultValues = Record<string, unknown>[] | Record<string, unknown>;\nexport interface ThreadState<ValuesType = DefaultValues> {\n    /** The state values */\n    values: ValuesType;\n    /** The next nodes to execute. If empty, the thread is done until new input is received */\n    next: string[];\n    /** Checkpoint of the thread state */\n    checkpoint: Checkpoint;\n    /** Metadata for this state */\n    metadata: Metadata;\n    /** Time of state creation  */\n    created_at: Optional<string>;\n    /** The parent checkpoint. If missing, this is the root checkpoint */\n    parent_checkpoint: Optional<Checkpoint>;\n    /** Tasks to execute in this step. If already attempted, may contain an error */\n    tasks: Array<ThreadTask>;\n}\nexport interface ThreadTask {\n    id: string;\n    name: string;\n    result?: unknown;\n    error: Optional<string>;\n    interrupts: Array<Interrupt>;\n    checkpoint: Optional<Checkpoint>;\n    state: Optional<ThreadState>;\n}\nexport interface Run {\n    /** The ID of the run */\n    run_id: string;\n    /** The ID of the thread */\n    thread_id: string;\n    /** The assistant that wwas used for this run */\n    assistant_id: string;\n    /** The time the run was created */\n    created_at: string;\n    /** The last time the run was updated */\n    updated_at: string;\n    /** The status of the run. */\n    status: RunStatus;\n    /** Run metadata */\n    metadata: Metadata;\n    /** Strategy to handle concurrent runs on the same thread */\n    multitask_strategy: Optional<MultitaskStrategy>;\n}\nexport type Checkpoint = {\n    thread_id: string;\n    checkpoint_ns: string;\n    checkpoint_id: Optional<string>;\n    checkpoint_map: Optional<Record<string, unknown>>;\n};\nexport interface ListNamespaceResponse {\n    namespaces: string[][];\n}\nexport interface Item {\n    namespace: string[];\n    key: string;\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    value: Record<string, any>;\n    createdAt: string;\n    updatedAt: string;\n}\nexport interface SearchItem extends Item {\n    score?: number;\n}\nexport interface SearchItemsResponse {\n    items: SearchItem[];\n}\nexport interface CronCreateResponse {\n    cron_id: string;\n    assistant_id: string;\n    thread_id: string | undefined;\n    user_id: string;\n    payload: Record<string, unknown>;\n    schedule: string;\n    next_run_date: string;\n    end_time: string | undefined;\n    created_at: string;\n    updated_at: string;\n    metadata: Metadata;\n}\nexport interface CronCreateForThreadResponse extends Omit<CronCreateResponse, \"thread_id\"> {\n    thread_id: string;\n}\nexport type AssistantSortBy = \"assistant_id\" | \"graph_id\" | \"name\" | \"created_at\" | \"updated_at\";\nexport type ThreadSortBy = \"thread_id\" | \"status\" | \"created_at\" | \"updated_at\";\nexport type CronSortBy = \"cron_id\" | \"assistant_id\" | \"thread_id\" | \"created_at\" | \"updated_at\" | \"next_run_date\";\nexport type SortOrder = \"asc\" | \"desc\";\n// Select field aliases for client-side typing of `select` parameters.\n// These mirror the server's allowed field sets.\nexport type AssistantSelectField = \"assistant_id\" | \"graph_id\" | \"name\" | \"description\" | \"config\" | \"context\" | \"created_at\" | \"updated_at\" | \"metadata\" | \"version\";\nexport type ThreadSelectField = \"thread_id\" | \"created_at\" | \"updated_at\" | \"metadata\" | \"config\" | \"context\" | \"status\" | \"values\" | \"interrupts\";\nexport type RunSelectField = \"run_id\" | \"thread_id\" | \"assistant_id\" | \"created_at\" | \"updated_at\" | \"status\" | \"metadata\" | \"kwargs\" | \"multitask_strategy\";\nexport type CronSelectField = \"cron_id\" | \"assistant_id\" | \"thread_id\" | \"end_time\" | \"schedule\" | \"created_at\" | \"updated_at\" | \"user_id\" | \"payload\" | \"next_run_date\" | \"metadata\" | \"now\";\nexport {};\n"],"mappings":";;;KACKC,cAAcC;KACPC,SAAAA;AADPF,KAEOG,YAAAA,GAFOF,MAAAA,GAAAA,MAAAA,GAAAA,aAAAA,GAAAA,OAAAA;AACnB,KAEKG,iBAAAA,GAFgB,QAAA,GAAA,WAAA,GAAA,UAAA,GAAA,SAAA;AACTD,KAEAE,YAAAA,GAFY,WAAA,GAAA,UAAA;AACnBD,KAEOE,MAAAA,GAFPF;EACOC;AACZ;;;MAsBwBL,CAAAA,EAAAA,MAAAA,EAAAA;;AAIxB;;;iBAcoBD,CAAAA,EAAAA,MAAAA;;;;;IAiBRS;;;IAAYC,SAAAA,CAAAA,EAvCJT,QAuCIS,CAAAA,MAAAA,CAAAA;;AACxB;;IAGaA,aAAAA,CAAAA,EAvCWT,QAuCXS,CAAAA,MAAAA,CAAAA;IACCA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;;;AAGGE,UAvCAJ,WAAAA,CAuCa;EAAA;;;;EAoBbK;AAEjB;AAIA;;cAKeH,CAAAA,EA7DIV,WA6DJU,GAAAA,IAAAA,GAAAA,SAAAA;;;;AAaf;EAyBiBS,aAAM,CAAA,EA9FHnB,WA8FG,GAAA,IAAA,GAAA,SAAA;EAAA;;;;cAYXqB,CAAAA,EArGOrB,WAqGPqB,GAAAA,IAAAA,GAAAA,SAAAA;;;;;EAIKC,aAAI,CAAA,EApGDtB,WAoGC,GAAA,IAAA,GAAA,SAAA;EAAA;;;;gBAkBRC,CAAAA,EAjHQD,WAiHRC,GA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