Commit graph

22 commits

Author SHA1 Message Date
0484c6321a feat(memory): add session memory persistence module
Some checks failed
Tests / test (push) Failing after 5s
New cortex/memory/ module that provides:
- boot_assembler: builds BOOTSTRAP.md from threads, decisions, narrative
- thread_tracker: tracks conversation threads across sessions via NATS
- narrative_generator: daily narrative with Ollama LLM (fallback: structured)
- pre_compaction: snapshot pipeline before context compaction

CLI commands:
- cortex memory bootstrap [--dry-run] [--workspace DIR]
- cortex memory snapshot [--workspace DIR]
- cortex memory threads [--summary] [--hours N]

All paths configurable via WORKSPACE_DIR, NATS_URL, AGENT_NAME env vars.
No hardcoded paths. Works with any OpenClaw agent.

Fixes array/dict handling for empty threads.json and decisions.json.
2026-02-13 11:52:25 +01:00
d60d337da3 feat: expand signal extraction — positive reinforcement, teaching, soft redirects
Some checks failed
Tests / test (push) Failing after 5s
- Renamed to 'Preference & Learning Pair Extractor'
- NEW: Positive reinforcement detection (praise, affirmation, emoji, accept+continue)
- NEW: Teaching moment detection (rules, explanations, reminders, preferences)
- NEW: Soft redirect detection (let's rather, alternative plan, switch to)
- Outputs: DPO pairs, SFT pairs (alpaca format), teaching pairs
- Improved false positive filters (subagent output, apt, system messages)
- 4x more training signal: 3 → 11 pairs from same 30-day window
- 446 tests passing
2026-02-12 10:23:31 +01:00
a3764c627d feat: DPO preference pair extractor
Some checks failed
Tests / test (push) Failing after 5s
- Extracts Direct Preference Optimization training pairs from session transcripts
- Detects corrections via regex patterns (direct, redirect, frustration, forgotten, etc.)
- Supports session JSONL files (primary) and NATS events (fallback)
- Async NATS fetching via nats-py ordered consumer for bulk reads
- Outputs training format (prompt/chosen/rejected) and detailed format with metadata
- 41 tests covering correction detection, false positives, event parsing, pair building
- CLI: python -m cortex.dpo_extractor --since 30d --source sessions --dry-run
2026-02-12 10:01:32 +01:00
c5e5ce9dc0 fix: all imports updated to cortex.xxx namespace — 405 tests green
Some checks failed
Tests / test (push) Failing after 5s
- Fixed bare 'from governance.' imports in source + tests
- Fixed bare 'from intelligence.' imports in tests
- Fixed mock.patch targets to use full cortex.xxx paths
- All 405 tests passing
2026-02-12 08:47:45 +01:00
fd7d75c0ed Merge darkplex-core into cortex — unified intelligence layer v0.2.0
Some checks failed
Tests / test (push) Failing after 2s
- Merged all unique darkplex-core modules into cortex:
  - intelligence/ subfolder (anticipator, collective, shared_memory, knowledge_cleanup, temporal, llm_extractor, loop)
  - governance/ subfolder (policy engine, risk scorer, evidence, enforcer, report generator)
  - entity_manager.py, knowledge_extractor.py
- Fixed bare 'from intelligence.' imports to 'from cortex.intelligence.'
- Added 'darkplex' CLI alias alongside 'cortex'
- Package renamed to darkplex-core v0.2.0
- 405 tests passing (was 234)
- 14 new test files covering all merged modules
2026-02-12 08:43:02 +01:00
fda607c204 fix: sync missing import os + stray } from darkplex-core PR #2 (YesMan)
All checks were successful
Tests / test (push) Successful in 4s
2026-02-11 20:25:29 +01:00
47f9703e3b feat: port needs, alert, summarize, anomaly, predict, monitor modules
All checks were successful
Tests / test (push) Successful in 3s
2026-02-09 16:20:22 +01:00
0123ec7090 fix: format specifier crash when stream_info is None
All checks were successful
Tests / test (push) Successful in 3s
2026-02-09 12:51:56 +01:00
cbd3556a09 feat: cortex init + schedule — self-managed jobs via systemd/launchd
All checks were successful
Tests / test (push) Successful in 2s
- cortex init: creates workspace, smoke tests, optional job setup
- cortex schedule list|status|enable|disable|logs
- Linux: systemd user timers
- macOS: launchd plists
- Jobs: feedback (6h), hygiene (daily), health (30min)
- --interval flag for custom intervals
- Replaces external OpenClaw cron jobs
- 169/169 tests green
2026-02-09 12:19:15 +01:00
734f96cfcf refactor: remove all hardcoded paths, use env vars + config
All checks were successful
Tests / test (push) Successful in 2s
All ~/clawd/ references replaced with configurable paths:
- CORTEX_HOME (default: ~/.cortex)
- CORTEX_MEMORY_DIR, CORTEX_CONFIG, CORTEX_GROWTH_LOG, CORTEX_ROADMAP
- permanent_files configurable via config.json
- Tests pass both with and without env vars set
- 169/169 tests green
2026-02-09 12:13:18 +01:00
0972e81ec8 ci: fix PATH for pip on dock5 host runner
All checks were successful
Tests / test (push) Successful in 2s
2026-02-09 11:58:33 +01:00
33bb697da8 ci: repo now public, should clone fine
Some checks failed
Tests / test (push) Failing after 0s
2026-02-09 11:56:13 +01:00
134b130ca0 ci: manual checkout without actions/checkout
Some checks failed
Tests / test (push) Failing after 7m17s
2026-02-09 11:48:51 +01:00
06f6b867be ci: use host execution mode
Some checks failed
Tests / test (push) Failing after 0s
2026-02-09 11:39:07 +01:00
5904237eb8 ci: debug runner
Some checks failed
Tests / test (push) Failing after 16s
2026-02-09 11:38:01 +01:00
6fbdd56480 ci: trigger with host-native runner
Some checks failed
Tests / test (push) Failing after 18s
2026-02-09 11:36:24 +01:00
fbffe52210 ci: trigger pipeline with updated runner config
Some checks failed
Tests / test (push) Failing after 15s
2026-02-09 11:34:47 +01:00
7c3a14a945 ci: use ubuntu-latest with python container
Some checks failed
Tests / test (push) Failing after 15s
2026-02-09 11:33:37 +01:00
a3668d2534 ci: fix checkout action URL for Forgejo
Some checks failed
Tests / test (push) Failing after 6s
2026-02-09 11:32:52 +01:00
34942079f1 ci: add Forgejo Actions workflow (pytest + smoke tests)
Some checks failed
Tests / test (push) Failing after 7s
2026-02-09 11:32:00 +01:00
58251e5ce1 fix: all 169 tests passing
- Fixed auto_handoff: added default markers (DECISION/TODO/BLOCKED/QUESTION)
- Fixed enhanced_search: internal imports use cortex. prefix
- Fixed intent_classifier test: stronger WHEN query for date_tokens test
- Fixed test imports: all use cortex.module_name
- Fixed triage test: accept MINIMAL classification for very low priority
- Fixed typo: self.self.assertIn → self.assertIn
2026-02-09 11:21:44 +01:00
43d033e242 feat: initial cortex package — 8 intelligence modules, CLI, Docker
Modules: triage, health_scanner, feedback_loop, memory_hygiene,
         roadmap, validate_output, enhanced_search, auto_handoff
         + composite_scorer, intent_classifier

CLI: 'cortex <module> <command>' unified entry point
Tests: 157/169 passing (12 assertion mismatches from rename)
Docker: python:3.11-slim based
2026-02-09 11:18:20 +01:00