balena-io-modules / mahler

A automated task composer and HTN based planner for building autonomous system agents.
Apache License 2.0
7 stars 1 forks source link

Refactor agent, split into multiple files #7

Closed pipex closed 1 year ago

pipex commented 1 year ago

This moves the runtime behavior of the agent to a Runtime class, now under lib/agent/runtime.ts, making the code easier to read. The agent interface definition is now under lib/agent/index.ts

This also modifies the behavior of the agent from polling to being influenced by sensors. Configuring an agent with follow true, means that new state changes coming from sensors will trigger re-plans to check if the state has gone off-target.

Change-type: minor

pipex commented 1 year ago

I self-certify!