chore(conductor): Archive track 'manual_slop_headless_20260225'
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# Track manual_slop_headless_20260225 Context
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Implementation Plan](./plan.md)
|
||||
- [Metadata](./metadata.json)
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"track_id": "manual_slop_headless_20260225",
|
||||
"type": "feature",
|
||||
"status": "new",
|
||||
"created_at": "2026-02-25T12:00:00Z",
|
||||
"updated_at": "2026-02-25T12:00:00Z",
|
||||
"description": "Support headless manual_slop for making an unraid gui docker frontend and a unraid server backend down the line."
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
# Implementation Plan: Manual Slop Headless Backend
|
||||
|
||||
## Phase 1: Project Setup & Headless Scaffold [checkpoint: d5f056c]
|
||||
- [x] Task: Update dependencies (02fc847)
|
||||
- [x] Add `fastapi` and `uvicorn` to `pyproject.toml` (and sync `requirements.txt` via `uv`).
|
||||
- [x] Task: Implement headless startup
|
||||
- [x] Modify `gui_2.py` (or create `headless.py`) to parse a `--headless` CLI flag.
|
||||
- [x] Update config parsing in `config.toml` to support headless configuration sections.
|
||||
- [x] Bypass Dear PyGui initialization if headless mode is active.
|
||||
- [x] Task: Create foundational API application
|
||||
- [x] Set up the core FastAPI application instance.
|
||||
- [x] Implement `/health` and `/status` endpoints for Docker lifecycle checks.
|
||||
- [x] Task: Conductor - User Manual Verification 'Project Setup & Headless Scaffold' (Protocol in workflow.md) d5f056c
|
||||
|
||||
## Phase 2: Core API Routes & Authentication [checkpoint: 4e0bcd5]
|
||||
- [x] Task: Implement API Key Security
|
||||
- [x] Create a dependency/middleware in FastAPI to validate `X-API-KEY`.
|
||||
- [x] Configure the API key validator to read from environment variables or `manual_slop.toml` (supporting Unraid template secrets).
|
||||
- [x] Add tests for authorized and unauthorized API access.
|
||||
- [x] Task: Implement AI Generation Endpoint
|
||||
- [x] Create a `/api/v1/generate` POST endpoint.
|
||||
- [x] Map request payloads to `ai_client.py` unified wrappers.
|
||||
- [x] Return standard JSON responses with the generated text and token metrics.
|
||||
- [x] Task: Conductor - User Manual Verification 'Core API Routes & Authentication' (Protocol in workflow.md) 4e0bcd5
|
||||
|
||||
## Phase 3: Remote Tool Confirmation Mechanism [checkpoint: a6e184e]
|
||||
- [x] Task: Refactor Execution Engine for Async Wait
|
||||
- [x] Modify `shell_runner.py` and tool-call loops to support a non-blocking "Pending Confirmation" state instead of launching a GUI modal.
|
||||
- [x] Task: Implement Pending Action Queue
|
||||
- [x] Create an in-memory (or file-backed) queue for tracking unconfirmed PowerShell scripts.
|
||||
- [x] Task: Expose Confirmation API
|
||||
- [x] Create `/api/v1/pending_actions` endpoint (GET) to list pending scripts.
|
||||
- [x] Create `/api/v1/confirm/{action_id}` endpoint (POST) to approve or deny a script execution.
|
||||
- [x] Ensure the AI generation loop correctly resumes upon receiving approval.
|
||||
- [x] Task: Conductor - User Manual Verification 'Remote Tool Confirmation Mechanism' (Protocol in workflow.md) a6e184e
|
||||
|
||||
## Phase 4: Session & Context Management via API [checkpoint: 7f3a1e2]
|
||||
- [x] Task: Expose Session History
|
||||
- [x] Create endpoints to list, retrieve, and delete session logs from the `project_history.toml`.
|
||||
- [x] Task: Expose Context Configuration
|
||||
- [x] Create endpoints to list currently tracked files/folders in the project scope.
|
||||
- [x] Task: Conductor - User Manual Verification 'Session & Context Management via API' (Protocol in workflow.md) 7f3a1e2
|
||||
|
||||
## Phase 5: Dockerization [checkpoint: 5176b8d]
|
||||
- [x] Task: Create Dockerfile
|
||||
- [x] Write a `Dockerfile` using `python:3.11-slim` as a base.
|
||||
- [x] Configure `uv` inside the container for fast dependency installation.
|
||||
- [x] Expose the API port (e.g., 8000) and set the container entrypoint.
|
||||
- [x] Task: Conductor - User Manual Verification 'Dockerization' (Protocol in workflow.md) 5176b8d
|
||||
|
||||
## Phase: Review Fixes
|
||||
- [x] Task: Apply review suggestions (docstrings and security fix) 9b50bfa
|
||||
@@ -1,48 +0,0 @@
|
||||
# Specification: Manual Slop Headless Backend
|
||||
|
||||
## Overview
|
||||
Transform Manual Slop into a decoupled, container-friendly backend service. This track enables the core AI orchestration and tool execution logic to run without a GUI, exposing its capabilities via a secured REST API optimized for an Unraid Docker environment.
|
||||
|
||||
## Goals
|
||||
- Decouple the GUI logic (`Dear PyGui`, `ImGui`) from the core AI and Tool logic.
|
||||
- Implement a lightweight REST API server (FastAPI) to handle AI interactions.
|
||||
- Ensure full compatibility with Unraid Docker networking and configuration patterns.
|
||||
- Maintain the "Human-in-the-Loop" safety model through a remote confirmation mechanism.
|
||||
|
||||
## Functional Requirements
|
||||
|
||||
### 1. Headless Mode Lifecycle
|
||||
- **Startup**: Provide a `--headless` flag or `[headless]` section in `manual_slop.toml` to skip GUI initialization.
|
||||
- **Dependencies**: Ensure the app can start in environments without an X11/Wayland display or GPU.
|
||||
- **Service Mode**: Support running as a persistent background daemon/service.
|
||||
|
||||
### 2. REST API (FastAPI)
|
||||
- **Status/Health**: `/status` and `/health` endpoints for Docker/Unraid monitoring.
|
||||
- **AI Interface**: `/generate` and `/stream` endpoints to interact with configured AI providers.
|
||||
- **Tool Management**: Endpoints to list and execute tools (PowerShell/MCP).
|
||||
- **Session Support**: Manage conversation history and project context via API.
|
||||
|
||||
### 3. Security & Authentication
|
||||
- **API Key**: Require a `X-API-KEY` header for all sensitive endpoints.
|
||||
- **Unraid Integration**: API keys should be configurable via Environment Variables (standard for Unraid templates).
|
||||
|
||||
### 4. Remote Confirmation Mechanism
|
||||
- **Challenge/Response**: When a tool requires execution, the API should return a "Pending Confirmation" state.
|
||||
- **Webhook/Poll**: Support a mechanism (e.g., a `/confirm/{id}` endpoint) for the future frontend to approve/deny actions.
|
||||
|
||||
## Non-Functional Requirements
|
||||
- **Performance**: Headless mode should use significantly less memory/CPU than the GUI version.
|
||||
- **Logging**: Use standard Python `logging` for Docker-compatible stdout/stderr output.
|
||||
- **Portability**: Must run reliably inside a standard `python:3.11-slim` or similar Docker image.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] Manual Slop starts successfully with `--headless` and no display environment.
|
||||
- [ ] API is accessible via a configurable port (e.g., 8000).
|
||||
- [ ] All API requests are rejected without a valid API Key.
|
||||
- [ ] AI generation works via REST endpoints, returning structured JSON or a stream.
|
||||
- [ ] Tool execution is successfully blocked until a separate "Confirm" API call is made.
|
||||
|
||||
## Out of Scope
|
||||
- Building the actual Unraid GUI frontend (React/Vue/etc.).
|
||||
- Multi-user authentication (OIDC/OAuth2).
|
||||
- Native Unraid `.plg` plugin development (focusing on Docker).
|
||||
Reference in New Issue
Block a user