UNPKG

mahler

Version:

A automated task composer and HTN based planner for building autonomous system agents

40 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Instruction = exports.Action = exports.Method = exports.MethodExpansion = void 0; exports.MethodExpansion = { SEQUENTIAL: 'sequential', DETECT: 'detect', }; /** * Check if an instruction is a method */ function isMethod(t) { return (t.condition != null && typeof t.condition === 'function' && typeof t === 'function' && t._tag === 'method'); } /** * Check if an instruction is an action */ function isAction(t) { return (t.condition != null && typeof t.condition === 'function' && typeof t === 'function' && t._tag === 'action'); } function isEqual(i1, i2) { return i1.id === i2.id && i1.path === i2.path && i1.target === i2.target; } exports.Method = { is: isMethod, equals: isEqual, }; exports.Action = { is: isAction, equals: isEqual, }; exports.Instruction = { equals: isEqual, }; //# sourceMappingURL=instructions.js.map