MCPcopy Create free account

hub / github.com/Vasco0x4/Neo-AI / functions

Functions93 in github.com/Vasco0x4/Neo-AI

↓ 5 callersMethodget_valid_access_token
(self)
src/token_manager.py:83
↓ 5 callersMethodregister_handler
Register a protocol handler. Args: handler: Protocol handler to register
src/mcp_protocol/registry.py:46
↓ 5 callersMethodrun
Run the interactive terminal UI.
src/terminal_ui.py:160
↓ 4 callersMethod_is_terminal_running
Check if the terminal process is still running.
src/command_executor.py:81
↓ 4 callersMethod_is_token_expired
(self, token)
src/token_manager.py:53
↓ 4 callersMethodrequest_approval
Request approval for command execution with bash-style prompt UI. Args: command (str): Command to be approved R
src/approval_handler.py:30
↓ 2 callersMethod_initialize_fallback
Initialize a fallback terminal method.
src/command_executor.py:218
↓ 2 callersMethod_process_response
Process the AI response and handle MCP protocol commands. This replaces the old system tag processing with the new MCP protocol.
src/ai_core.py:251
↓ 2 callersMethod_query_digitalocean
(self, prompt, clear_thinking=False)
src/ai_core.py:134
↓ 2 callersMethod_query_lm_studio
(self, prompt, clear_thinking=False)
src/ai_core.py:97
↓ 2 callersMethod_request
(self, method, endpoint, headers=None, params=None, data=None)
src/token_manager.py:19
↓ 2 callersMethodget_conversation_history
(self)
src/ai_core.py:310
↓ 2 callersMethodparse_mcp_tags
Parse all MCP protocol tags in the provided text. Args: text: The text to parse for MCP tags Returns:
src/mcp_protocol/core.py:34
↓ 2 callersMethodprint_banner
Print Neo AI welcome banner.
src/terminal_ui.py:88
↓ 2 callersMethodquery
(self, prompt, clear_thinking=False)
src/ai_core.py:231
↓ 1 callersMethod_detect_terminal_type
Detect the available terminal emulator.
src/command_executor.py:53
↓ 1 callersMethod_ensure_valid_token
Check that the token is still valid and renew it if necessary
src/ai_core.py:56
↓ 1 callersMethod_get_access_token
(self, refresh_token)
src/token_manager.py:43
↓ 1 callersMethod_get_refresh_token
(self)
src/token_manager.py:34
↓ 1 callersMethod_initialize_terminal
Initialize the persistent terminal if not already running.
src/command_executor.py:107
↓ 1 callersMethod_load_tokens_from_cache
(self)
src/token_manager.py:64
↓ 1 callersMethod_save_tokens_to_cache
(self, access_token, refresh_token)
src/token_manager.py:79
↓ 1 callersMethoddetect_interactive_command
Detect if a command is likely to be interactive. Args: command (str): Command to check Returns: boo
src/interactive_commands.py:152
↓ 1 callersMethoddisplay_history
Display conversation history with improved formatting.
src/terminal_ui.py:132
↓ 1 callersMethoddisplay_history
(self)
src/terminal_interface.py:37
↓ 1 callersFunctionexecute_command
Execute a command and return its output. Args: command (str): Command to execute Returns: str: Command output or
src/command_executor.py:384
↓ 1 callersMethodexecute_command
Execute a command in the persistent terminal. Args: command (str): Command to execute Returns:
src/command_executor.py:264
↓ 1 callersFunctionexecute_command_in_terminal
Execute a command in the persistent terminal. Args: command (str): Command to execute Returns: str: Path to the
src/command_executor.py:426
↓ 1 callersMethodformat_ai_response
Format AI responses for better readability.
src/terminal_ui.py:112
↓ 1 callersMethodformat_command
Format a command for display.
src/command_display.py:38
↓ 1 callersMethodformat_output
Format command output with syntax highlighting.
src/command_display.py:42
↓ 1 callersMethodget_handler
Get a protocol handler by name. Args: protocol_name: Name of the protocol Returns: Protocol handler
src/mcp_protocol/registry.py:61
↓ 1 callersMethodhandle
Handle a protocol command. Args: content: Command content require_approval: Whether approval is required
src/mcp_protocol/registry.py:24
↓ 1 callersMethodhas_handler
Check if a handler exists for a protocol. Args: protocol_name: Name of the protocol Returns: True i
src/mcp_protocol/registry.py:79
↓ 1 callersMethodinitialize_context
(self)
src/ai_core.py:81
↓ 1 callersFunctionload_config
Load configuration from config.yaml file.
main.py:21
↓ 1 callersFunctionload_persistent_memory
Load persistent memory from file. Creates a new file with system information if it doesn't exist. Returns: str: Contents of
src/utils.py:6
↓ 1 callersFunctionmain
Main entry point for Neo AI.
main.py:41
↓ 1 callersFunctionparse_arguments
Parse command line arguments.
main.py:33
↓ 1 callersMethodprint_help
Display help menu.
src/terminal_ui.py:95
↓ 1 callersMethodprocess_response
Process a response text containing MCP tags. Args: response: Text containing MCP protocol tags require_appro
src/mcp_protocol/core.py:60
↓ 1 callersFunctionregister_all_protocols
Register all available protocol handlers.
src/mcp_protocol/__init__.py:28
↓ 1 callersMethodrun_interactive_command
Run an interactive command. Args: command (str): Command to execute initial_inputs (list): List of inputs to
src/interactive_commands.py:81
↓ 1 callersFunctionwait_for_command_completion
Wait for a command to complete and read its output. Args: temp_file (str): Path to the output file Returns: str:
src/command_executor.py:438
↓ 1 callersMethodwait_for_command_completion
Wait for the command to complete by checking for the lock file. Returns: str: Command output
src/command_executor.py:340
Function_
(event)
src/terminal_ui.py:33
Method__init__
Initialize approval handler with settings.
src/approval_handler.py:25
Method__init__
Initialize the command display handler.
src/command_display.py:27
Method__init__
Initialize the terminal UI with Neo AI instance and config.
src/terminal_ui.py:43
Method__init__
Initialize the persistent terminal executor.
src/command_executor.py:19
Method__init__
(self, neo_ai, config)
src/terminal_interface.py:4
Method__init__
(self, config)
src/ai_core.py:29
Method__init__
(self, agent_id, agent_key, auth_api_url)
src/token_manager.py:11
Method__init__
(self)
src/interactive_commands.py:26
Method__init__
Initialize the MCP protocol handler.
src/mcp_protocol/core.py:20
Method__init__
Initialize a protocol handler. Args: name: Name of the protocol
src/mcp_protocol/registry.py:15
Method__init__
Initialize the protocol registry.
src/mcp_protocol/registry.py:42
Method__init__
Initialize the network protocol handler.
src/mcp_protocol/handlers/network_protocol.py:25
Method__init__
Initialize the terminal protocol handler.
src/mcp_protocol/handlers/terminal_protocol.py:26
Method__init__
Initialize the security protocol handler.
src/mcp_protocol/handlers/security_protocol.py:26
Method__init__
Initialize the analyze protocol handler.
src/mcp_protocol/handlers/analyze_protocol.py:25
Method__init__
Initialize the files protocol handler.
src/mcp_protocol/handlers/files_protocol.py:24
Method_cleanup
Clean up resources on exit.
src/command_executor.py:245
Method_handle_user_input
Handle user input to the process.
src/interactive_commands.py:50
Method_read_process_output
Read and display output from the process.
src/interactive_commands.py:32
Methodcompleter
(self, text, state)
src/terminal_interface.py:9
Methodextract_commands
Extract commands from <s> tags in a text.
src/command_display.py:88
Functionextract_context_tags
Extract content from <context> tags in the text. Args: text (str): Text to search for context tags Returns: str:
src/utils.py:44
Methodformat_approval_request
Format a command approval request.
src/command_display.py:101
Functionformat_output_for_display
Format command output for display, truncating if necessary. Args: output (str): Command output to format max_lines (int
src/utils.py:62
Methodget_completions
(self, document, complete_event)
src/terminal_ui.py:69
Functionget_from_persistent_memory
Get a value from persistent memory by key. Args: key (str): Key to retrieve Returns: str: Value if found, None o
src/utils.py:132
Methodhandle
Handle network protocol commands (network operations). Args: command: The network command require_approval:
src/mcp_protocol/handlers/network_protocol.py:46
Methodhandle
Handle terminal protocol commands (shell command execution). Args: command: The shell command to execute req
src/mcp_protocol/handlers/terminal_protocol.py:30
Methodhandle
Handle security protocol commands (security operations). Args: command: The security command require_approva
src/mcp_protocol/handlers/security_protocol.py:50
Methodhandle
Handle analyze protocol commands - always performs a full system analysis. Args: command: The analyze command (ignored)
src/mcp_protocol/handlers/analyze_protocol.py:29
Methodhandle
Handle files protocol commands (read/write files). Args: command: The file operation command require_approva
src/mcp_protocol/handlers/files_protocol.py:28
Methodhighlight_command
Format command for improved visibility.
src/terminal_ui.py:156
Functionis_interactive_command
Check if a command is likely to be interactive. Args: command (str): Command to check Returns: bool: True if likely int
src/interactive_commands.py:198
Functionparse_hooks
Parse hooks like <mcp:protocol> tags and legacy <system> or <s> tags in text. This function utilizes the MCP singleton for parsing tags.
src/utils.py:28
Methodprint_command_execution
Print a notification that a command is being executed.
src/command_display.py:77
Methodprint_command_output
Print the formatted output of a command.
src/command_display.py:83
Functionregister
Register this protocol handler.
src/mcp_protocol/handlers/network_protocol.py:147
Functionregister
Register this protocol handler.
src/mcp_protocol/handlers/terminal_protocol.py:84
Functionregister
Register this protocol handler.
src/mcp_protocol/handlers/security_protocol.py:131
Functionregister
Register this protocol handler.
src/mcp_protocol/handlers/analyze_protocol.py:93
Functionregister
Register this protocol handler.
src/mcp_protocol/handlers/files_protocol.py:195
Methodreplace_tags_with_display
Replace <s> tags with visually formatted command displays.
src/command_display.py:93
Methodreplacement
(match)
src/command_display.py:95
Methodreset_history
(self)
src/ai_core.py:313
Methodrun
(self)
src/terminal_interface.py:16
Functionrun_interactive_command
Run an interactive command. Args: command (str): Command to execute initial_inputs (list): Optional list of inputs to send
src/interactive_commands.py:184
Functionsave_to_persistent_memory
Save a key-value pair to persistent memory. Args: key (str): Key to store value (str): Value to store Returns:
src/utils.py:92