Commit Graph
17 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 c60d99baba Let an app name the oldest database server it works with
coreapp.toml's [postgres] or [mysql] min_version: the installer compares
it with the Core's PostgreSQL or MariaDB on install and update, and
refuses an older Core with both versions, instead of the app failing
later. coreapp core reads the versions the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:31:23 -07:00
davidandClaude Opus 5.5 cf18bef278 Let an app ask for PostgreSQL extensions its user can't make
coreapp.toml's [postgres] extensions = ["vector"]: the installer checks
the Core's PostgreSQL has each one (refusing before anything changes if
not) and makes them in the app's database as the superuser, with CASCADE,
on install and every update. Ones taken off the list are kept, since the
data may use them. Also fixes the check refusing needs with both postgres
and mysql, which never ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:28:33 -07:00
davidandClaude Opus 5.5 a7cd4e325c Shorten the skill into reference files; fixes from the Miniflux rehearsal
SKILL.md keeps what every app needs; sign-in details and publishing move
to references/sign-in.md and references/publishing.md, read when it says.
A Miniflux rehearsal found coreapp signin calling a quiet callback failure
"Signed in": it now checks the app's page doesn't offer sign-in again.
Every app gets CORE_PROXY (traefik's address). The skill says groups is
null (don't map roles from it), claims come from userinfo, and to wait
for Authelia's discovery and the database at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:14:06 -07:00
davidandClaude Opus 5.5 dca8837487 The Core's admin account is always an admin of the app
Every app's .env gets CORE_ADMIN_EMAIL (admin@<domain>, the Core's own
admin, as Federated's apps use). The skill says apps make that account an
admin on each Core sign-in, trusting only Authelia's email, instead of a
setup link; the sso example apps show the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:34:36 -07:00
davidandClaude Opus 5.5 dcc72fe5da Fixes from porting Supermarket: sign-in buttons, CORE_DOMAIN, skill gaps
An agent ported Supermarket with only the skill. coreapp signin now
presses a sign-in page's button (a form with only hidden fields; --form
picks one), every app gets CORE_DOMAIN, and the skill covers apps that
also run elsewhere, IMAGE_VERSION instead of build args, deriving keys
from APP_SECRET, the first admin, apps with their own client setup, and
that the groups claim is empty on today's Cores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:22:42 -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 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 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 ed2841f092 coreapp publish, and a Gitea Actions workflow in new apps
coreapp publish builds the release image, pushes image:version to the
registry named in coreapp.toml and tags the commit v<version>. It refuses
local-only image names (suggesting one from the git remote), uncommitted
changes, a version already published and a tag already on another
commit. The existence check uses docker buildx imagetools inspect:
docker manifest inspect reported "no such manifest" for an image that
existed. Any error but "not found" stops the publish.

New apps get .gitea/workflows/publish.yml, which does the same on a v*
tag, for repositories with a runner that can use Docker (secrets
REGISTRY_USER and REGISTRY_TOKEN). Untested: needs a runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:15:47 -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
davidandClaude Opus 5.5 d8c6d1011f coreapp new --postgres --sso: database and sign-in together
Overlays no longer replace service: each names the Core apps it needs in
.depends, merged into DEPENDS. The sign-in code is a module (oidc.py)
that examples import; templates/postgres-sso is the combined example
(sign-in, each person's visits counted in PostgreSQL). Tested with
team-visits, including sign-in in a browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:43:22 -07:00
davidandClaude Opus 5.5 284f52fc29 coreapp new --sso: sign-in through the Core's Authelia
A template overlay (templates/sso) registers the app as an OpenID Connect
client in Authelia's idproviders.yml (between markers, secret hashed by
the running Authelia), checks the configuration before restarting
Authelia and restores it if the check fails; uninstall removes the client.
The app reaches Authelia's https address through traefik (@TRAEFIK_IP@,
provided by the template's install and by redeploys). The example is a
standard-library Python OIDC client (code flow with PKCE). Tested by
install, redeploy, remove and reinstall, and a real sign-in in a browser.

Also: the postgres overlay appends to the base install, uninstall and
env.in; database names get a coreapp_ prefix (PostgreSQL reserves pg_*);
deploy waits until the app answers on its own address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:34:27 -07:00
davidandClaude Opus 5.5 74bdc13f0f coreapp new --postgres: apps with their own database
A template overlay (templates/postgres) adds DEPENDS="postgresql", DB_*
settings with a random password, an install that creates the user and
database on the Core's PostgreSQL (safe to re-run), an uninstall that
drops them, and a Python example that counts visits. Tested with a
throwaway app: deploy, redeploy and a reboot of the Core keep the data,
remove drops the database and user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 12:06:55 -07:00
davidandClaude Opus 5.5 1108060432 coreapp: make, deploy and test apps on the Core in the VM
Apps are folders in Federated Core's generic services format (service,
docker-compose.yml.in, env.in, install, uninstall, icon.png) plus their
own Dockerfile. coreapp new scaffolds one from templates/app with an
address in 192.168.200.x; deploy builds the image, copies it to the Core
over SSH, installs it with installapp (and starts it, since the Core's
start only knows its own apps) or updates it keeping .env; check, status,
logs, shell and remove work on the Core.

Apps in development aren't registered with Federated's monitoring: deploy
drops MONITOR from the Core's copy of service. installapp/uninstallapp
traces go to private logs, not the terminal.

update.sh installs docker and docker-buildx and links coreapp into
~/.local/bin. PLAN.md: how the Core runs apps, and corrected evidence for
the Core's timers running their jobs at every boot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 11:54:25 -07:00