Changeset b300682 in Klonkt for src/services/SettingsService.js


Ignore:
Timestamp:
06/16/2026 12:38:38 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
25d4041
Parents:
af5407f
Message:

Circles v1 — foundation: migration + signed own publication

Steps 1+2 of the Circles federation (3rd tenancy mode alongside solo/hub):

  • DB: circle_links / remote_actors / remote_posts (idempotent in initializeDatabase)
  • SettingsService: tenancy now accepts 'circle'
  • CircleFederation.js: per-instance Ed25519 keypair (app_settings) + actor/outbox builders + sign/verify (SPKI-DER pubkey, signature over raw body)
  • routes/federation.js: GET /.klonkt/actor.json + signed /.klonkt/outbox.json, mounted in server.js before resolveSite
  • docs/cirkels-v1-spec.md: full v1 spec

Still to do: CircleService.sync (pull+verify), Admin UI, /cirkel feed, hardening.
Ed25519 sign/verify round-trip verified in isolation; syntax clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/SettingsService.js

    raf5407f rb300682  
    3535
    3636export function getTenancy() {
    37   return getSetting('tenancy', 'solo') === 'hub' ? 'hub' : 'solo';
     37  const v = getSetting('tenancy', 'solo');
     38  return v === 'hub' ? 'hub' : v === 'circle' ? 'circle' : 'solo';
    3839}
    3940
    4041export function setTenancy(mode) {
    41   setSetting('tenancy', mode === 'hub' ? 'hub' : 'solo');
     42  const m = (mode === 'hub' || mode === 'circle') ? mode : 'solo';
     43  setSetting('tenancy', m);
    4244}
Note: See TracChangeset for help on using the changeset viewer.