Commit Graph
183 Commits
Author SHA1 Message Date
Juan DenisandClaude Opus 4.8 50587fe06b test(ssh-import): redirect APPS_DIR to tmp so create_app step passes on CI
test_copy_files_uses_staged_docroot drove _step_create_app, which provisions
the app root under paths.APPS_DIR (defaults to /var/serverkit/apps). That path
is writable on a local dev box but denied on the CI runner, so the test failed
only in CI with PermissionError. Monkeypatch app.paths.APPS_DIR to the tmp
import base, matching the apps_dir pattern already used in test_site_import.py.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 23:58:45 -04:00
Juan DenisandClaude Opus 4.8 dcde6ab64a fix(extensions): gate GPU auto-install on a present GPU; purge em dashes from manifests
Move serverkit-gpu from CONVERTED_BUILTIN_SLUGS into GATED_BUILTIN_SLUGS behind
a _gpu_present() predicate (shutil.which('nvidia-smi')), mirroring the email
gate: fresh installs stay marketplace-only, upgraded panels without a GPU no
longer get it, upgraded panels with a GPU keep it (D3 continuity). Rewrite the
12 builtin + baked extension descriptions that used em dashes into plain
sentences, keeping every pair in sync. New test_extension_manifests.py walks
both manifest trees to assert no em/en dashes and per-slug description parity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 23:12:48 -04:00
Juan DenisandClaude Opus 4.8 634f21340d feat(jobs): host-idiom Jobs page + server-side search/paging + job retention
Frontend: rebuild /jobs to the Servers/Domains table-with-search idiom —
SegControl status filter, kind Select, debounced search, DataTable rows,
clickable compact KPIs, Prev/Next paging with 'Showing X-Y of N'. Rewrite
_jobs.scss for the sk-jobs namespace (dead .jobs-* selectors removed).

Backend: GET /api/v1/jobs gains a case-insensitive `q` (kind/owner) filter
and a `total` count; JobService.prune_terminal + a builtin.job_retention
ScheduledJob prune scheduler-tick jobs (succeeded/cancelled > jobs.retention_days
default 14, failed > 3x) so the '107k Total' stops growing at the source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 23:01:12 -04:00
Juan DenisandClaude Opus 4.8 befd67e266 fix(recovery): restore lost cron-completion service methods (plan 34)
Surviving cron tests failed on methods dropped from surviving service files.

- cron_service: restore get_job, set_tracking, _crontab_command (serverkit-cron
  -run shim wrapper), clear_application, jobs_for_application (read-time last-run
  join), preview_schedule, application_id on add/update_job, run-now history
- remote_cron_service: restore update_job + CRON_UPDATE capability gate
  (recovered constant-for-constant from readable bytecode)
- conftest: restore the lost scoping_rbac fixture (owner/admin/member/viewer/
  foreign personas) used by the cron + authz RBAC suites

test_cron_runs 18, test_remote_cron_update 3, test_cron_rbac 10 — green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 02:05:39 -04:00
Juan DenisandClaude Opus 4.8 98d05eecdf fix(recovery): gpu core-slim move + cross-service doctor/schedule wiring
Cluster G of plan 38 (plan 32) + integration glue.

- gpu: complete the core-slim move — remove core app.api.gpu +
  app.services.gpu_service (+ its blueprint registration), rebuild the probe in
  the serverkit-gpu builtin extension (nvidia-smi parser, Linux-guarded)
- __init__: register dns_cutover + setup_health blueprints
- doctor_service: add fleet DNS-vs-IP checks, backup-proof checks
  (backup_drill_stale/backup_unverified), and the setup-health section into run()
- builtin_handlers: seed the host-doctor sweep + weekly setup-health nag
- test_jobs: schedule count 15 -> 17 for the two restored schedules

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 01:41:54 -04:00
Juan DenisandClaude Opus 4.8 b29fa77313 fix(recovery): rebuild authz-R2 policy + notification digests/chat webhooks
Clusters E+H of plan 38 (plans 24/29/33).

- security_policy_service: require-2FA policy (ok/nudge/enforce), SSO-exempt,
  grace window (plan 29); restored can_operate_app/can_admin_app on
  resource_grant_service for the member-action callers — 23 tests green
- notifications/digest: per-user daily/weekly digest rollups over queued_digest
  deliveries, respecting cadence + last_sent_at (plans 24/33)
- notifications/service: deep-link action_path/action_label on send + inbox
  category/severity filters (plan 24 Phase 5); catalog link builder
- chat_webhook_service: org chat/webhook connections, HMAC-signed delivery,
  category fan-out through the notify bus (plan 33)
- restored digest_cadence/digest_last_sent_at on NotificationPreferences

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 01:41:43 -04:00
Juan DenisandClaude Opus 4.8 a131cf5e0f fix(recovery): rebuild DNS cutover service+API and SSH site importer
Cluster C of plan 38 (plan 31). dns_cutover_service reconstructed from readable
string fragments + plan doc + the frontend contract; SSH importer from the
surviving wiring tests.

- dns_cutover_service: server-sourced snapshots, dry-run + real cutover via the
  guarded provider client, world-restoring revert that deletes cutover-created
  records (uses restored DnsCutoverSnapshot) — 20 tests green
- api/dns_cutover: 7 JWT/admin-gated endpoints matching dnsCutover.js
- site_importers/ssh: GenericSshImporter + parse_ssh_source, keyfile-only,
  credential-scrubbing; wired into site_import_service ('ssh' source) — 33 tests

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 01:41:22 -04:00
Juan DenisandClaude Opus 4.8 7b8e604fab fix(recovery): rebuild agent-fleet survey + fleet doctor/repair services
Cluster A of plan 38 (plans 27/28). survey_service reconstructed from the
surviving test + api/survey.py caller (bytecode corrupt); fleet_repair_service
recovered faithfully from readable bytecode; fleet_doctor_service reconstructed
from the fleet contract + FleetDoctorResult model (bytecode corrupt).

- survey_service: probe catalog, run_survey/normalize_map/diff_maps over the
  agent registry, ServerSurvey snapshots (6 tests green)
- fleet_doctor_service: allowlisted fleet health sweep writing one
  FleetDoctorResult per (server_id, check_key) + DNS-vs-IP checks
- fleet_repair_service: executes the doctor's allowlisted repair actions
  (audited, capability-gated) — 20 proving tests green

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 01:41:13 -04:00
Juan Denis 6e32519f7e restore: remaining reconstructed July 5-7 changes (clean recovered files not attributable to one plan) 2026-07-07 20:29:31 -04:00
Juan Denis 38c281d274 feat(cron): completion — run history, project scope, cwd/run-as (plan 34) 2026-07-07 20:29:29 -04:00
Juan Denis 45942339eb feat(notifications): polish — digests, prefs, deep-links (plans 24/33) 2026-07-07 20:29:29 -04:00
Juan Denis c96a476a74 feat(extensions): runtime-frontend hardening + GPU core-slim (plan 32) 2026-07-07 20:29:28 -04:00
Juan Denis a882d35db9 feat(adoption): DNS cutover+verify, snapshots, SSH import (plan 31) 2026-07-07 20:29:26 -04:00
Juan Denis 7d045f32af feat(backup): trust round 2 — restore drills, offsite/verify (plan 30) 2026-07-07 20:29:25 -04:00
Juan Denis 6b6237bc17 feat(security): authz hardening round 2 (plan 29) 2026-07-07 20:29:24 -04:00
Juan Denis 44892d3314 feat(agent): V2 capability pack — survey/doctor/fleet sweep+repair (plan 28) 2026-07-07 20:29:24 -04:00
Juan Denis 2eabfac2b8 feat(onboarding): setup health, preflight + reconcile (plan 22) 2026-07-07 20:29:23 -04:00
Juan DenisandClaude Opus 4.8 e1f9d5bb7a feat(manifest): fleet targeting, manifest-powered previews, CLI verbs (Phase 5 backend)
Route manifest-created apps to a fleet server via top-level/per-service server:
(sets Application.server_id; unknown server = plan issue). Clone the
manifest-resolved config (env + per-preview overrides + domain) into non-WP PR
previews via ManifestPreviewService. Add 'serverkit manifest plan|apply|diff'
CLI verbs against the manifests API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 01:46:34 -04:00
Juan DenisandClaude Opus 4.8 8d61abbf2c feat(manifest): push re-sync, drift check family, events (Phase 4)
Both webhook receivers now re-read serverkit.yaml after a deploy: unchanged hash
is a no-op, a changed manifest auto-applies its autoDeploy services and flips the
rest to pending with an admin notification. Register a 'manifest' drift check
that projects live state onto the declared surface (in_sync iff declared items
match; repair re-applies). Emit manifest.applied/pending/drifted/error events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 01:39:53 -04:00
Juan DenisandClaude Opus 4.8 f823c6c74f feat(manifest): fromSecret/fromService/generate reference binders (Phase 3)
Add EnvironmentVariable.value_from (migration 055) so an env var can resolve from
a vault secret or a sibling service's connection property at injection time — the
value never lands in the row, masking stays intact, and a rotated secret
propagates on next deploy. EnvReferenceResolver handles both; the apply engine
plans set_env_ref steps, flags missing secrets as plan-time issues, and generates
a random vault secret for generate:true (idempotently).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 01:34:54 -04:00
Juan DenisandClaude Opus 4.8 315c80e9a0 feat(manifest): apply engine — resolve/plan/apply + core domain attach (Phase 2)
Add manifest_apply_service (resolve -> ordered plan -> idempotent apply inside a
manifest.apply DeploymentJob with before/after snapshots), covering app create/
update, env, volumes, managed databases, backup policies and domain attach.
Extract the WordPress one-call domain+SSL pattern into a core DomainAttachService
(DNS -> vhost -> best-effort cert, each stage degrading to a warning). Wire the
/api/v1/manifests blueprint with get/plan/apply (admin-gated, audit-logged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 01:28:16 -04:00
Juan DenisandClaude Opus 4.8 ae0f823e90 feat(manifest): persist manifest + seed env + health-check gate (Phase 1)
Stop dropping what import already detects. Add Application.healthcheck_path
(migration 054) and an application_manifests table (one row per project) storing
the normalized manifest, hash and provenance. Import now seeds non-secret env
values and records the health-check path, and the zero-downtime restart gate
polls that path instead of a blind sleep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 01:16:29 -04:00
Juan DenisandClaude Opus 4.8 8c5ede0cfd feat(manifest): v1 serverkit.yaml spec, normalizer, scaffold (Phase 0)
Add the declarative serverkit.yaml v1 spec: JSON Schema + reference doc, a pure
parse/validate/normalize service, version:1 recognition in the repo manifest
detector (legacy flat files unchanged), and a scaffold endpoint that renders a
manifest from a live app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 01:11:50 -04:00
Juan DenisandClaude Opus 4.8 427492cb4b fix(mail): pin Stalwart engine against live 0.16.11 (WSL+Docker)
Ran the real container and drove its API; corrected what only a live box
reveals:

- image is stalwartlabs/stalwart:latest — the assumed stalwartlabs/mail-server
  no longer resolves on Docker Hub (404 on pull)
- config lives at /etc/stalwart/config.json and data at /opt/stalwart, so
  install() now bind-mounts two host dirs instead of one /opt/stalwart-mail
- admin credential is pinned via a single STALWART_RECOVERY_ADMIN=user:secret
  env var (not FALLBACK_ADMIN_USER/SECRET)
- a fresh container boots into BOOTSTRAP mode: only the /account setup UI is up
  and every /api/* returns 404 (RFC-7807 problem+json) until the one-time setup
  completes. get_status now probes /api/session and reports needs_setup +
  setup_url; the Overview UI shows a "finish setup" banner. Verified live:
  GET /api/session -> 404 problem+json.
- _api parses the problem+json detail/title error shape

Tests updated to the real install argv + two new cases (bootstrap needs_setup,
problem+json parsing): 58 pass. Post-setup CRUD sub-paths (/api/principal etc.)
remain best-effort constants until confirmed against a fully-initialized
instance on a real box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 00:48:01 -04:00
Juan DenisandClaude Opus 4.8 d99d4db6a9 test(mail): proving suite for serverkit-mail + changelog
56 hermetic tests (docker/HTTP/socket/DNS-provider all stubbed; pass on
Windows). Cover: manifest validity + lifecycle-key/jobs wiring (guards the
loader-key bug), models + no mailbox-password column, Stalwart install argv
(admin API loopback-only, mail ports, generated+persisted admin secret) and
Windows gating, preflight pass/block + persistence, the sending-activation
gate (refused without a passing preflight, force override audited), DKIM
keygen + exact SPF/DKIM/DMARC/MX/A record push with source='mail', fail2ban
jail, and blueprint auth/validation/503 paths.

CHANGELOG: document the Mail Server extension under Unreleased.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 00:27:41 -04:00
Juan DenisandClaude Fable 5 75a839f556 fix(dns): move DNS provider routes back to core
The /api/v1/email/dns-providers routes lived only in the serverkit-email
extension, so panels without it (email is gated to mail users) got a
404/405 from the Settings -> Connections DNS tiles. The service was
already core; the routes now are too, at the same historical paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 23:18:08 -04:00
Juan DenisandClaude Fable 5 5e22aa8510 feat(panel): wire drift/doctor, CLI tools, security suite and hosting polish
Blueprint/model/job registrations and schedule seeding for drift,
doctor, support bundle, bandwidth, FIM, malware-scan and htaccess
tools; API module aggregation, SCSS imports and CHANGELOG for the
batch. Full backend suite: 1793 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:22:07 -04:00
Juan DenisandClaude Fable 5 e3b69da3c4 feat(extensions): authoritative DNS server extension
serverkit-dns-server runs PowerDNS (SQLite) in a managed container:
zones, records, DNSSEC with DS records for the registrar, and a
delegation check. Complements the provider integrations; for homelab
and air-gapped boxes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:22:07 -04:00
Juan DenisandClaude Fable 5 8ff893a4c8 feat(hosting): .htaccess to nginx converter
Paste-in translator for common rewrite/redirect/auth/access rules with
per-line unsupported flags, launched from the Import wizard (no core
custom-rules editor exists yet — output is copy/insert).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:22:05 -04:00
Juan DenisandClaude Fable 5 96d162e9a4 feat(hosting): per-site nginx micro-cache toggle
Opt-in 10s FastCGI/proxy micro-cache per site (migration 053) with safe
bypasses for logged-in/admin/cart cookies and paths, X-SK-Cache header
for verification, and a shared-zone purge. Flows through the drift-safe
vhost render seam so detection and writes always agree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:50 -04:00
Juan DenisandClaude Fable 5 3cbbcb5e6b feat(hosting): per-domain bandwidth accounting
Daily nginx access-log aggregation (migration 052) into per-site
transfer stats with 30-day sparklines on the Services list and a
monthly figure on the service Overview. Streaming parser handles
combined and vhost-prefixed formats plus rotation spillover.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:48 -04:00
Juan DenisandClaude Fable 5 ce6d0b11fb feat(extensions): CrowdSec integration extension
serverkit-crowdsec surfaces decisions/alerts, ban/unban and allowlists
via cscli with feature detection and graceful degradation when CrowdSec
is absent. Installs from Marketplace Browse; no core changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:36 -04:00
Juan DenisandClaude Fable 5 202b310c94 feat(security): scoped file-integrity monitoring
Baseline-and-diff over managed paths (nginx config, serverkit systemd
units, opt-in app docroots) on a six-hourly sweep, feeding the
Notifications Bus; Integrity tab gains baseline/check/accept controls
and a what-changed view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:34 -04:00
Juan DenisandClaude Fable 5 c192e4f383 feat(security): job-backed malware scans with a web-shell YARA pass
Malware scans run as jobs and can target an app's docroot; a curated
web-shell rule set (yara CLI when present, pure-Python fallback) runs
alongside ClamAV with custom .yar upload; quarantine gains restore via
original-path metadata. Note: api/security.py also carries the FIM
routes of the next commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:23 -04:00
Juan DenisandClaude Fable 5 c3f356b6fb feat(cli): API-backed operator verbs and diagnostic support bundle
serverkit status / services / apps / doctor [--repair] / repair /
update / login-url / support-bundle. Break-glass auth mints a 10-minute
admin JWT in-process (audit-logged) — root on the box already implies
full control. The support bundle exports a secret-scrubbed zip of
versions, service states, setting shapes and recent job failures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:22 -04:00
Juan DenisandClaude Fable 5 f296e1dd61 feat(ops): config drift detection, per-resource repair and doctor sweep
Daily read-only drift sweep re-renders expected nginx vhosts and compose
overrides from panel state (via extracted pure render seams) and diffs
against disk; drift notifies admins. Doctor tab on Monitoring runs the
full diagnosis (drift, services, certs, disk, DB) with diff-confirmed
per-item and batch repair. Nothing auto-repairs. The nginx render seam
also carries the micro-cache blocks used by the next commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:21:09 -04:00
Juan DenisandClaude Fable 5 91e6f5cb29 feat(panel): wire imports, database tools and quick wins into the app
Blueprint/model/job registrations for the migration pipeline, speed
test, metadata guard, login-link + SSO reapers (seeded with the
builtin schedules), demo-mode middleware, /imports route, API module
aggregation and SCSS imports; CHANGELOG for the batch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:25:04 -04:00
Juan DenisandClaude Fable 5 64658cf91d feat(wordpress): pull-import a live site over SSH
Probe with host-key pinning, tar-stream the docroot, dump the DB
through the tunnel and rebuild via the existing import/URL-swap path;
3-step UI at /wordpress/ssh-import. Password auth needs sshpass;
secrets never hit argv or logs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:24:31 -04:00
Juan DenisandClaude Fable 5 d01d82036b feat(imports): panel-migration pipeline with cPanel, DirectAdmin and Hestia importers
Format-pluggable analyse->plan->run pipeline (migration 051) that maps
legacy panel backups to ServerKit apps, managed DBs (preserving MySQL
password hashes where portable) and cron entries, as resumable jobs
with per-step logs, SSRF/tar-traversal guards, and a 5-step Import a
Site wizard at /imports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:24:29 -04:00
Juan DenisandClaude Fable 5 76a688fb49 feat(databases): managed DB users and one-click Adminer SSO
managed_database_users rows (migration 050) track users/grants so they
survive restarts; SSO launches an on-demand Adminer container
pre-authenticated with a single-use, 5-minute shadow credential scoped
to one database, reaped on schedule. Also mounts the config tuner in
the explorer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:24:15 -04:00
Juan DenisandClaude Fable 5 1fb7b81c32 feat(databases): curated engine config tuner
Vetted MySQL/PostgreSQL settings with RAM-aware suggestions, applied
via a ServerKit-owned drop-in (MySQL) or ALTER SYSTEM (PostgreSQL) with
timestamped backups, verified restart and clean rollback. Never
auto-applies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:24:03 -04:00
Juan DenisandClaude Fable 5 0a82873c83 feat(databases): live processlist with kill in the explorer
SHOW FULL PROCESSLIST / pg_stat_activity normalized per server or
container, with admin-only kill/terminate and 5s auto-refresh tabs in
the Database Explorer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:24:02 -04:00
Juan DenisandClaude Fable 5 bd7624130c feat(auth): one-time login links and demo mode
Single-use, short-TTL, optionally IP-bound login URLs (hash-at-rest,
migration 049, hourly reap job) minted from Settings > Users; plus a
config-gated demo mode that 403s mutating API calls and seeds read-only
credentials on the login page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:23:50 -04:00
Juan DenisandClaude Fable 5 9edeb68f85 feat(apps): first-class per-app CPU/memory limits
cpu_limit/memory_limit on Application (migration 048), emitted into the
generated compose and the ServerKit override for live re-apply, with a
Resource Limits panel (usage vs limit) in Service Settings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:23:39 -04:00
Juan DenisandClaude Fable 5 e7e2de486f feat(monitoring): on-demand server speed test card
Job-backed speed test (Ookla/speedtest-cli when present, pure-Python
fallback) with download/upload/latency surfaced on the Monitoring
overview; last result persisted in settings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:23:29 -04:00
Juan DenisandClaude Fable 5 4c76d43cb7 feat(security): cloud-metadata egress guard for app containers
Default-on (opt-out) DOCKER-USER drop rule for 169.254.169.254 with an
nftables fallback, toggleable from Security > Firewall. Kills the
SSRF-to-cloud-IAM credential-theft class on cloud VPSes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 14:23:11 -04:00
Juan DenisandClaude Fable 5 53220e5782 fix(plugins): stamp source_type='registry' on registry installs
install_from_url/install_from_path gain a source_type override (default
unchanged: 'url'/'local'). install_registry_extension stamps 'registry';
update_plugin preserves builtin/local/upload rows and stamps 'registry'
for url/registry rows; builtin copy-installs and repairs now stamp
'builtin' instead of 'local'; boot repair re-downloads registry rows too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 04:12:58 -04:00
Juan DenisandClaude Fable 5 af777a87b3 feat(marketplace): default the registry to the public serverkit-extensions index
SERVERKIT_REGISTRY_URL unset now resolves to the curated raw index at
jhd3197/serverkit-extensions (the go-live step for the registry infra);
set-but-empty explicitly disables remote fetching (air-gapped panels,
and how the test suite stays offline — pinned in conftest). URL is
resolved per fetch so env changes apply without a restart. Cache ->
bundled fallback chain unchanged; the Marketplace never blanks.

3 proving tests (default, empty-disables, override); registry/plugin
selection 76 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 03:57:23 -04:00
Juan DenisandClaude Fable 5 e93faac226 feat(servers): store the agent's self-reported footprint dirs
The agent (serverkit-agent bbaf4e2) now sends install_dir and
config_dir in system_info. Panel side:

- servers.agent_install_dir + agent_config_dir columns (migration 047,
  idempotent guard like its siblings) with the same coalesce contract
  as the other system_info fields — a transient payload gap never
  wipes a stored value
- exposed in Server.to_dict and /servers/available; TargetPicker
  passes them on the agent target
- the File Manager rail prefers the reported config dir over the
  installer convention (backslash-normalized for Windows agents;
  agent-logs link derives <config_dir>/logs)
- proving test: full system_info -> DB -> available round trip +
  coalesce survival

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 22:36:34 -04:00
Juan DenisandClaude Fable 5 9dfed262d6 feat(files): per-target quick-access rail for remote agents
Browsing a remote agent no longer shows the panel host's shortcuts:

- /servers/available now returns each server's os_type
  (linux/windows/darwin, null for pre-sysinfo agents) and TargetPicker
  passes it through on the agent target
- the File Manager rail switches per target: Linux agents link the
  agent's own footprint (/etc/serverkit-agent, fixed by the served
  installer) plus the generic Unix paths; Windows agents get
  ProgramData/ServerKit/Agent, its logs, and C:/Users instead of Unix
  paths that don't exist; darwin gets /Users + /var/log; unknown
  os_type falls back to the Linux set (the historical behavior)
- local target unchanged: panel set with the resolved install dir
- 2 proving tests for the os_type contract (present + null for legacy)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 22:26:46 -04:00