Commit Graph
356 Commits
Author SHA1 Message Date
Evgeny Poberezkin 9757c5e8b8 Merge branch 'master' into names 2026-11-15 09:59:13 +00:00
Evgeny @ SimpleX Chat f44711b20c website: links (#8208)
* website: two publications on the links page

* website: shorter link descriptions

* website: preview images for the two new links

* website: 30 more 2026 links, Freedom.Tech review address

* website: distinct title for the Flux entry, to keep the Whonix anchor
2026-11-15 00:02:47 +00:00
Evgeny Poberezkin c194aefb95 Revert "core: wallet for names (#7684)"
This reverts commit 1b329f41fb.
2026-11-14 13:58:26 +00:00
Evgeny Poberezkin e4fdc6603c Merge branch 'master' into names 2026-11-14 13:36:20 +00:00
Evgeny @ SimpleX Chatandshum 9d3241b06c mcp: Claude Code plugin, a SimpleX group per session (0.3.0) (#8116)
* mcp: remove HTTP serve and register modes

* mcp: read plugin options

* mcp: add daemon data root layout

* mcp: keep actions per session

* mcp: serve tools for one session profile

* mcp: add plain QR code text

* mcp: share the Main group across sessions

* mcp: promote only the first joiner to owner

* mcp: add the daemon socket protocol

* mcp: fix socket UTF-8 and late error handling

* mcp: open session agents and the hub

* mcp: order hub control work on one chain

* mcp: add the daemon

* mcp: fix daemon disconnects, stop and idle calls

* mcp: create the socket token atomically

* mcp: add the daemon client

* mcp: handle spawn errors and a stopped daemon

* mcp: add the stdio session server

* mcp: retry session calls after a daemon restart

* mcp: add the SessionStart hook and link commands

* mcp: remove unused shell quoting

* mcp: wire session, daemon and hook commands

* mcp: reject inherited names as commands

* mcp: add the Claude Code plugin

* mcp: add the plugin marketplace

* mcp: test the daemon end to end

* mcp: say Main group in tool descriptions

* mcp: document the plugin and the daemon

* mcp: record session titles from the hook

* mcp: allow long tool calls

* mcp: name the SimpleX daemon in texts

* mcp: quote no-owner texts and cite hook docs

* mcp: drop the project from title requests

* mcp: record Claude Code plugin checks

* mcp: qualify Claude Code check evidence

* mcp: start new profiles without preset contact

* mcp: remove unit test temp folders

* mcp: fix preset contact review findings

* mcp: expire each action with its own timer

* mcp: wait for decisions without a tick

* mcp: expire actions on core events and requests

* mcp: document the delivery poll at stop

* mcp: assert the socket handler error log

* mcp: complete only the session's own connects

* mcp: move closeServer to the test fixtures

* mcp: drop the name from session requests

* mcp: listen before the hub opens

* mcp: keep the approval mode per session

* mcp: pre-approve the skill commands

* mcp: a group per session under one Claude profile, approved by owners

* mcp: prompts, answers and tool-use approval in the session group, 0.3.0

* mcp: reply to prompts of stopped sessions, skip prompts echoed in a tag

* mcp: document the Claude Code plugin of 0.3.0

* mcp: name one-line commands in the plugin reference

* mcp: real-session checks without a channel command

* mcp: specify the Claude Code plugin, and serve as built in 0.3.0

* mcp: run the plugin from its own build and shrinkwrap, without npx

* mcp: start with a torn session file, and on file systems without links

* mcp: start the daemon with only the environment variables it uses

* mcp: one group per Claude Code process, re-attach, late contacts

* mcp: document one session per process, re-attach and the plugin launch

* mcp: hold prompts after a daemon start until the session attaches

* mcp: document prompts held after a daemon start

* mcp: pack production dependencies only, for a faster plugin install

* mcp: keep resumed sessions' groups, quote by hook start, order prompts

* mcp: document resumed sessions, turn records and ordered prompts

* mcp: quote each prompt once, post without refused quotes, answer first

* mcp: wait for a stopping daemon to release the lock

* mcp: double the re-attach delay once per attempt

* mcp: read a token file of another user as serve 0.2 did

* mcp: cut long prompts and answers to fit the daemon's body limit

* mcp: document quotes, refused quotes, the lock wait and long prompts

* mcp: open a titled new session only after its process registers

* mcp: document titles held until the session server registers

* mcp: skip late turn records and tag-only prompts, describe after failures

* mcp: take over the lock atomically, keep held titles across stops

* mcp: document turn records, tag-only prompts, the lock and held titles

* mcp: delete groups of sessions closed 7 days; no group for claude -p

* mcp: keep the approved mode in the session group, the link off /status

* mcp: apply leaving, removal and demotion in the Main group to sessions

* mcp: reply sends a file after an owner's approval when non-owners see it

* mcp: spec of closed groups, -p runs, mode, membership and reply cards

* mcp: resume after a running group deletion, continue past failed ones

* mcp: post terminal prompts in the current group of a resumed session

* mcp: show only the file's name and size on a reply card

* mcp: the hooks of a run Claude Code marks unattended post nothing

* mcp: serve lists its tools with the metadata of 0.2

* mcp: list leaves out the session's tool-use and mode cards

* mcp: one starter takes over a stale lock also without hard links

* mcp: test a resume after deletion, reply cards and demotion end to end

* mcp: document resumes after deletion, unattended runs and reply cards

* mcp: spec of round 5 fixes, with source links at their lines

* mcp: no permission relay in a run without a group or with invalid options

* mcp: spec of the permission relay of a run without a group

* mcp: every session keeps its group, claude -p runs included

* mcp: changes of the Main group's members leave session groups as they are

* mcp: every member who joins from the Main group prompts and approves

* mcp: reply cards match send cards; /approve N all sends later files too

While a session group has a guest, a member added without the Main group, the card of a reply shows its caption, the file's type, path and size, and an image's or a video's preview, as a card of send does. /approve N all approves that file, the other pending reply files and every later one of the group, until /revoke; the approval is kept in the group's custom data and counts while its approver joined from the Main group and stays in the group.

* mcp: the Main group says everyone in it is trusted with all sessions

The short description and the welcome message of the Main group, also of an existing one at the daemon's start, and a message at each member's join say that everyone in the group is trusted with all Claude Code sessions of the hub: they can join each session's group by /join N, prompt Claude and approve its actions.

* mcp: a session group says whether each joiner came from the Main group

When a member joins a session's group, Claude posts there that the member joined from the Main group, and their messages are prompts and they can approve actions, or that the member joined as a guest, whose messages are not prompts and who gets Claude's files only after an approval. The welcome message of a new session group says that members who join from the Main group prompt the session and approve its actions.

* mcp: test Main group members, guests and reply approvals end to end

A member who joins the Main group by an owner's link and a session's group by /join prompts and approves there, also after removal from the Main group; a guest added by a group link gets reply files after an approval, /approve N all sends later files at once, and /revoke ends it. The Main group and the session group post the join statements.

* mcp: document the trust of the Main group, guests and kept session groups

REFERENCE, README and TESTING describe that every member of the Main group prompts and approves in the sessions' groups, that changes in the Main group leave the sessions' groups as they are, the join statements, guests and the reply card with /approve N all and /revoke. The texts about deleted groups of closed sessions, runs without a group and the cascade of Main group changes are removed, as their behaviour was reverted.

* mcp: spec of the trust of the Main group, guests and kept session groups

The spec describes approvers as the members invited through the Main group, the statements of trust and standing, the reply card with /approve N all and /revoke, and Main group changes that leave the session groups as they are. The sections on deleted groups of closed sessions, runs without a group and the cascade are removed, flow 30 among them, and the source links point at the lines of this commit.

* mcp: claude -p and unattended runs get no session and no group again

A run whose CLAUDE_CODE_ENTRYPOINT is sdk-cli, sdk-ts or sdk-py, or whose CLAUDE_CODE_SESSION_ATTENDED is 0, gets no session and no group: its hooks post nothing, and its session server answers every call with the text of a run that is not interactive, without the daemon. Only the deletion of the groups of closed sessions stays removed.

* mcp: no group for the server of a claude -p run under a VS Code session

A claude -p run started by a command of a session of the VS Code extension or the desktop app keeps that session's entrypoint, and its MCP server gets the session's CLAUDE_CODE_SESSION_ATTENDED 1; only its hooks get 0. Its SessionStart hook now sends /title with unattended for its Claude Code process, and the daemon refuses /session from that process with status 403 for 10 seconds, before or after the title; the session server then answers every call with the text of a run that is not interactive and registers no more. The tests take the environments of a recorded run of Claude Code 2.1.319.

* mcp: Claude's channel and reply texts name members from the Main group

The channel instructions and the description of reply say that prompts come from the members who joined the session's group from the Main group, and that one of them approves a file while the group has a guest, in place of the owners.

* mcp: test that the session server stays out of the modern MCP era

Claude Code 2.1.319 registers no channel for a server that negotiates the modern protocol revision 2026-07-28. The test sends Claude Code's server/discover probe and its initialize, and expects Method not found and the revision 2025-11-25, so that an SDK upgrade that turns the modern era on fails the tests.

* mcp: document runs without a group and the refused server of claude -p

REFERENCE describes again the runs that are not interactive, and the refusal of the session server of a claude -p run under a VS Code session; TESTING restores the real-session checks of such runs, adds the one under a VS Code session, and names the recorded environments and the protocol era test.

* mcp: spec of runs without a group, the unattended mark and the MCP era

The spec describes again the runs that are not interactive, in flow 30 and the tables, with the mark of the process of a claude -p run under a VS Code session, the 403 of its session server and the end of its retries; it states the revision 2025-11-25 and the server/discover answer that keep the channel registered, and the channel instructions in their new words. Source links point at the lines of this commit.

* mcp: // passes a / command to Claude, /! an owner's ! command

In a session's group, every one-line message that starts with / is a command of the group. A message that starts with // reaches Claude without its first /, so //model sonnet arrives as /model sonnet. A message that starts with /! from a member whose member in the Main group is an owner reaches Claude as !...; from another member it gets the reply Only owners of the Main group can send ! commands to Claude. A message that starts with ! is not passed, and gets the reply Messages starting with ! reach Claude only from owners, as /!command.

* mcp: an unknown command in a session's group gets Unknown command.

The reply to a one-line / message that is not a command of a session's group no longer lists the commands, which the group's menu and the cards show; its text Unknown command. waits for the user's wording. The agent control chat of serve keeps its commands reply.

* mcp: guests' messages reach Claude as prompts

Every member of a session's group but User prompts the session, a guest added to the group directly too; approvals and tool-use verdicts still count only from members who joined from the Main group. Claude's channel instructions and the description of reply name the members of the group.

* mcp: split answers and terminal prompts at the size of a message

Answers and terminal prompts are posted in parts that each fit one message by the size check of send, fitsMessage, with the quote in the first part of an answer, in place of parts of 12000 encoded bytes: a Latin part holds 14962 characters, a Cyrillic part 7481 and a CJK part 4987. An answer quotes its prompt when the quote fits with an empty text.

* mcp: the option approve_guest_files turns the guests' file cards off

The plugin option approve_guest_files, a boolean on by default, passed to the session server as CLAUDE_PLUGIN_OPTION_APPROVE_GUEST_FILES: on, a file of reply waits for its card while the group has a guest, and /approve N all works as before; off, reply sends the file at once. The daemon applies the option of each /session and /title to all sessions, as the expiry, and refuses a config without it.

* mcp: test end to end that a guest prompts and each join is posted once

The trust test checks that the guest's message reaches the session as a prompt, and that the Main group and the session's group hold one join post for each member: the core raises joinedGroupMember for a member the hub hosts and connectedToGroupMember for one another member hosts, one of the two for each connection, in the same case of its CON handler.

* mcp: document //, /!, Unknown command., guest prompts, parts and the option

REFERENCE describes the commands and prompts of a session's group with // and /!, the reply Unknown command., the guests' prompts, the parts of a message's size, and the option approve_guest_files; README states the guests' prompts; TESTING adds a real-session check of // and /! and the e2e checks of guest prompts and single join posts.

* mcp: a space in the prompt queue of a session

Formatting of the line that queues a prompt.

* mcp: an answer drops the quote that leaves no room for its first character

The quote of an answer is kept when it fits with the answer's first character, so that the first part fits one message.

* mcp: spec of //, /!, guest prompts, parts and approve_guest_files

The spec describes the commands and prompts of a session's group with // and /!, the reply Unknown command., the guests' prompts, the parts that each fit one message with a quote that fits the first character, the option approve_guest_files, and one post for each join.

* mcp: document an answer without the quote that leaves it no room

REFERENCE states that an answer is posted without the quote when the quote leaves no room for its first character.

* mcp: a reply too large with its quote is posted without it

Claude's posts with a quote are sent again without it also when the core refuses them with largeMsg, as replies that quote a message near the size limit are.

* mcp: no command reply to a one-line / part that User posts

The control of a session's group drops the commands of User, the member of the hub's contact marked simplexMcpUser, in the order of the other commands, so a part of a terminal prompt that starts with / gets no reply.

* mcp: a part of a long text is searched within one message size

textParts searches each part among the next 15602 characters, the most a message holds, in place of the whole rest of the text; the parts stay the same.

* mcp: reply refuses a caption too long for a message with its file

reply checks the file's message with its caption as send does, before the post and before the card: text: too long for a message with this TYPE; shorten it.

* mcp: the daemon forgets the unattended marks older than 10 s

Each new mark of an unattended run removes the marks of 10 seconds ago and older, which no longer refuse a session server.

* mcp: test end to end the reply to a prompt as long as a message

The mirroring test sends the longest text the member's core sends to a session without Claude Code and waits for Session 1 is not running. without the quote; before 193f03f6c the core refused the reply with largeMsg and nothing was posted.

* mcp: document large replies, User's / parts, reply size, check 6

REFERENCE states that a reply too large with its quote is posted without it, that User's posts are never commands, and that reply refuses a caption too long for its message; TESTING records check 6 with Claude Code 2.1.319, which runs no command or shell command from a channel prompt, and the e2e reply to a long prompt.

* mcp: spec of large replies, User's commands, reply size, the marks

The spec describes replies sent again without the quote on largeMsg, User's commands dropped, the search of a part within one message size, the reply's message size check and the removal of old unattended marks; the source links follow the new lines.

* mcp: send and reply share the text of a message too long

tooLongText gives the refusal of send and reply: the text too long for the message with its quote, or for a message with the file.

* mcp: spec links of the shared refusal text

The spec names tooLongText and follows the lines of tools.ts after it.

* mcp: a reset of the owners leaves the session groups as they are

A replaced Main group keeps every session group and its invited records, so the members who joined from the old Main group keep prompting and approving there, as rule 4 of the trust model states for every change in the Main group.

* mcp: test end to end that the members stay after a reset of owners

The trust test approves a reset of the owners and checks that Alice and Bob, who joined from the old Main group, stay in the session's group, prompt there and get No pending actions. for /pending.

* mcp: document the reset of the owners and a hand-edited approve

REFERENCE states that a reset of the owners keeps the sessions' groups and the standing of their members, with /! from owners of the new Main group, and that a hand-edited approve outside requests and host is shown only at the session start while the tools run in mode requests; TESTING lists the reset in the trust test.

* mcp: spec of a reset of the owners that keeps the session groups

The spec describes the replacement of the Main group without changes to the session groups and their invited lists, with /! from owners of the new Main group, drops removeOwners and its log context, and follows the new lines of hub.ts and main-group.ts.

* mcp: every member controls a session; Main group owners approve files

Every member of a session group but User and observers prompts the session and approves its actions and tool use, whatever way they joined; each joiner gets the post NAME can send prompts to Claude and approve tool use, with the command that makes them an observer. A file of reply waits for an owner of the Main group in every session group, while the option is on; other members' approvals of files are refused, and a group without such an owner refuses the reply. The hub keeps the contact of User from its start.

* mcp: the option approve_files turns the file cards off

The plugin option approve_guest_files is renamed approve_files, variable CLAUDE_PLUGIN_OPTION_APPROVE_FILES and config field approveFiles, on by default; its title and description name the owner of the Main group who approves Claude's files.

* mcp: the reply to an unknown command names // for Claude's commands

A one-line / text outside the requests of a session group gets Unknown command. To send a command to Claude, start it with //.

* mcp: /observer #G ID makes a member of a session group an observer

The command is accepted from a member whose role lets them change that member's role in SimpleX: admin or owner, and not below the member's role; the member, Claude, the sender, a relay and a pending member are refused, and so is another group. The end-to-end test makes Carol an observer by the command of her join post, and her app then refuses to send.

* mcp: a session without an approver names members who can approve

The refusal of a new action in a session group without an approver says it has no member who can approve actions, a proposed text.

* mcp: document that every member of a session group controls it

REFERENCE and README state that every member but User and observers prompts and approves, the join post with /observer, the files approved by owners of the Main group, the option approve_files and the reply to an unknown command; TESTING lists the trust test as it now runs.

* mcp: spec of session groups that every member controls

The spec describes approvers as every member but User and observers, the join post with /observer and the command, files decided by owners of the Main group, the option approve_files, the reply to an unknown command and the refusal texts, and follows the new lines of the source.

* mcp: Claude's files reach a session group without approval

reply sends its file at once, and the core refuses it when the group's preference for files and media forbids it; the option approve_files, the reply cards, /approve N all and the bare /revoke of a session group are removed.

* mcp: rights in a session group follow the member's role there

Admins and owners of a session group approve actions and tool use and send // and /! commands to Claude; members, moderators and authors send prompts, and their // and /! commands get a reply. /join N invites a member of the Main group as admin, and an owner of the Main group as owner.

* mcp: Claude posts a member's rights at each join and role change

At each join and each change of a member's role in a session group, User excepted, Claude posts the rights of that role: admins and owners send prompts and // and /! commands and approve tool use; members, moderators and authors send prompts; observers can't send. The posts of sending roles end with the /observer command for that member, and the reply to /observer states the observer's rights.

* mcp: session groups keep no record of their invited members

Rights follow the role in the session group, so the invitations through the Main group are no longer recorded in the group's custom data.

* mcp: session groups keep the profile their owners changed

A session group's Control takes the group's profile from each groupUpdated event, so the updates of the model, the effort level and the name keep what owners changed, the preference for files and media included.

* mcp: document rights by role in session groups and files without cards

REFERENCE and README state the rights of each role in a session group, /join N as admin, the rights posts at joins and role changes, the replies to // and /! and to approvals from other roles, files of reply sent at once under the group's preference for files and media, and the removed option approve_files; TESTING lists the trust test as it now runs.

* mcp: spec of rights by role in session groups

The spec describes approvers as admins and owners of the session group, the replies to // and /! from other roles, /join N as admin, the rights posts at joins and role changes and the /observer reply, files of reply sent at once under the group's preference for files and media, the profile kept from groupUpdated, the session group's data without invited members and the options without approve_files, and follows the new lines of the source.

* mcp: spec flow 28 messages without semicolons

Mermaid ends a sequence message at a semicolon, so the join and rights messages of flow 28 use commas and a shortened post.

* mcp: group profile updates start from the group's current profile

Control and the Main group read the group's profile from the chat database before each update, and change only their own fields: the name, the short description, the Main group's description and the commands. The preferences owners set, files and media included, stay. This replaces the profile taken from groupUpdated events, which covered session groups only.

* mcp: / commands in a session group come from admins and owners

A one-line / text, a // text or a /! text from a moderator, member or author gets one reply, Only admins and owners of this group can send / commands., and reaches neither Control nor Claude. The check is Session.refusesCommand in Session.onMessage; without it, the replies of Control and Session.prompt apply as before.

* mcp: document / commands from admins and owners and profile updates

REFERENCE and README state that every message of a member who can send is a prompt except / commands, // and /!, that the / commands of moderators, members and authors get one refusal, and that Claude changes only its own fields of a group's profile, from the profile as it stands; TESTING lists the trust test as it now runs.

* mcp: spec of / commands from admins and owners and profile updates

The spec describes the one refusal of the / commands, // and /! of moderators, members and authors before Control and the prompt, the profile updates of Control and the Main group from the group's current profile, the removal of the groupUpdated handling, and follows the new lines of the source.

* mcp: spec summary of / commands from admins and owners

* mcp: spec diagrams render whole on GitHub

Mermaid ends a sequence message, a note and a block label at a semicolon and treats # as the start of a comment; the diagrams write them as #59; and #35;, which render as ; and #. All 36 diagrams of the spec render with GitHub's Mermaid viewer, each message, note and label in full.

* mcp: /observer ends the observer's standing approvals at once

Control reads the group's members again after /observer sets the role, as after a role change in the app, so the approvals of all messages to a chat and of all files from it that the new observer gave count no more.

* mcp: /observer answers that a member who has not joined is no member

A member invited to a session group who has not joined yet is neither current nor pending, so /observer #G ID answers No member ID in this group. and changes nothing; the member joins with the role of the invitation, and its role can change after the join.

* mcp: a session's rename and model change keep both in the group

Control makes its profile updates of a group one at a time, each from the profile the one before it wrote, so a rename and a change of the model or effort that overlap both stay in the group's profile.

* mcp: test the mode host card after a role change to the first admin

A session that requested mode host while its group had no admin or owner posts the mode card once a member becomes the group's first admin by a role change, after the post of the member's rights.

* mcp: no code comments

The code and tests carry no comments; the facts they stated are in the spec: an expiry timer that fires before the expiry time, the listener before the hub opens, the exit after the /stop reply, the stop timer cleared by a new entry, the socket path limit, the repeated call of an unknown session, and the request without a connection pool.

* mcp: document /observer and the Main group observer

REFERENCE states that a Main group observer can't send /join N, that /observer ends the observer's standing approvals at once, and the reply for a member who has not joined yet; TESTING lists the /observer test.

* mcp: spec of /observer, profile updates one at a time, removed comments

The spec describes the members read again after /observer, the reply for a member who is neither current nor pending, Control's profile updates one at a time, and the facts the removed code comments stated, and follows the new lines of the source.

* mcp: rights posts name / commands, without the observer hint for owners

The rights of admins and owners read can send prompts and / commands to Claude, and approve tool use; those of moderators, members and authors read can send prompts to Claude; / commands and approvals need the role admin or owner. The post for an owner ends without the /observer command, as an admin can't change an owner's role.

* mcp: session group description names prompts, / commands and approvals

A new session group's description reads The Claude Code session N. Members send it prompts; admins and owners also send / commands and approve tool use. Existing groups keep theirs, as Control sets only the name and the commands.

* mcp: Main group welcome and join post state what members can do

* mcp: Main group short description states what members can do

* mcp: Main group replies Unknown command. to an unknown command

* mcp: architecture names the Main group's texts as they now stand

* mcp: reply answers that files and media are off in the session group

* mcp: Main group texts are set at its creation, so owners' edits stay

* mcp: plugin texts name admins and owners where they decide

* mcp: commands of members past the one refusal get no reply

* mcp: overview link labels of the architecture match their lines

* mcp: actions expire within 60 s after a sleep past their expiry time

* mcp: cards of image and video actions are text while media are off

* mcp: /forward answers that files and media are off in the session group

* mcp: docs say an observer's standing approvals count again as admin

* mcp: serve passes the 0.2 tests unchanged

* mcp: serve answers /give with the list of commands, as 0.2

* mcp: maxTimer is private to messages.ts again, as 0.2

* mcp: docs state what text cards and serve's kept expired actions do

* mcp: the e2e test checks the bot receives the image with its file

* mcp: Claude names the group preference that refuses a post

* mcp: spec drops the reply file approvals that decision 87 removed

* mcp: docs say a refused outcome card leaves a performed action done

* mcp: a refused outcome card of a done action says it was performed

* mcp: a refused terminal prompt says the feature is not allowed for User

* mcp: test the cards refused for a preset server's SimpleX link

* mcp: docs name the text that reply returns for a refused file

* mcp: refused cards name the outcome; failure logs end with one period

* mcp: test the notice of a card edit refused after an expiry

* mcp: serve logs a failure with the period of 0.2

* mcp: reset-owners replaces the Main group at once, without an approval

* mcp: the plugin install links the marketplace on master

* mcp: docs state which Main group texts Claude keeps

* mcp: the plugin leaves serve agents named token and lock as they are

* mcp: rename the plugin's daemon to the service

* mcp: remove // and /!; a message starting with ! is a prompt

* mcp: docs say one-line / messages are the group's commands

* mcp: spec drops // and /!, which decision 117 removed

* mcp: remove the plugin's link and reset-owners skills

* mcp: test an admin's multi-line // and /! text reaches Claude as sent

* mcp: docs say the PreToolUse hook runs plugin/allow.js

* mcp: publish the plugin with its production dependencies bundled

* mcp, docs: the package bundles its dependencies; nothing installs them

* mcp: spec of the bundled dependencies and the package without a lockfile

* mcp: test the packed plugin has no link, which Claude Code refuses

* mcp, docs: plugin-only README; serve and shared settings in REFERENCE

* mcp, docs: shared settings name channels and process IDs precisely

* mcp: the description shows the model from the first answer

* mcp, docs: the Stop hook reads the model of its answer

* mcp, docs: README names a roadmap of what comes next

* mcp, docs: README and REFERENCE in short sentences

* mcp, docs: plain sentences in TESTING, spec and plugin texts

* mcp: the marketplace description names its one plugin

* mcp, docs: README shows a session group; serve images move to REFERENCE

* mcp: simplex-chat 7.1.3 and @simplex-chat/types 7.1.3, core 7.1.3.0

* mcp, docs: the package is a 4 MB download

* mcp: an older turn request no longer replaces a newer model or effort

* mcp: a held title's model keeps the start time of its hook

* mcp: User posts only prompts a person typed, not Claude Code's own

* mcp: User posts a typed prompt behind a slow hook or a new transcript

* mcp, docs: shorter Safety section in README

* mcp, docs: README says how to use the plugin without the channel

* plan: decisions 121 and 122 are decided by judgement on 2026-11-12

---------

Co-authored-by: shum <github.shum@liber.li>
2026-11-12 18:52:05 +00:00
Evgeny @ SimpleX Chat d94981224a docs: names conditions of use (#8135)
* docs: names conditions of use

* docs: capitalize SimpleX Network

* docs: state transfer rule after registration ends
2026-11-11 18:38:56 +00:00
Evgeny @ SimpleX Chat d142283c3e types: typescript is a development dependency (#8124)
* ci: a change of the types package.json releases the types

* types: typescript is a development dependency, not installed with the types
2026-11-11 13:47:04 +00:00
Evgeny @ SimpleX Chat 3ff3a124e4 docs: mark pull requests ready for review before the approval (#8059) 2026-11-09 22:40:23 +00:00
Evgeny @ SimpleX Chat 4f6fc5fb3a ci: publish the MCP server from build.yml (#8049)
* ci: publish @simplex-chat/mcp from build.yml

* ci: publish MCP after PyPI, notice for a version held back

* ci: test the MCP server as a scope of build-linux
2026-11-07 10:02:01 +00:00
Evgeny Poberezkin 0882a847cc Merge branch 'master' into names 2026-11-05 08:13:14 +00:00
Evgeny @ SimpleX Chat d00513ed27 docs: user guide matches the 7.1 apps (#7997)
* docs: user guide for the 7.1 apps

* docs, website: guide order, badge benefits, message expiry; soft line breaks on the site

* docs: guide videos for the first profile, invitations, joining and the address

* docs: guide screens with the iPhone status bar

* docs: guide shows full and cut screens only

* docs: guide pages corrected in place, keeping master's structure

* docs: group chat and SimpleX address pictures in the iPhone frame

* docs: plainer wording in the guide

* docs: guide checked against how SimpleX explains its features

* docs: guide answers on profiles, channel privacy, SOCKS and names

* docs: android guide picture from the emulator in the pixel 7 frame
2026-11-04 09:07:06 +00:00
shandsh-agents 2c09d06793 store: rename badge service to store service (#7987)
Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-03 13:24:17 +00:00
sh-agents 0465fd649a Merge branch 'master' into names 2026-11-02 11:42:59 +00:00
Evgeny @ SimpleX Chat 3a98f25666 core: crop and resize profile images set from files (#7955)
* docs: plan resized profile images from files

* core: crop and resize profile images set from files

* docs: profile image from a file in the chat relay docs

* core: faster crop of profile images
2026-11-01 11:46:25 +00:00
fbca2cae81 core, ui: resize images in the core for sharper previews and images (#7941)
* WIP: Haskell impl of resizeImageToStrSize

* WIP: add FFI export wrapper

* WIP: switch ios resizeImageToStrSizeSync to backend

* WIP: fix resizeImageToStrSizeSync

* WIP: add JNI wrappers

* Add non-base64 resize and cWriteImage

* WIP: add chat_write_image

* fix resizeToStr

* fixes

* fix syntax, raise jpeg quality back

* add chatWriteImage

* Fix cfArgs in tests

* Use jpeg-turbo encoder

* add nix pins

* bump jpeg-turbo

* add CI deps

* add encoding funs to android lib

* bump jpeg-turbo for 20.04 fix

* jpeg-turbo fix for 8.10

* android fixes

* Bump jpeg-turbo

* set static flag for jpeg-turbo

* Fix nix for aarch64/android

* Fix android C api

* Fix resize in android

* Bump hs-libjpeg-turbo

* target correct override

* override android lib from android pkgs

* add macos build tweaks

* bump hs-jpeg-turbo for 8.10 fixes

* more build fixes

* make ios compile

* Always use pkgconfig for libjpeg-turbo

* WIP: debug libjpeg in ubuntu pkg-config CI

* Add pkg-config to dockerfiles

* Add libturbojpeg to dockerfiles

* Use -dev version of libturbojpeg in dockerfiles

* Install pkg-config in windows CI

* Disable flag for custom libturbojpeg linking options

Workarounds relocation error on x86_64-linux with gcc:
  /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libturbojpeg.a(turbojpeg.c.o): relocation R_X86_64_TPOFF32 against `errStr' can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: failed to set dynamic section sizes: bad value

* WIP: debug libjpeg in windows pkg-config CI

* WIP: debug libjpeg package in windows CI

* core: image resize module and buffer FFI

* ci: link libjpeg-turbo statically on all platforms

* ui: resize images in the core

* core: rename image resize functions to chat_resize_image and chat_resize_image_uri

* ci: restore whitespace in build.yml

* ci: build libjpeg-turbo 3.1.4.1 from a submodule

* core: hs-jpeg-turbo from github.com/simplex-chat

* nodejs: resize images

* python: resize images

* core: hs-jpeg-turbo from gitlab.com, the GitHub import lacks LFS objects

* core: generate /img previews

* ci: link libjpeg-turbo on Windows without pkg-config

* ci: build libjpeg-turbo on Windows with the GHC toolchain

* docs: plan for image resizing in the core

* docs: update image resizing plan

* ios: prevent crash when wallpaper image cannot be resized

* android, desktop: raise an error when an image cannot be resized

* docs: update spec references for image resizing

* docker: build the CLI image from a clone without submodules

* docs: apply review fixes to image resizing plan

* docker: build the CLI from a git worktree with the submodule present

* docs: apply second review to image resizing plan

* docs: point image resizing plan at the rewritten commit

* core: choose image format by transparency in chat_resize_image

* nodejs: resize images to the app sizes

* python: resize images to the app sizes

* nodejs, python: describe the core modules as used for image resizing

* docs: add license notices of the image libraries

* ci: describe the avatar method without attributing it to the apps

* ci, ios, nix: remove the libjpeg-turbo build outside cabal

* python: name resize_image in the core module text

* nodejs, python: describe resizing to the app image sizes

* core: refuse images larger than the supported size

* core: resize to JPEG images with a side above 65500 pixels

* docs: record image resizing decisions for the bundled libjpeg-turbo

* core, docs: build libjpeg-turbo and stb from the fork submodules

* docs: record the fork pins in the image resizing plan

* core: resize images to at most 4320 pixels per side, refuse above 16384

* docs: record the image side limits in the image resizing plan

* core: pin the rebased hs-jpeg-turbo fork

* core: pin the hs-jpeg-turbo fork without package.yaml

* docs: plan scaled JPEG decoding and EXIF orientation of images

* docs: copy the JuicyPixels-stbir licence of the pinned fork

* core: pin the hs-jpeg-turbo fork with scaled JPEG decoding

* core: decode JPEG at the display size, up to 65500 pixels per side

* core: rotate JPEG images by their EXIF orientation

* docs: refer the image plan to the JPEG decoding code

* docs: record the approved image processing decisions

* core: limit JPEG decoding memory to 1024 MB outside iOS and Android

* docs: name JPEG decoding in the libjpeg-turbo notice

* docs: plan image resizing from files and the decisions of 26 Oct

* core: scale images in one Catmull-Rom pass with sharpening

* docs: plan image sizes at a fixed quality

* core: resize images at a fixed quality to fill the size limit

* core: resize images from a file path or a file descriptor

* ios, android, desktop: resize picked images from their files

* core: encode resized images with mozjpeg

* tests: check descriptor closing by the file it refers to

* core: raise JPEG quality only for a full-size image below 97% of the limit

* ci: name the mozjpeg submodule in the Windows cleanup comments

* docs: refer the image plan to the current code

* docs: refer the image plan to the code merged with master

* core: export every image resizing function from each library

* core: close the file descriptor when its handle cannot be created

* docs: count the C sources of mozjpeg with the arithmetic decoder

* core: use the reviewed hs-jpeg-turbo and JuicyPixels-stbir forks

* ci: build the armv7a Android core library on request

* core: round image heights half up in the size search

* ios: describe the file image resizing functions in SimpleX.h

* ci: pick, preview and send images in the Claude app tests

* core: decode PNG images with libspng and refuse other formats

* core: encode PNG with libspng, keeping the smaller filter choice

* ci: pick, preview and send images in the scripted app smoke tests

* flake: build the PNG decoder package in nix builds

* ios: remove the copy of a picked image after sending it

* core: refuse image files larger than the decode memory limit

* core: scale a JPEG image to its largest size once per resize

* core: bisect JPEG quality without a step function

* core: reduce the memory used to sharpen and to decode PNG images

* android, desktop: pass the image format to the core as an integer

* android, desktop: fuse the preview conditions of picked media

* android, desktop, ci: check that the core resized the smoke test images

* python: remove the docstrings of the explicit image resizing functions

* docs: add the second review fixes to the image plan

* ci: tap the iOS attachment button by its accessibility label

* core: keep the colour profiles of resized images

* docs: add the colour profiles to the image plan

* ci: wait up to 30 s for the new group screens in the iOS smoke test

* ci: pick the Android smoke test images from their own photo folders

* ci: tap the iOS photo picker by position, as its tree is not shown

* ci: pick the test card and the logo by their iOS picker positions

* core: update JuicyPixels-stbir with the stb_image_resize licence terms

* core: write a fixed Display P3 profile for Display P3 images only

* core: do not keep the input image in memory for its colour profile

* core: read the JPEG segments once for the orientation and the profile

* core: read an image file into one buffer of its size

* docs: add the third review fixes to the image plan

* core: resize images with Display P3 or no profile, not profile bytes

* ci: check the pixel sizes of the images sent in the iOS smoke test

* core: update hs-jpeg-turbo with PNG chunk limits and encoder fixes

* docs: list Compact ICC Profiles, libspng and miniz in the dependencies

* android, desktop: reword the picked media preview comment

* docs: refer the image plan to the code merged with master

* ci: render the iOS snapshots before the images case

* ci: dismiss the snapshot tests' camera alert before the iOS images case

* core: update hs-jpeg-turbo with tests and the JuicyPixels-spng synopsis

* core: pin hs-jpeg-turbo and JuicyPixels-stbir in simplex-chat repositories

* update ios core library

* core, ui: accept only JPEG and PNG image data

* core: update JuicyPixels-stbir

* docs: plan for the iOS copy of picked images

---------

Co-authored-by: IC Rainbow <aenor.realm@gmail.com>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
Co-authored-by: Alexandre Esteves <alexfmpe@proton.me>
2026-10-30 12:14:51 +00:00
shum 6d80f6fa91 Merge branch 'master' into names
# Conflicts:
#	cabal.project
#	scripts/nix/sha256map.nix
#	simplex-chat.cabal
#	src/Simplex/Chat/Store/Postgres/Migrations.hs
#	src/Simplex/Chat/Store/SQLite/Migrations.hs
#	src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt
2026-10-29 06:40:22 +00:00
spaced4ndyandspacedandy-agents-simplex 9696a71b91 core, badge-service: renew supporter badges from App Store and Google Play subscriptions (#7716)
* core, badge-service: name Apple claims by reference

Rename appleTransactionId to appleTransactionRef, matching googlePurchaseRef
and StoreTransactionRef. No behaviour change: the next change makes it
return a subscription's original transaction id, which the old name would
misstate.

Run: 001-badge-subscriptions, slice 1

* core, badge-service: store subscription charges and carry the subscription state

Add the service migration 20261012_badge_subscriptions: the subscription
charges table, the ledger's charge_id, and the payment's subscription state,
check time and Play token, replacing three subscription columns nothing
wrote. The ledger now stores and reads back charge credits, and the badge
credential response gains an optional subscription state that older clients
ignore and that reads an unknown state without failing. Nothing writes a
charge or a state yet, so no behaviour changes.

Run: 001-badge-subscriptions, slice 2

* core, badge-service: plan subscription charges and claim Apple subscriptions by original id

Add chargeEntries, the one planner for a store charge's ledger rows: a
lapse to the billing period start, the grant dated to that start, and a
lapse to now, so coverage follows the store's periods and every row
verifies by re-running it at its createdAt. A test runs its rows through
the client's own balanceChecked for first charges, monthly and annual
renewals, billing-retry recovery and grace.

An Apple auto-renewable transaction is now claimed by its original
transaction id, which every renewal keeps, so renewals resolve to one
purchase. One function names the ref for both the claim and the real
verifier, so they cannot disagree.

Run: 001-badge-subscriptions, slice 3a

* badge-service: credit a store subscription purchase

The catalog now tells subscription products from one-time ones and maps a
store plan to its tier and months. A subscription receipt is checked with
the store once: with a grantable charge, the service plans the charge's
rows from the store's period start, signs the first month, and writes the
payment, purchase, charge, ledger rows, issuance, state and Play token in
one transaction, answering with the subscription state. Without one, it
answers payment_pending (300 s while the period has not started or the
store is pending, a day otherwise), receipt_invalid for an ended Play
subscription, or test_purchase, and writes nothing. Replays carry the
state. The store verifier interface gains the subscription check, which no
real store implements yet; the fake store does.

Run: 001-badge-subscriptions, slice 3b

* badge-service: renew a subscription once its paid coverage ends

While a subscription purchase's coverage runs, issueBadge is unchanged
and makes no store call. Once it has ended, the service asks the store at
most once an hour per subscription, stamping every attempt, and answers
from the stored state in between; a failed check is retried after the
whole interval. A grantable charge is planned from the tip at the store's
period start, signed, and written with its issuance and state in one
transaction that re-reads the tip, answering internal if it moved. Any
other charge and the state are recorded without a ledger row. Every answer
for a subscription purchase carries its state.

Run: 001-badge-subscriptions, slice 4

* core: keep a subscription badge until the service says it ended

A purchase is a subscription exactly when its ledger replica holds a
charge credit, so the kind is derived with no column or migration. A
subscription is still asked about at zero months, at the shared weekly
moment, and keeps its badge past paidThrough until an answer says the
subscription ended, so a renewed month is presented at the old
credential's expiry with no gap, and a charge the store recovers later
still re-activates it. While it waits, the client records no failure and
raises no support-ended alert; "issued no credential" now fires only while
the ledger still owes a month. Prepaid purchases are unchanged.

Run: 001-badge-subscriptions, slice 5

* badge-service: check Apple subscriptions with the App Store Server API

With an in-app purchase key configured in [apple], the service reads a
subscription's status by its original transaction id from Get All
Subscription Statuses, authenticated by an ES256 token reused until near
expiry. Each signed transaction and renewal info is verified against the
pinned Apple root through the same chain check as one-time purchases, now a
separate function, and a body that fails it is a verifier failure, never a
refusal. Statuses map to renewing, cancelled, billing retry and ended;
family-shared transactions are refused; 401 and 403 are this service's
failure, other errors and timeouts unreachable. A verifier failure thrown
by a store check is answered internal, and a test subscription is refused
in one place for first purchases and renewals. Without the key, Apple
one-time purchases verify as before and subscriptions are not configured.

Run: 001-badge-subscriptions, slice 6

* badge-service: check and acknowledge Google Play subscriptions

The Play subscription check reads purchases.subscriptionsv2 by token
through the existing service-account client, with the same HTTP classes as
product reads, and maps Play's state, base plan, period, order id and
offer phase; the period start is its end minus the plan's length, and a
pending subscription stays pending. A subscription is acknowledged with
purchases.subscriptions.acknowledge before it is credited, skipped when
Play reports it acknowledged, so it never reaches the one-time endpoint.
Each store's subscriptions answer provider_not_configured when that store
is not configured. A charge on a plan the catalog does not sell is pending
rather than a malformed period.

Run: 001-badge-subscriptions, slice 7

* review: round 1 fixes

R1-1: test an App Store subscription renewal through issueBadge, including
a charge recorded before its period starts and granted later under the
same charge id.
R1-2: make the ledger's charge_id index unique, so the schema itself grants
each store charge at most once.
R1-3: pin that a charge on a plan the catalog does not sell, with an empty
period, is pending at purchase and recorded at renewal, never internal.

Run: 001-badge-subscriptions, review round 1

* core: update query plans

getBadgePurchase derives the purchase kind from the ledger replica, and a
subscription test makes a held store receipt due.

Run: 001-badge-subscriptions, final verification

* fixes

* core: move SubscriptionState to Badges.Types (structural)

BadgeState, which lives in Badges.Types, is about to carry a subscription's
state, and Badges.Service imports Badges.Types. Service re-exports it, as it
does BadgeServiceErrorCode. No behaviour change.

Run: 003-badge-subscriptions-ui, slice 1

* core: keep a store subscription's state on the client

The screens and alerts need to know whether a subscription renews, was
cancelled, waits for a charge, or ended, and the client dropped every state
the service sent but ended. It is now stored on the purchase: from the
answer to the first credit, and from a renewal answer only when the
asserted tip's coverage had ended, since while coverage runs the service
repeats what it read at the last renewal (a year old for an annual plan).

BadgeState gains `subscription` (the plan's months, from the latest charge
credit, and the state), and fills renewsAt/willRenew from it. A changed
state is announced with CEvtBadgeChanged. The column goes into the
unreleased M20260925 migration.

Run: 003-badge-subscriptions-ui, slice 2

* core: record the device store's view of a subscription

The service reads the store only once a subscription's paid coverage has
ended, so it never sees a cancellation while the period runs. The apps read
the device's store (StoreKit's renewal state, Play's isAutoRenewing) and
report it with /_badge subscription <state> <payment>, which records it on
the credited subscription purchase the payment resolves to and announces the
change to its owner.

A renewing report does not replace billingRetry or ended: Play lists a
subscription in its grace period with auto-renew on, and the service's next
answer clears billing retry once the charge lands.

Run: 003-badge-subscriptions-ui, slice 3

* core: claim a store-listed transaction only on the device that bought it

A store account's purchases are listed on every device signed into it:
Play's purchase query lists active subscriptions for their whole life, and
Apple's Transaction.updates delivers auto-renewables made on other devices.
A hand-over with no record and an unknown echoed invoice made a new record
under the presenting profile, so another device could claim a buyer's
subscription for its own active profile, or repeat a refused request every
30 days after cleanup.

/_badge purchase now takes a `listed` mark, which the apps' sweeps and
purchase listeners send: it joins only a record this core already has for
the transaction or its echoed invoice, and otherwise records and sends
nothing (CRStoreReceiptNotRecorded). The purchase call and Restore hand over
unmarked, as before.

Run: 003-badge-subscriptions-ui, slice 4

* core: let a held App Store subscription adopt its later transactions

A held Apple subscription record is keyed by its original transaction id,
so every renewal resolves to it. It kept the payment's back-off when a new
transaction arrived, and adopted any payment handed over, including a
revoked renewal, which the service refuses as receipt_invalid and so would
refuse the whole subscription.

A held Apple record now adopts a JWS only for another transaction with a
later purchaseDate and no revocationDate, read from the unverified payload,
and is then due at once with its retry delay and credit error cleared. A
re-delivered or re-signed copy changes nothing. A failed attempt writes its
back-off only if the record still holds the payment it sent.

Run: 003-badge-subscriptions-ui, slice 5

* core: refuse a badge code or invoice while a store receipt is pending

A code redeemed while a store receipt is held put the code's badge on the
profile, and the held receipt then waited behind it; for a subscription the
store kept charging every period meanwhile. Code redemption and invoice
creation now answer "store purchase open" while the profile holds an App
Store subscription receipt, or another receipt whose last failure can clear
on its own. A receipt that failed for good does not block, except an Apple
subscription, which Apple keeps charging; an uncredited Play subscription is
refunded by Play.

Run: 003-badge-subscriptions-ui, slice 6

* core: alert a subscriber that a payment failed, a renewal nears, or it was cancelled or ended

A subscription's alerts were the prepaid ones: a retired subscription said
"support ended", and nothing told the user a payment failed, an annual
renewal was near, or a cancelled subscription still runs. The derived alert
for a subscription is now, in order: subscription_ended once retired,
payment_issue while the store retries, issue_failed as before,
subscription_cancelled before paidThrough, and renewal_approaching from
three days before an annual plan renews, with a wake at that moment. Monthly
plans get no reminder, as there is no opt-out yet.

The unreleased migration's down step clears an acked subscription_cancelled,
which an older core cannot read.

Run: 003-badge-subscriptions-ui, slice 7

* badge-service: let the dev mock vouch for store subscriptions

With [dev] accept_unverified_store_receipts on, every subscription was
answered provider_not_configured, so the apps' subscription screens could
not be tried against a dev service. The mock now credits an App Store
subscription for the plan its product names, and a Play subscription for
the base plan a test token test.<basePlanId>.<uuid> names, or else its
product's monthly plan, from a minute ago; it remembers the plan in memory
and grants each renewal a new charge, answering a subscription it does not
know (after a restart) as ended.

The subscription check is given the product the presented receipt names,
which only the mock reads; it reads the service's badge clock at check time.

Run: 003-badge-subscriptions-ui, slice 8

* ios: hand App Store subscriptions to the core and report their renewal state

A subscription transaction was finished uncredited, so a buyer would pay and
get nothing. Every badge product now goes through a core invoice and is
handed over, and finished only once the core answers it credited or refused.
Transactions the store lists (the launch sweep, Transaction.updates) are
handed over as listed, so another device's purchase is not claimed here;
Restore purchases syncs with the App Store and claims them for this profile.
A revoked renewal is finished without hand-over, as the service would refuse
it and so the whole subscription.

The app reports StoreKit's renewal state to the core at each sweep, after the
manage-subscriptions sheet and after a restore. Monthly and annual are offered
only to an Apple ID with no earlier subscription in the group, which Apple
would fold a new one into.

Run: 003-badge-subscriptions-ui, slice 9

* ios: sell badge subscriptions and show their state on Your badge

Monthly and annual subscriptions are offered on How long and Check your
order, with the App Store's subscription disclosure, Terms of use and
Privacy policy links, and Restore purchases. Your badge shows a
subscription's state - Renews {date} · {price}, Ends {date}, Payment
problem, Renewing or Ended - with why another badge cannot be bought or
redeemed while it waits for its charge, Manage subscription and Restore
purchases. The chat list shows one banner for the current badge alert of
any kind: renewal soon, payment problem, cancelled, ended, as well as the
expired and renewal-failed ones it had.

Run: 003-badge-subscriptions-ui, slice 10

* android: hand Play subscriptions to the core and report their renewal state

The Kotlin port of the iOS store change. A Play subscription was
acknowledged uncredited; every badge product now goes through a core
invoice and is handed over. The sweep queries subscriptions as well as
one-time products, and the sweep and purchases listener hand over as listed,
so another device on the Google account does not claim them; Restore claims
them for this profile. A subscription is bought on its base plan's own
offer, and the app never acknowledges one itself: the service does when it
credits it, so Play still refunds one the service never credits.

The app reports Play's isAutoRenewing to the core as renewing or cancelled.

Run: 003-badge-subscriptions-ui, slice 11

* android, desktop: sell badge subscriptions and show their state on Your badge

The Kotlin port of the iOS screens. How long and Check your order offer
monthly and annual with Google Play's subscription disclosure, the privacy
policy link and Restore purchases. Your badge shows the subscription's state
with the same texts as iOS, the store named Google Play with a store lane and
"the store" without one, and Manage subscription and Restore purchases only
with a store lane on the local host. The chat list shows one banner for the
current badge alert of any kind. Desktop shows the state, footers and banners
without store rows or a price.

Run: 003-badge-subscriptions-ui, slice 12

* docs: describe the one badge alert banner in the apps' chat-list specs

Both chat-list specs described two hand-written badge banners (expired,
renewal failed); the chat list now has one banner for the current badge
alert of any kind. Also moves the line links this run shifted.

Run: 003-badge-subscriptions-ui, slice 13

* review: round 1 fixes

ios: stop selling a subscription once this device has seen one, so a
second profile is not charged for a subscription Apple folds into the
first (R1-12). Continue pins the chosen period on both apps (R1-13).
Only a device with a subscription asks its store for products and status
when reporting, and the purchases are marked checked before the report
(R1-14, R1-5: Kotlin now loads the products, so the price shows after a
restart). Restore says "Nothing to restore" after a cancelled purchase
(R1-7). Android keeps sweeping one-time purchases when the subscriptions
query fails (R1-6). The freshness comment in requestBadgeIssue states the
service's one-hour repeat of its last check (R1-1).

Run: 003-badge-subscriptions-ui, review round 1

* badge-service: answer a long-expired Play subscription as ended, and hash Play order ids

Play answers HTTP 410 for a subscription that expired too long ago to be
queried; it was read as unreachable, so the service never answered ended,
the badge was never retired and the profile stayed blocked from buying or
redeeming (R1-2). Play order ids appear on the buyer's receipt email, so
charges now store a hash of the order id, as purchase tokens already are
(R1-10).

Run: 004-badge-subscriptions-review, review round 1

* review: run 003 round 2 and run 004 round 1 app fixes

ios: buy a subscription only while it is still for sale, after re-reading
the Apple ID's transactions, and disable Pay once it is not, so a Check
your order screen opened before another profile or device subscribed
cannot buy one Apple folds into the earlier subscription (run 003 R2-1,
run 004 R1-4). android: skip the subscriptions query only on a device
whose Play does not support subscriptions, so Restore no longer says
"Nothing to restore" when the query failed (run 003 R2-2).

Run: 003-badge-subscriptions-ui round 2; 004-badge-subscriptions-review round 1

* review: round 3 fixes

ios: a subscription refused because this Apple ID subscribed before has
its own error, and Check your order says why Pay is disabled (R3-2).
android: skip the subscriptions query only when Play does not support
subscriptions, so a disconnected client fails the sweep or Restore
rather than reading as no subscriptions (R3-1).

Run: 003-badge-subscriptions-ui, review round 3

* core: update query plans

Regenerated by the full suite for the purchase, subscription status and adoption queries. Run: 003-badge-subscriptions-ui, final step

* badge-service: say what hashing the Play order id protects

The hash is unkeyed, so a holder of the buyer's receipt can still find the row (R2-1). Run: 004-badge-subscriptions-review, review round 2

* badge-service: name the rule for when a subscription is due a store check

The issue path's purchase read becomes getIssuePurchase and its "ask the
store now" test becomes subscriptionCheckDue, so the request router can
read the same rows by the same rule. No behaviour change.

Run: 005-subscriptions-load-timing, slice 1

* badge-service: answer every request that may ask a store on the store lane

App Store subscription purchases and subscription renewal checks called
their store from the main lane, so one slow or repeated store call held up
code redemptions and every other renewal. The router now reads the
purchase the way the issue path does and sends to the store lane every
request that may ask a store: Play purchases, App Store auto-renewable
purchases, and issue requests for a subscription due its store check,
judged a minute ahead so the handler never finds one due on the main lane.

Run: 005-subscriptions-load-timing, slice 2

* core: send no badge request before the wake a request that issued nothing set

While a subscription waited for its store charge, or a prepaid renewal
kept failing, every launch, foreground, profile switch and badge-state
read sent the issue request again, so the badge service saw the user's
app-open times for weeks. A due request now waits for the wake the last
pass stored, as long as that wake is no more than a stall interval away,
so it is asked again a day later as the renewal design says.

Run: 005-subscriptions-load-timing, slice 3

* fixup! core: send no badge request before the wake a request that issued nothing set

* fixup! badge-service: answer every request that may ask a store on the store lane

* badge-service: ask the App Store about a subscription purchase at most once an hour per claim

Anyone holding a real but uncreditable App Store subscription JWS, such as
their own lapsed subscription, could present it again and again, each time
spending an App Store Server API call from the quota every subscriber's
renewal check needs. The purchase path now remembers, in memory, which
subscription claims it asked about within the hour and answers a repeat
payment_pending with the time left. Keys are original transaction ids from
JWS that verified offline, entries expire after the hour, and a full table
asks rather than refuses, so memory stays bounded and no buyer waits on
another's claim.

Run: 005-subscriptions-load-timing, slice 4

* fixup! badge-service: ask the App Store about a subscription purchase at most once an hour per claim

* review: round 1 fixes

badge-service: a Play charge whose clipped period start leaves its month
already spent is answered as period over, not internal (R1-A1).
docs: the per-store answer classes list Play's 410 and the App Store
subscription check (R1-A2).
tests: a held receipt with no attempt yet blocks an invoice (R1-B2); a
renewing report keeps an ended status (R1-B3); a test comment names
[google] (run 005 C2-R2-1).
ios: a subscription refused because this Apple ID subscribed before
shows its sentence, not the error's name (R1-C2); ios, android, desktop:
the Check your order footnotes share one helper (R1-C3).

Run: 006-subscriptions-branch-review, review round 1

* fixup! review: round 1 fixes

* core: wait a day after a badge request that issued nothing, whatever the service or a snooze says

The hold on the stored wake let two moments the client does not schedule end it early. A renewal whose store check failed was answered with an hour's retryAfter, so the next activation after each hour sent it again, sampling when the app is opened. A snooze set before a request ended its wait at the snooze's end, timing the next request by the user's tap. Now a request that issued nothing waits the stall or a ledger moment: retryAfter only marks the failure transient, and a snooze is not a wake while a request waits; the request's own wake raises the alert again.

Run: 005-subscriptions-load-timing, slice 5

* fixup! review: round 1 fixes

* fixup! core: wait a day after a badge request that issued nothing, whatever the service or a snooze says

* badge-service: ask Play about a subscription purchase at most once an hour per token

The purchase path's hourly bound covered only App Store claims, so a re-presented Play subscription token, uncredited or credited to another key, spent a subscriptionsv2.get call each time, from the quota bucket Play renewal checks use. The bound now lives in purchaseSubscription, which both stores' purchase paths call, with one map per store: Play's keyed by the token's hash, so made-up Play tokens cannot fill the App Store's. Distinct made-up tokens are still one call each.

Run: 005-subscriptions-load-timing, slice 6

* badge-service: read Play's paused subscription as waiting to renew

An unmapped SUBSCRIPTION_STATE_PAUSED was answered internal, so a paused subscriber's renewal failed for the whole pause. Play reports a pause with auto-renewal on and charges again when it ends, so it now maps as an active subscription does: renewing, or cancelled with auto-renewal off. Pause is being turned off on the base plan; this is defence in depth. A pause grants nothing: Play names no new order, and the last one is already granted.

Run: 005-subscriptions-load-timing, slice 9

* core: retire a subscription badge once no store could still charge it, whatever the service answers

A subscription badge retired only on an ended answer, so a service that never sent one (a final error such as unknown_purchase_key, a rollback, a service that never answers) left the badge shown, one request a day forever, and the profile unable to redeem, buy or have a held receipt credited. Now it also retires once paidThrough is older than the longest store recovery window: Apple retries a failed renewal for up to 60 days, the longest with Play's pause off, plus a week. paidThrough counts every month the ledger holds, so banked months are never retired by it.

Run: 005-subscriptions-load-timing, slice 8

* ios, android: no Restore purchases on Your badge, where a restored purchase could not be credited

Your badge shows only while a badge is shown, so a purchase Restore found there with no record on this device was held under a profile whose held receipts are not processed while it shows a badge: not credited, nothing said, and on Android acknowledged, ending Play's three-day refund. Restore stays on Check your order, the one screen where a restored purchase can be processed.

Run: 005-subscriptions-load-timing, slice 7

* review: round 4 fixes

R4-1: a subscription badge is asked about first and retired only after the service answers, judged on the ledger after that answer. Retiring before asking used the client's paidThrough, which moves only when the client asks, so a subscriber who had not opened the app for longer than the recovery window while the store kept charging lost the badge at the next launch and was never asked again. A request that is not answered retires nothing. Tests: testSubscriptionRetiredAfterRecoveryWindow changed, testIdleSubscriptionKeptPastWindow and testSubscriptionNotRetiredWithoutAnswer added.
R4-2: one snooze comment where two contradicted each other.
R4-3: the recovery window's comment names Play's clipped period start.
R4-4: the retirement tests use subscriptionRecoveryWindow.

* badge-service: name the lane each request waits on

The router answered "may this request ask a store" as a Bool; renewal checks are to get a lane of their own, which a Bool cannot say. requestLane now names the lane: main, purchase or renewal. Both store lanes still share one queue, so no request changes lane.

Run: 007-subscriptions-retirement-lane, slice 1

* badge-service: check renewals on a lane no purchase waits on

Renewal checks shared the store lane with every purchase, so made-up Play tokens, which anyone can send, and the weekly burst of genuine purchases delayed them. Renewal checks now wait on a lane of their own, which only a request signed by the purchase key it names, and due its hourly store check, can reach.

Run: 007-subscriptions-retirement-lane, slice 2

* badge-service: name the web limiter's fixed-window step

takeToken counted a request against a minute's limit inline. The step becomes takeFrom, a pure function, so the purchase path's Play read allowance can use the same rule. No behaviour change.

Run: 007-subscriptions-retirement-lane, slice 3a

* badge-service: read Play's subscriptions at most 300 times a minute for purchases

A Play subscription purchase is asked about without any offline check, so any token in the accepted grammar spends a read from the Subscriptions quota renewal checks share. The purchase path now takes one of a minute's 300 reads for each Play subscription it asks about, a tenth of Play's default quota; with none left, the claim is answered rate_limited with the seconds left in the minute and is not held, as Play was not asked. A claim already held takes no read, and App Store claims, verified offline first, take none.

Run: 007-subscriptions-retirement-lane, slice 3

* core: count the subscription retirement window from the first answer that renewed nothing

The window was counted from the client's paidThrough, which moves only when the client asks, so after months away the first answer that granted nothing for any reason, a transient error, Play's clipped last days or a billing retry, retired a subscriber whose store may still have been charging. The purchase now stores its unrenewed run: the first answered request after which the ledger covered nothing, and the latest one. The badge retires once the window has passed since the run started, still only after an answer; a renewal ends the run, and an answer that comes a window or more after the latest one starts a new run, since an absence or an outage that long may hide a renewal. The window stays 67 days, written as Apple's 60-day billing retry plus the week contacts give an expired credential.

Run: 007-subscriptions-retirement-lane, slice 4

* review: round 1 fixes

R1-A1: the docs and the PlayReads comment said the purchase path reads Play's subscriptions at most 300 times a minute; it asks about at most 300 subscriptions, and a credited one is read once more to acknowledge it, so made-up tokens can spend at most a tenth of the quota renewal checks share.
R1-A2: a comment on RequestLane repeated the one above the queues.
R1-B1: a test that a held pass, which sends no request, leaves the unrenewed run unchanged.
R1-B2: the outage test's last wait for the run is 30 s instead of 5 s.

Run: 007-subscriptions-retirement-lane, review round 1

* core: add the badge subscription columns in their own migration

M20261016_badge_store_receipts shipped to master in #7587, so it must
stay as released. Restore it in both dialects and move the
subscription_status, unrenewed_since and last_unrenewed_at columns,
with the down step that clears subscription_cancelled acknowledgements
master cannot read, into M20261016_badge_subscriptions.

Run: 008-subs-migration-split, slice 1

* tests: drop the FilePath import a merge duplicated

The branch and master each added import System.FilePath ((</>)) to
Direct.hs on 2026-10-14 at different positions, and an earlier merge
kept both, so GHC warned that one was redundant. Keep master's.

Run: 008-subs-migration-split, slice 2

* fixup! core: add the badge subscription columns in their own migration

* ios, android, desktop: choose a badge in the app

* ios, android, desktop: use the dev badge page for testing (don't merge)

* update postgres schema

* update ios lib

* ios, android: hide Restore purchases on the order screen

* docs: summarize the badge subscriptions PR for reviewers, with diagrams

A summary of PR #7716 as built: buying, renewing and retiring on each
store, the retirement window, lanes and store limits, RPC, API and
database changes, alerts, tests, open items, and a review map. Seven
SVG diagrams, an HTML page with them inline, and a link from the plan.

* ios, android, desktop: restore purchases on the Support SimpleX screen

* ios, android, desktop: show the badge privacy policy in the app

* docs: keep only the badge subscription diagrams, with a README

The reviewer summary leaves the repo; the folder keeps the seven
diagrams with a README that captions each, and the plan links the
README.

* ios, android, desktop: smaller Restore purchases label

* ios: no alert when a badge purchase is cancelled

* docs: replace the badge subscriptions diagrams README with a short summary

A plain-English summary for anyone on the team, with the seven
diagrams and a self-contained HTML page; the plan links it again.
Diagrams follow the branch: Restore purchases is on Support SimpleX,
"Renewing" shows past paidThrough, and only a present retryAfter is
raised to an hour.

* ui

* ui wip

* core: retire a subscription badge as soon as its store says it ended

A subscription badge retired only on an ended answer to a request that was due, and only once the ledger's paidThrough had passed, so an ended answer while the ledger still covered, or the iOS app's report of StoreKit's expired or revoked state, left the badge shown, Support SimpleX unreachable and every purchase refused until a later request. Now an answered ended state is stored even while coverage runs (the service writes it only from a store check, after which it grants nothing), and every pass retires a subscription whose state, from this pass's answer or else as stored, is ended, whatever the ledger covers. The paidThrough guard stays at the prepaid call site, its only remaining user.

Run: 010-subscription-lifecycle, slice S1

* docs: record that a badge subscription cannot be restored or bought again

Restoring a subscription on a new device or under another profile fails for two independent reasons, the client's restore reading only unfinished transactions on iOS and the service answering any key but the one it credited receipt_used, and a lapsed iOS subscriber cannot subscribe again on the same install either. Both gaps files record it in their own format, and both restorePurchases() say why reading the store's entitlements alone would not help.

Run: 010-subscription-lifecycle, slice S2c

* fixup! core: retire a subscription badge as soon as its store says it ended

* transfer plan

* shorter plan

* update plan

* badge-service: let a dev deployment ask its mock store while coverage runs

[dev] check_store_during_coverage = on makes every issueBadge for a
subscription ask the dev mock, during paid coverage too, and bank the
month of a charge it can grant, issued once coverage reaches it. So a
renewal can be watched by hand without waiting a month, and a mock that
forgot the plan after a restart answers ended at once.

Off by default, and refused unless accept_unverified_store_receipts is
on, which is itself refused beside a real store: a real store has not
started its next charge while coverage runs, and asking spends the
quota every subscriber shares.

Run: 011-subscription-tools, slice S3a

* core: send a badge request at once from a build for the dev badge service

/_badge request <userId> sends the profile's badge request now, while
its badge is shown, and runs the badge pass on the answer, so a renewal
or an ended subscription can be watched by hand against the dev
service.

It is allowed only when ChatConfig's badgeDevRequests is set, which no
shipped build does and nothing sets at runtime: the dev-service branch
sets it beside its own badge service overrides. A request off the shared
expiry would tell requests apart, so every other build refuses it, and
it is refused from a paired remote controller.

Run: 011-subscription-tools, slice S3b

* fixup! badge-service: let a dev deployment ask its mock store while coverage runs

* fixup! badge-service: let a dev deployment ask its mock store while coverage runs

* fixup! core: send a badge request at once from a build for the dev badge service

* core: split the badge request's lock from its body

The receipt worker's attempt already holds the owner's badge lock, which is not reentrant, so it cannot call requestBadgeIssue. The body becomes sendBadgeIssue, and both answer a service error as Left (code, retryAfter) instead of Nothing, so that caller can classify it as it does today. No behaviour change.

Run: 011-subscription-resume, slice S2-0

* core: retire on a device's ended report only once the paid period is over

StoreKit can report a subscription expired during Apple's billing retry, and Apple may then recover the charge, so retiring at once on that report left a paying user without the badge. The service's answered ended still retires at once, also while the ledger covers. A stored ended, which is how the device's report arrives, retires once paidThrough has passed.

Run: 011-subscription-resume, slice S1c

* core: resume a retired Apple subscription when its store charges it again

A same-install resubscription keeps Apple's original transaction id, so its hand-over found the old credited record and was answered from it with the old credential: the subscriber paid and got nothing. A credited record is now held again when a later charge of its subscription is handed over, the charge is not revoked, its paid period runs and it is dated less than a day ahead of this device's clock, and the record's purchase is its owner's newest, a subscription and not shown, with no other receipt held. The receipt worker then sends the purchase's issueBadge, and the service grants the charge as a renewal. A covered answer shows the purchase again with the newest credential and clears an ended state. A charge the service answers without crediting is deferred an hour and refused a day after its purchase date, so it holds the profile for about a day. A refused resume is remembered on the record (every credit, re-hold and resume clears credit_error), so the app's sweep does not hold the same charge again after its day.

Run: 011-subscription-resume, slice S2a

* fixup! core: resume a retired Apple subscription when its store charges it again

Review round 1 fixes:
- R1-1: a resumable charge waiting behind another held receipt of the owner is answered held and left unfinished, rather than answered from the record and finished uncredited.
- R1-3: a resume shows the purchase again only with a credential that has not expired.
- R1-2, R1-8: tests of the resumable-charge rule and the hold's edge, of a held charge whose paid period ends before it is sent, and that a resumed profile shows the newest credential. The resume test is split in two, one environment each.
- R2-V1: a test comment that the reordered steps made false.

Run: 011-subscription-resume, review rounds 1 and 2

* core, ios, android, desktop: let a lapsed iOS subscriber subscribe again to the badge the profile retired

The iOS app refused any subscription to an Apple ID that ever subscribed, so a lapsed subscriber could never subscribe again in the app. Core now tells the apps each subscription's store reference (BadgeSubscription.transactionRef, optional in JSON), and the iOS gate opens a subscription card only when every earlier subscription of the Apple ID is the active profile's newest purchase, retired, of the card's badge: the one charge core resumes. Kotlin gets the model field only, as Play gives a resubscription a new token and needs no gate.

Run: 011-subscription-resume, slice S2b

* docs: bound a badge move by the previous credential's expiry

* badge-service: credit test purchases and check the store during coverage in a dev deployment

* core: let a dev build ask the badge service on an interval

* badge-service: log each request's command and each store check's outcome

* fix compilation

* badge-service: name the purchase each request came from in the log

* badge-service: name the purchase each request came from in the log

* core, ios, android: explain a failed badge renewal and stop retrying a subscription the store forgot; tests (#7788)

* core, badge-service, ios, android: change badge tier in the store, and restore a subscription on another device (#7795)

* core: tell the apps when a badge request banks a month without issuing it

A pass announced the badge state only when the balance start moved, so a charge granted onto running coverage, or a debit the service wrote, changed months left and paid-through without an event, and the apps kept showing the old renewal date until the screen was reopened. The pass now announces whenever the ledger's last entry is not the one it started from, which a moved balance start implies.

Run: 015-badge-fixes, slice 1

* core: test that every Play charge of a month-end subscription funds its month

Play reports only a period's end, and the service dates the charge a plan length before it, so month-end clipping could leave a charge funding less than its month. Walk a monthly and an annual Play plan anchored on 31 January through their renewals at the device's request moments, through the deployed Play verifier: each charge funds exactly its months, paid-through stays at most the grace behind Play's period end (three days at most in this walk), and no charge is left without a grant.

Run: 015-badge-fixes, slice 2

* core: test that the newest issued badge credential is taken by its ledger row

After a tier change the newer issuance can end before the older one, so ordering issuances by period end would answer the superseded credential to the worker and to the resume and tier-change paths. Pin the row order: the test fails if the query goes back to period_end order.

Run: 015-badge-fixes, slice 3

* review: round 1 fixes

The App Store tier-change hold, reviewed for the first time:

- R1-B2: a tier change's credit now shows its purchase again (shown_badge_id) in the same transaction, as a resume's does, so a retire that ran while the change was with the service cannot leave a paid purchase unshown and never renewed.
- R1-B5: a tier change of a shown purchase is held whatever other receipt is held, as the worker serves it while the badge is shown; only a resume waits for other held receipts.
- R1-B3: test a tier change the store does not vouch for: refused in silence, the badge kept, and answered from the record after.
- R1-B8: the changeTier comment names when the record settles.

Run: 015-badge-fixes, review round 1

* review: round 2 fixes

- R2-1: a granted tier change clears an ended state the device reported before it. A renewing report never replaces ended, and a charge of the new tier granted proves the subscription has not ended, so without this the worker retired the new tier's badge at its paid-through while the subscription renewed.
- R1-B3: test a tier change whose credential does not verify: the failure stays on the receipt record, not the purchase, and Supporter stays shown.
- R2-3: the refused tier change's test buys Supporter through an invoice, so it shows the refusal announces nothing.
- R2-2: the changeTier comment says what follows each way the record settles.

Run: 015-badge-fixes, review round 2

* review: round 3 fixes

- R3-1: a tier change whose answer says the subscription ended is not credited, as a resume is not, so the credit's clearing of a stored ended never drops the one this answer carries.
- R3-2: the changeTier comment in two lines.

Run: 015-badge-fixes, review round 3

* core: apply an App Store tier change at once only when it raises the tier

Apple keeps charging the old plan to the end of the period, so applying a downgrade at once took away a badge the subscriber had already paid for. A charge of another tier is now held and sent at once only from supporter to legend; a lower tier, or one that is not ranked (investor, unknown), is answered from the record and the renewal check grants it, as badges-rpc.md says. A record already held for such a change settles silently.

Run: 016-tier-change-direction

* core: test that an App Store change to a lower tier waits for the renewal

A Supporter charge handed over while Legend is shown is answered from the record and sends nothing, and the renewal check grants Supporter, shown once the Legend credential expires; a record an older build held for a lower tier settles with no request. Both fail if every change of tier is sent at once again.

Run: 016-tier-change-direction

* badge-service: let a restore ask the store without waiting for the purchase's own check

* docs: describe badge tier changes and restore as the service handles them

The RPC document splits a store tier change by store and direction: the
app never starts one, an App Store raise seen within a day of its charge
is sent as upgradeBadgeSubscription, every other change waits for the
renewal check, and a Play plan change is a new token, a new purchase.
transferBadge and its limits are checked against the handlers, and the
upgrades that are not built are marked so.

The overview admits what Restore discloses: the service links the two
purchase keys, a store receipt moves its subscription to whoever presents
it within the move limit, and a new badge or tier is shown as soon as it
is issued. The Android gap names what remains of Restore.

* docs: tell the badge subscriptions story with tier changes and restore

The summary now covers the whole lifecycle: buying, renewing, changing
tier, moving to another device or profile, and ending. The badge retires
as soon as the store says the subscription ended, a lapsed iOS subscriber
can resume the retired badge, an App Store raise is granted at once and
a lower tier at the renewal, and a Play plan change is a new purchase.
The known limits and the before-sale list follow the code.

The seven diagrams are updated, with stale file and line references
dropped, and two are added: a tier change and a restore. The page now
points at the diagram files instead of carrying copies of them.

* fixup! docs: describe badge tier changes and restore as the service handles them

* fixup! docs: tell the badge subscriptions story with tier changes and restore

* fixup! docs: describe badge tier changes and restore as the service handles them

* fixup! docs: tell the badge subscriptions story with tier changes and restore

* core: make the badge subscription tests fail on the defects they name (#7798)

* fix compilation

* fix api

* ios, android, desktop: open the badge page on the site again

* ios: choose a badge on the site, not in the app

* tests: hold the move with no charge to grant, not with the purchase's store check

* unfocus test

* update postgres schema

* badge-service: break a tie between issuances by their period, so both databases agree

* badge subscription review fixes (#7799)

* update badge subscriptions docs (#7802)

* core: show a changed badge tier to contacts as soon as it is granted

* update plans

* core: show a raised badge tier to contacts at once, hold back a lower one

* update sqlite schema

* badge subscriptions review fixes (#7903)

* update ios lib

* update query plans

* ios: one property wrapper on the chat view's chat (#7910)

* android: a shorter note under Restore purchases

* Revert "ios: one property wrapper on the chat view's chat (#7910)"

This reverts commit d5a24bb342.

* ci: larger RAM disk so tests do not run out of space

* update sqlite schema

* ios: preview references for the badge screens

---------

Co-authored-by: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com>
2026-10-28 13:54:10 +00:00
shum 24c09d9c13 Merge branch 'master' into names
# Conflicts:
#	cabal.project
#	scripts/nix/sha256map.nix
#	simplex-chat.cabal
#	src/Simplex/Chat/Library/Commands.hs
#	src/Simplex/Chat/Store/Postgres/Migrations.hs
#	src/Simplex/Chat/Store/SQLite/Migrations.hs
#	src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt
#	src/Simplex/Chat/Store/SQLite/Migrations/chat_schema.sql
#	src/Simplex/Chat/Store/Shared.hs
2026-10-26 14:42:36 +00:00
Evgeny @ SimpleX Chat c3b709a807 docs: CLAUDE.md importing the contributing and CI guides (#7871) 2026-10-26 10:34:31 +00:00
Evgeny @ SimpleX ChatandEvgeny Poberezkin 7810fc4752 core, ui: terminal chat layout for LLM and service bot chats (#7811)
* plan: UI improvements to improve LLM usage via SimpleX

* core, ui: types for chat layout

* core, ui: settings for alternative terminal-like chat layout for managing LLMs or other service bots

* plan: message priority

* fixes

* query plan

* update plans

* remove silent messages plan

* rename migrations

* implement layout

* amend

* fix

* fix

* fix

* improve

* time on the right, sender name in blue

* no avatar in direct chats

* better previews

* update, fixes

* update

* time gap

* changes

* ui: terminal layout line heights, gaps and time placement

* ui: simplify terminal meta layout, correct its docs and tests

* ui: right-to-left emoji edge in terminal rows, time placement tests

* android, desktop: raise Kotlin compiler memory to 4 GB

* ui: terminal captions as follow-up text, classic event separators

* ui: terminal media edge and overlay time, plan decisions

* ui: simplify terminal row separation, correct doc line references

* ui: keep the media time inside terminal rows, restore caption conditions

* ui: terminal heading capitals at large font scales, idle live message time

* ui: rename the classic voice-with-text flag, correct the meta copy docs

* ui: smaller terminal layout diff, sender gap and meta names

* ui: terminal row as tall as the media time

* docs: remove the chat layout section from the bots readme

* docs: shorten the terminal layout section of the chat view

* core: address settings API as on master, /auto_accept reads the stored layout

* ui: smaller terminal headings

* ui: classic sender rows and avatar rule as on master

* ui: classic reply quote text colour as on master

* ios: keep the chat layout setting with other UI settings

* ui: go-to button at the end of terminal rows, no gutter in direct chats

* ui: forwarded arrow on the header line of terminal rows, above the time

* ui: forwarded arrow centred above the time line of terminal rows

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2026-10-25 18:03:11 +00:00
sh 31c4b68189 ui: don't reconnect calls with peers before v22 (#7785) 2026-10-23 10:06:33 +01:00
EvgenyandEvgeny @ SimpleX Chat d63906ad55 mcp server: fixes (#7793)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-22 21:33:25 +01:00
EvgenyandEvgeny @ SimpleX Chat 16618c26cc ci: reduce runners (#7778)
* ci: reduce runners

* ram disk in mac tests

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 22:36:12 +01:00
Evgeny Poberezkin 3e2c487ad9 Merge branch 'stable' 2026-10-19 16:03:47 +01:00
EvgenyandEvgeny @ SimpleX Chat 1ad402d06b docs: update discovery spec (#7774)
* docs: update discovery spec

* rename

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 15:51:03 +01:00
Evgeny Poberezkin 7361a029ac docs: update web discovery 2026-10-19 14:31:21 +01:00
EvgenyandEvgeny @ SimpleX Chat 03d789aed7 website: add link relations, update spec (#7773)
* website: add link relations, update spec

* wellknown

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 14:28:35 +01:00
EvgenyandEvgeny @ SimpleX Chat 85cae84809 docs: web discovery and LLM agent protocols (#7769)
* docs: web discovery and LLM agent protocols

* update

* update

* update

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 13:50:32 +01:00
EvgenyandEvgeny @ SimpleX Chat e41ee3a851 docs: web discovery and LLM agent protocols (#7769)
* docs: web discovery and LLM agent protocols

* update

* update

* update

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 13:49:56 +01:00
sh 58bc94bc74 core: carry ICE restart session in call extra info (#7718) 2026-10-19 12:22:10 +01:00
EvgenyandEvgeny @ SimpleX Chat 1cbbe82517 ci: fix mac library build to sign and notarize library (#7765)
* ci: fix mac library build to sign and notarize library

* script

* sign and notarize to test

* remove test build

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 11:59:43 +01:00
sh bdc4edc524 nix: build armv7a from master with ghc 8.10.7 (#7763) 2026-10-19 09:07:52 +01:00
EvgenyandEvgeny @ SimpleX Chat a766d0af0f ci: package releases with drafts in simplex-chat-libs (#7754)
* ci: package releases with drafts in simplex-chat-libs

* test release

* core: 7.1.0.12

* packages: release nodejs and python libraries

* fixes

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-19 07:50:09 +01:00
EvgenyandEvgeny @ SimpleX Chat 77f9f4a464 core: add peer type "agent" (#7738)
* add agent peer type

* bot types

* agent app icons

* refactor

* smaller image

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-17 19:23:53 +01:00
spacedandy-agents-simplex e3324c6828 Merge branch 'master' into badge-in-app-checkout
# Conflicts:
#	simplex-chat.cabal
#	src/Simplex/Chat/Store/Postgres/Migrations.hs
#	src/Simplex/Chat/Store/SQLite/Migrations.hs
#	src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt
#	src/Simplex/Chat/Store/SQLite/Migrations/chat_schema.sql
2026-10-16 09:40:53 +00:00
EvgenyandEvgeny @ SimpleX Chat 5dfe7c1f0e website: downloads page (#7728)
* website: downloads page

* bigger headings

* translations

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-15 22:10:59 +01:00
shandspaced4ndy daa7c4f3d8 badge-service: accept a list of Apple roots (#7707)
* badge-service: accept a list of Apple roots

* badge-service: document root_certificates

---------

Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
2026-10-14 10:43:53 +00:00
1b329f41fb core: wallet for names (#7684)
* core: wallet key for name ownership (CLI only)

A name has to be owned by an address the client can still derive after a
restart or on a new device. This adds that key and nothing else.

/wallet create makes one BIP-39 key per device and one BIP-44 account per
chat profile under it, /wallet shows the address that would own the next
name that profile buys, /wallet import and /wallet export move the key with
its recovery phrase.

A name key sits at m/44'/60'/<profile>'/0/<name>, which is ordinary BIP-44,
so the phrase reaches the same addresses in other wallets. No signing, so
nothing can be bought or edited yet.

Split out of #7390 / #7425.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: pin simplexmq with eth crypto merged into master

ab/eth-crypto forked before Crypto.Entitlement, which Chat.Badges imports,
so the branch had to be merged with simplexmq master before it could be
pinned here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: wallet review fixes, and show the derived addresses

Concurrency: the account index is incremented in SQL and read back in the
same transaction, so two profiles cannot be handed the same key. Importing
a phrase is one transaction and single_seed is UNIQUE, so a phrase cannot
be discarded in favour of a key created meanwhile, and a device cannot end
up with two keys.

Wallet commands are no longer forwarded to a remote host: the recovery
phrase must not leave the device, and the raw command is logged there.

/wallet delete removes the key, confirmed by the last word of the phrase,
so creating a key before importing your own is no longer a dead end.

/wallet now shows every profile on the key with the first two name
addresses each, to check derivation against other wallets. Hidden profiles
are left out, as they are by /users. A bad phrase no longer says which word
was wrong. /wallet export uses the profile's own key.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: make the wallet an API, not a user-facing feature

Names commands will use the wallet; users do not. The commands move to
/_wallet, and the help section, its topic and the changelog entry are
removed. The tests drive the API end to end.

Comments cut to what the code does not say, dead exports removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: wallet export and delete act on the device key

The key is one per device, so both commands read it directly instead of
going through the active profile's account. A profile without an account
of its own can now export, and the delete error says that the key goes for
every profile on the device. The confirmation word is lowercased, as the
phrase is when imported.

Two known limitations are written down: account indexes restart at 0 after
an import, so profiles are bound in the order they ask for a key, and the
gap left by a hidden profile in the printed indexes shows that it exists.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: /_wallet delete takes no confirmation word

The wallet is an API, and no other API command takes a typed confirmation:
/_delete user takes the profile password. The word was also no barrier to a
caller, which can read it from /_wallet export. Confirming belongs in the
command that will wrap this one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: name the unique index on wallet_seeds

The one key per device rule is meant to be lifted later. SQLite cannot drop
a column with an inline UNIQUE, or its automatic index, so lifting it would
have meant rebuilding the table. As a named index it is a DROP INDEX and a
DROP COLUMN.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: export the secret of a single name key

/_wallet export gives the seed mnemonic, /_wallet export <account> <name>
gives the secret of one derived key, so a single name can be handed over
without the seed. Both are what a wallet takes on import: the mnemonic as a
recovery phrase, the secret as hex.

The commands are named for what they return, APIWalletExportSeedMnemonic
and APIWalletExportDerivedSecret, as the difference is which secret leaves
the device.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: reject a key index BIP-32 cannot harden

A.decimal wraps into Word32 and hardened leaves anything at or above 2^31
alone, so /_wallet export 4294967296 0 returned account 0's secret under the
path m/44'/60'/0'/0/0. Handing out a different account's key for a mistyped
index is the wrong failure for this command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: /_wallet bind, and name the other profiles instead of numbering them

Restoring a chat database older than the key loses which account each
profile had, and the keys are still there, so /_wallet bind <account> sets
it by hand. The counter moves past an account bound this way, and an
account another profile holds is refused.

/_wallet now shows the paths of the active profile only, and names the
other profiles on the key. Their account indexes were the gap that showed
a hidden profile exists.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: say same seed, not same key, for the other profiles

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: create makes the seed, bind claims a path

The two were one command: on a device that already had a seed, /_wallet
create only bound a profile. Now create makes the seed and refuses when one
exists, and binds every profile that exists, as a new seed has no account
that already owns a name.

/_wallet import binds nothing. Which account a profile had is what an
import is recovering, and the seed does not say, so the profile says it
with /_wallet bind <account>. /_wallet bind with no account takes the next
free one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: the known issue is now about bind, not import

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: create binds no profile either

Create and import differed only in whether they bound a profile, which made
the convenient one inconsistent. Neither binds now, so the store keeps one
function for both, and a profile reaches an account only through bind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: test the restore cases the key has to survive

A database backed up after the key carries the key and the binding, so the
restore is all of it and an import is refused. A database backed up before
the key comes back with the profiles and no binding, so the phrase is
imported and each profile says which account was its. A key imported before
the database is restored is replaced by what the backup held.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: drop the types nothing reads, and say account where it means account

AccountRef and WalletAccount were built and never read: deriveNameKey now
returns the key, and the address comes from addressFromPrivateKey, which
already exists. SeedId is a plain Int64 like every other row id here.

The master key is derived once per command rather than once per name key,
which is where PBKDF2 runs.

A device has a key and a profile has an account, so /_wallet says "no
account for this profile" rather than repeating "no wallet key", which is
what it says when the device has none.

Also: no "wallet: " in front of "bad chat command: ", strEncode for the
address, the repeated seed lookup in one place, comments cut to what the
code does not say, and the export test pins its addresses and secrets,
including one whose first byte is zero.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: store the seed as bytes, and bind one account per profile

On Postgres a bare ByteString binds as a text literal, so entropy with a
backslash or a high bit was rejected and entropy with a zero byte was
truncated: the BIP-39 test vector stored as an empty seed. Blob columns go
through DB.Binary here, as every other one does.

/_wallet bind with no account moved a profile that already had one to a
fresh account, abandoning the old one without saying so. It refuses now;
moving is asked for by number.

The counter could walk past 2^31, where BIP-32 hardening folds every index
back onto a low one, so a profile handed 2147483648 derived account 0's
keys and printed account 0's path. Binding refuses once the counter is
there, and a very long index is now rejected on its digit count rather than
after reading it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: rfc for the keys that own names

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: pin simplexmq for the BIP-44 path, and use it

ethereumPath now takes the address index, so the path a name key sits at is
built once in the library rather than again here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: refuse an account index BIP-32 cannot harden, whichever way it arrives

The counter path checked it, the explicit one did not, and the parser is not
the only caller: processChatCommand takes APIWalletBind from library callers
too. hardened leaves an index at or above 2^31 alone, so account i and
i + 2^31 are the same key while the duplicate check compares the stored
integers, and two profiles could hold one account's names.

The rfc now says what hiding a profile from /_wallet does and does not
protect: the seed is one per device, so whoever unlocks any profile can
derive every account.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: pin simplexmq with the wordlist embedded from the upstream file

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: cut the rfc to what stands on its own

Drops the references to other documents and to what is or is not in a pull
request, so the design reads without them, and the list of tests, which
restated their names and would drift. 164 lines to 134, against a median of
117 for the rfcs here that define schema.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: what the stealth meta address is for

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: the wallet is not only for names

The seed, the accounts and the derivation are a wallet. Owning a name is the
first thing it is used for, not what it is, and the title and the problem it
solves now say so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: the reason for a key per name is that owners are public

One address owning several names links them: whoever knows one name can read
its owner and find the others. That is the reason, not the narrower export.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: give the reason for the counter before what it costs

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: names are the device's, so drop the per-profile account

A name's profile is the record it resolves to, not the key that owns it, so
the account level was carrying a mapping nothing needs. It was also the only
source of the profile to account ambiguity after a restore, of /_wallet
bind, and of the index gap and the refusal that told a visible profile an
account was held by one it cannot see. All of it goes.

Names sit in account 0 from index 1. Index 0 is left unused so neither the
names nor the profile accounts, which start at 1, claim the origin of both
dimensions. users gains no columns at all now, so the migration is one
CREATE TABLE.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: rfc for names counted per device

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: one command for the seed, whichever way it arrives

create and import differed only in where the entropy came from and already
shared one store function, so they are one command with the source named:
/_wallet create new, or /_wallet create seed=<phrase>. Naming it means no
seed is generated by typing a prefix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: the argument is a mnemonic, so name it one

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: the column holds entropy, so name it entropy

The mnemonic comes back from the entropy exactly, which is what export
returns, and the seed PBKDF2 derives from the mnemonic is computed when a
key is needed and never stored. The column was the one thing called seed
that is not the seed, which is why it needed a comment saying so.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: 24 words is a choice, not a default

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: deleting the seed reports ok, not the empty wallet

Delete re-ran /_wallet, so a successful delete printed "no wallet key",
which is the same words the error uses and reads as a failure. There is
nothing to show after a delete.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* docs: the export argument is an index, not a name

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* core: export says which kind of secret, so other kinds can follow

/_wallet export name <k> rather than an index straight after export. The
bare form stays the seed mnemonic, and a profile's key can be added beside
the name one without the argument having to be guessed from its shape.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rvc3HbiWBTqbAvRT45G5oX

* disencourage hidden profiles using names

* let remote use wallet, but filter logs to avoid leaking secrets

* change RFC wallet architecture to BIP-85 per profile and hardened paths for names

* introduce keyring as the thing a profile binds to

* restructure RFC

* shorten

* drop BIP85 and flattenhierarche. no keyrings

* /goal iteration 4 - unconfirmed

* /goal iteration 5 - unconfirmed

* repin

* rename to adapt

* cut comments

* next review round

* minimize diff and align style even more

* missing type mappings

* fix review comments

* self-review iteration 2

* self-review iteration 3

* self-review iteration 5

* iteration 6

* self-review iteration 9

* self-review iteration 10

* repin

* rng preserve

* refactor WalletSeed type, see mq wip

* repin

* infallibel wallet and account derivation

* review iterations

* repin to mq, derivation fallible again

* repin

* use deriveAddress, update simplexmq

* simplexmq

* add down migration for db and drop redundant masterkey field in db

* repin to simplexmq PR

* fable review fixes

* iterations on /goal

* treat hidden profiles same as normal ones. they can hold accounts now

* reduce explicit types

* repin mq

* doc cosmetics

* simplify

* query plans

* query plan

* simplify

* query plans

* simplify more

* fixes for comment ^^

---------

Co-authored-by: Alain Brenzikofer <alain@encointer.org>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-13 18:22:55 +01:00
spaced4ndy 59c588932e badge-service: verify App Store and Google Play purchases (#7654) 2026-10-13 15:24:07 +00:00
EvgenyandEvgeny @ SimpleX Chat 07c363849b core, ui: invite member of one group to another group (#7682)
* rfc: invite member of one group to another group

* update

* update

* implement

* version

* update

* do not show error if contact was removed when joining group

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-11 09:50:42 +01:00
EvgenyandEvgeny @ SimpleX Chat 2e56d32b52 core: badge presentations in profiles (#7573)
* badge presentation in groups

* fix tests

* badge presentations in profiles

* update simplexmq

* change types

* badge profile presentations

* improvements

* remove proof from cards, send owner public key for channel to relay

* add test

* merge migrations

* update

* prevent fallback to PHTest

* fixes

* many fixes

* fixes

* fixes

* cleanup

* improve

* query plans

* fix test

* diff

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-10 17:48:45 +01:00
spaced4ndy 57ab333a2b Merge branch 'master' into badge-in-app-checkout 2026-10-09 15:00:36 +04:00
EvgenyandEvgeny @ SimpleX Chat 10166454fd website: add sitemap, robots, llms.txt and markdown pages (#7670)
* website: markdown pages for llms

* website: add sitemap, robots, llms.txt and markdown pages

* faster site generation

* more faster

* faster

* update

* optimize build

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-09 07:53:40 +01:00
EvgenyandEvgeny @ SimpleX Chat f2b3fe385c core: remove legacy field to support contact connections in groups (#7671)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-10-09 07:00:27 +01:00
spaced4ndy 80b7f96a96 merge master into badge-in-app-checkout 2026-10-08 14:31:30 +04:00
spaced4ndy 27d12f230d core, ui: buy a badge with an App Store or Google Play purchase (#7590) 2026-10-07 14:32:48 +00:00
Evgenyandshum b79223fe5c core: call media key HKDF, expire stale calls (#7642)
* core: call media key HKDF, expire stale calls

* core: expire stale calls in bulk SQL

* core: reduce call tests

* core: remove periodic call cleanup

* core: expire calls with DELETE RETURNING

* core: skip call item update when none expired

---------

Co-authored-by: shum <github.shum@liber.li>
2026-10-04 18:44:52 +01:00
EvgenyandEvgeny @ SimpleX Chat 851ff062da core: compress messages if needed to fit envelope, even if there is no PQ e2ee in connection (#7630)
* core: compress messages if needed to fit envelope, even if there is no PQ e2ee in connection

* simplify

* remove noise

* compress messages without PQ too

* case

* update query plans

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-09-30 14:07:00 +01:00
sh b1dc25dc3e badges: service group with multi-use codes (#7578)
* core: cancel the chat callback on interrupt

* badges: add multi-use codes

* badges: add the managed group

* badges: document multi-use codes and the group

* core: sign test badges with whole-second expiry

* badges: rework tracker and reply texts
2026-09-30 08:48:57 +01:00
EvgenyandEvgeny @ SimpleX Chat e863ee4c27 core: limit depth of forwarded messages (#7614)
Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
2026-09-29 21:56:03 +01:00