Compare commits

...
Sign in to create a new pull request.

9 commits

Author SHA1 Message Date
9841c24ec9 Merge pull request 'Document the Vaultwarden fetch contract' (#12) from secrets-out-of-the-box into main
Some checks failed
Crowdin Sync / sync (push) Has been cancelled
Reviewed-on: #12
2026-06-23 06:57:41 +02:00
7da997402a Merge pull request 'feat(pkg): FreeBSD host baseline — ffmpeg, py311-pillow, python311 (hermes)' (#17) from feat/freebsd-hermes-runtime-pkgs into main 2026-06-21 10:29:02 +02:00
Sam & Claude
39dbee3b61 feat(pkg): FreeBSD host baseline — ffmpeg, py311-pillow, python311 (hermes runtime)
Some checks failed
CI / ci (pull_request) Has been cancelled
Keep the host baseline in sync with clawdie-iso pkg-list-host.txt (Tier 1 hermes
deps). ffmpeg (media/voice), py311-pillow (hermes core Pillow dep via
--system-site-packages venv), python311 explicit (python3 = 3.11).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 10:26:38 +02:00
393b0c76c7 Merge pull request 'docs(vault): update domedog findings — end-to-end PASS, bug found+fixed' (#16) from docs/vault-domedog-proof-passed into main
Some checks failed
Crowdin Sync / sync (push) Has been cancelled
Reviewed-on: #16
2026-06-20 07:11:32 +02:00
Sam & Claude
c2d5b5224f docs(vault): update domedog findings — end-to-end PASS, bug found+fixed
Some checks failed
CI / ci (pull_request) Has been cancelled
Rewrite the findings to reflect the corrected outcome after the first draft
misdiagnosed unlock as a password failure:

- End-to-end chain PASS: login + unlock + fetch DEEPSEEK_API_KEY + write .env
  + re-lock. Master password was correct all along; the earlier 'decryption
  failed' was a stale logged-in session side effect.
- Document the one real bug: clawdie-vault-fetch failed at 'bw config server'
  when already logged in ('Logout required' treated as fatal). Fixed in
  clawdie-iso fix/vault-fetch-bw-config-when-logged-in.
- Record setup state on domedog (bw path, staged helper, bootstrap file).
- Carry forward the not-wired-yet follow-up: runtime consumption (agent reads
  the fetched .env at launch) is the next milestone.

Checks: prettier clean; git diff --check.

Co-Authored-By: Hermes & Sam <hello@clawdie.si>
2026-06-20 07:06:44 +02:00
85ea20c5ba Merge pull request 'docs(vault): domedog connectivity findings — login works, unlock fails (Sam & Claude)' (#15) from docs/vaultwarden-domedog-findings into main
Some checks are pending
Crowdin Sync / sync (push) Waiting to run
2026-06-19 19:07:09 +02:00
Sam & Claude
8c78369adf docs(vault): domedog connectivity findings — login works, unlock fails (Sam & Claude)
Some checks failed
CI / ci (pull_request) Has been cancelled
Tested the vault-fetch verification flow from domedog against
vault.smilepowered.org. bw login --apikey succeeds (authenticated as
samo.blatnik@gmail.com) but bw unlock fails with a decryption error —
BW_PASSWORD in the bootstrap env doesn't match the vault's master key.
Action: update BW_PASSWORD. PR #65 code assessed as solid, no merge blocker.
2026-06-19 19:01:20 +02:00
151f366cc2 Merge pull request 'VAULTWARDEN-SETUP: document name-based retrieval contract' (#14) from fix/vault-fetch-contract-docs into main
Some checks are pending
Crowdin Sync / sync (push) Waiting to run
2026-06-19 18:36:40 +02:00
Sam & Claude
622bdee32f docs: document clawdie-vault-fetch contract in Vaultwarden setup
Some checks failed
CI / ci (pull_request) Has been cancelled
Adds the runtime-fetch section the seam depends on: item-naming
convention (item name = env var name, value in password field),
the ~/.config/vault-bootstrap.env drop, helper usage and exit-code
semantics. The manual CLI flow remains the floor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 08:46:08 +02:00
3 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,81 @@
# Vaultwarden Connectivity — domedog Findings (2026-06-19, updated)
**Host:** domedog (`domedog.pro`, Linux)
**Agent:** Claude
**PRs under evaluation:** clawdie-iso #65 (merged as #67) + clawdie-ai #14 (doc contract)
## Test results — end-to-end PASS ✅
Full chain proven: bootstrap creds → `bw` login → unlock → fetch → `.env` → re-lock.
| Step | Command | Result |
| ---------------- | --------------------------------------------------------- | --------------------------------------------------- |
| Server reachable | `curl -sI https://vault.smilepowered.org/` | ✅ HTTP 200 (Rocket/Vaultwarden) |
| bw CLI installed | `bw --version` | ✅ 2026.5.0 |
| API key login | `bw login --apikey` (via `BW_CLIENTID`/`BW_CLIENTSECRET`) | ✅ Logged in as `samo.blatnik@gmail.com` |
| Vault unlock | `bw unlock --passwordenv BW_PASSWORD` | ✅ Unlock succeeds — master password is correct |
| Fetch item | `clawdie-vault-fetch --keys DEEPSEEK_API_KEY` | ✅ Resolved 1 of 1 key |
| Write to `.env` | `--write-env /tmp/smoke.env` | ✅ Written 0600, value correct (35 chars, `sk-...`) |
| Re-lock on exit | trap cleanup | ✅ Vault re-locked automatically |
## The test item
A `DEEPSEEK_API_KEY` login item was created in the `agent-secrets` collection,
with the **item name = the env var name** and the **value in the password
field**, per the documented contract. The helper fetched it cleanly with
`bw get password DEEPSEEK_API_KEY` — confirming the name-based retrieval
contract works.
## One real bug found and fixed
**`clawdie-vault-fetch` failed when `bw` was already logged in.**
`bw config server "$SERVER"` refuses with `Logout required before server config
update` when the CLI is already authenticated. The helper treated that as fatal
(`exit 1`), which broke **every repeat run** on a host that is already logged in
— including the very case the helper exists for (refresh `.env` from the vault
on demand).
The `bw login` block already tolerated the analogous "already logged in" case.
Fix (clawdie-iso, branch `fix/vault-fetch-bw-config-when-logged-in`): mirror
that pattern for `bw config` — capture stderr/stdout and tolerate
`logout required` / `already configured` / `already set`, failing only on a
real error. Verified: the fixed helper runs cleanly from the logged-in state
(previously exited 1 at the config step).
## Correction to the earlier draft
An earlier draft of this doc reported `bw unlock` failing with
`Decryption failed` and concluded the master password was wrong. That was
incorrect: the unlock failure was a side effect of running the flow against a
**stale logged-in session**. After `bw logout` and a clean re-run, unlock
succeeds with the **same** master password — it was never wrong. The only
defect was the `bw config` intolerance documented above.
## Setup state on domedog
- `bw` 2026.5.0 installed at `~/.nvm/versions/node/v22.22.0/bin/bw`.
- Helper staged at `~/.colibri/clawdie-vault-fetch` (the fixed version).
- Bootstrap env at `~/.config/vault-bootstrap.env` (0600) — `BW_CLIENTID`,
`BW_CLIENTSECRET`, and `BW_PASSWORD` all correct and verified by a successful
fetch.
- Server set to `https://vault.smilepowered.org`.
## Not wired yet (documented follow-ups)
- **Runtime consumption:** the helper fetches into a `.env`, but nothing yet
loads that `.env` into a running agent's environment at launch. This is the
next milestone (soul load + harness launch).
- **Auto-refresh:** no scheduled/firstboot caller of the helper yet — it is run
manually. The `bw config` bug fix is a prerequisite for auto-refresh to be
reliable.
## PR #65 / #14 assessment
**Code quality:** solid. `clawdie-vault-fetch` has trap-based lock-on-exit,
headless `--apikey` login, tolerates "already logged in", sensible exit codes
(0/1/3/4), and a `--write-env` upsert that preserves untouched keys at 0600.
The one repeat-run bug (`bw config` intolerance) is fixed in a follow-up.
**No blockers** to the runtime-consumption milestone. The secret→`.env` path is
proven; what remains is having an agent read it.

View file

@ -163,6 +163,60 @@ clawdie-vault-fetch --write-env ~/.env
bw lock
```
## Runtime fetch: `clawdie-vault-fetch`
The manual flow above is the operator/agent CLI path. For a host to pull its own
provider keys **out of the box**, the image ships a small language-neutral
helper, `clawdie-vault-fetch` (`/usr/local/bin/`), that the post-install setup
flow shells out to and the live USB can run directly. It depends only on `bw`
no node module, no `jq`.
### Item-naming convention (the contract)
For a secret to be auto-fetchable, store it in `agent-secrets` as a **login item
whose name is exactly the env var name**, with the value in the **password
field**:
| Item name | Field | Becomes |
| -------------------- | -------- | ---------------------- |
| `ANTHROPIC_API_KEY` | password | `ANTHROPIC_API_KEY=…` |
| `OPENAI_API_KEY` | password | `OPENAI_API_KEY=…` |
| `OPENROUTER_API_KEY` | password | `OPENROUTER_API_KEY=…` |
| `ZAI_API_KEY` | password | `ZAI_API_KEY=…` |
The default key set mirrors clawdie-ai's `PROVIDER_KEY_BY_PROVIDER` (anthropic,
openai, openrouter, zai, deepseek, gemini, groq). `bw get password <NAME>`
returns the raw value, so no JSON parsing is involved.
### Bootstrap drop (the one secret that can't live in the vault)
The helper reads `~/.config/vault-bootstrap.env` (mode 0600) for the headless
credentials — exactly the file from the [Bootstrap Flow](#bootstrap-flow) above:
```sh
BW_CLIENTID=user....
BW_CLIENTSECRET=...
BW_PASSWORD=<master-password>
```
**No bootstrap file → the helper exits cleanly and does nothing**, so a host with
no vault access still uses the manual setup wizard. That is the floor; the vault
fetch only ever adds.
### Usage
```sh
clawdie-vault-fetch # print KEY=VALUE lines to stdout
clawdie-vault-fetch --write-env FILE # upsert results into FILE (0600), keys preserved
clawdie-vault-fetch --bootstrap FILE # explicit bootstrap env file
clawdie-vault-fetch --keys "A B C" # override the key-name list
```
Exit codes let a caller tell "skip" from "broken": `0` ran cleanly · `1` vault
configured but login/unlock/fetch failed · `3` no bootstrap config (fall back to
manual) · `4` `bw` not installed. The helper always `bw lock`s on exit and never
logs secret values.
## Current items in agent-secrets
| Name | Type | Purpose |

View file

@ -9,6 +9,8 @@ tmux
btop
bsddialog
codex
# python3 is 3.11 (FreeBSD PYTHON_DEFAULT); python312 available as python3.12.
python311
python312
uv
ripgrep
@ -16,6 +18,10 @@ fd-find
rsync
postgresql18-client
dnsmasq
# hermes runtime: ffmpeg (media + voice-transcription), py311-pillow (Pillow
# core dep; venvs use --system-site-packages so the system pkg satisfies it).
ffmpeg
py311-pillow
dejavu
rust