Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vasco0x4/Neo-AI
/ functions
Functions
93 in github.com/Vasco0x4/Neo-AI
⨍
Functions
93
◇
Types & classes
17
↓ 5 callers
Method
get_valid_access_token
(self)
src/token_manager.py:83
↓ 5 callers
Method
register_handler
Register a protocol handler. Args: handler: Protocol handler to register
src/mcp_protocol/registry.py:46
↓ 5 callers
Method
run
Run the interactive terminal UI.
src/terminal_ui.py:160
↓ 4 callers
Method
_is_terminal_running
Check if the terminal process is still running.
src/command_executor.py:81
↓ 4 callers
Method
_is_token_expired
(self, token)
src/token_manager.py:53
↓ 4 callers
Method
request_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 callers
Method
_initialize_fallback
Initialize a fallback terminal method.
src/command_executor.py:218
↓ 2 callers
Method
_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 callers
Method
_query_digitalocean
(self, prompt, clear_thinking=False)
src/ai_core.py:134
↓ 2 callers
Method
_query_lm_studio
(self, prompt, clear_thinking=False)
src/ai_core.py:97
↓ 2 callers
Method
_request
(self, method, endpoint, headers=None, params=None, data=None)
src/token_manager.py:19
↓ 2 callers
Method
get_conversation_history
(self)
src/ai_core.py:310
↓ 2 callers
Method
parse_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 callers
Method
print_banner
Print Neo AI welcome banner.
src/terminal_ui.py:88
↓ 2 callers
Method
query
(self, prompt, clear_thinking=False)
src/ai_core.py:231
↓ 1 callers
Method
_detect_terminal_type
Detect the available terminal emulator.
src/command_executor.py:53
↓ 1 callers
Method
_ensure_valid_token
Check that the token is still valid and renew it if necessary
src/ai_core.py:56
↓ 1 callers
Method
_get_access_token
(self, refresh_token)
src/token_manager.py:43
↓ 1 callers
Method
_get_refresh_token
(self)
src/token_manager.py:34
↓ 1 callers
Method
_initialize_terminal
Initialize the persistent terminal if not already running.
src/command_executor.py:107
↓ 1 callers
Method
_load_tokens_from_cache
(self)
src/token_manager.py:64
↓ 1 callers
Method
_save_tokens_to_cache
(self, access_token, refresh_token)
src/token_manager.py:79
↓ 1 callers
Method
detect_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 callers
Method
display_history
Display conversation history with improved formatting.
src/terminal_ui.py:132
↓ 1 callers
Method
display_history
(self)
src/terminal_interface.py:37
↓ 1 callers
Function
execute_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 callers
Method
execute_command
Execute a command in the persistent terminal. Args: command (str): Command to execute Returns:
src/command_executor.py:264
↓ 1 callers
Function
execute_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 callers
Method
format_ai_response
Format AI responses for better readability.
src/terminal_ui.py:112
↓ 1 callers
Method
format_command
Format a command for display.
src/command_display.py:38
↓ 1 callers
Method
format_output
Format command output with syntax highlighting.
src/command_display.py:42
↓ 1 callers
Method
get_handler
Get a protocol handler by name. Args: protocol_name: Name of the protocol Returns: Protocol handler
src/mcp_protocol/registry.py:61
↓ 1 callers
Method
handle
Handle a protocol command. Args: content: Command content require_approval: Whether approval is required
src/mcp_protocol/registry.py:24
↓ 1 callers
Method
has_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 callers
Method
initialize_context
(self)
src/ai_core.py:81
↓ 1 callers
Function
load_config
Load configuration from config.yaml file.
main.py:21
↓ 1 callers
Function
load_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 callers
Function
main
Main entry point for Neo AI.
main.py:41
↓ 1 callers
Function
parse_arguments
Parse command line arguments.
main.py:33
↓ 1 callers
Method
print_help
Display help menu.
src/terminal_ui.py:95
↓ 1 callers
Method
process_response
Process a response text containing MCP tags. Args: response: Text containing MCP protocol tags require_appro
src/mcp_protocol/core.py:60
↓ 1 callers
Function
register_all_protocols
Register all available protocol handlers.
src/mcp_protocol/__init__.py:28
↓ 1 callers
Method
run_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 callers
Function
wait_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 callers
Method
wait_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
Method
completer
(self, text, state)
src/terminal_interface.py:9
Method
extract_commands
Extract commands from <s> tags in a text.
src/command_display.py:88
Function
extract_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
Method
format_approval_request
Format a command approval request.
src/command_display.py:101
Function
format_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
Method
get_completions
(self, document, complete_event)
src/terminal_ui.py:69
Function
get_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
Method
handle
Handle network protocol commands (network operations). Args: command: The network command require_approval:
src/mcp_protocol/handlers/network_protocol.py:46
Method
handle
Handle terminal protocol commands (shell command execution). Args: command: The shell command to execute req
src/mcp_protocol/handlers/terminal_protocol.py:30
Method
handle
Handle security protocol commands (security operations). Args: command: The security command require_approva
src/mcp_protocol/handlers/security_protocol.py:50
Method
handle
Handle analyze protocol commands - always performs a full system analysis. Args: command: The analyze command (ignored)
src/mcp_protocol/handlers/analyze_protocol.py:29
Method
handle
Handle files protocol commands (read/write files). Args: command: The file operation command require_approva
src/mcp_protocol/handlers/files_protocol.py:28
Method
highlight_command
Format command for improved visibility.
src/terminal_ui.py:156
Function
is_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
Function
parse_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
Method
print_command_execution
Print a notification that a command is being executed.
src/command_display.py:77
Method
print_command_output
Print the formatted output of a command.
src/command_display.py:83
Function
register
Register this protocol handler.
src/mcp_protocol/handlers/network_protocol.py:147
Function
register
Register this protocol handler.
src/mcp_protocol/handlers/terminal_protocol.py:84
Function
register
Register this protocol handler.
src/mcp_protocol/handlers/security_protocol.py:131
Function
register
Register this protocol handler.
src/mcp_protocol/handlers/analyze_protocol.py:93
Function
register
Register this protocol handler.
src/mcp_protocol/handlers/files_protocol.py:195
Method
replace_tags_with_display
Replace <s> tags with visually formatted command displays.
src/command_display.py:93
Method
replacement
(match)
src/command_display.py:95
Method
reset_history
(self)
src/ai_core.py:313
Method
run
(self)
src/terminal_interface.py:16
Function
run_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
Function
save_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