# Path: opencenteragent/utils.py
# def detailed_exception():
#     exc_type, exc_value, exc_traceback = sys.exc_info()
#     full_traceback = repr(
#         traceback.format_exception(
#             exc_type, exc_value, exc_traceback))
# 
#     return full_traceback


import base64
import json
import logging
import os
import random
import time
from opencenteragent.utils import detailed_exception
from opencenterclient.client import OpenCenterEndpoint
from state import StateMachine, StateMachineState
from primitives import OrchestratorTasks
    if not adventure_dsl:
        return _retval(1,
                       friendly_str='must specify adventure or adventure_dsl')

    if not 'nodes' in payload:
        return _retval(1, friendly_str='no "nodes" list in request')

    if 'initial_state' in payload:
        initial_state = payload['initial_state']
    else:
        initial_state = {}

    if not 'nodes' in initial_state:
        initial_state['nodes'] = payload['nodes']

    adv_globals = []
    if 'globals' in payload:
        adv_globals = payload['globals']

    LOG.debug('using globals %s' % adv_globals)

    ns = {}
    ns['LOG'] = LOG
    ns['StateMachine'] = StateMachine
    ns['StateMachineState'] = StateMachineState
    ns['tasks'] = OrchestratorTasks(endpoint=endpoint,
                                    parent_task_id=parent_id,
                                    adventure_globals=adv_globals)
    ns['input_data'] = initial_state
    ns['result_str'] = 'fail'

# Path: opencenteragent/utils.py
# def detailed_exception():
#     exc_type, exc_value, exc_traceback = sys.exc_info()
#     full_traceback = repr(
#         traceback.format_exception(
#             exc_type, exc_value, exc_traceback))
# 
#     return full_traceback


# Path: opencenteragent/plugins/output/plugin_adventurator.py
import base64
import json
import logging
import os
import random
import time
from opencenteragent.utils import detailed_exception
from opencenterclient.client import OpenCenterEndpoint
from state import StateMachine, StateMachineState
from primitives import OrchestratorTasks

    if not adventure_dsl:
        return _retval(1,
                       friendly_str='must specify adventure or adventure_dsl')

    if not 'nodes' in payload:
        return _retval(1, friendly_str='no "nodes" list in request')

    if 'initial_state' in payload:
        initial_state = payload['initial_state']
    else:
        initial_state = {}

    if not 'nodes' in initial_state:
        initial_state['nodes'] = payload['nodes']

    adv_globals = []
    if 'globals' in payload:
        adv_globals = payload['globals']

    LOG.debug('using globals %s' % adv_globals)

    ns = {}
    ns['LOG'] = LOG
    ns['StateMachine'] = StateMachine
    ns['StateMachineState'] = StateMachineState
    ns['tasks'] = OrchestratorTasks(endpoint=endpoint,
                                    parent_task_id=parent_id,
                                    adventure_globals=adv_globals)
    ns['input_data'] = initial_state
    ns['result_str'] = 'fail'

    ns['result_code'] = 254