- Dart 78.6%
- PLpgSQL 19.3%
- Kotlin 1.1%
- C++ 0.4%
- CMake 0.2%
- Other 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
ADR 0044's step 6a (D42, D43, D45): accounts for programs, such as AI assistants, that an identified person makes from the Profile. halkyon_base keeps them on the instance's register, which its members ask: an agent is an account (agent_account: its owner, its name, its public keys, set by itself once) with one token (agent_token: 32 random bytes, kept as their SHA-256 alone, shown once). agents.create, mine, newToken, revoke, delete and setKeys serve its owner; agentSignIn.signIn exchanges the token for an ordinary server-side session of a day, with the scopes identified and agent, at most 60 sign-ins an hour from a network. Revoking a token or making a new one ends the agent's sessions; a token unused for 90 days lapses in every service's pruning. Up to 5 agents a person, where the operator didn't switch them off (AGENTS=off; said on the privacy page and in instance.basics). An agent makes no agents, creates or owns no shared space, is invited and raised as a Viewer alone, is never handed a space on, is named no operator and granted no assistants; each refusal has its test. Deleting a person deletes their agents first; an agent's public profile names whose agent it is. In the apps, every Profile has an Agents card (halkyon_app's AgentsSection): made with a name and a handle, its token shown once to copy, a new token, the token taken back, deleted. Learn's Share sheet marks an agent among the members and offers it no role above Viewer. The migrations, the module's and each host's (Learn, Meditate, Todo, Train), are additive alone: CREATE TABLE "agent_account" with a unique index on "agentId" (one row an agent account) and one on "ownerId" (a person's agents, and deleting them with the person), and CREATE TABLE "agent_token" with unique indexes on "agentId" (one token an agent) and "tokenHash" (the sign-in finds the token by its hash). No existing table is touched, so the server before the deploy keeps working on the migrated database. Whats-New: Make agents in your Profile: accounts for programs such as AI assistants, which sign in with a token and see only what you share with them. Whats-New-De: Leg in deinem Profil Agenten an: Konten für Programme wie KI-Assistenten, die sich mit einem Token anmelden und nur sehen, was du mit ihnen teilst. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me> |
||
| .forgejo/workflows | ||
| .vscode | ||
| apps | ||
| deploy | ||
| docs/adr | ||
| packages | ||
| snap | ||
| test | ||
| third_party | ||
| tool | ||
| .dockerignore | ||
| .gitignore | ||
| AGENTS.md | ||
| analysis_options.yaml | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| LICENSE.md | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
Halkyon
Halkyon's apps and the packages they share, in one repository. Each app is a Flutter app for Linux, Windows, macOS, Android and iOS with a Serverpod server of its own, offline-first, and anyone may run an instance of it: the apps, the servers and everything needed to host an instance are published.
| App | What it is | Where |
|---|---|---|
| Halkyon Learn | Creating, sharing and studying study material, flashcards scheduled with FSRS | apps/learn/, at learn.halkyon.eu |
| Halkyon Todo | To-dos; for now a shell on the shared packages: sign-in, instances, the account | apps/todo/ |
| Halkyon Train | Running, cycling and rowing (ADR 0030); for now a shell on the shared packages | apps/train/ |
Halkyon Meditate is to follow.
Layout
apps/<app>/: each app's server, generated client and Flutter app.packages/: what the apps share, taken by path:halkyon_ui(the look: theme, bundled Noto Sans, layout, shared widgets),halkyon_app(instances, signing in, each person's data and its sync),halkyon_base(what every server has, as a Serverpod module with its generated clienthalkyon_base_client: signing in, the account and its deletion, the pruning, the instance's basics),halkyon_editor(rich text: the editor, its view and the document they keep),halkyon_core(low-level primitives) andhalkyon_interop(contracts between apps).deploy/: what runs an instance (Docker Compose: Caddy, the server, PostgreSQL), learn.halkyon.eu's today.tool/: the checks, the pre-push hook and the release scripts.docs/adr/: the decisions and their reasons.
One pub workspace holds every package: one pubspec.lock, one version of each dependency.
Melos runs scripts across them.
Getting started
- Flutter v3.47.8, the version CI uses (
FLUTTER_VERSIONin.forgejo/workflows/ci.yaml), with each platform you build for set up by Flutter's own guides; what an app needs beyond that is in its README. - The Serverpod CLI v4.0.4:
dart install serverpod_cli@4.0.4. Pass--no-analyticsto every call; otherwise it reports the commands run to Serverpod. - A C++ compiler, for
flutter testtoo: a dependency of Learn's compiles MeCab as it builds.
flutter pub get # every package of the workspace
dart run melos list # the packages
ln -s ../../tool/pre-push .git/hooks/pre-push # the checks before every push
dart run tool/check.dart # format, analysis, every package's tests
dart run tool/check.dart --changed-since=origin/main tests only what changed since
main and what depends on it; dart run melos run test:flutter --scope=<package> one
package's Flutter tests. Each server's tests start an embedded PostgreSQL (no Docker) and
need test passwords in the server's git-ignored config/passwords.yaml (the module's
README and each app's say which). How the code is organised and the rules it follows are
in AGENTS.md and each app's own.
Licences
The servers and the server module are under the Server Side Public License 1.0, the apps,
the client packages and the other shared packages under the GNU Affero General Public
License 3.0 or later. LICENSE.md says
which covers what, CONTRIBUTING.md how to contribute.