noboxio/tj-python

Conversation Command Filtering

Opened this issue · 2 comments

Need to work on the syntax that pulls commands from the returned conversation text. Currently using ~ACTION but I am thinking we need to do something with the tag syntax
<tj action="LED">
or
<tj action="LED" color="RED"><tj action="SPEAK">TURN LIGHT ON, SPEAK THIS, AND THEN TURN LIGHT OFF></tj></tj>

That way actions can be triggered in the code that last a duration but the programmer doesn't actually have to know the duration of the inner action. And if another action is called it always trumps, basically how we have the treads working right now.

This would also allow for easy pulling of parameters and it not requiring text.

This could also be connected to the Python code by using the action text to make a (im not sure what it is called) but basically attempt to connect the text to a function inside of the program instead of using the large if then if then block to interpret the commands. This way the new commands will just work and they won't have to be added to the interpreter, it will attempt to run the command and if it can't then it says so or something.

THIS DOES OPEN THREATS we will need to make sure that certian methods cannot be called using this syntax such as direct system calls as processes, threads, subprocesses, etc. exit(), forks, etc. They will need to be limited to actions in the objects and not have access to the __METHOD__ methods as they should be "private"