Skip to content

feat(vault): first-run setup popup → local personal vault (#13) - #148

Merged
jack-champagne merged 2 commits into
mainfrom
integration/vaults
Jul 16, 2026
Merged

jack-champagne merged 2 commits into
mainfrom
integration/vaults

Conversation

@jack-champagne

Copy link
Copy Markdown
Member

What

First-run local personal-vault setup (dotfolder-style; no GitHub), the first step of a broader workspace setup.

  • On activation, if no personal vault resolves (and not dismissed), a notification offers to create one: Create vault / Not now / Don't ask again.
  • Amicode: Set up a personal vault command (Command Palette) does the same any time.
  • Creates ~/.amico/vaults/<name>/ + .amico-vault.toml (kind=personal) + local git init. Name prefilled (OS username; profile-name prefill is a follow-up).
  • Does NOT seed the amicode/ substrate — the distiller (distill_batch.mjs) already creates it on first run (no duplication).
  • After create: hot-refresh in-process (re-prep + respawn opencode + re-arm distiller), no window reload — mirrors the solver-mode switch.

Non-goals (follow-ups)

Synced tiers (team/public, e.g. armonissima) and the Julia env belong to the same 'setup' flow later. This is personal-only + local for v1.

Testing

  • New test/substrate/vault_setup.test.ts — 8 tests: sanitize/suggest, create→resolveMountStack picks it up as personal, git-init default/off, no-clobber, no amicode/ skeleton. Pass.
  • pnpm -r build + tsc --noEmit clean locally.
  • Built on integration/vaults per the test-before-merge model; validate a test vsix in the GUI before merging to main.

Implements #13 (scoped earlier this session).

…nal vault

On activation with no personal vault resolved (and not dismissed), offer to create a
LOCAL personal vault (dotfolder-style: ~/.amico/vaults/<name>/ + .amico-vault.toml
kind=personal + local git init; no GitHub). Also an 'Amicode: Set up a personal vault'
command. Does NOT seed the amicode/ substrate — the distiller owns it (no dup). After
create, hot-refreshes in-process (re-prep + respawn server + re-arm distiller), no reload.

First step of a broader workspace setup; synced tiers (team/public) + Julia env are
follow-ups. New src/substrate/vault_setup.ts (+ test); wiring in extension.ts; command
in package.json.
The auto-notification now fires ONLY when a profile exists on this machine but no
personal vault resolves (returning user / new machine). First-timers (no profile)
are left to the onboarding wizard; a resolved vault needs nothing. Gated via
opencode_config.profileHasIdentity(); extracted a testable shouldOfferVaultSetup()
predicate (4 flow cases). The amicode.setupVault command still works unconditionally.
@jack-champagne
jack-champagne merged commit 78d12ea into main Jul 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant