diff --git a/.beads/.gitignore b/.beads/.gitignore index df4911d41..de3a828d0 100644 --- a/.beads/.gitignore +++ b/.beads/.gitignore @@ -1,5 +1,7 @@ # Dolt database (managed by Dolt, not git) dolt/ +dolt +df/ embeddeddolt/ # Runtime files diff --git a/Makefile b/Makefile index 932743e50..0da7296c6 100644 --- a/Makefile +++ b/Makefile @@ -921,7 +921,7 @@ lua-check-hammerspoon-dev: ## Run the Hammerspoon Lua check inside the Nix dev s ##@ Launchd Services .PHONY: launchctl -launchctl: launchctl-brew-upgrader launchctl-openclaw launchctl-cliproxyapi launchctl-cliproxyapi-backup launchctl-code-syncer launchctl-docker-postgres launchctl-dotfiles-updater launchctl-neverssl-keepalive launchctl-ollama launchctl-tmux-session-logger ## Restart all launchd agents. +launchctl: launchctl-brew-upgrader launchctl-openclaw launchctl-cliproxyapi launchctl-cliproxyapi-backup launchctl-code-syncer launchctl-docker-postgres launchctl-dolt launchctl-dotfiles-updater launchctl-neverssl-keepalive launchctl-ollama launchctl-tmux-session-logger ## Restart all launchd agents. .PHONY: launchctl-brew-upgrader launchctl-brew-upgrader: ## Restart brew-updater launchd agent. @@ -987,6 +987,18 @@ launchctl-docker-postgres: ## Restart docker-postgres launchd agent. @launchctl load ~/Library/LaunchAgents/org.nix-community.home.docker-postgres.plist @echo "✅ docker-postgres restarted" +.PHONY: launchctl-dolt +launchctl-dolt: ## Restart dolt launchd agent. + @echo "🔄 Restarting dolt..." + @if [ "$(DETECTED_HOST)" = "galactica" ] || [ "$(HOST)" = "galactica" ]; then \ + launchctl unload ~/Library/LaunchAgents/org.nix-community.home.dolt.plist 2>/dev/null || true; \ + sleep 3; \ + launchctl load ~/Library/LaunchAgents/org.nix-community.home.dolt.plist; \ + else \ + echo "Skipping dolt launchd agent (host not galactica)"; \ + fi + @echo "✅ dolt restarted" + .PHONY: launchctl-ollama launchctl-ollama: ## Restart ollama launchd agent. @echo "🔄 Restarting ollama..." @@ -1006,7 +1018,7 @@ launchctl-tmux-session-logger: ## Restart tmux-session-logger launchd agent. ##@ Systemd Services (Linux) .PHONY: systemctl -systemctl: systemctl-cliproxyapi systemctl-cliproxyapi-backup systemctl-code-syncer systemctl-docker-postgres systemctl-dotfiles-updater systemctl-make-updater systemctl-neverssl-keepalive systemctl-obsidian systemctl-ollama systemctl-openclaw systemctl-paperclip systemctl-tmux-session-logger ## Restart all systemd user services. +systemctl: systemctl-cliproxyapi systemctl-cliproxyapi-backup systemctl-code-syncer systemctl-docker-postgres systemctl-dolt systemctl-dotfiles-updater systemctl-make-updater systemctl-neverssl-keepalive systemctl-obsidian systemctl-ollama systemctl-openclaw systemctl-paperclip systemctl-tmux-session-logger ## Restart all systemd user services. .PHONY: systemctl-cliproxyapi systemctl-cliproxyapi: ## Restart cliproxyapi systemd user service. @@ -1033,6 +1045,17 @@ systemctl-docker-postgres: ## Restart docker-postgres systemd user service. @systemctl --user restart docker-postgres.service || true @echo "✅ docker-postgres restarted" +.PHONY: systemctl-dolt +systemctl-dolt: ## Restart Dolt systemd user service. + @echo "🔄 Restarting dolt..." + @if [ "$(DETECTED_HOST)" = "kyber" ] || [ "$(HOST)" = "kyber" ]; then \ + systemctl --user daemon-reload; \ + systemctl --user restart dolt.service; \ + else \ + echo "Skipping dolt.service (host not kyber)"; \ + fi + @echo "✅ dolt restarted" + .PHONY: systemctl-dotfiles-updater systemctl-dotfiles-updater: ## Restart dotfiles-updater systemd user service. @echo "🔄 Restarting dotfiles-updater..." diff --git a/config/openclaw/openclaw.template.json b/config/openclaw/openclaw.template.json index dfb1bb8bf..2895423f8 100644 --- a/config/openclaw/openclaw.template.json +++ b/config/openclaw/openclaw.template.json @@ -204,7 +204,7 @@ ] }, "workspace": "__HOME__/.openclaw/workspace", - "thinkingDefault": "high", + "thinkingDefault": "low", "maxConcurrent": 4, "subagents": { "maxConcurrent": 8 @@ -231,7 +231,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "code-reviewer-sonnet", @@ -249,7 +250,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "medium" }, { "id": "code-reviewer-glm", @@ -266,7 +268,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "code-reviewer-gpt", @@ -356,7 +359,8 @@ "read", "write" ] - } + }, + "thinkingDefault": "off" }, { "id": "security-scanner", @@ -391,7 +395,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "docs-checker", @@ -427,7 +432,8 @@ "edit", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "sales", @@ -502,7 +508,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "mindset", @@ -520,7 +527,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "routine", @@ -538,7 +546,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "medium" }, { "id": "dev-opus", @@ -558,7 +567,8 @@ "edit", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "dev-gpt", @@ -636,7 +646,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "strategy-gpt", @@ -690,7 +701,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "medium" }, { "id": "devops", @@ -709,7 +721,8 @@ "edit", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "amp", @@ -832,6 +845,16 @@ "id": "120363405790595065@g.us" } } + }, + { + "agentId": "dev-gpt", + "match": { + "channel": "whatsapp", + "peer": { + "kind": "group", + "id": "120363425572081403@g.us" + } + } } ], "broadcast": { @@ -852,6 +875,9 @@ "120363405790595065@g.us": [ "dev-gpt" ], + "120363425572081403@g.us": [ + "dev-gpt" + ], "120363407321327235@g.us": [ "strategy-gpt" ] @@ -992,7 +1018,7 @@ ] }, "slots": { - "memory": "" + "memory": "memory-core" }, "entries": { "telegram": { @@ -1014,7 +1040,7 @@ "memory-wiki": { "enabled": true, "config": { - "vaultMode": "bridge", + "vaultMode": "unsafe-local", "vault": { "path": "__HOME__/ghq/github.com/shunkakinoki/wiki", "renderMode": "obsidian" @@ -1025,13 +1051,11 @@ "vaultName": "Shun Kakinoki", "openAfterWrites": false }, - "bridge": { - "enabled": true, - "readMemoryArtifacts": true, - "indexDreamReports": true, - "indexDailyNotes": true, - "indexMemoryRoot": true, - "followMemoryEvents": true + "unsafeLocal": { + "allowPrivateMemoryCoreAccess": true, + "paths": [ + "__HOME__/.openclaw/workspace" + ] }, "ingest": { "autoCompile": true, diff --git a/config/openclaw/openclaw.tpl.json b/config/openclaw/openclaw.tpl.json index cc11e5c55..f888439d7 100644 --- a/config/openclaw/openclaw.tpl.json +++ b/config/openclaw/openclaw.tpl.json @@ -204,7 +204,7 @@ ] }, "workspace": "__HOME__/.openclaw/workspace", - "thinkingDefault": "high", + "thinkingDefault": "low", "maxConcurrent": 4, "subagents": { "maxConcurrent": 8 @@ -231,7 +231,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "code-reviewer-sonnet", @@ -249,7 +250,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "medium" }, { "id": "code-reviewer-glm", @@ -266,7 +268,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "code-reviewer-gpt", @@ -356,7 +359,8 @@ "read", "write" ] - } + }, + "thinkingDefault": "off" }, { "id": "security-scanner", @@ -391,7 +395,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "docs-checker", @@ -427,7 +432,8 @@ "edit", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "sales", @@ -502,7 +508,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "mindset", @@ -520,7 +527,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "routine", @@ -538,7 +546,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "medium" }, { "id": "dev-opus", @@ -558,7 +567,8 @@ "edit", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "dev-gpt", @@ -636,7 +646,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "high" }, { "id": "strategy-gpt", @@ -690,7 +701,8 @@ "read", "exec" ] - } + }, + "thinkingDefault": "medium" }, { "id": "devops", @@ -709,7 +721,8 @@ "edit", "exec" ] - } + }, + "thinkingDefault": "off" }, { "id": "amp", @@ -832,6 +845,16 @@ "id": "120363405790595065@g.us" } } + }, + { + "agentId": "dev-gpt", + "match": { + "channel": "whatsapp", + "peer": { + "kind": "group", + "id": "120363425572081403@g.us" + } + } } ], "broadcast": { @@ -852,6 +875,9 @@ "120363405790595065@g.us": [ "dev-gpt" ], + "120363425572081403@g.us": [ + "dev-gpt" + ], "120363407321327235@g.us": [ "strategy-gpt" ] @@ -992,7 +1018,7 @@ ] }, "slots": { - "memory": "" + "memory": "memory-core" }, "entries": { "telegram": { @@ -1014,7 +1040,7 @@ "memory-wiki": { "enabled": true, "config": { - "vaultMode": "bridge", + "vaultMode": "unsafe-local", "vault": { "path": "__HOME__/ghq/github.com/shunkakinoki/wiki", "renderMode": "obsidian" @@ -1025,13 +1051,11 @@ "vaultName": "Shun Kakinoki", "openAfterWrites": false }, - "bridge": { - "enabled": true, - "readMemoryArtifacts": true, - "indexDreamReports": true, - "indexDailyNotes": true, - "indexMemoryRoot": true, - "followMemoryEvents": true + "unsafeLocal": { + "allowPrivateMemoryCoreAccess": true, + "paths": [ + "__HOME__/.openclaw/workspace" + ] }, "ingest": { "autoCompile": true, diff --git a/home-manager/packages/default.nix b/home-manager/packages/default.nix index 6b062abc2..fdaa6f36a 100644 --- a/home-manager/packages/default.nix +++ b/home-manager/packages/default.nix @@ -24,6 +24,7 @@ with pkgs; broot bun clipse + cmatrix cloudflared copybara curl diff --git a/home-manager/services/default.nix b/home-manager/services/default.nix index db5db2c9b..7f25bd8ad 100644 --- a/home-manager/services/default.nix +++ b/home-manager/services/default.nix @@ -11,6 +11,7 @@ let cliproxyapi = import ./cliproxyapi; codeSyncer = import ./code-syncer { inherit pkgs; }; darkman = import ./darkman { inherit pkgs; }; + dolt = ./dolt; docker = import ./docker { inherit lib pkgs; }; dockerPostgres = import ./docker-postgres { inherit pkgs; }; dotfilesUpdater = import ./dotfiles-updater { inherit pkgs; }; @@ -31,6 +32,7 @@ in cliproxyapi codeSyncer darkman + dolt docker dockerPostgres dotfilesUpdater diff --git a/home-manager/services/dolt/default.nix b/home-manager/services/dolt/default.nix new file mode 100644 index 000000000..350628085 --- /dev/null +++ b/home-manager/services/dolt/default.nix @@ -0,0 +1,68 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: +let + inherit (inputs.host) isKyber isGalactica; + homeDir = config.home.homeDirectory; + repoDir = "${homeDir}/dotfiles"; + beadsDir = "${repoDir}/.beads"; + enabled = isKyber || isGalactica; + startScript = pkgs.writeShellScript "dotfiles-dolt-start.sh" '' + set -euo pipefail + + mkdir -p "${beadsDir}" + + if [ -d "${beadsDir}/dolt" ] && [ ! -L "${beadsDir}/dolt" ]; then + if [ -e "${beadsDir}/df" ]; then + echo "Refusing to migrate ${beadsDir}/dolt because ${beadsDir}/df already exists" >&2 + exit 1 + fi + + mv -f "${beadsDir}/dolt" "${beadsDir}/df" + fi + + if [ -d "${beadsDir}/df" ]; then + ln -sfn df "${beadsDir}/dolt" + fi + + exec "${pkgs.dolt}/bin/dolt" sql-server \ + -H 127.0.0.1 \ + -P 3307 \ + --data-dir "${beadsDir}" \ + --loglevel info + ''; +in +lib.mkIf enabled { + launchd.agents.dolt = lib.mkIf pkgs.stdenv.isDarwin { + enable = true; + config = { + ProgramArguments = [ startScript ]; + KeepAlive = true; + RunAtLoad = true; + WorkingDirectory = repoDir; + StandardOutPath = "/tmp/dolt.log"; + StandardErrorPath = "/tmp/dolt.error.log"; + }; + }; + + systemd.user.services.dolt = lib.mkIf pkgs.stdenv.isLinux { + Unit = { + Description = "Dolt SQL server for dotfiles beads"; + After = [ "network.target" ]; + }; + Service = { + Type = "simple"; + ExecStart = startScript; + Restart = "always"; + RestartSec = 5; + WorkingDirectory = repoDir; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + }; +}