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>
221 lines
11 KiB
Dart
221 lines
11 KiB
Dart
/// What every Halkyon app is built around, on an instance's halkyon_base:
|
|
///
|
|
/// - **Instances**: the ones a device keeps an account on, one in use at a
|
|
/// time (`InstanceChoice`), chosen at first start (`FirstStartScreen`) or
|
|
/// added later (`showAccountSwitcher`), each checked before the app moves
|
|
/// there (`InstanceChecker`) and saying where it keeps people's data.
|
|
/// - **Gates**: `InstanceGate` opens the app's dependencies on the instance
|
|
/// in use (`AppDependencies`, `AppScope`); `SessionGate` keeps a person
|
|
/// signed in and asks how to start once signed out (`StartScreen`);
|
|
/// `PersonScope` opens each person's own dependencies. While an account
|
|
/// waits for the instance's operator, `WaitScreen` shows where its wait
|
|
/// stands (Halkyon Learn's ADR 0021, D31).
|
|
/// - **The look**: the device's appearance and language (`Look`), kept on
|
|
/// it (`FileLookStore`) and applied before anyone signs in (`LookCubit`),
|
|
/// chosen in Settings (`DeviceLookCard`, `LookSettingsCard`; ADR 0014's
|
|
/// amendment of 4 Nov 2026).
|
|
/// - **The account and About**: `AccountTiles` for an app's settings,
|
|
/// `showAppAbout` with the source of what the instance runs, and
|
|
/// `resolveAppLocale`, the language every Halkyon app picks.
|
|
/// - **The instance's operators**: `InstanceOperatorCard` (or
|
|
/// `InstanceOperatorTiles`) and `WaitingAccountsBadge` for whoever
|
|
/// operates the instance, on `OperatingCubit`, leading to
|
|
/// `InstanceOperatorScreen`, an overview whose screens approve, refuse and
|
|
/// suspend accounts and name operators (Halkyon Learn's ADR 0021, D21 to
|
|
/// D24, D61, D62).
|
|
/// - **Assistants**: `AssistantsCard` for an app's settings, what the
|
|
/// operator grants a person and their own keys where allowed, on
|
|
/// `AssistantRepository`; `AssistantGrantsScreen` from the operator's
|
|
/// screen, on `AssistantOperatorRepository` (Halkyon Learn's ADR 0021,
|
|
/// step 2, D57 to D63).
|
|
/// `package:halkyon_app/assistant_models.dart` holds the models alone.
|
|
/// - **Signing in**: with SimpleLogin (ADR 0020: `SimpleLoginRepository`,
|
|
/// its sheet and `SimpleLoginSection`), with a password and TOTP (ADR
|
|
/// 0017: `PasswordRepository`, its sheets and `AccountSecuritySection`),
|
|
/// the session on `AuthRepository` and `ServerpodAuthGateway`, the
|
|
/// account's keys on the device. Every account has a way in: there are no
|
|
/// anonymous ones (ADR 0020, D4).
|
|
/// - **What's new**: `WhatsNew` reads what each release changed from the
|
|
/// app's `assets/whats_new/` (`tool/release.dart` drafts it), and
|
|
/// `WhatsNewOnUpdate` shows it once after an update, `WhatsNewTile` in
|
|
/// Settings again, both under the app's `WhatsNewScope`.
|
|
/// - **Sync**: `SyncService` on triggers, the changes still waiting, and
|
|
/// where it stands (`SyncStatusBloc`, `SyncStatusCard`, `AppMismatchBanner`,
|
|
/// `SyncTroubleBadge`).
|
|
/// - **Shared spaces' keys** (Halkyon's ADR 0044, D3, D18): `SharedKeys`
|
|
/// seals a space's data keys to its members and opens those sealed to
|
|
/// the person, holding each member to the public keys `KeyPins` pinned
|
|
/// on first sight, with the safety code to compare them by.
|
|
///
|
|
/// An app gives its name, look and own words as an `AppFrame`, and installs
|
|
/// `HalkyonAppLocalizations.delegate` beside its own.
|
|
library;
|
|
|
|
// The envelope every synced row is sealed in, the account's unlocked keys
|
|
// and the keys of shared spaces (Halkyon's ADR 0044, D49): pure Dart, so an
|
|
// agent without Flutter seals and opens them as an app does; with them a
|
|
// member's public keys (`PublicKeys`).
|
|
export 'package:halkyon_content/halkyon_content.dart';
|
|
// Deletions waiting for their Undo, and what a synced gateway asks of the
|
|
// sync (`SyncService` is one), pure Dart for the agent too.
|
|
export 'package:halkyon_core/halkyon_core.dart'
|
|
show DelayedDeletions, SyncRequests;
|
|
|
|
export 'l10n/halkyon_app_localizations.dart';
|
|
export 'src/agent/bloc/agents_cubit.dart';
|
|
export 'src/agent/data/agent_gateway.dart';
|
|
export 'src/agent/data/agent_repository.dart';
|
|
export 'src/agent/data/serverpod_agent_gateway.dart';
|
|
export 'src/agent/model/agent.dart';
|
|
export 'src/agent/widget/agents_section.dart';
|
|
export 'src/app/about.dart';
|
|
export 'src/app/app_frame.dart' show AppFrame, AppFrameScope, LookSettings;
|
|
export 'src/app/app_locale.dart';
|
|
export 'src/app/app_scope.dart';
|
|
export 'src/app/instance_gate.dart';
|
|
export 'src/app/person_scope.dart';
|
|
export 'src/assistant/bloc/assistant_grant_cubit.dart';
|
|
export 'src/assistant/bloc/assistant_use_cubit.dart';
|
|
export 'src/assistant/bloc/assistants_cubit.dart';
|
|
export 'src/assistant/data/assistant_gateway.dart';
|
|
export 'src/assistant/data/assistant_messages.dart'
|
|
show
|
|
eventsOf,
|
|
failureOf,
|
|
llmMessageOf,
|
|
messageOf,
|
|
ownKeyFailureOf,
|
|
questionOf;
|
|
export 'src/assistant/data/assistant_repository.dart';
|
|
export 'src/assistant/data/serverpod_assistant_gateway.dart';
|
|
export 'src/assistant/model/assistant_amount.dart';
|
|
export 'src/assistant/model/assistant_failed.dart';
|
|
export 'src/assistant/model/assistant_grant.dart';
|
|
export 'src/assistant/model/assistant_offer.dart';
|
|
export 'src/assistant/model/assistant_provider.dart';
|
|
export 'src/assistant/model/own_assistant.dart';
|
|
export 'src/assistant/model/provider_terms.dart';
|
|
export 'src/assistant/widget/assistant_grants_screen.dart';
|
|
export 'src/assistant/widget/assistant_provider_view.dart';
|
|
export 'src/assistant/widget/assistant_use_view.dart';
|
|
export 'src/assistant/widget/assistant_words.dart';
|
|
export 'src/assistant/widget/assistants_card.dart';
|
|
export 'src/auth/bloc/session_bloc.dart';
|
|
export 'src/auth/bloc/sign_in_ways_cubit.dart';
|
|
export 'src/auth/bloc/wait_cubit.dart';
|
|
export 'src/auth/data/account_wait_store.dart';
|
|
export 'src/auth/data/auth_gateway.dart';
|
|
export 'src/auth/data/auth_repository.dart';
|
|
export 'src/auth/data/serverpod_auth_gateway.dart';
|
|
export 'src/auth/data/sign_in_addresses.dart';
|
|
export 'src/auth/model/account_wait.dart';
|
|
export 'src/auth/model/auth_status.dart';
|
|
export 'src/auth/model/session_grant.dart';
|
|
export 'src/auth/model/sign_in_ways.dart';
|
|
export 'src/auth/model/sign_ups.dart';
|
|
export 'src/auth/widget/account_tiles.dart';
|
|
export 'src/auth/widget/session_gate.dart';
|
|
export 'src/auth/widget/start_screen.dart';
|
|
export 'src/auth/widget/wait_screen.dart';
|
|
export 'src/base/base_client.dart';
|
|
export 'src/files/file_opener.dart';
|
|
export 'src/files/file_picker.dart';
|
|
export 'src/files/file_saver.dart';
|
|
export 'src/handle/bloc/handle_check_cubit.dart';
|
|
export 'src/handle/model/handle_problem.dart';
|
|
export 'src/handle/widget/handle_field.dart';
|
|
export 'src/instance/cldr_license.dart';
|
|
export 'src/instance/country_names.dart';
|
|
export 'src/instance/european_union.dart';
|
|
export 'src/instance/flag_icons_license.dart';
|
|
export 'src/instance/instance.dart';
|
|
export 'src/instance/instance_checker.dart';
|
|
export 'src/instance/instance_choice.dart';
|
|
export 'src/instance/instance_locations.dart';
|
|
export 'src/instance/instance_scope.dart';
|
|
export 'src/instance/instance_storage.dart';
|
|
export 'src/instance/instance_store.dart';
|
|
export 'src/instance/subdivision_names.dart';
|
|
export 'src/instance/widget/account_switcher_sheet.dart';
|
|
export 'src/instance/widget/first_start_screen.dart';
|
|
export 'src/instance/widget/instance_location.dart';
|
|
export 'src/instance/widget/instance_location_words.dart';
|
|
export 'src/instance/widget/instance_step.dart';
|
|
export 'src/instance/widget/instance_tile.dart';
|
|
export 'src/look/bloc/look_cubit.dart';
|
|
export 'src/look/data/look_store.dart';
|
|
export 'src/look/model/look.dart';
|
|
export 'src/look/widget/look_settings_card.dart';
|
|
export 'src/operator/bloc/account_suggestions_cubit.dart';
|
|
export 'src/operator/bloc/operating_cubit.dart';
|
|
export 'src/operator/bloc/operator_list_cubit.dart';
|
|
export 'src/operator/bloc/operator_overview_cubit.dart';
|
|
export 'src/operator/data/instance_operator_gateway.dart';
|
|
export 'src/operator/data/instance_operator_repository.dart';
|
|
export 'src/operator/data/serverpod_instance_operator_gateway.dart';
|
|
export 'src/operator/model/operated_account.dart';
|
|
export 'src/operator/widget/instance_operator_card.dart';
|
|
export 'src/operator/widget/instance_operator_screen.dart';
|
|
export 'src/password/bloc/account_recovery_cubit.dart';
|
|
export 'src/password/bloc/account_security_cubit.dart';
|
|
export 'src/password/bloc/account_setup_cubit.dart';
|
|
export 'src/password/bloc/password_sign_in_cubit.dart';
|
|
export 'src/password/data/account_crypto.dart';
|
|
export 'src/password/data/account_key_store.dart';
|
|
export 'src/password/data/password_gateway.dart';
|
|
export 'src/password/data/password_repository.dart';
|
|
export 'src/password/data/serverpod_password_gateway.dart';
|
|
export 'src/password/data/sodium_account_crypto.dart';
|
|
export 'src/password/model/account_authenticator.dart';
|
|
export 'src/password/model/account_security.dart';
|
|
export 'src/password/model/mail_code_purpose.dart';
|
|
export 'src/password/model/password_failed.dart';
|
|
export 'src/password/model/phrase_check.dart';
|
|
export 'src/password/widget/account_recovery_sheet.dart';
|
|
export 'src/password/widget/account_security_section.dart';
|
|
export 'src/password/widget/account_setup_sheet.dart';
|
|
export 'src/password/widget/password_sign_in_sheet.dart';
|
|
export 'src/password/widget/password_texts.dart';
|
|
export 'src/password/widget/password_widgets.dart';
|
|
export 'src/password/widget/secret_clipboard.dart';
|
|
export 'src/password/widget/secret_screen.dart';
|
|
export 'src/person/person_folders.dart';
|
|
export 'src/profile/bloc/public_profile_bloc.dart';
|
|
export 'src/profile/data/avatar_image.dart';
|
|
export 'src/profile/data/base_public_profile_gateway.dart';
|
|
export 'src/profile/data/public_profile_gateway.dart';
|
|
export 'src/profile/data/public_profile_repository.dart';
|
|
export 'src/profile/model/public_profile.dart';
|
|
export 'src/profile/widget/halkyon_profile.dart';
|
|
export 'src/profile/widget/profile_sheet.dart';
|
|
export 'src/profile/widget/public_profile_section.dart';
|
|
export 'src/simplelogin/bloc/simplelogin_cubit.dart';
|
|
export 'src/simplelogin/bloc/simplelogin_standing_cubit.dart';
|
|
export 'src/simplelogin/data/serverpod_simplelogin_gateway.dart';
|
|
export 'src/simplelogin/data/simplelogin_gateway.dart';
|
|
export 'src/simplelogin/data/simplelogin_repository.dart';
|
|
export 'src/simplelogin/model/simplelogin_arrival.dart';
|
|
export 'src/simplelogin/model/simplelogin_failed.dart';
|
|
export 'src/simplelogin/model/simplelogin_standing.dart';
|
|
export 'src/simplelogin/widget/keys_reset.dart';
|
|
export 'src/simplelogin/widget/simplelogin_section.dart';
|
|
export 'src/simplelogin/widget/simplelogin_sheet.dart';
|
|
export 'src/simplelogin/widget/simplelogin_standing_scope.dart';
|
|
export 'src/simplelogin/widget/simplelogin_texts.dart';
|
|
export 'src/speech/dictation.dart';
|
|
export 'src/speech/speech_input.dart';
|
|
export 'src/speech/voice_input_app.dart';
|
|
export 'src/sync/app_compatibility.dart';
|
|
export 'src/sync/bloc/sync_status_bloc.dart';
|
|
export 'src/sync/network/mobile_data_gate.dart';
|
|
export 'src/sync/network/network_watch.dart';
|
|
export 'src/sync/pending_changes_store.dart';
|
|
export 'src/sync/sync_service.dart';
|
|
export 'src/sync/sync_status.dart';
|
|
export 'src/sync/widget/app_mismatch_banner.dart';
|
|
export 'src/sync/widget/mobile_data_banner.dart';
|
|
export 'src/sync/widget/sync_and_wait.dart';
|
|
export 'src/sync/widget/sync_status_card.dart';
|
|
export 'src/sync/widget/sync_trouble_badge.dart';
|
|
export 'src/whats_new/whats_new.dart';
|
|
export 'src/whats_new/whats_new_view.dart';
|