personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add sol config CLI and retire env alias

Introduce a new command for journal configuration inspection.

- Add with default JSON output and SHELL=/bin/bash
COREPACK_ENABLE_AUTO_PIN=0
COLORTERM=
PYENV_SHELL=fish
NVM_INC=/home/jer/.nvm/versions/node/v20.16.0/include/node
_OLD_FISH_PROMPT_OVERRIDE=/home/jer/projects/sunstone/.venv
HISTCONTROL=ignoredups
XDG_MENU_PREFIX=gnome-
TERM_PROGRAM_VERSION=3.5a
QT_IM_MODULES=wayland;ibus
TMUX=/tmp/tmux-1000/default,18116,0
HOSTNAME=fedora
HISTSIZE=1000
GUESTFISH_OUTPUT=\e[0m
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
OPENAI_API_KEY=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
XMODIFIERS=@im=ibus
DESKTOP_SESSION=gnome
KITTY_PID=17759
GPG_TTY=not a tty
PKG_AUTH_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWFsX2dyb3VwcyI6WyJqZXIiLCIkYWxsIiwiJGF1dGhlbnRpY2F0ZWQiLCJAYWxsIiwiQGF1dGhlbnRpY2F0ZWQiLCJhbGwiXSwibmFtZSI6ImplciIsImdyb3VwcyI6WyJqZXIiLCIkYWxsIiwiJGF1dGhlbnRpY2F0ZWQiLCJAYWxsIiwiQGF1dGhlbnRpY2F0ZWQiLCJhbGwiXSwiaWF0IjoxNzM2Nzk5NjI0LCJuYmYiOjE3MzY3OTk2MjQsImV4cCI6MTc0NDU3NTYyNH0.oMUcefDGFf1hkG5EVGI7D0CnKusy5oOkBamo0up_0SE
EDITOR=/usr/bin/nano
GH_PAGER=cat
PWD=/home/jer/.local/share/hopper/lodes/jpel37ge/worktree
XDG_SESSION_DESKTOP=gnome
LOGNAME=jer
XDG_SESSION_TYPE=wayland
CODEX_MANAGED_BY_NPM=1
SYSTEMD_EXEC_PID=14973
DESKTOP_STARTUP_ID=gnome-shell/kitty/14973-0-fedora_TIME111151
KITTY_PUBLIC_KEY=1:gwcYz@X<Ls<TIlj2eT12-M%a%BQ6M#m>fSUF`vFp
NoDefaultCurrentDirectoryInExePath=1
GUESTFISH_RESTORE=\e[0m
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
CLAUDECODE=1
GDM_LANG=en_US.UTF-8
HOME=/home/jer
USERNAME=jer
SSH_ASKPASS=/usr/bin/ksshaskpass
LANG=C.UTF-8
XDG_CURRENT_DESKTOP=GNOME
_OLD_VIRTUAL_PATH=/home/jer/.pyenv/shims:/home/jer/go/bin:/home/jer/.local/bin:/home/jer/.pyenv/bin:/home/jer/.bun/bin:/home/jer/.bun/bin:/usr/local/bin:/usr/bin
VIRTUAL_ENV=/home/jer/.local/share/hopper/lodes/jpel37ge/worktree/.venv
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/org.gnome.Shell@wayland.service/memory.pressure
WAYLAND_DISPLAY=wayland-0
HOPPER_LID=jpel37ge
KITTY_WINDOW_ID=1
GUESTFISH_PS1=\[\e[1;32m\]><fs>\[\e[0;31m\]
INVOCATION_ID=673132b9d2eb4447bd1298464cd5af3e
SSH_CONNECTION=174.198.131.171 12546 192.168.4.88 22
MANAGERPID=14567
GJS_DEBUG_OUTPUT=stderr
NVM_DIR=/home/jer/.nvm
MOZ_GMP_PATH=/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed
GNOME_SETUP_DISPLAY=:1
XDG_SESSION_CLASS=user
TERMINFO=/usr/lib64/kitty/terminfo
TERM=dumb
CODEX_THREAD_ID=019c3633-e394-73a3-b006-608c93b48da6
LESSOPEN=||/usr/bin/lesspipe.sh %s
USER=jer
GIT_PAGER=cat
TMUX_PANE=%200
SHLVL=2
NVM_CD_FLAGS=
GIT_EDITOR=true
PAGER=cat
GUESTFISH_INIT=\e[1;34m
QT_IM_MODULE=ibus
VIRTUAL_ENV_PROMPT=.venv
MANAGERPIDFDID=14568
NO_COLOR=1
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
CODEX_CI=1
LC_CTYPE=C.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
CLAUDE_CODE_ENTRYPOINT=cli
PYENV_ROOT=/home/jer/.pyenv
DEBUGINFOD_URLS=ima:enforcing https://debuginfod.fedoraproject.org/ ima:ignore
BUN_INSTALL=/home/jer/.bun
DEBUGINFOD_IMA_CERT_PATH=/etc/keys/ima
KDEDIRS=/usr
JOURNAL_STREAM=9:49379
XDG_DATA_DIRS=/home/jer/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
PATH=/home/jer/.nvm/versions/node/v20.16.0/bin:/home/jer/.local/bin:/home/jer/bin:/home/jer/.codex/tmp/arg0/codex-arg0J13JzM:/usr/local/lib/node_modules/@openai/codex/vendor/x86_64-unknown-linux-musl/path:/home/jer/.local/share/hopper/lodes/jpel37ge/worktree/.venv/bin:/home/jer/.pyenv/shims:/home/jer/go/bin:/home/jer/.local/bin:/home/jer/.pyenv/bin:/home/jer/.bun/bin:/home/jer/projects/hopper/.venv/bin:/home/jer/.bun/bin:/home/jer/.bun/bin:/usr/local/bin:/usr/bin:/home/jer/go/bin
GDMSESSION=gnome
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
NVM_BIN=/home/jer/.nvm/versions/node/v20.16.0/bin
MAIL=/var/spool/mail/jer
KITTY_INSTALLATION_DIR=/usr/lib64/kitty
GIO_LAUNCHED_DESKTOP_FILE_PID=17759
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/kitty.desktop
TERM_PROGRAM=tmux
_=/usr/bin/env subcommand
() that reports JOURNAL_PATH and source.
- Register in command registry and Specialized tools group.
- Remove legacy JOURNAL_PATH=/home/jer/.local/share/solstone/journal (from default) alias and remove handling from supervisor.
- Add focused tests for config CLI JSON and env output behavior.
- Scope config pattern to repo root () so
is trackable.

+86 -13
+1 -1
.gitignore
··· 12 12 fixtures/journal/tokens/*.json 13 13 *.sqlite 14 14 *.log 15 - config*.py 15 + /config*.py 16 16 .installed 17 17 journal
+2 -1
sol.py
··· 48 48 "top": "think.top", 49 49 "callosum": "think.callosum", 50 50 "journal-stats": "think.journal_stats", 51 + "config": "think.config_cli", 51 52 "formatter": "think.formatters", 52 53 # observe package - multimodal capture 53 54 "transcribe": "observe.transcribe", ··· 82 83 83 84 ALIASES: dict[str, tuple[str, list[str]]] = { 84 85 "start": ("think.supervisor", []), 85 - "env": ("think.supervisor", ["--env"]), 86 86 } 87 87 88 88 # Command groupings for help display ··· 118 118 "maint", 119 119 ], 120 120 "Specialized tools": [ 121 + "config", 121 122 "journal-stats", 122 123 "formatter", 123 124 "detect-created",
+42
tests/test_config_cli.py
··· 1 + # SPDX-License-Identifier: AGPL-3.0-only 2 + # Copyright (c) 2026 sol pbc 3 + 4 + """Tests for the sol config CLI.""" 5 + 6 + import json 7 + 8 + from think.config_cli import main 9 + 10 + 11 + def test_config_prints_json(monkeypatch, capsys): 12 + """Default command prints full config JSON.""" 13 + monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") 14 + monkeypatch.setattr("sys.argv", ["sol config"]) 15 + 16 + main() 17 + 18 + output = capsys.readouterr().out 19 + config = json.loads(output) 20 + assert "identity" in config 21 + 22 + 23 + def test_config_env_prints_path(monkeypatch, capsys): 24 + """env subcommand prints resolved JOURNAL_PATH.""" 25 + monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") 26 + monkeypatch.setattr("sys.argv", ["sol config", "env"]) 27 + 28 + main() 29 + 30 + output = capsys.readouterr().out.strip() 31 + assert output == "JOURNAL_PATH=fixtures/journal (from shell)" 32 + 33 + 34 + def test_config_env_shows_source(monkeypatch, capsys): 35 + """env subcommand includes source for the resolved path.""" 36 + monkeypatch.setenv("JOURNAL_PATH", "fixtures/journal") 37 + monkeypatch.setattr("sys.argv", ["sol config", "env"]) 38 + 39 + main() 40 + 41 + output = capsys.readouterr().out.strip() 42 + assert output.endswith("(from shell)")
+41
think/config_cli.py
··· 1 + # SPDX-License-Identifier: AGPL-3.0-only 2 + # Copyright (c) 2026 sol pbc 3 + 4 + """CLI for inspecting journal configuration. 5 + 6 + Shows the resolved journal configuration as JSON, or prints JOURNAL_PATH with 7 + its source for shell integration. 8 + 9 + Usage: 10 + sol config Show full config JSON 11 + sol config env Show JOURNAL_PATH and source 12 + """ 13 + 14 + from __future__ import annotations 15 + 16 + import argparse 17 + import json 18 + 19 + from think.utils import get_config, get_journal_info, setup_cli 20 + 21 + 22 + def main() -> None: 23 + parser = argparse.ArgumentParser(description="Show journal configuration") 24 + subparsers = parser.add_subparsers(dest="subcommand") 25 + subparsers.add_parser("env", help="Show journal path and source") 26 + 27 + # Capture journal info BEFORE setup_cli() loads .env 28 + journal_info = get_journal_info() 29 + 30 + args = setup_cli(parser) 31 + 32 + if args.subcommand == "env": 33 + path, source = journal_info 34 + print(f"JOURNAL_PATH={path} (from {source})") 35 + else: 36 + config = get_config() 37 + print(json.dumps(config, indent=2)) 38 + 39 + 40 + if __name__ == "__main__": 41 + main()
-11
think/supervisor.py
··· 1245 1245 type=str, 1246 1246 help="Remote mode: sync to server URL instead of local processing", 1247 1247 ) 1248 - parser.add_argument( 1249 - "--env", 1250 - action="store_true", 1251 - help="Show journal path and source, then exit", 1252 - ) 1253 1248 return parser 1254 1249 1255 1250 ··· 1269 1264 journal_info = get_journal_info() 1270 1265 1271 1266 args = setup_cli(parser) 1272 - 1273 - # Handle --env: print journal info and exit 1274 - if args.env: 1275 - path, source = journal_info 1276 - print(f"JOURNAL_PATH={path} (from {source})") 1277 - return 1278 1267 1279 1268 journal_path = _get_journal_path() 1280 1269