Commit Graph

17 Commits

Author SHA1 Message Date
faligam
1aacf4aa20 Implement persistent API-key authentication
Protect the research lifecycle with X-API-Key validation backed by persistent user and key records. Store only salted scrypt hashes, support expiry and revocation, and expose a local admin CLI for create/list/revoke workflows.

Initialize only the authentication schema at startup, prevent SQL echo from exposing sensitive bound values, and keep health probes public. Add coverage for valid, missing, invalid, expired, and revoked keys.

Document deployment and key administration, update the local CLI to send NSCT_API_KEY, and record the reset handoff state.
2026-09-06 17:23:05 +02:00
faligam
64eb4e8465 Update reset handoff for API authentication work 2026-09-06 16:59:34 +02:00
NSCT Agent
6e2e7386ad stage20: context budgeting - per-stage token limits (planner 12k, claim 16k, contradiction 24k, synthesis 48k)
Implemented:
- context_budget.py: ContextBudgetConfig (Pydantic, frozen) mit 4 Stage-Limits,
  validation (ge/le), get_limit(), total_max_tokens, stage_keys
- context_budget.py: ContextBudgetTracker mit track_tokens(), get_usage(),
  is_exhausted(), reset_stage(), reset_all(), total_usage, elapsed_seconds
- context_budget.py: ContextBudgetExhaustedError mit stage_name, used_tokens, limit_tokens
- orchestrator.py: _track_context_tokens() Methode, context_budget_config/tracker init
- orchestrator.py: context_budget_tracker property export
- __init__.py: exports ContextBudgetConfig, ContextBudgetExhaustedError, ContextBudgetTracker
- priority_queue.py: __aenter__/__aexit__ auf async geandert (Testfix)
- test_context_budget.py: 28 Tests (DefaultConfig, TrackAccumulation, ExhaustedError,
  GetUsage, Reset, IsExhausted, InvalidStageNames, InvalidTokens)
- test_context_budget_integration.py: 6 Tests (Orchestrator-Integration)
- HANDOFF.md: Stage 20 abgeschlossen dokumentiert

Tests: 34 passed (28 unit + 6 integration) + 14 performance = 48 total
2026-08-29 08:57:18 +00:00
NSCT Agent
58488de7b3 docs: update HANDOFF.md — Stage 19 completed, 20 next 2026-08-28 17:32:32 +00:00
NSCT Agent
ce9b031ea0 docs: update HANDOFF.md — Stage 18 completed, 19 next 2026-08-28 16:23:43 +00:00
NSCT Agent
b23ff5a565 docs: update HANDOFF.md — Stages 14-16 completed, 17 next 2026-08-27 20:35:40 +00:00
NSCT Agent
413050bdd9 docs: update HANDOFF.md — Stage 16 completed, Stage 17 next 2026-08-27 19:52:04 +00:00
NSCT Agent
b2340fca63 docs: update HANDOFF.md — Stage 15 completed, Stage 16 next 2026-08-27 17:11:29 +00:00
NSCT Agent
c059fb0ffd docs: update HANDOFF.md — Stage 14 completed, Stage 15 next 2026-08-27 16:14:51 +00:00
Frerk Campen
a55e26f3b1 docs: update HANDOFF.md — Stage 13 completed, Stage 14 next 2026-08-26 11:22:02 +00:00
NSCT Agent
2ef7b67002 feat(stage12): implement Research Orchestrator 2026-08-26 10:29:57 +00:00
NSCT Agent
d76d48a0ee docs: update HANDOFF.md — Stages 10+11 completed, Stage 12 next 2026-08-25 15:42:00 +00:00
NSCT Agent
8582a8e60f docs: update HANDOFF.md — Stage 9 completed, Stage 10 next 2026-08-24 12:38:47 +00:00
NSCT Agent
1b54b172ca docs: update HANDOFF.md — Stage 8 completed, Stage 9 next 2026-08-24 07:52:43 +00:00
NSCT Agent
cc9d4f2ba5 docs: update HANDOFF.md — Stage 7 completed, Stage 8 next 2026-08-23 21:00:40 +00:00
NSCT Agent
d2294c58d0 docs: update HANDOFF.md — Stage 6 completed, Stage 7 next 2026-08-23 18:50:25 +00:00
NSCT Agent
27e494d161 docs: update HANDOFF.md — Stage 5 completed, Stage 6 next 2026-08-23 17:58:41 +00:00