@bonesgit/session-desktop-library
v0.1.16
Published
Headless Node.js API for the Session decentralized private messaging protocol
Readme
Session Desktop & Library
Library Fork
This is a fork of Session Desktop with an added build to produce a library to run the desktop headless. For use by the claws of the world. Used AI to help separate frontend from backend with minimal changes to the core desktop app portion. Most UI and app logic is already nicely decoupled but hit a few snags that took more changes to desktop app then I liked.
https://github.com/BonesGit/session-desktop-library
npm package: @bonesgit/session-desktop-library
TODO
- Still to many changes to the core desktop app code. To much coupling between frontend and backend code that needed tweaking to just get something working. Needs better architecture so I can touch less desktop app code.
Client Features
- Account management — generate mnemonic, create new account, restore from mnemonic, get Session ID
- 1:1 messaging — send text messages to any Session ID
- Receive messages — real-time async iterator stream (for await (const msg of client.messages()))
- Group chats (GroupV2) — create groups, send messages, add/remove members, promote to admin, leave groups
- Emoji reactions — react to any message with an emoji (1:1 and GroupV2)
- Conversation history — list all conversations, fetch message history with pagination
- Attachments — send files/images with messages; download and decrypt received attachments
- Quoted replies — send messages quoting a prior message
- Linked device sync — group creation pushes config to user's own swarm so other devices see it
- Typing Indicator - Can set whether or not the user is typing, to show the typing indicator. DMs only. No group support.
- Contact management — accept contact requests, block/unblock contacts (untested)
- Conversation updates — real-time async iterator stream for metadata changes (untested)
- Profile — set display name, set display image
- Disappearing messages — send with configurable expiry timer (untested)
SKILL.md
See API docs
SessionClient source
Desktop Project Updates
- New
build:libbuild target. - New
dist-liboutput folder. - New integration tests for the library.
- Electron API - Prevents bundling Electron in library builds. See
ts/node/dbVacuumManager.ts,ts/node/sql.tsandts/session/apis/seed_node_api/SeedNodeAPI.ts - IPC / Attachment Path - Direct file access or parameter passing instead of IPC. Explicit paths instead of Electron app paths.
ts/types/MessageAttachment.ts - Worker compatibility: Support for both Node.js worker_threads and browser Web Workers. See
ts/webworker/ - Many more I can't list here - needs refactoring
Summary
Session integrates directly with Oxen Service Nodes, which are a set of distributed, decentralized and Sybil resistant nodes. Service Nodes act as servers which store messages offline, and a set of nodes which allow for onion routing functionality obfuscating users IP Addresses. For a full understanding of how Session works, read the Session Whitepaper.
Want to Contribute? Found a Bug or Have a feature request?
Please search for any existing issues that describe your bug or feature request to avoid duplicate submissions.
Submissions can be made by making a pull request to our development branch.If you don't know where to start contributing please read Contributing.md and refer to issues tagged with the good-first-issue tag.
Supported platforms
Check Session's system requirements and what platforms are supported here.
Build instructions
Build instructions can be found in Contributing.md.
Translations
Want to help us translate Session into your language? You can do so at https://getsession.org/translate!
Verifying signatures
Step 1:
Add Jason's GPG key. Jason Rhinelander, a member of the Session Technology Foundation and is the current signer for all Session Desktop releases. His GPG key can be found on his GitHub and other sources.
wget https://github.com/jagerman.gpg
gpg --import jagerman.gpgStep 2:
Get the signed hashes for this release. SESSION_VERSION needs to be updated for the release you want to verify.
export SESSION_VERSION=1.15.0
wget https://github.com/session-foundation/session-desktop/releases/download/v$SESSION_VERSION/signature.ascStep 3:
Verify the signature of the hashes of the files.
gpg --verify signature.asc 2>&1 |grep "Good signature from"The command above should print "Good signature from "Jason Rhinelander...". If it does, the hashes are valid but we still have to make the sure the signed hashes match the downloaded files.
Step 4:
Make sure the two commands below return the same hash for the file you are checking. If they do, file is valid.
sha256sum session-desktop-linux-amd64-$SESSION_VERSION.deb
grep .deb signature.ascApple Silicon
sha256sum releases/session-desktop-mac-arm64-$SESSION_VERSION.dmg
grep .dmg signature.ascIntel
sha256sum releases/session-desktop-mac-x64-$SESSION_VERSION.dmg
grep .dmg signature.ascPowerShell
Get-FileHash -Algorithm SHA256 session-desktop-win-x64-$SESSION_VERSION.exe # checksum is uppercase but should otherwise match
Select-String -Pattern ".exe" signature.ascBash
sha256sum session-desktop-win-x64-$SESSION_VERSION.exe
grep .exe signature.ascDebian repository
Please visit https://deb.oxen.io/
License
Copyright 2011 Whisper Systems
Copyright 2013-2017 Open Whisper Systems
Copyright 2019-2024 The Oxen Project
Copyright 2024-2025 Session Technology Foundation
Licensed under the GPLv3: https://www.gnu.org/licenses/gpl-3.0.html
Attributions
The IP-to-country mapping data used in this project is provided by MaxMind GeoLite2.
This project uses the Lucide Icon Font, which is licensed under the ISC License.
