14 new tests: version bump, rejection cases (same/older/core/type/id
mismatch), schema add column/table with data preservation, settings
merge, export with valid zip, default allowlist, wildcard allowlist.
Existing bundled tests updated for curated default behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Routes: POST /packages/:id/update, GET /packages/:id/export
SDK: update (file upload), exportPkg (URL for window.open)
Admin UI: Update button on non-core package cards with confirm dialog
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
UpdatePackage (POST /packages/:id/update) validates semver bump, applies
additive schema migration, merges settings (new keys with defaults,
existing preserved), replaces assets, and re-syncs permissions/triggers.
ExportPackage (GET /packages/:id/export) streams the installed package
as a .pkg ZIP archive containing manifest.json and all assets. Completes
the manual rollback story: export before update, re-install old .pkg if
needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ListExtColumns introspects existing columns via PRAGMA (SQLite) or
information_schema (Postgres). MigrateExtTables diffs manifest db_tables
against existing schema: creates new tables, adds new columns via ALTER
TABLE, applies indexes idempotently. No destructive changes — columns
present in DB but absent from manifest are preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ParseSemver handles major.minor.patch with optional prerelease suffix.
Compare follows semver spec: prerelease < release at same version.
13 test cases covering parse, compare, and string formatting.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously all 23 bundled .pkg archives auto-installed on first boot.
Now only the curated default set installs: notes, chat-core, workflow-chat,
dashboard, and 4 demo workflows. Other packages still ship in the image
and can be enabled via BUNDLED_PACKAGES env var (or "*" for all).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>