feat(vault): first-run setup popup → local personal vault (#13) - #148
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
First-run local personal-vault setup (dotfolder-style; no GitHub), the first step of a broader workspace setup.
Amicode: Set up a personal vaultcommand (Command Palette) does the same any time.~/.amico/vaults/<name>/+.amico-vault.toml(kind=personal) + localgit init. Name prefilled (OS username; profile-name prefill is a follow-up).amicode/substrate — the distiller (distill_batch.mjs) already creates it on first run (no duplication).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
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 --noEmitclean locally.integration/vaultsper the test-before-merge model; validate a test vsix in the GUI before merging to main.Implements #13 (scoped earlier this session).