From 1344c64819505b3a81e6b934a2d37bec900f6ca8 Mon Sep 17 00:00:00 2001 From: bcherb2 Date: Wed, 18 Nov 2026 22:43:58 -0500 Subject: [PATCH] feat: glm settings, wakeonlan, MacBook vault path; drop OpenAI key - dot_claude/settings-glm.json: the model map glm() passes to claude, carried from ben-pc; no other machine had it, so glm() failed everywhere - core/wakeonlan in the dotup manifest, for the private tier's wakeup_tv - sysjournal and the vault symlink now find the MacBook's personal vault, which Obsidian Sync named "Personal" rather than "Obsidian-Personal"; candidates must contain .obsidian, so a plain ~/Documents/Personal folder or the stale Obsidian2 can no longer win - zshrc: remove the zsh-ai openai provider case; OPENAI_API_KEY is gone Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013FbsgpRXBucM8DAwLARhA6 --- .../bin/private_executable_dotsecrets.tmpl | 2 +- .tests/test.sh | 2 +- dot_claude/settings-glm.json | 7 +++++++ dot_local/bin/executable_sysjournal | 15 +++++++++------ dot_local/bin/symlink_vault.tmpl | 10 +++++++++- dot_local/share/dotup/packages.tsv | 1 + private_dot_zshrc | 1 - 7 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 dot_claude/settings-glm.json diff --git a/.tests/lab/fake-private/dot_local/bin/private_executable_dotsecrets.tmpl b/.tests/lab/fake-private/dot_local/bin/private_executable_dotsecrets.tmpl index a5ac991..8681647 100644 --- a/.tests/lab/fake-private/dot_local/bin/private_executable_dotsecrets.tmpl +++ b/.tests/lab/fake-private/dot_local/bin/private_executable_dotsecrets.tmpl @@ -146,7 +146,7 @@ while [ "$#" -ge 2 ]; do # -o env prints `KEY=VALUE`, where KEY is the secret's own name in bws. # Comparing it to the name we asked for is a free integrity check on the - # map: an id that points OPENAI_API_KEY at the Groq secret is caught here + # map: an id that points GEMINI_API_KEY at the Groq secret is caught here # rather than six months later as a confusing 401. line="$(bws secret get "$id" -o env 2>/dev/null)" \ || abort "could not fetch $name from bws (no network, or the token is wrong or revoked)" diff --git a/.tests/test.sh b/.tests/test.sh index 148d912..165e110 100755 --- a/.tests/test.sh +++ b/.tests/test.sh @@ -169,7 +169,7 @@ done # go-tools is `go install`; without a go there is nothing to run it. reset; sh $D toggle p:core/go >/dev/null is "dropping go drops go-tools" "off" "$(on core/go-tools)" -# bws-secrets promised seven API keys and installed nothing to fetch them with. +# bws-secrets promised six API keys and installed nothing to fetch them with. # The binary ships as a .zip and 24.04 minimal has no unzip, so the dependency # is real rather than decorative. reset; sh $D toggle p:private/bws-secrets >/dev/null diff --git a/dot_claude/settings-glm.json b/dot_claude/settings-glm.json new file mode 100644 index 0000000..7902bfa --- /dev/null +++ b/dot_claude/settings-glm.json @@ -0,0 +1,7 @@ +{ + "env": { + "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.7-flash", + "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7", + "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.6" + } +} diff --git a/dot_local/bin/executable_sysjournal b/dot_local/bin/executable_sysjournal index 9043962..c7331b4 100755 --- a/dot_local/bin/executable_sysjournal +++ b/dot_local/bin/executable_sysjournal @@ -15,14 +15,17 @@ set -euo pipefail # Vault location. SYSJOURNAL_VAULT always wins; otherwise take the first -# candidate that exists on this machine. Obsidian-Personal is the cutover -# target, so it is preferred wherever it has landed; the pre-split vault is -# the fallback for machines that have not synced the split yet, and it is -# named Obsidian25 on Linux but Obsidian2 on the MacBook. +# candidate on this machine that is an Obsidian vault (has a .obsidian dir). +# The split-off personal vault comes first: Obsidian Sync landed it as +# Obsidian-Personal on Linux but as plain "Personal" on the MacBook. The +# pre-split vault is the fallback for machines that have not synced the split +# yet, named Obsidian25 on Linux but Obsidian2 on the MacBook. Requiring +# .obsidian stops a generic ~/Documents/Personal folder from being mistaken +# for a vault, and stops the MacBook's stale Obsidian2 from winning. sysjournal_default_vault() { local c - for c in "Obsidian-Personal" "Obsidian25" "Obsidian2"; do - [ -d "$HOME/Documents/$c" ] && { printf '%s' "$HOME/Documents/$c"; return; } + for c in "Obsidian-Personal" "Personal" "Obsidian25" "Obsidian2"; do + [ -d "$HOME/Documents/$c/.obsidian" ] && { printf '%s' "$HOME/Documents/$c"; return; } done printf '%s' "$HOME/Documents/Obsidian-Personal" # for the error message } diff --git a/dot_local/bin/symlink_vault.tmpl b/dot_local/bin/symlink_vault.tmpl index 5e85b9f..516e5c7 100644 --- a/dot_local/bin/symlink_vault.tmpl +++ b/dot_local/bin/symlink_vault.tmpl @@ -1 +1,9 @@ -{{ .chezmoi.homeDir }}/Documents/Obsidian-Personal/Meta/bin/vault \ No newline at end of file +{{- /* The personal vault is Obsidian-Personal on Linux but "Personal" on the + MacBook (Obsidian Sync named it there). Same rule as sysjournal: first + candidate that is a vault wins, Obsidian-Personal when neither is. */ -}} +{{- $docs := joinPath .chezmoi.homeDir "Documents" -}} +{{- $vault := joinPath $docs "Obsidian-Personal" -}} +{{- if and (not (stat (joinPath $vault ".obsidian"))) (stat (joinPath $docs "Personal" ".obsidian")) -}} +{{- $vault = joinPath $docs "Personal" -}} +{{- end -}} +{{ $vault }}/Meta/bin/vault diff --git a/dot_local/share/dotup/packages.tsv b/dot_local/share/dotup/packages.tsv index 5cd7688..ddbbd3e 100644 --- a/dot_local/share/dotup/packages.tsv +++ b/dot_local/share/dotup/packages.tsv @@ -93,6 +93,7 @@ core magic-wormhole safe magic-wormhole magic-wormhole snap wormhole on dev core bitwarden-cli safe -snap bitwarden-cli snap bw on ubuntu core mosh safe mosh mosh core nmap safe nmap nmap +core wakeonlan safe wakeonlan wakeonlan for the wakeup_tv alias in the private tier's local.zsh core binwalk safe binwalk binwalk core pipx safe pipx pipx core age safe age age general purpose only now diff --git a/private_dot_zshrc b/private_dot_zshrc index 7aed51a..a29f801 100644 --- a/private_dot_zshrc +++ b/private_dot_zshrc @@ -127,7 +127,6 @@ plugins=(git zsh-autosuggestions sudo web-search dirhistory history) # nothing else. ollama is local and needs no key. case ${ZSH_AI_PROVIDER:-anthropic} in gemini) _zai_key=GEMINI_API_KEY ;; - openai) _zai_key=OPENAI_API_KEY ;; ollama) _zai_key= ;; *) _zai_key=ANTHROPIC_API_KEY ;; esac