Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ dist
changes.patch
.firebase-service-account.json
.env

# Python package metadata
*.egg-info/
Empty file added client-cli/__init__.py
Empty file.
9 changes: 8 additions & 1 deletion client-cli/python_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
import pathlib

# Import the necessary function from the agentignore_rules module
from agentignore_rules import evaluate_path # Assuming momoa_client is package root
try:
from agentignore_rules import evaluate_path
except ModuleNotFoundError:
from .agentignore_rules import evaluate_path # Assuming momoa_cli is package root

# Variable to store the number of lines the wrapped question takes
question_lines_count = None
Expand Down Expand Up @@ -558,6 +561,10 @@ def main():

args = parser.parse_args()

# If no directory or files specified, default to current directory
if args.directory is None and not args.files:
args.directory = os.getcwd()
Comment on lines +564 to +566
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaulting to uploading the entire current working directory can unintentionally exfiltrate sensitive or very large content (e.g., .env, .git/, node_modules/, virtualenvs), because evaluate_path defaults to include everything when no .agentignore is present and the CLI reads all file contents into memory before chunking. Please add a safety mitigation (e.g., built-in default excludes for common sensitive/huge paths, require confirmation when defaulting to CWD, and/or cap total files/bytes) to reduce accidental leakage and OOM/slow runs.

Copilot uses AI. Check for mistakes.

# --------------------------------------------------------------------------
# MODIFIED: Check if --spec and --env arguments are file paths.
# If they are, read the content from the file.
Expand Down
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "momoa-cli"
version = "0.1.0"
description = "MoMoA: Mixture of Mixture of Agents CLI"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"websocket-client"
]

[project.scripts]
momoa = "momoa_cli.python_cli:main"

[tool.setuptools]
packages = ["momoa_cli"]

[tool.setuptools.package-dir]
momoa_cli = "client-cli"