Self-hosted AI workspace.
Python
Merge branch 'main' of github.com:pewdiepie-archdaemon/odysseus
pewdiepie-archdaemon5fa38fae10ff
diff --cc src/tool_index.pyindex 3fecb79b8,3c5150efe..c6487150c--- a/src/tool_index.py+++ b/src/tool_index.py@@@ -110,12 -102,11 +110,12 @@@ BUILTIN_TOOL_DESCRIPTIONS: Dict[str, st"resolve_contact": "Look up a contact's email address by name. Searches CardDAV address book and sent email history. Use when the user says 'message [name]', 'email [name]', or 'send to [name]' without an email address.","manage_contact": "Create, update, delete, or list CardDAV contacts. Use to save a new contact, change an existing one's email/phone, or remove one. Action=list returns uids needed for update/delete. Use when the user says 'save this contact', 'add [name] to contacts', 'update [name]'s email', 'delete [name] from contacts'. Do not use for user identity facts like 'my name is <name>'; those are memory.","manage_notes": "Create and manage notes and checklists (Google Keep-style). ALWAYS use this for note/todo/checklist/reminder creation — NEVER hit /api/notes via app_api. Accepts natural-language `due_date` like 'tomorrow at 9am' or '11pm today' (parsed in the USER'S timezone). The due_date IS the reminder — it fires a notification at that time, so do NOT also create a calendar event for the same reminder. Set colors, labels, pin, archive. Do NOT use manage_memory for note content.",- "manage_calendar": "Calendar event management: list, create, update, delete. Each event can carry a tag/category (event_type — work/personal/health/travel/meal/social/admin/other) and importance (low/normal/high/critical). Use ISO datetimes; supports all-day events. For event reminders/alarms, pass reminder_minutes; this creates the Notes reminder, so do not also call manage_notes for the same reminder.",+ "manage_calendar": "Calendar event management: list, create, update, delete. Each event can carry a tag/category (event_type — work/personal/health/travel/meal/social/admin/other) and importance (low/normal/high/critical). Resolve today/tomorrow using the Current date and time context, then use ISO datetimes in the user's local wall time; supports all-day events. For event reminders/alarms, pass reminder_minutes; this creates the Notes reminder, so do not also call manage_notes for the same reminder.","download_model": "Download a HuggingFace model to a local or remote server. Specify repo_id (e.g. 'Qwen/Qwen3-8B'), optional server host, and optional include filter for specific files.",- "serve_model": "Start serving a model with vLLM, SGLang, llama.cpp, Ollama, or Diffusers. For image/inpainting/diffusion use python3 scripts/diffusion_server.py --model <repo> --port 8100. After launch, call list_served_models for readiness/errors and retry suggestions.",+ "serve_model": "Start serving a model with vLLM, SGLang, llama.cpp, Ollama, or Diffusers. cmd MUST start with the binary directly — e.g. `vllm serve /mnt/HADES/models/Qwen3.5-397B-A17B-AWQ --port 8003 --tensor-parallel-size 8 …`. NEVER prefix with `cd …`, `source …`, or chain with `&&`/`||` — those get rejected by the validator. The venv activation (env_prefix) and CUDA env are added automatically from the target host's saved settings. For image/inpainting/diffusion use python3 scripts/diffusion_server.py --model <repo> --port 8100. After launch, call list_served_models for readiness/errors and retry suggestions. If serve_model fails with 'Invalid characters in cmd', simplify to the bare binary + args.","list_served_models": "List currently running model servers in the Cookbook — shows status (loading, ready, idle, error), model name, port, throughput, and serve failure diagnosis/retry suggestions. Use when the user asks 'what's running', 'show my cookbook', 'which models are up', 'what's serving'.","stop_served_model": "Stop a running model server in the Cookbook by session ID or model name. Use when the user says 'kill my cookbook', 'stop the model', 'kill the serve', 'shut down vLLM', 'cancel the running model'.",+ "tail_serve_output": "Read the actual tmux stderr/traceback of a cookbook serve/download task. Use to debug WHY a task is `crashed`/`error` (compute_89 nvcc mismatch, OOM, missing kernels, wrong attention backend, etc.) so you can call serve_model with adjusted flags. Pass session_id from list_served_models; tail defaults to 300, bump if the error references 'see root cause above'.","list_downloads": "List in-progress HuggingFace model downloads in the Cookbook. Shows model name, phase, percent, session ID. Use for 'what's downloading', 'show my downloads', 'check download progress'.","cancel_download": "Cancel an in-progress model download by tmux session ID. Use for 'cancel the download', 'stop downloading X', 'kill the download'. Call list_downloads first to get the session_id.","search_hf_models": "Search HuggingFace for models matching a query (e.g. 'qwen 8B', 'flux', 'llama-3 instruct'). Returns ranked repo IDs with sizes and download counts. Use for 'find a model', 'search huggingface for X', 'what models are there for Y'.",diff --cc static/js/cookbookRunning.jsindex b532602db,1f225b7d1..64ddd93d4--- a/static/js/cookbookRunning.js+++ b/static/js/cookbookRunning.js@@@ -2483,21 -2464,11 +2500,27 @@@ async function _reconnectTask(el, task} else {const downloadLooksSuccessful = !lastOutput.includes('DOWNLOAD_FAILED')&& (lastOutput.includes('DONE') || lastOutput.includes('100%') || lastOutput.includes('/snapshots/') || lastOutput.includes('Download complete') || lastOutput.includes('DOWNLOAD_OK'));+ // Pip install / reinstall tasks are launched via _launchServeTask (so+ // they show up in the Running tab + use tmux) but they aren't real+ // serves — the cmd is `python3 -m pip ...` and the success markers+ // are pip's own. Without this branch, a successful reinstall ends+ // with no "Uvicorn running on" line and gets mis-flagged as a crashed+ // serve.+ const _isPipTask = ((task.payload?.repo_id || '').startsWith('pip-'))+ || /python3? -m pip\b/.test(task.payload?._cmd || '');+ const pipLooksSuccessful = _isPipTask+ && /Successfully installed|Requirement already (?:satisfied|up-to-date)/i.test(lastOutput)+ && !/error:|ERROR:/.test(lastOutput.slice(-1024));const serveLooksReady = task.type === 'serve' && _serveOutputLooksReady({ ...task, output: lastOutput });- const looksSuccessful = task.type === 'download'- ? downloadLooksSuccessful- : (_isPipTask ? pipLooksSuccessful : serveLooksReady);+ // Dependency installs are tracked as download tasks but finish with a- // pip exit-0 sentinel, not HF download markers — so check that too.++ // pip exit-0 sentinel, not HF download markers — check that too.++ // Standalone pip-* serves finish with pip's own success line, not++ // HF or "Uvicorn running on".+ const depInstallSucceeded = !!task.payload?._dep && _depInstallSucceeded(lastOutput);- const looksSuccessful = depInstallSucceeded || (task.type === 'download' ? downloadLooksSuccessful : serveLooksReady);++ const looksSuccessful = depInstallSucceeded++ || (task.type === 'download'++ ? downloadLooksSuccessful++ : (_isPipTask ? pipLooksSuccessful : serveLooksReady));if (!lastOutput.trim() || !looksSuccessful) {_updateTask(task.sessionId, { status: 'crashed' });el.dataset.status = 'crashed';