refactor(content,core,app,editor,learn): Learn's content in pure Dart, for its agent
ADR 0044's D49 (amended in building it): what reads and seals Learn's content moves out of the Flutter packages, so Learn's agent, which runs without Flutter, shares it rather than repeating the privacy rules. packages/halkyon_content (new, pure Dart) takes from halkyon_app the envelope and its cipher, SealedFile, UnlockedAccountKeys, shared spaces' gateway with SharedKeys and KeyPins, FileCache and FileServerGateway, with their fakes and tests; halkyon_app exports it, so no app changes. Its rich_text.dart takes RichContent from halkyon_editor, which exports it. newAccountKeys makes an agent's key pair. halkyon_core takes DelayedDeletions and gains SyncRequests, what a synced gateway asks of the sync, which SyncService implements. apps/learn/halkyon_learn_core (new, pure Dart) takes Learn's privacy, sync, payloads and the models, codecs, gateways and repositories of studysets, cards, notes, tags and feedback, with what they reach of files, learning paths, citations and study options; the app imports them from there. A subject's icon, colour and name stay in the app (SubjectLook); what only the app shows (progress, exam coverage, the card browser, deletions' waits) stays too. Nothing changes for people using the apps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
82c777b1a5
commit
d09625d43e
1 changed files with 3517 additions and 2007 deletions
37
packages/halkyon_content/lib/halkyon_content.dart
Normal file
37
packages/halkyon_content/lib/halkyon_content.dart
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/// What seals and opens a person's synced content, in pure Dart (Halkyon's
|
||||
/// ADR 0044, D49):
|
||||
///
|
||||
/// - **The envelope** every synced row is sealed in (`PayloadEnvelope`, on a
|
||||
/// `ContentCipher`, ADR 0019): sealed for its table, row and what it belongs
|
||||
/// to, readable rows signed; a file sealed alike (`SealedFile`, HLKF).
|
||||
/// - **People's files** on the device and the module's store (`FileCache`,
|
||||
/// `FileServerGateway`).
|
||||
/// - **The account's keys**, unlocked (`UnlockedAccountKeys`), and new ones
|
||||
/// for an account without a password (`newAccountKeys`, an agent's).
|
||||
/// - **Shared spaces** (ADR 0044): their members and invitations through the
|
||||
/// module (`SharedSpaceGateway`), and their keys, sealed to each member and
|
||||
/// held to the public keys first seen (`SharedKeys`, `KeyPins`).
|
||||
///
|
||||
/// Rich text (`RichContent`, the editor's document JSON, which
|
||||
/// halkyon_editor edits and exports) is a library of its own here,
|
||||
/// `rich_text.dart`. An app takes the rest through halkyon_app, which
|
||||
/// exports it; Learn's agent takes it directly.
|
||||
library;
|
||||
|
||||
// A member's public keys, as `SharedKeys` and `KeyPins` take them.
|
||||
export 'package:halkyon_keys/halkyon_keys.dart' show PublicKeys;
|
||||
|
||||
export 'src/files/file_cache.dart';
|
||||
export 'src/files/file_server_gateway.dart';
|
||||
export 'src/files/serverpod_file_server_gateway.dart';
|
||||
export 'src/privacy/content_cipher.dart';
|
||||
export 'src/privacy/new_account_keys.dart';
|
||||
export 'src/privacy/payload_envelope.dart';
|
||||
export 'src/privacy/sealed_file.dart';
|
||||
export 'src/privacy/unlocked_account_keys.dart';
|
||||
export 'src/shared_space/key_pins.dart';
|
||||
export 'src/shared_space/serverpod_shared_keys_gateway.dart';
|
||||
export 'src/shared_space/serverpod_shared_space_gateway.dart';
|
||||
export 'src/shared_space/shared_keys.dart';
|
||||
export 'src/shared_space/shared_keys_gateway.dart';
|
||||
export 'src/shared_space/shared_space_gateway.dart';
|
||||
Loading…
Reference in a new issue