- Add openWorldHint to MCP tool annotations with per-route override
- Document readOnly/destructive/openWorld hints in MCP docs
- Add OpenAI review test cases, publication notes, and support/privacy/terms URLs to plugin manifest
- Bump plugin version to 0.1.2
- Add SUBMISSION.md guide for directory draft creation and review setup
* feat: add domain virtual responses with a compact editor and bounded edge matching
* fix: keep traffic working during rolling edge script updates
* refactor: centralize edge management transport
* fix(mail): complete local backups and portable server restores
* test(mail): report engine diagnostics on round-trip failure
* fix(mail): stop Postfix writers before container snapshots
* fix(mail): apply Postfix shutdown in the daemon action renderer
* test(mail): install GNU tar on the remote fixture host
* fix(deploy): let webhooks and CLI accept reviewed Compose changes
Webhook and CLI deploys hit COMPOSE_REVIEW_REQUIRED with no way through the gate, and the refusal hid what changed. Accept the current Compose source explicitly per deploy (--accept-compose-changes, or acceptComposeChanges on the hook), and surface the added/changed/removed services in the CLI error and the webhook delivery record.
* test(contracts): include acceptComposeChanges in deployment schema flags
The Compose review gate added acceptComposeChanges to
CreateDeploymentSchema without updating the contract test that
enumerates the schema's public flags, so the contracts suite failed
on CI. Add the flag to the expected list.
* docs(cli): list --accept-compose-changes in the deploy reference
The new deploy flag was missing from the generated CLI reference,
so docs:check failed with a stale reference. Add the row in
declaration order.
* Retain explicit Compose approval through shared deployment admission
---------
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
* fix(edge): stop trimming edge file content read through exec
Executors resolve command output with `stdout.trim()`, which is right for
command parsers and wrong for file content. Three file reads go through
`exec` + `cat`: the sudo fallback when the login user cannot read a file
(root-owned 0600 vhosts on a non-root SSH login), the container fallback in
`readMaybeInContainer`, and `DockerEdgeExecutor` in container file mode.
Each returned the file without its trailing newline.
That breaks every comparison against the bytes about to be written:
`writeEdgeChallenge`'s "already on disk" check never matched, so each
`serveEdgeChallenge` rewrote the vhost and reloaded the edge, and a
rollback that restored such a snapshot wrote the truncated text back.
Frame the payload between two markers so the trim cannot reach it. The
closing marker is printed only after `cat` succeeds, and unframed output
is an error rather than a short file; anything a login shell prints
before the opening marker is ignored. `exec` itself is unchanged.
(SshExecutor still decodes each output chunk separately, so a multi-byte
UTF-8 character split across chunks can decode wrongly. That predates
this change, affects every command, and vhosts are ASCII; left for a
separate fix.)
Refs #1536
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(edge): skip route writes and reloads that would change nothing
Every route registration rewrote its vhost and sidecar and reloaded the
edge, even when the bytes on disk were already exactly right. On a
deploy `registerResolvedRoutes` registers each hostname and then, when a
verified certificate already exists, `provisionCert` re-registers it
through `activateCert`: two write-and-reload cycles per hostname for no
change. Over SSH on a remote server that is most of the deploy's routing
phase.
`updateConfig` now publishes only the files that differ: a change is
skipped when the file already holds exactly that content as a regular
file with the desired mode, or when it removes a path that is already
gone. The mode comes from a new optional `CommandExecutor.lstat` (SFTP
lstat on SSH, fs.lstat locally and through DockerEdgeExecutor's mount),
which also answers the existence probe, so an unchanged file costs the
same two file operations as before. Where the mode cannot be read,
content is the only evidence, as in `writeEdgeChallenge` today.
Skipping the reload needs more than disk matching: a process that died
between write and reload leaves the edge running something else. The
provider records whether it has seen the edge load what is on disk (a
successful reload sets it; a failed reload or incomplete rollback clears
it), and a transaction that writes nothing still reloads until then.
Every write path to edge config or certificate files clears that record
before it touches disk, so a writer that fails part-way, inside or
outside this transaction, cannot leave it vouching for unloaded files.
Writes bump a generation counter, and a reload only vouches for the
generation it started with; certbot and certificate staging, which run
outside the config lock, bump it again when they finish, so once they
return no reload that overlapped them vouches for what they wrote.
Remote servers get a new provider per deployment (the native local
platform keeps one for the life of the process), so an unchanged deploy
of HTTP-01 hostnames costs one confirming reload instead of two per
hostname. DNS-01 and wildcard hostnames, which the platform activates
directly, still reload once each. That confirming reload also syncs the
container edge's trusted-proxy include, which comes from the API's
environment and so changes only with a restart.
`writeEdgeChallenge` drops its own content-only "already on disk" return
and lets `updateConfig` decide, so it honours the mode and the record
above too. Challenge tokens are served, not loaded, and do not clear the
record.
`activateCert` always reloads: issuance and uploads put new certificate
material at the paths the vhost already names, so the vhost text cannot
show the change. Only `provisionCert`'s reuse of an existing, verified
certificate may skip. Rollback restores only the files this transaction
attempted to write, with their original mode when known; a symlink, even
a dangling one, is replaced by a regular file (and restored as a link
where `readlink` can see it).
Refs #1536
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(edge): stop repeating the same remote file operations per route
On a non-root SSH login whose vhosts are root:root 0600, every read of a
route file is a refused SFTP read plus a `sudo cat`, and every probe for a
path that does not exist ends in a `sudo test -e`. With the previous two
fixes an unchanged registration writes and reloads nothing, but it still
paid about 25 such round trips per hostname, most of them repeats.
- Remember, for one turn of the edge config lock, what was read or written
under the sites directory. Slug resolution, the protection check and the
transaction snapshot read the same vhost and sidecar up to seven times.
Only the provider's own file helpers change those files, all under that
lock; certificates stay uncached because certbot changes them.
- `elevatedExecutor.exists` asks `lstat` before `sudo test -e`. SFTP's "no
such file" is authoritative; a path behind a directory the login cannot
search reports a refusal and still gets root's answer.
- Create the sites directory once per provider; the atomic writes create
missing parents anyway.
- Skip removing a route's bootstrap certificate directory when it is
absent: lstat says so and `exists` (which also looks inside a container
edge) agrees. An unknown answer still removes.
Remote operations for an unchanged redeploy of nine HTTP-01 TLS
hostnames through a non-root login, counted at the provider level
(registerRoute + provisionCert per host, excluding the platform's
certificate pre-check) with a fake executor that refuses unelevated reads
of the sites and certificate directories:
remote execs (sudo) SFTP ops reloads
main 459 (351) 414 18
+ untrimmed reads 387 (315) 396 18
+ skip unchanged 226 (226) 326 1
+ this commit 56 (56) 317 1
Refs #1536
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(edge): report a refused lstat in elevatedExecutor.exists
The new lstat shortcut turned a rejected probe into "unknown" without
observing the error, which `errors:check` (audit-error-boundaries) flags
as an unobserved rejection. Report it through observeCaughtError like
the neighbouring `exists` fallback; behaviour is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
* fix(build): keep environment values out of Dockerfiles and logs
* test(build): exercise secret transport in deployment CI
* test(build): align cloud fixture file and command identities
* fix(build): validate secrets before allocating build resources
* fix(mail): persist mail logs, fail2ban database and ignoreip across engine updates
Mail engine updates recreate the container (docker rm -f + docker run),
so anything not on a bind mount is lost: /var/log (mail.log, dovecot and
fail2ban logs), fail2ban's SQLite database, and operator ignoreip
customisations in /etc/fail2ban.
- Bind-mount /var/log and /var/lib/fail2ban from the host mail state dir.
Deliberately not /etc/fail2ban: a seed-once mount would hide later image
changes (same trap as #392's master.cf).
- Render operator ignoreip additions (OPENSHIP_MAIL_F2B_IGNOREIP, passed
through engine.env) into a jail.d override on every boot, as baked
jail.local value + operator value, so image defaults are never dropped.
- Run cron under supervisord so logrotate's daily job actually fires for
the now-persisted logs; logrotate is installed explicitly (only a
Recommends of rsyslog) and build-gated.
Fixes#1701
* Preserve existing mail state before replacement and repair supervised log rotation
---------
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
* fix(updates): report image services with an unknown deployed digest instead of up to date
When the active service_deployment row has no image_digest — a carried
service loses it when a per-service update upserts the row — the feed
compared digests only when both were known and fell back to the equal
ref strings, so the service read as up to date and `?behind=1` dropped
the project entirely.
The deployed side is now marked unknown, not current: evaluateDrift
flags image services whose row has no digest, and the feed resolves
those against the live daemon before rendering — the running
container's image ID against the image ID the configured tag resolves
to right now, the same test the deploy pipeline uses before carrying
an unchanged service. A mismatch is behind; matching images recover
the tag's RepoDigest onto the row when the registry comparison agrees;
anything the daemon cannot answer stays unknown and the project is
kept visible with an `unverified` flag instead of being dropped.
Fixes#1702
* fix(updates): narrow the live runtime to DockerRuntime before resolving unknown digests
`resolveDeploymentRuntimeForRead` returns a `RuntimeAdapter`, and
`prepareDeploymentImage` is Docker-only, so the Typecheck job failed
with TS2345 at local-image-drift.ts:79. Guard the call with the same
`instanceof DockerRuntime` check `recordDeploymentArtifacts` uses:
other runtimes leave the services unknown, and the runtime is still
disposed on every path.
---------
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
After a `docker restart` (not recreate) the openship-mail container
keeps the previous run's /run/dovecot/master.pid, and a fresh PID
namespace hands the old PID to another daemon — usually amavisd.
Dovecot then refuses to start with "Dovecot is already running",
supervisord burns its retries and marks dovecot FATAL, and nothing
listens on 993/995 until someone removes the pid file by hand.
The entrypoint already did this for Amavis (PR #885); Dovecot is the
mirror image. A new prepare-dovecot-runtime.sh removes
/var/run/dovecot/master.pid at boot, called from the entrypoint next
to the Amavis step, and a Docker e2e test proves the refusal and the
recovery against real Dovecot.
Fixes#1700
* feat(dns): add DigitalOcean DNS provider support
- Add DigitalOcean DNS management for custom domains and DNS-verified HTTPS
- Preserve record ownership with paired TXT markers and update provider setup guidance
* fix(dns): parse DigitalOcean record IDs from formatted JSON
- Handle compact and pretty-printed API responses, with a fallback when Python is unavailable
- Cover record cleanup and API error responses in DNS hook tests
* fix(dns): harden DigitalOcean DNS provider after review
- Decode TXT input before writing so quoted values compare in-sync
- Treat zones not delegated to DigitalOcean nameservers as pending
- Resolve zones with one paginated domain list and strip wildcard labels
- Carry credential id and provider on unauthorized lookups so the
reconnect modal targets the rejected credential
- Clean up ownership markers when the marked record is already gone
- Report read-only token verification accurately and surface missing
write scope on 403
- Guard token redaction and requests against an empty token
- Share DNS name helpers and the DNS-01 cleanup hook template
* fix(dns): release owned records from inactive DigitalOcean zones
- Allow DNS cleanup to resolve inactive zones while keeping writes restricted to active zones
- Fetch DigitalOcean records and ownership markers concurrently
* fix(dns): resolve provider credentials oldest first
* Require strict JSON record IDs before DNS challenge cleanup
---------
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
* fix(api): stamp PAT token id on REST audit rows and audit token reads
Two gaps in the audit log, both from the same root: a REST call made
with a personal access token left no trace of WHICH token made it, and
a successful read made with a token left no row at all — while the
same read through MCP was audited with the token id attached.
- resolveCallClientId now falls back to the credential the auth layer
already resolved: a token principal's session id IS its canonical
principal id (pat:<id> / oauth:<clientId>), minted from the
hashed-token lookup, not from anything the caller supplies. The
nonce-signed MCP claim still wins. Browser sessions never reach the
fallback (no principalKind), so a cookie session id can never land
in the column. Shared operations and the deployment create path use
the same resolver, so their rows gain the token id too. No schema
change: the column was documented for exactly this value.
- The route emitter now audits successful reads/lists by token
principals (PAT / OAuth) — a script holding a token gets the same
"what did it look at" treatment MCP already gives its reads.
Browser reads stay unaudited (too noisy), failed reads are still
not logged, and operations that already recorded the call still
skip the emitter. One exception: reads of the audit log itself are
not audited — every such read would append a row to the log, so its
total could never be stable and its facets would be dominated by
whoever reads it most.
Fixes#1703
* fix(api): clear the error-boundary gate and the tokens parity expectation
The error-boundary gate flagged the pre-auth catch in
resolveCallClientId as unobserved. It only runs when no
RequestContext exists yet, so there is no credential to derive
from: mark it with the repo's diagnostics-ignore marker.
The tokens SDK-parity audit test listed only the three MCP rows,
but token reads are now audited by design, so the two remote
token-client reads in that test add two settings:read rows.
Expect them, matching the settings/webhooks parity updates.
Fixes#1703
* fix(api): avoid duplicate MCP read audit events
* fix(api): simplify audit coverage and reject malformed nonce bytes
---------
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
* Protect support intake and add mailbox sender blocking
* Regenerate support operator route reference
* Wire contact widget key into the website runtime
* Fix repeat contact challenges and classify private support blocks
* Render mail print metadata as text and isolate print documents
* Update application dependencies for published security advisories
* Require patched Dovecot and Pigeonhole in mail images
* feat: add platform migrations and refresh the Cloud experience
* fix(ci): run MongoDB 8 imports on compatible runners
* docs(web): add Railway and Vercel migration pages
* feat(dashboard): add shared dotenv text editing and top add action
* fix(dashboard): wrap text editor actions on narrow screens
* perf: reuse Docker builders and parallelize independent Compose work
* test: exercise declared dependency gates on the isolated Docker host
* fix: preserve dependency ownership and native cache maintenance
* fix: drain dependency readiness failures through the shared task barrier
* test: align server recovery expectations with source scan recovery
* fix: retain released dependency providers during publication recovery
* Keep route verification and bound parallel deployment work safely
* Send scoped cancellation confirmations through the customer email queue
* Offer help without treating one canceled subscription as account churn
* Invite cancellation feedback and offer direct support
* Preserve native Docker dependency cache across source changes
* Keep runtime dependencies ahead of changing API source
* Split independent Docker regression suites across CI jobs
* Use fresh connections for routing configuration probes
* Show published deployments while final startup verification runs
* Complete verification translations and align test types
* feat(billing): unify plan management and referral navigation
* docs(billing): describe plan management and align summary assertions
* test(billing): align named plan and accessible summary assertions
* fix(build): scale the managed build-cache budget with the disk
The managed project-cache budget was min(5 GiB, 10% of the Docker
filesystem). A project whose BuildKit cache outgrew 5 GiB was evicted by
the post-build prune after every build, so every deploy started cold.
- buildCacheKeepBytes is now 20% of the Docker filesystem, so the budget
follows the disk in both directions: disks under 50 GiB also move from
10% to 20%. This also applies to managed Cloud workers, which share
the collector.
- Below the 20% free-space GC target the idle budget shrinks to what
still fits above it (never below the old min(5 GiB, 10%)), so idle
caches give space back before rollback artifacts and running apps.
BuildKit's own 20% minFreeSpace still bounds a running worker.
- pruneManagedBuildCaches defaults to that budget instead of 5 GiB.
- The daily sweep marks its call as automaticRetention, so managed caches
use the same budget; keepStorageBytes still bounds native Docker cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(servers): configurable build-cache budget per server
Adds an optional managed build-cache budget for remote deployment
servers, edited from a Build cache card on the server Overview tab and
through the existing server update API, CLI and MCP tool. Empty keeps the
automatic share of the Docker filesystem.
- servers.build_cache_budget_bytes (migration 0224), bounded 1 GiB to
64 TiB in the database and the API contract.
- Only remote deployment servers expose and accept it: the local row
builds through the host daemon's native cache and migration sources
never build, so updates there are refused; managed Cloud servers keep
rejecting every field except name. Changing it requires server admin,
since a large budget lets caches hold most of the disk.
- SSH Docker runtimes read the value through a new buildCacheBudgetBytes
connection option on every collection, so a change applies to the next
build without reconnecting. It sets the post-build prune budget,
BuildKit's maxUsedSpace and the daily sweep's managed budget, capped at
the filesystem minus the admission reserve and still reduced under
storage pressure; a failed read falls back to automatic.
- Updates are audited like gpuOverride and do not drop retained SSH
sessions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs: regenerate the MCP and CLI references for the build-cache budget
The server update tool description and the `server configure` help now
mention the build-cache budget, so the generated references changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(migration): frame streamed rsync progress updates
* fix(migration): preserve exact progress with rsync byte units
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
The managed project-cache budget was min(5 GiB, 10% of the Docker
filesystem). A project whose BuildKit cache outgrew 5 GiB was evicted by
the post-build prune after every build, so every deploy started cold.
- buildCacheKeepBytes is now 20% of the Docker filesystem, so the budget
follows the disk in both directions: disks under 50 GiB also move from
10% to 20%. This also applies to managed Cloud workers, which share
the collector.
- Below the 20% free-space GC target the idle budget shrinks to what
still fits above it (never below the old min(5 GiB, 10%)), so idle
caches give space back before rollback artifacts and running apps.
BuildKit's own 20% minFreeSpace still bounds a running worker.
- pruneManagedBuildCaches defaults to that budget instead of 5 GiB.
- The daily sweep marks its call as automaticRetention, so managed caches
use the same budget; keepStorageBytes still bounds native Docker cache.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(updates): make manual security advisories actionable
* fix(updates): classify conditional advisories as unverified reviews
* fix(updates): retain service state in grouped advisory reviews