mahler
Version:
A automated task composer and HTN based planner for building autonomous system agents
29 lines (28 loc) • 913 B
TypeScript
import { Action } from '../task';
import type { Join, Fork } from '../dag';
import * as DAG from '../dag';
/**
* An action node defines an executable step of a plan
*/
export interface PlanAction<TState> extends DAG.Value {
/**
* Unique id for the node. This is calculated from the
* action metadata and the current runtime state expected
* by the planner. This is used for loop detection in the plan.
*/
readonly id: string;
/**
* The action to execute
*/
readonly action: Action<TState>;
}
export type PlanNode<TState> = PlanAction<TState> | Fork | Join;
declare function isPlanAction<TState>(n: DAG.Node): n is PlanAction<TState>;
export declare const PlanAction: {
/**
* Create a new Plan action node from a given action and a state
*/
from<TState>(s: TState, a: Action<TState>): PlanAction<TState>;
is: typeof isPlanAction;
};
export {};