Skip to content

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

Merged
Mearman merged 4 commits into
ExaDev:mainfrom
ovidius72:feat/data-directory
Oct 19, 2026
Merged

Mearman merged 4 commits into
ExaDev:mainfrom
ovidius72:feat/data-directory

Conversation

@ovidius72

@ovidius72 ovidius72 commented Oct 9, 2026 •

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.
  • Require absolute paths for environment and explicit directories. Reject relative paths, literal ~ paths and empty explicit overrides with an error naming AGENT_COMMS_DATA_DIR.
  • 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

  • 24 new tests cover directory precedence, non-absolute path rejection, all four bridge factories, unchanged existing data, separate identities, account export/import, a real two-peer room message, restart persistence and grant revocation.
  • Lint, typecheck and the full test suite: 1,881 tests across 211 files passed.
  • Build, 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.

@Mearman Mearman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I merged it onto current main locally: typecheck and the 13 new tests pass, lint is clean for the touched files, and every shipped bridge, the CLI account commands and the cc-peer front pick the setting up through the default resolver. One edge to close before merge, inline below.

Comment thread src/core/data-directory.ts Outdated
@Mearman
Mearman merged commit 5109522 into ExaDev:main Oct 19, 2026
7 checks passed
@ExaDev ExaDev deleted a comment from chatgpt-codex-connector Bot Oct 19, 2026
@ExaDev ExaDev deleted a comment from chatgpt-codex-connector Bot Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 8.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants