feat: http_post tool, nc_talk_history tool, local orchestrator retry
- http_post: POST to external URLs with per-user URL prefix allowlist
(home/{user}/http_allowlist.json); admin-only, confirm-required
- nc_talk_history: read recent NC Talk messages via Basic Auth (requires
nc_username + nc_app_password in channels.json under nextcloud)
- openai_orchestrator: _chat_with_retry() wraps both API calls with
exponential backoff (3 attempts, 1s/2s) on connection errors and
transient status codes (429, 500, 502, 503, 504)
- Docs updated: CLAUDE.md, HELP.md, TODO, MASTER, ROADMAP (50 tools)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,8 @@ Cortex is a self-hosted personal AI platform. It routes messages from any input
|
||||
| Distill safety | ✅ Live | Per-persona asyncio lock, per-endpoint cooldowns, Rebuild option |
|
||||
| Guided onboarding | ✅ Live | Setup Step 3 for OpenRouter; existing-user banner; settings quick-link |
|
||||
|
||||
**50 orchestrator tools** — `http_post` (URL allowlist POST), `nc_talk_history` (read Talk messages), and local orchestrator retry logic added 2026-05-09.
|
||||
|
||||
**Active users / personas:** scott/inara, holly/tina, brian/wintermute
|
||||
|
||||
---
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
- ✅ Sub-agent spawning — `spawn_agent` tool; per-host concurrency limit; Gemini API + local OpenAI backends
|
||||
- ✅ Web content extraction — `web_read` via trafilatura; strips ads/nav/boilerplate; 128K cap
|
||||
- ✅ Session log reader — `session_read(date)` tool; complements `session_search`
|
||||
- ✅ `http_post` — POST to external URLs with per-user URL prefix allowlist; admin-only, confirm-required
|
||||
- ✅ `nc_talk_history` — read recent NC Talk messages; requires nc_username + nc_app_password in channels.json
|
||||
- ✅ Local orchestrator retry — exponential backoff on 429/5xx/connection errors (3 attempts)
|
||||
- [ ] Knowledge import — markdown → AE Journals (import script)
|
||||
- [ ] Dev agent pipeline — specialist agents + supervisor + approval gate
|
||||
- [ ] Gitea webhook integration + Actions CI
|
||||
|
||||
@@ -41,7 +41,9 @@ automatically. Remaining work is quality/reliability parity, not ground-up desig
|
||||
- [x] Context budget: `_context_budget()` uses `context_k * 1000 * 0.75`, min 16k — 2026-05-06
|
||||
- [x] Context compaction: `_compact_messages()` trims old tool results before each round and before the confirmation-gate call — 2026-05-06
|
||||
- [x] Error handling: malformed tool args caught + logged; tool execution errors returned as strings
|
||||
- [ ] Retry logic on transient API errors (connection timeout, 429, 503)
|
||||
- [x] Retry logic on transient API errors (connection timeout, 429, 503) — 2026-05-09
|
||||
- `_chat_with_retry()` helper in `openai_orchestrator.py`; 3 attempts, exponential backoff (1s, 2s)
|
||||
- Retries on `APIConnectionError` and `APIStatusError` with status 429/500/502/503/504
|
||||
- [ ] Test end-to-end with Gemma 4 E4B and 26B A4B on scott_gaming
|
||||
- [ ] Review `ARCH__FUTURE.md` agent architecture ideas before finalising design
|
||||
- Reference: `docs/OPEN_WEBUI_API.md`, `documentation/ARCH__FUTURE.md` §1
|
||||
@@ -87,16 +89,15 @@ system prompt by `context_loader.py` at all tiers.
|
||||
- Supports `local_openai` and `gemini_api` model types; returns error string for others
|
||||
- Admin-only tool (powerful — can spawn arbitrarily long sub-tasks)
|
||||
- Host UI: "Max parallel" number input in host edit/add forms
|
||||
- [ ] **`http_post`** — POST to external URLs
|
||||
- Params: `url: str`, `body: dict | str`, `headers: dict | None`
|
||||
- Per-user host allowlist in `home/{user}/http_allowlist.json` (same pattern as email)
|
||||
- Default: blocked unless URL host matches an allowlist entry
|
||||
- Confirm-required for safety
|
||||
- [ ] **`nc_talk_history`** — read recent Talk messages before replying
|
||||
- Params: `conversation_token: str`, `limit: int = 20`
|
||||
- Returns last N messages with sender + timestamp
|
||||
- Admin-only (requires NC Talk API credentials from channels.json)
|
||||
- [ ] **`http_post`** — POST to external URLs with allowlist
|
||||
- [x] **`http_post`** — POST to external URLs — 2026-05-09
|
||||
- Params: `url: str`, `body: str`, `headers: dict | None`, `max_chars: int`
|
||||
- Per-user URL prefix allowlist in `home/{user}/http_allowlist.json` (JSON array of prefixes)
|
||||
- Default: blocked if no allowlist or URL doesn't match any prefix
|
||||
- Admin-only, confirm-required
|
||||
- [x] **`nc_talk_history`** — read recent Talk messages — 2026-05-09
|
||||
- Params: `conversation_token: str` (optional, defaults to notification_room), `limit: int = 20`
|
||||
- Returns last N messages with sender + timestamp, chronological order
|
||||
- Admin-only; requires `nc_username` and `nc_app_password` in channels.json under `nextcloud`
|
||||
- [ ] **`task_list` priority filter** — add `priority` param alongside existing `status`
|
||||
- [x] **`http_fetch` max_chars** — optional param, default 8192, cap at 32768 — 2026-05-09
|
||||
- [x] **`web_read(url, max_chars=16000)`** — clean article extraction via trafilatura; strips ads/nav/boilerplate, returns markdown — 2026-05-09
|
||||
|
||||
Reference in New Issue
Block a user