@foresight/memory
ForeSight: a temporal-aspect long-term memory plugin for DeepSeek Harness (dsh)
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xiangrui979/foresight说明文档
阅读完整 README ↗Configuration — where does my data go?
Your data lives OUTSIDE the repo, in your own data directory. The plugin never ships any user data; the repository is pure code + templates.
Data directory layout
/
├── SOUL.md # personality (copy from templates/SOUL.md.example)
├── user.md # user profile (copy from templates/user.md.example)
├── policy.yaml # all tunables (copy from templates/policy.yaml.example)
└── foresight.db # SQLite store (created automatically)
On first run the plugin expects the three text files to exist. The plugin creates the directory if needed but does not silently write policy — copy the templates, then adjust:
mkdir -p ~/.config/foresight
cp templates/SOUL.md.example ~/.config/foresight/SOUL.md
cp templates/user.md.example ~/.config/foresight/user.md
cp templates/policy.yaml.example ~/.config/foresight/policy.yaml
Resolution chain
explicit options (adapter) → environment variables → policy.yaml → defaults
| Setting | Env var | Default |
|---|---|---|
| data directory | FORESIGHT_MEMORY_DIR | %APPDATA%/foresight (win) / ~/.local/share/foresight (unix) |
| db file | FORESIGHT_DB_FILE | foresight.db |
| embed URL | FORESIGHT_EMBED_URL | http://localhost:11434 |
| embed model | FORESIGHT_EMBED_MODEL | nomic-embed-text-v2-moe |
| LLM base URL | FORESIGHT_LLM_BASE_URL | https://api.deepseek.com/v1 |
| LLM model | FORESIGHT_LLM_MODEL | deepseek-v4-flash |
Policy file
policy.yaml is the single source of truth for behavior: permission matrix,
aspect registry (TTL, dwell, injection mode), gate categories, activation β
and decay constants, retrieval factor weights, injection budgets, nudge
cadence, server port/token. You decide your assistant's personality,
profile, and memory policy — none of it is baked into the code.