halkyon/halkyon_learn_client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 56c5b36084
feat(assistant): Claude reads studysets through a connector on the instance
A Claude plan can't drive a chat inside another app, but Claude's apps
(every plan, the phone apps too) can add a remote MCP server as a custom
connector. The instance now is one (ADR 0006): Serverpod's web server
serves the MCP endpoint (/mcp, Streamable HTTP, JSON answers, no
sessions) with five read-only tools over the person's own synced rows
(their studysets, a studyset's cards and notes a page at a time, a
search across cards, a note, their progress), and the OAuth the
specification asks for: protected resource and authorization server
metadata, dynamic client registration, authorization code with PKCE
(S256 only), tokens bound to the resource, iss in the response, refresh
tokens that rotate. Caddy forwards these paths alone to the web server,
which production now runs on 8082.

People connect with a code from the app (Settings › Assistant › Connect
Claude): eight Crockford characters, valid for ten minutes and once,
typed on the authorization page, which names where it returns to, loads
nothing from elsewhere and may not be framed. Anonymous people can
connect too. Codes and tokens are kept only as SHA-256 hashes; an access
token lives an hour, a refresh token 30 days. The app lists what is
connected and disconnects it, which ends its tokens at once; deleting
the account deletes it; a daily job forgets what expired and clients
nobody connected within a week. InstanceInfo says where the connector is
(additive); the migration only adds server-only tables, so devices and
older apps are untouched.

The handlers take plain requests, so the integration tests drive the
whole flow (registration, the code, tokens, refresh, the tools, another
person's content, disconnecting, expiry, pruning, account deletion)
without a web server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-10 15:11:17 +02:00
..
doc chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
lib feat(assistant): Claude reads studysets through a connector on the instance 2026-10-10 15:11:17 +02:00
.gitignore chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
analysis_options.yaml chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
CHANGELOG.md chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
dartdoc_options.yaml chore: scaffold the Serverpod 4 build 2026-09-24 15:32:29 +02:00
LICENSE docs: licences and how to contribute 2026-09-30 20:38:16 +02:00
pubspec.yaml fix: Serverpod v4.0.4 and serverpod_offline_sync v0.0.10 2026-10-09 18:09:27 +02:00
README.md docs: licences and how to contribute 2026-09-30 20:38:16 +02:00

halkyon_learn_client

This is your Serverpod client. The code in here is mostly generated by Serverpod, but you may want to make changes if you are adding modules to your project.

Licence

Copyright (C) 2026 The Halkyon Learn contributors

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program (LICENSE). If not, see https://www.gnu.org/licenses/.