Commit Graph
30 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 ef4bd67139 Skill consistency pass; pick -N releases from a repository
coreapp install <url> without a tag and coreapp update now count -N tags
(v6.2.0-1) as releases, the same rule as the version ordering.

Skill and README: a new account's first sign-in is repeated by deleting
the user in the app; deploy and publish build the Dockerfile, not the
Core; health paths should answer 2xx; the right cross-reference for
waiting at startup; the update log's name; a description that covers
mysql, mail, updating and publishing; updating.md and --form in README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 14:10:30 -07:00
davidandClaude Opus 5.5 0aa334d22a Update rehearsal: downgrade check for deploys, -N versions, failed logs
coreapp deploy refuses a lower version than the installed one without
--downgrade, as coreapp install does. Versions with -N (the Coreapp's own
fix on the same upstream version) order after the upstream one, for
releases too. A failed start keeps the container's whole log, from its
first start, in <name>-failed-start.log. coreapp status shows the
installed version beside the folder's.

Skill: references/updating.md (versions, what to check between versions,
testing an update over real data and its rollback, no copy after a
successful update); reading the installer's bash -x log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 14:06:31 -07:00
davidandClaude Opus 5.5 491af8745f New-app rehearsal: mail refusals, Junk in inbox, Reply-To
coreapp mail lists mail the Core's mail server refused for sending too
fast (2 messages a minute per app; the refusal has no queue id, so it was
missing). coreapp inbox reads the test account's Junk folder too, marked
as such, and shows Reply-To. New apps ignore __pycache__.

Skill: the mail limit (queue, send again on a 4xx), Date and Message-ID,
a regular member role where taking part is the point, testing what takes
two people, the only readable mailbox, what coreapp new makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 13:45:11 -07:00
davidandClaude Opus 5.5 114b364cef Snipe-IT rehearsal: slow starts, image volumes, HTML-as-text mail
Deploy waits up to 5 minutes for an app to answer, printing its last log
line every 30 s, and stops early when the container exits or restarts
three times. It notes VOLUMEs the image declares outside /data, and
uninstall removes anonymous volumes (down -v). coreapp inbox renders HTML
sent in a text/plain part.

Skill: no first-come setup wizard even without sso (admin at startup,
password by reset), no new sign-in code for apps without OIDC, upstream
scripts that read shell variables, a step between upstream steps, the
image's VOLUMEs, a slow first install, three-part min_version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 13:12:46 -07:00
davidandClaude Opus 5.5 f4b869decd Fixes from the Leantime rehearsal: unhealthy apps, signin links and errors
Deploy now waits while an image's own HEALTHCHECK says "starting" and
stops on "unhealthy" with the check and its result, since traefik doesn't
route unhealthy containers (it used to say "Updated"); an update rolls
back, a first install says it stays installed, and a rollback waits until
the old version is routed again. coreapp signin follows a page's one
"Core SSO" or "Authelia" link, prints the app's visible error when it
doesn't end signed in, and has --help. The skill covers 127.0.0.1 among
trusted proxies, the image's HEALTHCHECK, COPY --chmod, $TMPDIR outside
the sandbox, patching an app's OIDC code for userinfo claims, and testing
a new account's first sign-in. PLAN: ID-token claims for Federated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 11:33:52 -07:00
davidandClaude Opus 5.5 58f90de66f Ask for the token without showing it in coreapps login
At a terminal, coreapps login on the Core now prompts with getpass;
piped (as coreapp login does), it still reads one line from stdin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 09:10:38 -07:00
davidandClaude Opus 5.5 1e86866e8a Copy PostgreSQL databases with zstd before updates
pg_dump -Fc -Z zstd:1 instead of its default gzip: on the dev Core a
1.3 GB database took 6 s and 158 MB instead of 27 s and 223 MB, and
restores as fast. A pg_dump without zstd falls back to its default. The
"takes a while" note now starts at 1 GB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:18:00 -07:00
davidandClaude Opus 5.5 5d90c246a1 Fixes from the listmonk rehearsal; porting checklist in its own file
A rehearsal porting listmonk (postgres, sso, email) deployed it, signed
in, and read its opt-in mail with coreapp inbox. The name refusal said the
Core "already has" listmonk when it's Federated's uninstalled app; it now
says so, and coreapp core lists the names apps can't use. The porting
checklist moves to references/porting.md, adding settings kept in the
app's database, upstream entrypoints that assume root, and min_version
from the app's documented minimum. sign-in.md: the admin rule in an
upstream image, and when --form isn't needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:05:11 -07:00
davidandClaude Opus 5.5 f0468c43f2 Let a Core keep a token for one owner's apps on a host
coreapp login <host>/<owner> saves a token used for that owner's
repositories and images before the host's token, so apps from different
accounts on one host can use different tokens. git sends it only under
https://<host>/<owner>/; docker gets it for that pull only. Errors name
the token that was tried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:51:41 -07:00
davidandClaude Opus 5.5 c337ba2530 Give the test account a mailbox, read with coreapp inbox
Mail an app sends to coreapp.test@<domain> (resets, invitations,
notifications) is now delivered: the account gets mailEnabled and a
homeDirectory (from extensibleObject, so it takes no uidNumber Superpanel
would give a person), older accounts on their next use. coreapp inbox
shows the newest 10 messages with their text (HTML as text, with links'
addresses); --clear empties it; removing the account removes its mail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:47:02 -07:00
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 adcd2f9aec Let an installed app drop a need
Taking sso or email out of needs removes the client or mail account once
the new version answers; postgres or mysql need --drop-database (coreapp
deploy asks for the app's name). Their settings leave .env first, so a
postgres -> mysql switch gets mysql's own values; a failed update rolls
back with them intact. The route wait now compares traefik's answer with
the app's own, so an app's 404 isn't taken for a missing route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:02:03 -07:00
davidandClaude Opus 5.5 f56641bbe1 Check there's room for the database's copy before an update
Before dumping the app's database for a rollback, coreapps reads its size
and refuses the update, changing nothing, if the apps' disk can't hold
the copy and keep 1 GB free; big databases say the copy takes a while.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 19:40:03 -07:00
davidandClaude Opus 5.5 2d29ca62b3 Fixes from the third Supermarket run: coreapp mail, route wait, skill edges
coreapp mail shows what the Core's mail server did with the app's mail
(from its log: accepted, delivered, deferred or bounced). Deploy waits
until traefik routes the public address, so it doesn't answer 404 just
after "Updated". The skill's settings rules no longer contradict, the
lowest role means read-only, the Core's admin gets no local password or
reset, and SQLite may need allowing in an app's multi-user edition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 19:36:28 -07:00
davidandClaude Opus 5.5 d860dd9200 Add coreapp core and "What the Core offers" to the skill
coreapp core prints what the Core in the VM offers apps, live: PostgreSQL
and which extensions an app can enable itself (the trusted ones; pgvector
needs a superuser), MariaDB, Authelia, the mail server, Traefik, Docker
and the machine. The skill has the same table with today's versions and
says to check the app's requirements against it before choosing a need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 19:36:05 -07:00
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