Commit Graph
14 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 b178b6964e Fixes from the second Supermarket run: database versions, health host
The rerun found Supermarket needs PostgreSQL 18 while the Core runs 17.6,
which nothing had shown. The skill now gives the version and says to
check the app's; coreapp status shows the Core's PostgreSQL/MariaDB
version. Deploy's health check sends the app's Host, as traefik does; a
same-version deploy says so. The skill covers making the owner at
startup, building settings in the app's config loader, and checking mail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:50:23 -07:00
davidandClaude Opus 5.5 da36a669bf Pin a release's image by digest, and refuse downgrades without --downgrade
After pulling a release, coreapps records its registry digest and runs
image:version@sha256:..., so a re-pushed tag can't change an installed
app; installing that release again with another digest is refused. An
older release than the installed one needs --downgrade (coreapps
install/plan, coreapp install), since it may not understand the newer
one's data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:31:09 -07:00
davidandClaude Opus 5.5 da767e2139 Add coreapp signin: test an app's sign-in on the Core, as a browser would
The Vikunja rehearsal's agent could only test sign-in against a stand-in
Authelia. coreapp signin follows the app's sign-in through the Core's real
Authelia as a test person (coreapp.test, made by coreapps test-account
with a new random password each run, kept nowhere), prints each step with
Authelia's errors, and says whether it got back to the app signed in.
--code covers apps that start sign-in in the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 17:57:48 -07:00
davidandClaude Opus 5.5 5d06f1bd9b Let apps describe their sign-in client: [sso] callback, pkce, token_auth
A rehearsal with Vikunja showed apps with their own redirect path or no
PKCE needed a bridge in the container. coreapp.toml's [sso] now sets the
Authelia client's callback, PKCE and token method; changes re-register
the client, and a failed update restores it. The skill covers [sso],
images without a shell and upstream ENV defaults; coreapp shell and
status explain rough edges the rehearsal hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 17:45:54 -07:00
davidandClaude Opus 5.5 e2d9381c35 Check the app's icon: say when it can't be used, refuse it on publish
An icon.png that's missing, a link, over 1 MB or not a PNG used to
become the default silently. The installer and coreapp deploy now say
so (and note icons that aren't square or are small); coreapp publish
refuses an unusable or uncommitted one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:53:06 -07:00
davidandClaude Opus 5.5 77427f2f16 Roll back the database and /data with a failed update
Before an update, coreapps dumps the app's database (pg_dump or
mariadb-dump, in the database's container) and makes a reflink copy of
/data (Cores' /federated is btrfs). A failed update restores both before
starting the old version; a failed dump refuses the update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:50:10 -07:00
davidandClaude Opus 5.5 14311cee21 Keep Superpanel's dashboard current: link, docs and updates
The service file gets URL="https://<name>.$DOMAIN/", as Federated's
apps on their own hostnames do. Apps from a repository without docs
link to it. Updates remake Superpanel's applist and catalog, as removes
do, so a new title or icon shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:37:21 -07:00
davidandClaude Opus 5.5 4e0292fd91 Roll back failed updates to the version that ran before
coreapps keeps copies of the app's service folder, .env and compose
file during an update. If it fails before the app answers, it tears
down needs the update added, restores the copies, starts the old
version and removes the new image. Data isn't rolled back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:22:04 -07:00
davidandClaude Opus 5.5 8ef2112e3c Add the mysql need: its own database on the Core's MariaDB
needs = ["mysql"] (coreapp new --mysql) makes a user and database
coreapp_<name> on pdnsmysql, with the same DB_* settings as postgres
(so an app has one or the other). Root's password is read inside the
container, so it stays out of installapp's set -x log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:15:23 -07:00
davidandClaude Opus 5.5 6ab1db839b Add the email need: each app gets its own sending-only mail account
needs = ["email"] (coreapp new --email) makes an LDAP account
coreapp-<name> (not a person, no mailbox) and adds SMTP_* settings.
Teardown removes it only if it's the app's; the installer warns about
an entry it left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 15:01:11 -07:00
davidandClaude Opus 5.5 bef3b86970 Install apps from their repository, including private ones
coreapps plan|install <https://host/owner/repo>[@tag] reads only
coreapp.toml and icon.png at the tag's commit (depth 1, blobs on demand,
regular files only), with git limited to https and no prompts or system
settings. The default tag is the newest numeric release; version must
match the tag; the image is always pulled. The marker records source,
tag and commit; the same name from another repository is refused.
coreapps update <name> moves to the newest release. On the workstation:
coreapp install <url> (shows the app and its needs, asks) and update.

Private apps: coreapps login <host> <user> keeps a read-only token (from
stdin) in /etc/coreapps/credentials (root only), checked with the host's
registry first. git gets it as an extraHeader for that host only, docker
in a config made for each pull. coreapp login/logout/logins on the
workstation. Tested with a private repository and package on Federated's
Gitea.

Fixed: old images of docker.io/library/... weren't deleted (docker lists
them by short name); remove force-deleted images another app could use;
coreapp help cut off multi-line descriptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:51:41 -07:00
davidandClaude Opus 5.5 89585e81aa Apps get 192.168.5.0/24; keep a copy of each Authelia client
Addresses now come from 192.168.5.0/24, the range Federated's Core
developer set aside for custom apps. Apps installed in 192.168.200.x get
a new address on their next update.

Like Federated's apps, the sso need keeps a copy of its Authelia client in
/federated/apps/<name>/.<name>.oidc-client.yml, so Authelia's start
(reconcile_authelia_sso) restores it if Authelia is reinstalled. Removing
an app deletes the copy before restarting Authelia, which would otherwise
add the client back. Needs can have an update step, run on every update;
sso's writes the copy for apps installed before this.

Fixed: an update of an app with no needs failed at its end (a test that
found nothing to run set the exit status), leaving the app on its old
address.

PLAN.md: the Core developer's guidance and where coreapp-dev stands on
each point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:10:43 -07:00
davidandClaude Opus 5.5 fdb57d260d Add the coreapp skill; fix /data ownership; deploy --recreate, shell <cmd>
skills/coreapp/SKILL.md teaches a Claude Code agent to make or port an
app for Federated Core: coreapp.toml, the needs, porting an existing app,
the deploy and test loop, troubleshooting, what isn't supported yet and
how to report back. update.sh links it into ~/.claude/skills/coreapp;
uninstall.sh removes the link. Rehearsed with a small app (memo-board)
ported by a fresh agent using only the skill.

The installer now gives /data to the image's user before starting the
container: Docker created it as root, so non-root apps couldn't write.
coreapp deploy --recreate always starts a new container (to test that
data survives); coreapp shell '<command>' runs one command without a
terminal.

PLAN.md: what would change on the Core to put the installer in
/federated/bin/coreapps/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 13:50:10 -07:00
davidandClaude Opus 5.5 b4d47fb1c5 Apps are a coreapp.toml; a trusted installer makes the Core side
An app's repository now has only coreapp.toml, its Dockerfile, its code
and an icon: no install scripts or compose file, so installing an app
from someone else's repository can't run their code as root on a Core.

core/coreapps runs on the Core (coreapp deploy puts it in /opt/coreapps).
It checks the manifest, refuses Federated's app names and the Core's
hostnames, picks a free address on that Core, writes the generic app
format from its own templates, sets up the needs (postgres, sso) and
installs through installapp. Updates keep the address, secrets and data,
add settings for new needs and delete old images; dropping a need is
refused. remove rebuilds Superpanel's catalog afterwards.

PLAN.md: the Coreapps direction and steps, and what the Core offers apps
(Superpanel's AI features, mcpserver, hermes, email, PowerDNS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 13:36:47 -07:00