singularity-forge/src
Mikael Hugo a2a44f8d15 feat: implement Tier 1.1 Vault secret resolver
- Create vault-resolver.js: URI parser, auth chain (env → file → AppRole), in-memory caching
- Add resolveConfigValueAsync() to pi-coding-agent for lazy vault URI resolution
- Integrate vault credential resolution into auth-storage credential loading path
- Add doctor check (checkVaultHealth) for vault setup validation at startup
- Document vault setup, auth methods, examples, troubleshooting in preferences-reference.md
- Add comprehensive test suite (18 tests) for vault URI parsing, auth, caching, fallback

Auth Chain:
1. VAULT_TOKEN env var (simplest for local dev)
2. ~/.vault-token file (recommended for local dev)
3. VAULT_ROLE_ID + VAULT_SECRET_ID env vars (AppRole for CI/CD)

Fail-open behavior: If vault unavailable, falls back to plaintext URIs to allow continued operation.

URI Format: vault://secret/path/to/secret#fieldname
Example: ANTHROPIC_API_KEY=vault://secret/anthropic/prod#api_key

Tests: parseVaultUri, isVaultUri, resolveSecret, caching, edge cases all passing (18/18).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-07 02:39:51 +02:00
..
resources feat: implement Tier 1.1 Vault secret resolver 2026-05-07 02:39:51 +02:00
tests test: add comprehensive Phase 1 coverage for dispatch loop (48 tests) 2026-05-07 00:38:19 +02:00
web sf snapshot: uncommitted changes after 43m inactivity 2026-05-05 21:39:56 +02:00
app-paths.ts sf snapshot: uncommitted changes after 93m inactivity 2026-05-06 11:37:27 +02:00
bundled-extension-paths.ts feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
bundled-resource-path.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
claude-cli-check.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
cli-logs.ts sf snapshot: uncommitted changes after 93m inactivity 2026-05-06 11:37:27 +02:00
cli-stats.ts style: format repository with biome 2026-05-05 14:31:16 +02:00
cli-status.ts sf snapshot: uncommitted changes after 61m inactivity 2026-05-06 03:25:43 +02:00
cli-web-branch.ts fix: make autonomous mode canonical 2026-05-05 15:42:10 +02:00
cli.ts sf snapshot: uncommitted changes after 39m inactivity 2026-05-06 09:02:38 +02:00
env.ts feat: comprehensive environment schema with type-safe validation 2026-05-07 00:31:59 +02:00
errors.ts feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
extension-discovery.ts feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
extension-registry.ts feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
headless-answers.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
headless-context.ts fix: make autonomous mode canonical 2026-05-05 15:42:10 +02:00
headless-events.ts test: add comprehensive Phase 1 coverage for dispatch loop (48 tests) 2026-05-07 00:38:19 +02:00
headless-query.ts sf snapshot: uncommitted changes after 93m inactivity 2026-05-06 11:37:27 +02:00
headless-types.ts feat: structured notification event model with metadata-first classification 2026-05-01 23:07:57 +02:00
headless-ui.ts integrate: hook quick wins into UOK dispatch loop 2026-05-06 22:34:41 +02:00
headless.ts fix: record requested headless command 2026-05-07 00:40:05 +02:00
help-text.ts fix: harden sf autonomous runtime 2026-05-06 06:02:46 +02:00
interactive-session-lock.ts fix: enforce one interactive sf per repo 2026-05-05 20:55:53 +02:00
loader.ts sf snapshot: uncommitted changes after 39m inactivity 2026-05-06 09:02:38 +02:00
logo.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
models-resolver.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
onboarding.ts fix: expose sf-scoped providers 2026-05-05 16:42:36 +02:00
pi-migration.ts fix: clean provider surfaces and core build 2026-05-05 16:31:53 +02:00
project-sessions.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
provider-migrations.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
remote-questions-config.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
resource-loader.ts sf snapshot: uncommitted changes after 61m inactivity 2026-05-06 03:25:43 +02:00
rtk.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
security-overrides.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
startup-model-validation.ts chore: commit current workspace state 2026-05-05 14:46:18 +02:00
startup-timings.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
tool-bootstrap.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
traces.ts feat: introduce repo-vcs skill and add JSDoc annotations across core modules 2026-05-01 21:36:32 +02:00
update-check.ts fix: clean provider surfaces and core build 2026-05-05 16:31:53 +02:00
update-cmd.ts fix: clean provider surfaces and core build 2026-05-05 16:31:53 +02:00
web-mode.ts fix(sf): recover model routes and self-feedback 2026-05-02 22:07:10 +02:00
welcome-screen.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
wizard.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
worktree-cli.ts sf snapshot: uncommitted changes after 43m inactivity 2026-05-05 21:39:56 +02:00
worktree-name-gen.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00