Marketplace: data model, settings and project fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 08:40:58 -07:00
co-authored by Claude Opus 5.5
parent 723555bf1d
commit d419d0a6b4
13 changed files with 536 additions and 5 deletions
+77
View File
@@ -66,6 +66,8 @@ export interface Project {
claude_instructions: string | null;
claude_code_settings: ClaudeCodeSettings | null;
renamed_session_names: Record<string, string>;
marketplace_installs: MarketplaceInstall[];
marketplace_disabled: MarketplaceItemRef[];
created_at: string;
updated_at: string;
}
@@ -296,6 +298,81 @@ export interface AppSettings {
* canvas renderer it would otherwise fall back to. See
* `resolveTerminalGpuRendering` in `lib/terminalRenderer.ts`. */
terminal_gpu_rendering: boolean | null;
marketplace_accounts: MarketplaceAccount[];
marketplaces: Marketplace[];
global_marketplace_installs: MarketplaceInstall[];
}
// ── Marketplace (mirrors src-tauri/src/models/marketplace.rs) ───────────────
export type ItemKind = "agent" | "skill" | "command" | "hook" | "plugin";
export type AccountMethod = "gh_host" | "gh_container" | "token";
export interface MarketplaceAccount {
id: string;
label: string;
host: string;
method: AccountMethod;
username: string | null;
}
export interface Marketplace {
id: string;
name: string;
url: string;
branch: string | null;
account_id: string | null;
}
export interface MarketplaceItemRef {
marketplace_id: string;
kind: ItemKind;
key: string;
}
export interface MarketplaceInstall extends MarketplaceItemRef {
commit: string;
}
export interface CatalogItem {
kind: ItemKind;
key: string;
name: string;
description: string;
path: string;
invalid: string | null;
hook_commands: string[];
preview: string;
}
export interface MarketplaceSnapshot {
marketplace_id: string;
head_commit: string | null;
fetched_at: string | null;
fetch_error: string | null;
items: CatalogItem[];
}
export interface ItemUpdate {
item: MarketplaceItemRef;
pinned: string;
head: string;
}
export type FileChange = "added" | "removed" | "modified";
export interface FileDiff {
path: string;
change: FileChange;
unified: string | null;
}
export interface SkippedItem {
item: string;
reason: string;
}
export interface SyncReport {
installed: string[];
updated: string[];
removed: string[];
skipped: SkippedItem[];
errors: string[];
finished_at: string;
}
export type InstallScope = { type: "global" } | { type: "project"; project_id: string };
export interface ProjectSyncResult {
project_id: string;
report: SyncReport;
}
/** What `preview_settings_import` returns before anything is applied —