Skip to content

0.3.0: client configuration, address management, relays, and file exchange#6

Open
lundog wants to merge 6 commits into
Start9-Community:masterfrom
lundog:update-simplex-6.5.5
Open

0.3.0: client configuration, address management, relays, and file exchange#6
lundog wants to merge 6 commits into
Start9-Community:masterfrom
lundog:update-simplex-6.5.5

Conversation

@lundog

@lundog lundog commented Jul 2, 2026

Copy link
Copy Markdown

Turns the bridge from a bare Websocket endpoint into a fully configurable SimpleX client, driven from the StartOS UI, and bundles simplex-chat v6.5.5.

Ordering / rebase: a smaller maintainer PR (#7 — version 0.2.1:0, start-sdk update and image dockerTag bump to 6.5.5) is open and should merge first. Once it lands I'll rebase this PR (0.3.0) onto it and reconcile the dockerTag/SDK bump and the version graph.

Image

  • lundog/simplex-websocket-bridge:6.5.5-2 (was simplex-chat v6.5.4): bundles v6.5.5, raises the websocat message ceiling (default 16 MiB), adds optional received-files retention. License declared MIT AND AGPL-3.0-only (bundled simplex-chat is AGPL-3.0).
  • Fixes a connect-time bug: websocat's 64 KiB default split large SimpleX events (e.g. a new-contact event, ~77 KB) into two frames, breaking JSON parsing (Unterminated string … at position 65536).

Configuration

All client settings live in client-settings.json (read on start; can be set before first start). Configure Client action (replaces Configure Bot Profile):

  • Display name, full name, profile picture, peer type, auto-accept contact requests, business mode, welcome message, message relays, received-file cleanup.
  • Profile picture accepts an image URL (http/https, fetched with timeout + size cap), a data URL, or raw base64 → center-cropped square and shrunk to a ≤12 KB JPEG (jimp) to fit SimpleX's avatar limit.
  • Application model: profile/address and relay changes apply live over the Websocket (no restart); only a received-file-retention change restarts (it's a container/janitor env). Reads are non-reactive so saving settings doesn't restart the service mid-edit.
  • Hands-off mode (manageProfile, default on): a "SimpleX Profile" union offers Managed by StartOS vs Managed by my application. When app-managed, the bridge makes no Websocket writes (start-time sync skipped) and applies relays + cleanup via container env, so a non-OpenClaw app can own the profile, address, and runtime server changes itself. Env relays are set-once (--server persists in the DB), so reverting to public is then the app's responsibility.

Message relays

Public / self-hosted SimpleX Server / custom SMP+XFTP, applied over the client's operator-servers API (/_servers GET → mutate → SET), not the container --server flag.

  • simplex-chat persists relay config in its DB and only uses presets when none are set, so the flag stuck and dropping it never reverted to public. The round-trip enables presets / disables+replaces custom per protocol, so switching (including back to public) is authoritative. Applied on every (re)start and live on change.
  • Local declares an optional dependency on the simplex package and auto-pulls its SMP/XFTP addresses from that package's service interfaces (preference: clearnet domain → clearnet IP → Tor → .local).

Addresses & lifecycle

  • View SimpleX Address / Reset SimpleX Address (Danger Zone, no stop) for the long-lived reusable address; Create SimpleX Invitation still covers one-time links.
  • Reset Client (was Reset Profile) — expanded warning incl. the OpenClaw reused-contact-id caveat.

Reliability

  • Start-time settings sync waits for the Websocket to actually answer (waitForBotReady) before syncing, fixing an ECONNREFUSED race against websocat's bind.

File exchange (consumer packages)

Single /data mount; consumers use mountDependency on subpaths (optional dependency, opt-in):

  • Inbound — name-only: mount .simplex/files read-only at any path; resolve reported filenames against it.
  • Outbound — mount .simplex/outbound read-write at any path; pass the bridge path (/data/.simplex/outbound/<name>), translating the prefix. The openclaw-simplex plugin does this via connection.outboundFolder + connection.outboundFolderOnClient. No shared/verbatim mountpoint needed.
  • DB and keys stay private; consumers never mount .simplex/ or the whole volume.

Version / migration

0.3.0:0; no data migration (client-settings.json is created on demand, store.json/keys unchanged; received files use the new image's .simplex/files default).

Testing

Installed against a live StartOS and verified:

  • Live display-name change and avatar-from-URL applied with no restart.
  • Relays: invitations and addresses used the expected server in public / custom / local; switching back to public reset to presets reliably.
  • View SimpleX Address / Reset SimpleX Address and Reset Client behaved as documented.
  • Connections: iOS client connected via invitation QR; the previously-splitting large connect event now parses cleanly.
  • File exchange (end-to-end): a companion openclaw-startos change mounts the bridge's .simplex/files (ro) and .simplex/outbound (rw) into OpenClaw; with the openclaw-simplex plugin installed (via CLI for now — StartOS auto-install is a later step), inbound and outbound files transferred through OpenClaw over the shared volume.

lundog added 4 commits July 2, 2026 03:53
- Bump the bundled image to lundog/simplex-chat:6.5.5, which raises websocat's
  WebSocket message-size limit so large SimpleX events (e.g. a new contact
  connecting) are no longer split into invalid frames — this was causing JSON
  parse errors on the client during connect.
- Rework the file-exchange mounts for the new image layout. Received files and
  tmp now live under /data/.simplex (covered by the single /data mount), so the
  inbound contract is the .simplex/files subpath: name-only reporting, mounted
  read-only, resolved by the consumer against its own path. Outbound keeps a
  neutral verbatim mount, now .simplex/outbound -> /tmp/simplex-outbound.
- Update the README file-exchange contract to match the new layout.
- Version 0.3.0:0. No data migration: the SimpleX profile DB and API keys keep
  their paths under .simplex/; any files left in the old .simplex/media tree are
  orphaned but harmless.
…paths and outbound files can be referenced by their path in /data
Turn the bridge from a bare Websocket endpoint into a configurable SimpleX
client, driven entirely from the StartOS UI. All settings live in a new
client-settings.json (read on start; can be set before first start); profile,
address, and relay changes apply live over the Websocket, while file-retention
(a container env/janitor setting) applies on restart.

Actions:
- Configure Client (replaces Configure Bot Profile; id configure-client):
  display name, full name, profile picture, peer type, auto-accept contact
  requests, business mode, welcome message, message relays, and received-file
  cleanup (days). allowedStatuses: any, so it can seed the identity before the
  first start.
- View Address / Reset Address: show or replace the long-lived, reusable
  contact address (create if missing). Reset Address runs live (Danger Zone,
  no stop). Create Invitation still covers one-time links; shared link
  formatting factored into links.ts (connLinkMembers).
- Reset Profile renamed to Reset Client (id reset-client), with an expanded
  warning covering the OpenClaw reused-contact-id caveat and a success message
  noting contacts must reconnect.

Profile picture: accepts an image URL (http/https, fetched with a timeout and
size cap), a data URL, or raw base64, then center-crops to a square and shrinks
to a <=12KB JPEG (jimp) to fit SimpleX's avatar limit. New avatar.ts; adds jimp
dependency.

Message relays (public / self-hosted SimpleX Server / custom SMP+XFTP):
- Applied over the client's operator-servers API (/_servers GET -> mutate ->
  SET), not via the container's --server flag. simplex-chat persists relay
  config in its database and only uses the presets when none are set, so the
  flag stuck and dropping it never reverted to public. The round-trip enables
  presets / disables+replaces custom per protocol, so switching (including back
  to public) is authoritative and reliable. Applied on every (re)start and live
  on relay change.
- Local mode declares an optional dependency on the simplex (SimpleX Server)
  package and auto-pulls its SMP/XFTP addresses from that package's service
  interfaces, preferring clearnet domain > clearnet IP > Tor > .local.

Reliability:
- The start-time settings sync waits for the Websocket to actually answer
  (waitForBotReady) before syncing, instead of trusting daemon launch ordering,
  fixing an ECONNREFUSED race against websocat's bind.
- main reads settings non-reactively (.once) so writing the settings file no
  longer re-triggers main and restarts the service mid-edit.

Docs & i18n:
- README, instructions.md, and the 0.3.0 release notes updated: new actions,
  the relay model, and a "Switching message relays" section explaining that a
  relay change affects only new connections (existing contacts/address stay on
  their original server) and the self-hosting reachability/decommission
  caveats.
- i18n dictionaries updated across all five languages; unused keys pruned.

No data migration: client-settings.json is created on demand and store.json
(API keys) is unchanged.
@lundog

lundog commented Jul 3, 2026

Copy link
Copy Markdown
Author

Changes completed for #3 and #4

@lundog lundog changed the title Bundle simplex-chat v6.5.5 and rework file exchange (0.3.0) 0.3.0: client configuration, address management, relays, and file exchange Jul 3, 2026
…impleX"

Hands-off mode lets a non-OpenClaw application own the SimpleX client while
still using the bridge as transport.

- New manageProfile setting (default true). In Configure Client the profile
  fields are wrapped in a "SimpleX Profile" union: "Managed by StartOS"
  (current behavior) or "Managed by my application".
- When app-managed, the bridge makes NO WebSocket writes: main skips the
  post-ready sync one-shot entirely, so the profile, address, and any runtime
  server changes are the app's to make over the WS. computeStartEnv instead
  sets SMP_SERVERS/XFTP_SERVERS (from the selected relays) and
  INBOUND_RETENTION_HOURS via container env. Relay/retention/mode changes take
  effect on restart (no live /_servers round-trip in this mode).
- Caveat documented: env relays are set-once (--server persists in the DB), so
  reverting to public is the app's responsibility in this mode.

Action name polish (display names only; ids/forms unchanged):
- "Create Invitation"  -> "Create SimpleX Invitation"
- "View Address"       -> "View SimpleX Address"
- "Reset Address"      -> "Reset SimpleX Address" (also its confirmation title)

Updates i18n across all five languages, README, and instructions.md.
@lundog

lundog commented Jul 4, 2026

Copy link
Copy Markdown
Author

Note: A maintainer PR #7 — version 0.2.1:0, start-sdk update and image dockerTag bump to 6.5.5) is open and should merge first. Once it lands I'll rebase this PR (0.3.0) onto it and reconcile the dockerTag/SDK bump and the version graph.

@lundog lundog marked this pull request as ready for review July 4, 2026 09:37
@lundog

lundog commented Jul 4, 2026

Copy link
Copy Markdown
Author

CI build failed with error:
Uninitialized: Not inside a packaging workspace. Run start-cli s9pk init-workspace first.

Build worked on #7 possibly related to developer signing key?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant