Rebuild installed modules for the new core during an update

The core changes almost daily and a plugin loads only into the core it was
built for. update::apply now brings every enabled plugin to the new core
before the trial start: a build already in the store is reused, otherwise it
is rebuilt from the sources recorded at its last build (build recipe). A
plugin that cannot be rebuilt is switched off with the reason (and plugins
that depend on it); the core update always goes ahead. A rollback puts the
builds for the restored core back. The update result lists rebuilt and
switched-off modules.

Also: plugin.json records the real compiler instead of a fixed string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Opus 5.5 committed 2026-11-05 15:36:16 +05:00
1 parent 76be1d3238
commit da94fb49a4
16 files changed
+424 -33

No files matched your search

+7 -1
View File
@@ -6,6 +6,12 @@ const queuedUpdateCheck = updateCheckQueue<UpdatePreview>();
export const REMOTE_CLIENT_ID = "@remote-client";
export interface RemoteConnection { host: string; client_path: string | null }
/** What an update did to an installed plugin on the new core (coa-core rebuild::ModuleRebuild). */
export type ModuleRebuild =
| { result: "upToDate" | "reused"; id: string }
| { result: "rebuilt"; id: string; seconds: number }
| { result: "disabled"; id: string; reason: string; also: string[] };
export type Classification = "healthy" | "partial" | "unknown-custom" | "incompatible";
export type ItemStatus = "found" | "missing" | "attention";
@@ -798,7 +804,7 @@ export const api = {
),
pendingUpdate: (id: string) => invoke<UpdateTxn | null>("pending_update", { id }),
applyUpdate: (id: string, resolutions: Record<string, "keep" | "replace">, source?: string) =>
invoke<{ txn: UpdateTxn; preexisting_character_count?: number }>("apply_update", { id, source: source ?? null, resolutions }),
invoke<{ txn: UpdateTxn; preexisting_character_count?: number; modules?: ModuleRebuild[] }>("apply_update", { id, source: source ?? null, resolutions }),
rollbackUpdate: (id: string, txn: string) => invoke<UpdateTxn>("rollback_update", { id, txn }),
retryUpdateValidation: (id: string, txn: string) => invoke<UpdateTxn>("retry_update_validation", { id, txn }),
population: (id: string) => invoke<Population | null>("get_population", { id }),