diff --git a/deployment/build/development-build.sh b/deployment/build/development-build.sh index eecbb686..fbe29634 100755 --- a/deployment/build/development-build.sh +++ b/deployment/build/development-build.sh @@ -29,7 +29,7 @@ echo "--- 1. Ensuring frontend submodule is synchronized ---" echo "--- 2. Injecting Environment Configurations ---" echo "Copying inference-orchestrator .env..." -cp "$CONFIG_PATH/inference-orchestrator/.env" "python-ecosystem/inference-orchestrator/.env" +cp "$CONFIG_PATH/inference-orchestrator/.env" "python-ecosystem/inference-orchestrator/src/.env" echo "Copying rag-pipeline .env..." cp "$CONFIG_PATH/rag-pipeline/.env" "python-ecosystem/rag-pipeline/.env" @@ -43,11 +43,11 @@ echo "--- 3. Building Java Artifacts (mvn clean package) ---" (cd "$JAVA_DIR" && mvn clean package -DskipTests) echo "--- 4. MCP Servers jar update ---" -cp "$MCP_SERVERS_JAR_PATH" python-ecosystem/inference-orchestrator/codecrow-vcs-mcp-1.0.jar +cp "$MCP_SERVERS_JAR_PATH" python-ecosystem/inference-orchestrator/src/codecrow-vcs-mcp-1.0.jar echo "--- 4.1. Platform MCP jar update ---" if [ -f "$PLATFORM_MCP_JAR_PATH" ]; then - cp "$PLATFORM_MCP_JAR_PATH" python-ecosystem/inference-orchestrator/codecrow-platform-mcp-1.0.jar + cp "$PLATFORM_MCP_JAR_PATH" python-ecosystem/inference-orchestrator/src/codecrow-platform-mcp-1.0.jar echo "Platform MCP JAR copied successfully." else echo "Warning: Platform MCP JAR not found at $PLATFORM_MCP_JAR_PATH" diff --git a/deployment/build/production-build.sh b/deployment/build/production-build.sh index 3bcb7e09..f289b30a 100755 --- a/deployment/build/production-build.sh +++ b/deployment/build/production-build.sh @@ -29,7 +29,7 @@ echo "Frontend at: $(cd "$FRONTEND_DIR" && git log --oneline -1)" echo "--- 2. Injecting Environment Configurations ---" echo "Copying inference-orchestrator .env..." -cp "$CONFIG_PATH/inference-orchestrator/.env" "python-ecosystem/inference-orchestrator/.env" +cp "$CONFIG_PATH/inference-orchestrator/.env" "python-ecosystem/inference-orchestrator/src/.env" echo "Copying rag-pipeline .env..." cp "$CONFIG_PATH/rag-pipeline/.env" "python-ecosystem/rag-pipeline/.env" @@ -43,11 +43,11 @@ echo "--- 3. Building Java Artifacts (mvn clean package) ---" (cd "$JAVA_DIR" && mvn clean package) echo "--- 4. MCP Servers jar update ---" -cp "$MCP_SERVERS_JAR_PATH" python-ecosystem/inference-orchestrator/codecrow-vcs-mcp-1.0.jar +cp "$MCP_SERVERS_JAR_PATH" python-ecosystem/inference-orchestrator/src/codecrow-vcs-mcp-1.0.jar echo "--- 4.1. Platform MCP jar update ---" if [ -f "$PLATFORM_MCP_JAR_PATH" ]; then - cp "$PLATFORM_MCP_JAR_PATH" python-ecosystem/inference-orchestrator/codecrow-platform-mcp-1.0.jar + cp "$PLATFORM_MCP_JAR_PATH" python-ecosystem/inference-orchestrator/src/codecrow-platform-mcp-1.0.jar echo "Platform MCP JAR copied successfully." else echo "Warning: Platform MCP JAR not found at $PLATFORM_MCP_JAR_PATH" diff --git a/deployment/ci/ci-build.sh b/deployment/ci/ci-build.sh index 703e9490..8ac251da 100755 --- a/deployment/ci/ci-build.sh +++ b/deployment/ci/ci-build.sh @@ -34,8 +34,8 @@ echo "==========================================" echo "--- 1. Writing .env files from CI secrets ---" if [ -n "${ENV_INFERENCE_ORCHESTRATOR:-}" ]; then - echo "$ENV_INFERENCE_ORCHESTRATOR" > python-ecosystem/inference-orchestrator/.env - echo " ✓ inference-orchestrator/.env written" + echo "$ENV_INFERENCE_ORCHESTRATOR" > python-ecosystem/inference-orchestrator/src/.env + echo " ✓ inference-orchestrator/src/.env written" fi if [ -n "${ENV_RAG_PIPELINE:-}" ]; then @@ -55,11 +55,11 @@ echo " ✓ Java build & tests complete" # ── 3. Copy MCP JARs ────────────────────────────────────────────────────── echo "--- 3. Copying MCP server JARs ---" -cp "$MCP_JAR" python-ecosystem/inference-orchestrator/codecrow-vcs-mcp-1.0.jar +cp "$MCP_JAR" python-ecosystem/inference-orchestrator/src/codecrow-vcs-mcp-1.0.jar echo " ✓ VCS MCP JAR copied" if [ -f "$PLATFORM_MCP_JAR" ]; then - cp "$PLATFORM_MCP_JAR" python-ecosystem/inference-orchestrator/codecrow-platform-mcp-1.0.jar + cp "$PLATFORM_MCP_JAR" python-ecosystem/inference-orchestrator/src/codecrow-platform-mcp-1.0.jar echo " ✓ Platform MCP JAR copied" else echo " ⚠ Platform MCP JAR not found (optional)" @@ -71,7 +71,7 @@ echo "--- 4. Building Docker images ---" IMAGES=( "codecrow/web-server|java-ecosystem/services/web-server|Dockerfile.observable" "codecrow/pipeline-agent|java-ecosystem/services/pipeline-agent|Dockerfile.observable" - "codecrow/inference-orchestrator|python-ecosystem/inference-orchestrator" + "codecrow/inference-orchestrator|python-ecosystem/inference-orchestrator/src|Dockerfile.observable" "codecrow/rag-pipeline|python-ecosystem/rag-pipeline" "codecrow/web-frontend|frontend" ) diff --git a/deployment/ci/server-deploy.sh b/deployment/ci/server-deploy.sh index 3a4e2c19..403796d9 100755 --- a/deployment/ci/server-deploy.sh +++ b/deployment/ci/server-deploy.sh @@ -46,6 +46,7 @@ for cfg in \ "$CONFIG_DIR/java-shared/newrelic-web-server.yml" \ "$CONFIG_DIR/java-shared/newrelic-pipeline-agent.yml" \ "$CONFIG_DIR/inference-orchestrator/.env" \ + "$CONFIG_DIR/inference-orchestrator/newrelic.ini" \ "$CONFIG_DIR/rag-pipeline/.env"; do if [ ! -f "$cfg" ]; then echo "ERROR: Missing config file: $cfg" diff --git a/deployment/ci/server-init.sh b/deployment/ci/server-init.sh index c5222db1..d523e40b 100755 --- a/deployment/ci/server-init.sh +++ b/deployment/ci/server-init.sh @@ -83,6 +83,27 @@ SAMPLE fi done +# New Relic config for inference-orchestrator (Python agent) +NR_INI="$DEPLOY_DIR/config/inference-orchestrator/newrelic.ini" +if [ ! -f "$NR_INI" ]; then + cat > "$NR_INI" <<'SAMPLE' +# ============================================================================ +# New Relic Python agent config for inference-orchestrator +# See https://docs.newrelic.com/docs/apm/agents/python-agent/configuration/python-agent-configuration/ +# Copy your newrelic.ini here with your license_key and app_name +# ============================================================================ +[newrelic] +license_key = REPLACE_WITH_YOUR_LICENSE_KEY +app_name = CodeCrow Inference Orchestrator +monitor_mode = true +log_level = info +SAMPLE + echo " ✓ Created placeholder: inference-orchestrator/newrelic.ini" + echo " → EDIT THIS FILE with your New Relic license key!" +else + echo " ○ inference-orchestrator/newrelic.ini already exists (skipped)" +fi + # Docker Compose .env (DB creds, internal secrets — never committed to git) ENV_FILE="$DEPLOY_DIR/.env" if [ ! -f "$ENV_FILE" ]; then @@ -126,7 +147,8 @@ echo " │ ├── newrelic-pipeline-agent.yml ← YOUR New Relic con echo " │ └── github-private-key/" echo " │ └── *.pem ← YOUR GitHub App key" echo " ├── inference-orchestrator/" -echo " │ └── .env ← YOUR secrets" +echo " │ ├── .env ← YOUR secrets" +echo " │ └── newrelic.ini ← YOUR New Relic Python agent config" echo " └── rag-pipeline/" echo " └── .env ← YOUR secrets" echo "" diff --git a/deployment/docker-compose.prod.yml b/deployment/docker-compose.prod.yml index 164fa024..00cd2936 100644 --- a/deployment/docker-compose.prod.yml +++ b/deployment/docker-compose.prod.yml @@ -185,6 +185,7 @@ services: - codecrow-network volumes: - ./config/inference-orchestrator/.env:/app/.env + - ./config/inference-orchestrator/newrelic.ini:/app/newrelic.ini:ro restart: unless-stopped extra_hosts: - "host.docker.internal:host-gateway" diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index c862e4a1..706a01db 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -168,7 +168,7 @@ services: inference-orchestrator: build: - context: ../python-ecosystem/inference-orchestrator + context: ../python-ecosystem/inference-orchestrator/src container_name: codecrow-inference-orchestrator ports: - "127.0.0.1:8000:8000" diff --git a/frontend b/frontend index a120082f..b909b45c 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit a120082f97995d356933d42c85bd91d38169483f +Subproject commit b909b45ce60cbf049328bd480ddd5af903726d13 diff --git a/python-ecosystem/inference-orchestrator/src/.gitignore b/python-ecosystem/inference-orchestrator/src/.gitignore new file mode 100644 index 00000000..be5a87da --- /dev/null +++ b/python-ecosystem/inference-orchestrator/src/.gitignore @@ -0,0 +1,18 @@ +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +.env +server.log +*.jar + +logs/** +**/__pycache__/ +newrelic.ini \ No newline at end of file diff --git a/python-ecosystem/inference-orchestrator/Dockerfile b/python-ecosystem/inference-orchestrator/src/Dockerfile similarity index 100% rename from python-ecosystem/inference-orchestrator/Dockerfile rename to python-ecosystem/inference-orchestrator/src/Dockerfile diff --git a/python-ecosystem/inference-orchestrator/src/Dockerfile.observable b/python-ecosystem/inference-orchestrator/src/Dockerfile.observable new file mode 100644 index 00000000..08468d98 --- /dev/null +++ b/python-ecosystem/inference-orchestrator/src/Dockerfile.observable @@ -0,0 +1,90 @@ +FROM python:3.11-slim-bullseye AS builder + +# Set work directory +WORKDIR /app + +# --- Builder Stage 1: Install Dependencies --- +COPY requirements.txt . + +# Install build dependencies required by some Python packages +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + gcc \ + libc-dev \ + && apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install Python dependencies +RUN pip install --no-cache-dir -r requirements.txt + + +# --- Builder Stage 2: Copy and Install Application Modules --- +# Copy application source code and the JAR +COPY main.py . +COPY api ./api/ +COPY server ./server/ +COPY model ./model/ +COPY service ./service/ +COPY utils ./utils/ +COPY llm ./llm/ +# Copy the JAR files (required by the Python service) +COPY codecrow-vcs-mcp-1.0.jar ./codecrow-vcs-mcp-1.0.jar +# Platform MCP JAR - if it exists (optional) +COPY codecrow-platform-mcp-1.0.jar* ./ + +# --- Production Stage --- +FROM python:3.11-slim-bullseye + +# CRITICAL FIX: Pull a slim JRE from eclipse-temurin instead of using apt-get +# This saves ~150-200MB compared to installing openjdk-17-jre-headless via apt +COPY --from=eclipse-temurin:17-jre /opt/java/openjdk /opt/java/openjdk +ENV JAVA_HOME=/opt/java/openjdk +ENV PATH="${JAVA_HOME}/bin:${PATH}" + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + curl && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Create non-root user and set permissions +RUN groupadd -r appuser && useradd -r -g appuser appuser +RUN mkdir -p /app && chown -R appuser:appuser /app + +WORKDIR /app + +# Copy installed dependencies directly from the builder stage +COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages +# Copy pip-installed executables (newrelic-admin, uvicorn, etc.) +COPY --from=builder /usr/local/bin/ /usr/local/bin/ + +# Copy application code from the builder stage +COPY --chown=appuser:appuser --from=builder /app/main.py ./ +COPY --chown=appuser:appuser --from=builder /app/api ./api/ +COPY --chown=appuser:appuser --from=builder /app/server ./server/ +COPY --chown=appuser:appuser --from=builder /app/model ./model/ +COPY --chown=appuser:appuser --from=builder /app/service ./service/ +COPY --chown=appuser:appuser --from=builder /app/utils ./utils/ +COPY --chown=appuser:appuser --from=builder /app/llm ./llm/ +# Copy the JAR files +COPY --chown=appuser:appuser --from=builder /app/codecrow-vcs-mcp-1.0.jar ./codecrow-vcs-mcp-1.0.jar +# Copy Platform MCP JAR if present +COPY --chown=appuser:appuser --from=builder /app/codecrow-platform-mcp-1.0.jar* ./ + +# Set PYTHONPATH environment variable to include the current working directory. +ENV PYTHONPATH=/app + +# ── New Relic observability ────────────────────────────────────────────────── +# The newrelic package is already installed via requirements.txt. +# Config file (newrelic.ini) is mounted at runtime via docker-compose volume. +ENV NEW_RELIC_CONFIG_FILE=/app/newrelic.ini +ENV NEW_RELIC_LOG_FILE_NAME=STDOUT + +# Switch to non-root user +USER appuser + +# Expose port (default for FastAPI/Uvicorn) +EXPOSE 8000 + +# Run via newrelic-admin for APM instrumentation +CMD ["newrelic-admin", "run-program", "python", "main.py"] diff --git a/python-ecosystem/inference-orchestrator/README.MD b/python-ecosystem/inference-orchestrator/src/README.MD similarity index 100% rename from python-ecosystem/inference-orchestrator/README.MD rename to python-ecosystem/inference-orchestrator/src/README.MD diff --git a/python-ecosystem/inference-orchestrator/api/__init__.py b/python-ecosystem/inference-orchestrator/src/api/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/__init__.py rename to python-ecosystem/inference-orchestrator/src/api/__init__.py diff --git a/python-ecosystem/inference-orchestrator/api/app.py b/python-ecosystem/inference-orchestrator/src/api/app.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/app.py rename to python-ecosystem/inference-orchestrator/src/api/app.py diff --git a/python-ecosystem/inference-orchestrator/api/middleware.py b/python-ecosystem/inference-orchestrator/src/api/middleware.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/middleware.py rename to python-ecosystem/inference-orchestrator/src/api/middleware.py diff --git a/python-ecosystem/inference-orchestrator/api/routers/__init__.py b/python-ecosystem/inference-orchestrator/src/api/routers/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/routers/__init__.py rename to python-ecosystem/inference-orchestrator/src/api/routers/__init__.py diff --git a/python-ecosystem/inference-orchestrator/api/routers/commands.py b/python-ecosystem/inference-orchestrator/src/api/routers/commands.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/routers/commands.py rename to python-ecosystem/inference-orchestrator/src/api/routers/commands.py diff --git a/python-ecosystem/inference-orchestrator/api/routers/health.py b/python-ecosystem/inference-orchestrator/src/api/routers/health.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/routers/health.py rename to python-ecosystem/inference-orchestrator/src/api/routers/health.py diff --git a/python-ecosystem/inference-orchestrator/api/routers/review.py b/python-ecosystem/inference-orchestrator/src/api/routers/review.py similarity index 100% rename from python-ecosystem/inference-orchestrator/api/routers/review.py rename to python-ecosystem/inference-orchestrator/src/api/routers/review.py diff --git a/python-ecosystem/inference-orchestrator/inspect_mcp_agent.py b/python-ecosystem/inference-orchestrator/src/inspect_mcp_agent.py similarity index 100% rename from python-ecosystem/inference-orchestrator/inspect_mcp_agent.py rename to python-ecosystem/inference-orchestrator/src/inspect_mcp_agent.py diff --git a/python-ecosystem/inference-orchestrator/llm/llm_factory.py b/python-ecosystem/inference-orchestrator/src/llm/llm_factory.py similarity index 100% rename from python-ecosystem/inference-orchestrator/llm/llm_factory.py rename to python-ecosystem/inference-orchestrator/src/llm/llm_factory.py diff --git a/python-ecosystem/inference-orchestrator/main.py b/python-ecosystem/inference-orchestrator/src/main.py similarity index 100% rename from python-ecosystem/inference-orchestrator/main.py rename to python-ecosystem/inference-orchestrator/src/main.py diff --git a/python-ecosystem/inference-orchestrator/model/__init__.py b/python-ecosystem/inference-orchestrator/src/model/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/model/__init__.py rename to python-ecosystem/inference-orchestrator/src/model/__init__.py diff --git a/python-ecosystem/inference-orchestrator/model/dtos.py b/python-ecosystem/inference-orchestrator/src/model/dtos.py similarity index 100% rename from python-ecosystem/inference-orchestrator/model/dtos.py rename to python-ecosystem/inference-orchestrator/src/model/dtos.py diff --git a/python-ecosystem/inference-orchestrator/model/enrichment.py b/python-ecosystem/inference-orchestrator/src/model/enrichment.py similarity index 100% rename from python-ecosystem/inference-orchestrator/model/enrichment.py rename to python-ecosystem/inference-orchestrator/src/model/enrichment.py diff --git a/python-ecosystem/inference-orchestrator/model/enums.py b/python-ecosystem/inference-orchestrator/src/model/enums.py similarity index 100% rename from python-ecosystem/inference-orchestrator/model/enums.py rename to python-ecosystem/inference-orchestrator/src/model/enums.py diff --git a/python-ecosystem/inference-orchestrator/model/multi_stage.py b/python-ecosystem/inference-orchestrator/src/model/multi_stage.py similarity index 100% rename from python-ecosystem/inference-orchestrator/model/multi_stage.py rename to python-ecosystem/inference-orchestrator/src/model/multi_stage.py diff --git a/python-ecosystem/inference-orchestrator/model/output_schemas.py b/python-ecosystem/inference-orchestrator/src/model/output_schemas.py similarity index 100% rename from python-ecosystem/inference-orchestrator/model/output_schemas.py rename to python-ecosystem/inference-orchestrator/src/model/output_schemas.py diff --git a/python-ecosystem/inference-orchestrator/requirements.txt b/python-ecosystem/inference-orchestrator/src/requirements.txt similarity index 92% rename from python-ecosystem/inference-orchestrator/requirements.txt rename to python-ecosystem/inference-orchestrator/src/requirements.txt index d9a6a973..30cd0ea8 100644 --- a/python-ecosystem/inference-orchestrator/requirements.txt +++ b/python-ecosystem/inference-orchestrator/src/requirements.txt @@ -10,3 +10,4 @@ langchain-anthropic>=1.0.0,<2.0.0 langchain-google-genai>=4.0.0 mcp-use redis>=5.0.0 +newrelic==11.5.0 \ No newline at end of file diff --git a/python-ecosystem/inference-orchestrator/server/command_queue_consumer.py b/python-ecosystem/inference-orchestrator/src/server/command_queue_consumer.py similarity index 100% rename from python-ecosystem/inference-orchestrator/server/command_queue_consumer.py rename to python-ecosystem/inference-orchestrator/src/server/command_queue_consumer.py diff --git a/python-ecosystem/inference-orchestrator/server/queue_consumer.py b/python-ecosystem/inference-orchestrator/src/server/queue_consumer.py similarity index 100% rename from python-ecosystem/inference-orchestrator/server/queue_consumer.py rename to python-ecosystem/inference-orchestrator/src/server/queue_consumer.py diff --git a/python-ecosystem/inference-orchestrator/server/stdin_handler.py b/python-ecosystem/inference-orchestrator/src/server/stdin_handler.py similarity index 100% rename from python-ecosystem/inference-orchestrator/server/stdin_handler.py rename to python-ecosystem/inference-orchestrator/src/server/stdin_handler.py diff --git a/python-ecosystem/inference-orchestrator/service/__init__.py b/python-ecosystem/inference-orchestrator/src/service/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/__init__.py rename to python-ecosystem/inference-orchestrator/src/service/__init__.py diff --git a/python-ecosystem/inference-orchestrator/service/command/__init__.py b/python-ecosystem/inference-orchestrator/src/service/command/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/command/__init__.py rename to python-ecosystem/inference-orchestrator/src/service/command/__init__.py diff --git a/python-ecosystem/inference-orchestrator/service/command/command_service.py b/python-ecosystem/inference-orchestrator/src/service/command/command_service.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/command/command_service.py rename to python-ecosystem/inference-orchestrator/src/service/command/command_service.py diff --git a/python-ecosystem/inference-orchestrator/service/rag/__init__.py b/python-ecosystem/inference-orchestrator/src/service/rag/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/rag/__init__.py rename to python-ecosystem/inference-orchestrator/src/service/rag/__init__.py diff --git a/python-ecosystem/inference-orchestrator/service/rag/llm_reranker.py b/python-ecosystem/inference-orchestrator/src/service/rag/llm_reranker.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/rag/llm_reranker.py rename to python-ecosystem/inference-orchestrator/src/service/rag/llm_reranker.py diff --git a/python-ecosystem/inference-orchestrator/service/rag/rag_client.py b/python-ecosystem/inference-orchestrator/src/service/rag/rag_client.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/rag/rag_client.py rename to python-ecosystem/inference-orchestrator/src/service/rag/rag_client.py diff --git a/python-ecosystem/inference-orchestrator/service/review/__init__.py b/python-ecosystem/inference-orchestrator/src/service/review/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/__init__.py rename to python-ecosystem/inference-orchestrator/src/service/review/__init__.py diff --git a/python-ecosystem/inference-orchestrator/service/review/issue_processor.py b/python-ecosystem/inference-orchestrator/src/service/review/issue_processor.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/issue_processor.py rename to python-ecosystem/inference-orchestrator/src/service/review/issue_processor.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/__init__.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/__init__.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/__init__.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/__init__.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/agents.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/agents.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/agents.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/agents.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/branch_analysis.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/branch_analysis.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/branch_analysis.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/branch_analysis.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/context_helpers.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/context_helpers.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/context_helpers.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/context_helpers.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/json_utils.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/json_utils.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/json_utils.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/json_utils.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/mcp_tool_executor.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/mcp_tool_executor.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/mcp_tool_executor.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/mcp_tool_executor.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/orchestrator.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/orchestrator.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/orchestrator.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/orchestrator.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/reconciliation.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/reconciliation.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/reconciliation.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/reconciliation.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_0_planning.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_0_planning.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_0_planning.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_0_planning.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_1_file_review.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_1_file_review.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_1_file_review.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_1_file_review.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_2_cross_file.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_2_cross_file.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_2_cross_file.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_2_cross_file.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_3_aggregation.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_3_aggregation.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_3_aggregation.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_3_aggregation.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_helpers.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_helpers.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/stage_helpers.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stage_helpers.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/stages.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stages.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/stages.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/stages.py diff --git a/python-ecosystem/inference-orchestrator/service/review/orchestrator/verification_agent.py b/python-ecosystem/inference-orchestrator/src/service/review/orchestrator/verification_agent.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/orchestrator/verification_agent.py rename to python-ecosystem/inference-orchestrator/src/service/review/orchestrator/verification_agent.py diff --git a/python-ecosystem/inference-orchestrator/service/review/review_service.py b/python-ecosystem/inference-orchestrator/src/service/review/review_service.py similarity index 100% rename from python-ecosystem/inference-orchestrator/service/review/review_service.py rename to python-ecosystem/inference-orchestrator/src/service/review/review_service.py diff --git a/python-ecosystem/inference-orchestrator/tests/test_dependency_graph.py b/python-ecosystem/inference-orchestrator/src/tests/test_dependency_graph.py similarity index 100% rename from python-ecosystem/inference-orchestrator/tests/test_dependency_graph.py rename to python-ecosystem/inference-orchestrator/src/tests/test_dependency_graph.py diff --git a/python-ecosystem/inference-orchestrator/tests/test_llm_reranker.py b/python-ecosystem/inference-orchestrator/src/tests/test_llm_reranker.py similarity index 100% rename from python-ecosystem/inference-orchestrator/tests/test_llm_reranker.py rename to python-ecosystem/inference-orchestrator/src/tests/test_llm_reranker.py diff --git a/python-ecosystem/inference-orchestrator/utils/context_builder.py b/python-ecosystem/inference-orchestrator/src/utils/context_builder.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/context_builder.py rename to python-ecosystem/inference-orchestrator/src/utils/context_builder.py diff --git a/python-ecosystem/inference-orchestrator/utils/dependency_graph.py b/python-ecosystem/inference-orchestrator/src/utils/dependency_graph.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/dependency_graph.py rename to python-ecosystem/inference-orchestrator/src/utils/dependency_graph.py diff --git a/python-ecosystem/inference-orchestrator/utils/diff_parser.py b/python-ecosystem/inference-orchestrator/src/utils/diff_parser.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/diff_parser.py rename to python-ecosystem/inference-orchestrator/src/utils/diff_parser.py diff --git a/python-ecosystem/inference-orchestrator/utils/diff_processor.py b/python-ecosystem/inference-orchestrator/src/utils/diff_processor.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/diff_processor.py rename to python-ecosystem/inference-orchestrator/src/utils/diff_processor.py diff --git a/python-ecosystem/inference-orchestrator/utils/error_sanitizer.py b/python-ecosystem/inference-orchestrator/src/utils/error_sanitizer.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/error_sanitizer.py rename to python-ecosystem/inference-orchestrator/src/utils/error_sanitizer.py diff --git a/python-ecosystem/inference-orchestrator/utils/file_classifier.py b/python-ecosystem/inference-orchestrator/src/utils/file_classifier.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/file_classifier.py rename to python-ecosystem/inference-orchestrator/src/utils/file_classifier.py diff --git a/python-ecosystem/inference-orchestrator/utils/mcp_config.py b/python-ecosystem/inference-orchestrator/src/utils/mcp_config.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/mcp_config.py rename to python-ecosystem/inference-orchestrator/src/utils/mcp_config.py diff --git a/python-ecosystem/inference-orchestrator/utils/mcp_pool.py b/python-ecosystem/inference-orchestrator/src/utils/mcp_pool.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/mcp_pool.py rename to python-ecosystem/inference-orchestrator/src/utils/mcp_pool.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompt_logger.py b/python-ecosystem/inference-orchestrator/src/utils/prompt_logger.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompt_logger.py rename to python-ecosystem/inference-orchestrator/src/utils/prompt_logger.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_branch.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_branch.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_branch.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_branch.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_mcp.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_mcp.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_mcp.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_mcp.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_shared.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_shared.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_shared.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_shared.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_0.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_0.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_0.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_0.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_1.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_1.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_1.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_1.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_2.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_2.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_2.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_2.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_3.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_3.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/constants_stage_3.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/constants_stage_3.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/prompt_builder.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/prompt_builder.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/prompt_builder.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/prompt_builder.py diff --git a/python-ecosystem/inference-orchestrator/utils/prompts/prompt_constants.py b/python-ecosystem/inference-orchestrator/src/utils/prompts/prompt_constants.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/prompts/prompt_constants.py rename to python-ecosystem/inference-orchestrator/src/utils/prompts/prompt_constants.py diff --git a/python-ecosystem/inference-orchestrator/utils/response_parser.py b/python-ecosystem/inference-orchestrator/src/utils/response_parser.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/response_parser.py rename to python-ecosystem/inference-orchestrator/src/utils/response_parser.py diff --git a/python-ecosystem/inference-orchestrator/utils/signature_patterns.py b/python-ecosystem/inference-orchestrator/src/utils/signature_patterns.py similarity index 100% rename from python-ecosystem/inference-orchestrator/utils/signature_patterns.py rename to python-ecosystem/inference-orchestrator/src/utils/signature_patterns.py