In Part 1, a post started in Codex, passed through a saved preview in VS Code, and ended with a public Mastodon receipt. The engineering work behind that flow came down to three questions. What exactly did I approve? What happens if the process dies during delivery? Where do drafts and credentials live?
I wanted those answers to survive a restart. DotShare 3.6.0 and CLI 3.0.0 ship the same publishing library across the VS Code interface, CLI, and local MCP server. The library stores drafts, their revisions, and publication attempts. The platform adapter reports what it actually delivered. Release and changelog.
A preview belongs to a specific revision
create_draft returns a saved draft ID and revision. update_draft checks the expected revision before saving an edit. That matters when I have the library open in VS Code while an agent edits the same record. If one edit wins, the other client needs to reload before saving against the new revision.
preview_draft validates the saved revision and creates a preview ID. The preview records the account plan, including the effective copy, thread parts, and media. Before publishing, DotShare revalidates the plan and the local image fingerprints. A change to the draft, an account binding, or the image bytes can require a fresh preview.
To publish a saved preview from the CLI, use the draft ID and the revision and preview ID returned by drafts preview. Give that action one stable request ID.
dotshare-agent drafts publish DRAFT_ID \
--revision 1 \
--preview-id PREVIEW_ID \
--request-id reviewed-release-1
1 is an example revision. Use the revision you actually reviewed. This command can publish to real accounts, so run it after checking the saved preview and its destinations. Saved draft commands.
Templates follow a similar versioning rule. The tool checks which template revision you filled, substitutes literal values, then creates an independent draft with its source template recorded. Effective content is resolved in this order: account override, platform version, shared copy. A preview always uses the resolved version for each selected destination.
A retry starts with the receipt journal
DotShare reserves a publication operation before sending requests. It records delivery results and receipts per account, including receipts for individual parts of a thread. Repeating the same request ID lets the caller recover that operation instead of sending a second copy.
The hard case is a connection drop after a platform accepted the post but before DotShare could confirm it. That case can land in NeedsReview. I inspect the journal and the destination before deciding what to do next. For a multi-account publish, the journal can show which destinations already received their posts.
dotshare-agent operation reviewed-release-1
Published records a completed publication. When Dev.to accepts an article sent with published: false, DotShare records SavedRemotely and returns the unpublished article’s receipt. Publication states and recovery.
Keep the key and the encrypted records separate
The CLI keeps platform tokens in the OS credential store. Linux requires Secret Service. The draft store uses a separate, randomly generated master key, also held in the OS keyring. DotShare uses AES-256-GCM to encrypt the contents of saved drafts, custom templates, and operation journals. Authentication ties each encrypted record to its identity, so a swapped or modified record fails verification.
This protects the shared library records on disk. Account labels and other non-secret metadata use private files. The OS credential provider, original images, VS Code’s separate composer drafts, and data held by DotSuite’s cloud backend have their own storage rules. Local security model.
I also removed the legacy CLI route that forwarded platform credentials through a relay. The new CLI publishes directly through named accounts. Local image uploads are limited to directories explicitly configured for the MCP server. DotSuite cloud scheduling uses a separate set of connected accounts. CLI upgrade notes.
Upgrade and practice a restore
For an existing library, stop active publications, install the current CLI, and run the migration.
npm install -g dotshare-cli
dotshare-agent security status
dotshare-agent security protect
protect verifies access to the keyring, fixes local permissions where needed, and encrypts older plaintext records in place. It reads back each migrated record to verify the original content survived. If the MCP launcher path changed, review the replacement configuration with dotshare-agent setup --dry-run --replace. After applying it, restart the MCP clients and VS Code, then run dotshare-agent doctor --check-accounts.
For the restore test, I used a disposable library with a draft and a publication receipt. I copied the encrypted files and security.json to a new directory. A missing key and an incorrect key both caused reads to fail. Restoring the matching test key through the OS keyring recovered the draft and the original receipt. That’s the recovery dependency to plan for: keep the encrypted library and its matching keyring backup. Recovery instructions.
What I verified before shipping
- Automated checks. 353 tests passed across 33 suites. The CLI and MCP smoke checks also exercised templates, variants, and saved drafts through the installed package.
- Upgrade and restore. A legacy test draft and receipt survived encryption and could be read back. Repeating the migration had no additional records to convert. The restore test exercised the actual OS keyring with a disposable key.
-
Live publishing. One real draft went from Codex to the VS Code library to a public Mastodon post. I verified the saved
Publishedstatus and receipt. Public test post. -
Distribution. The CLI installed from npm as
3.0.0. The3.6.0extension was available from Visual Studio Marketplace, Open VSX, and the GitHub release. The DotSuite product page also gained a Docs tab with both guides. npm · Marketplace · Open VSX · DotSuite docs.
If you try the workflow, I’d like to know which part of your own publishing process you’d keep in the editor. Account variants and review steps are especially interesting because teams often handle them differently. DotShare on GitHub.
I used AI assistance to draft and edit this write-up. The implementation, release checks, and live test are linked above.


Top comments (0)