Skip to content

feat(core): support isolated mesh data directories - #420

Open
ovidius72 wants to merge 2 commits into
ExaDev:mainfrom
ovidius72:feat/data-directory
Open

ovidius72 wants to merge 2 commits into
ExaDev:mainfrom
ovidius72:feat/data-directory

Conversation

@ovidius72

Copy link
Copy Markdown
Contributor

Why

An application embedding agent-comms needs to keep its keys and grants separate from an existing installation. slot.dir moves device-slot files, but the bridge factory still loads the shared account and machine keys from the default directory.

Changes

  • Add IdentitySlot.dataDir for all persistent mesh data and AGENT_COMMS_DATA_DIR as the default for shipped bridges and account commands.
  • Resolve the directory in one place and reuse the existing identity, trust, naming and ledger functions.
  • Keep ~/.agent-comms when the environment setting is absent or blank. Preserve the existing scope of slot.dir.
  • Use the same slot for identity loading, fronted identities and lock release. No per-bridge changes or data migration.

Verification

  • 13 new tests cover directory precedence, all four bridge factories, unchanged existing data, separate identities, account export/import, a real two-peer room message, restart persistence and grant revocation.
  • Build, lint, typecheck and the full test suite: 1,870 tests across 211 files passed.
  • 7 delivery tests, the multi-process smoke test and 53 browser tests.

Checks on fork PRs

My previous fork PR #335 had no workflow runs and was recreated as #394 so checks could run. Maintainer edits are enabled on this PR; please approve the fork workflows if approval is needed.

This branch has not been deployed

No deployments
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