@@ -990,11 +990,11 @@ def to_json(self, base_path: Path):
990990 )
991991 if code_file .exists ():
992992 code = code_file .read_bytes ().decode ()
993- #code = base64.b64encode(code).decode()
993+ # code = base64.b64encode(code).decode()
994994 return {"script" : code , "name" : self .script_name , "author" : self .author }
995995 elif Path (self .script_name ).exists ():
996996 code = Path (self .script_name ).read_bytes ().decode ()
997- #code = base64.b64encode(code).decode()
997+ # code = base64.b64encode(code).decode()
998998 return {"script" : code , "name" : self .script_name , "author" : self .author }
999999 else :
10001000 raise Exception (
@@ -1290,6 +1290,35 @@ def __str__(self):
12901290 return json .dumps (self .to_json (), sort_keys = True , indent = 2 )
12911291
12921292
1293+ InteractiveMessageType = {
1294+ 0 : ("Input" , 0 ),
1295+ 1 : ("Output" , 1 ),
1296+ 2 : ("Error" , 2 ),
1297+ 3 : ("Exit" , 3 ),
1298+ 4 : ("^[" , 0x1B ),
1299+ 5 : ("^A" , 0x01 ),
1300+ 6 : ("^B" , 0x02 ),
1301+ 7 : ("^C" , 0x03 ),
1302+ 8 : ("^D" , 0x04 ),
1303+ 9 : ("^E" , 0x05 ),
1304+ 10 : ("^F" , 0x06 ),
1305+ 11 : ("^G" , 0x07 ),
1306+ 12 : ("^H" , 0x08 ),
1307+ 13 : ("^I" , 0x09 ),
1308+ 14 : ("^K" , 0x0B ),
1309+ 15 : ("^L" , 0x0C ),
1310+ 16 : ("^N" , 0x0E ),
1311+ 17 : ("^P" , 0x10 ),
1312+ 18 : ("^Q" , 0x11 ),
1313+ 19 : ("^R" , 0x12 ),
1314+ 20 : ("^S" , 0x13 ),
1315+ 21 : ("^U" , 0x15 ),
1316+ 22 : ("^W" , 0x17 ),
1317+ 23 : ("^Y" , 0x19 ),
1318+ 24 : ("^Z" , 0x1A )
1319+ }
1320+
1321+
12931322class PTTaskMessageTaskData :
12941323 """A container for all information about a task.
12951324
@@ -1334,6 +1363,7 @@ class PTTaskMessageTaskData:
13341363 Functions:
13351364 to_json(self): return dictionary form of class
13361365 """
1366+
13371367 def __init__ (self ,
13381368 id : int = 0 ,
13391369 display_id : int = 0 ,
@@ -1369,6 +1399,9 @@ def __init__(self,
13691399 tasking_location : str = "" ,
13701400 parameter_group_name : str = "" ,
13711401 token_id : int = None ,
1402+ response_count : int = None ,
1403+ is_interactive_task : bool = None ,
1404+ interactive_task_type : int = None ,
13721405 ** kwargs ):
13731406 self .ID = id
13741407 self .DisplayID = display_id
@@ -1406,6 +1439,9 @@ def __init__(self,
14061439 self .TokenID = token_id
14071440 if self .TokenID is not None and self .TokenID <= 0 :
14081441 self .TokenID = None
1442+ self .ResponseCount = response_count
1443+ self .IsInteractiveTask = is_interactive_task
1444+ self .InteractiveTaskType = interactive_task_type
14091445
14101446 def to_json (self ):
14111447 return {
@@ -1443,6 +1479,9 @@ def to_json(self):
14431479 "tasking_location" : self .TaskingLocation ,
14441480 "parameter_group_name" : self .ParameterGroupName ,
14451481 "token_id" : self .TokenID ,
1482+ "response_count" : self .ResponseCount ,
1483+ "is_interactive_task" : self .IsInteractiveTask ,
1484+ "interactive_task_type" : self .InteractiveTaskType
14461485 }
14471486
14481487 def __str__ (self ):
@@ -1487,6 +1526,7 @@ class PTTaskMessageCallbackData:
14871526 Functions:
14881527 to_json(self): return dictionary form of class
14891528 """
1529+
14901530 def __init__ (self ,
14911531 id : int = 0 ,
14921532 display_id : int = 0 ,
@@ -1599,6 +1639,7 @@ class PTTaskMessagePayloadData:
15991639 Functions:
16001640 to_json(self): return dictionary form of class
16011641 """
1642+
16021643 def __init__ (self ,
16031644 os : str = "" ,
16041645 uuid : str = "" ,
@@ -1758,6 +1799,7 @@ class PTOnNewCallbackResponse:
17581799 Functions:
17591800 to_json(self): return dictionary form of class
17601801 """
1802+
17611803 def __init__ (self ,
17621804 AgentCallbackID : str ,
17631805 Success : bool = True ,
@@ -1843,6 +1885,7 @@ class PTTaskCompletionFunctionMessageResponse:
18431885 Functions:
18441886 to_json(self): return dictionary form of class
18451887 """
1888+
18461889 def __init__ (self ,
18471890 TaskID : int = 0 ,
18481891 ParentTaskId : int = 0 ,
@@ -1909,6 +1952,7 @@ class PTTaskProcessResponseMessageResponse:
19091952 Functions:
19101953 to_json(self): return dictionary form of class
19111954 """
1955+
19121956 def __init__ (self ,
19131957 TaskID : int ,
19141958 Success : bool = True ,
0 commit comments