Merge main

This commit is contained in:
Bohdan Triapitsyn
2026-08-28 01:25:37 +03:00
728 changed files with 42191 additions and 15617 deletions
+40 -22
View File
@@ -80,8 +80,19 @@ export interface ForceKillOptions {
cwd?: string;
}
export interface TerminalServerSession {
sessionId: string;
cwd: string;
status: 'running' | 'exited';
createdAt: number | null;
}
export interface TerminalAPI {
listShells?(): Promise<TerminalShellOption[]>;
/** Server-side sessions for a working directory; absent on runtimes without a server terminal list. */
listSessions?(cwd: string): Promise<TerminalServerSession[]>;
/** Marks the sessions as active so the server's idle sweep does not reap terminals an open client still shows. */
touchSessions?(sessionIds: string[]): Promise<void>;
createSession(options: CreateTerminalOptions): Promise<TerminalSession>;
connect(sessionId: string, handlers: TerminalHandlers): Subscription;
sendInput(sessionId: string, input: string): Promise<void>;
@@ -157,6 +168,22 @@ export interface GetGitRangeDiffOptions {
contextLines?: number;
}
export interface GetGitRangeFilesOptions {
base: string;
head: string;
}
/** One changed file in a `base...head` range, with its change letter (A/M/D/R/C). */
export interface GitRangeFileEntry {
path: string;
status: string;
}
export interface GitBranchBaseResponse {
/** Null when git has no authoritative record of where the branch started. */
base: string | null;
}
export interface GitFileDiffResponse {
original: string;
modified: string;
@@ -466,6 +493,8 @@ export interface GitAPI {
getGitDiff(directory: string, options: GetGitDiffOptions): Promise<GitDiffResponse>;
getGitFileDiff(directory: string, options: GetGitFileDiffOptions): Promise<GitFileDiffResponse>;
getGitRangeDiff?(directory: string, options: GetGitRangeDiffOptions): Promise<GitDiffResponse>;
getGitRangeFiles?(directory: string, options: GetGitRangeFilesOptions): Promise<GitRangeFileEntry[]>;
getBranchBase?(directory: string, branch: string): Promise<GitBranchBaseResponse>;
revertGitFile(directory: string, filePath: string, options?: { scope?: 'all' | 'working' }): Promise<void>;
stageGitFile(directory: string, filePath: string): Promise<void>;
stageGitFiles?(directory: string, filePaths: string[]): Promise<void>;
@@ -627,6 +656,8 @@ export interface ProjectEntry {
iconBackground?: string | null;
color?: string | null;
defaultModel?: string;
/** Variant of `defaultModel`, when that model exposes any. */
defaultVariant?: string;
addedAt?: number;
lastOpenedAt?: number;
sidebarCollapsed?: boolean;
@@ -643,6 +674,10 @@ export interface SettingsPayload {
opencodeBinary?: string;
projects?: ProjectEntry[];
activeProjectId?: string;
sidebarProjectDisplayMode?: 'all' | 'single';
sidebarSessionGroupingMode?: 'by-worktree' | 'flat';
sidebarProjectSortOrder?: 'manual' | 'a-z' | 'z-a' | 'date-added' | 'recent';
sidebarShowRecentSection?: boolean;
securityScopedBookmarks?: string[];
pinnedDirectories?: string[];
showReasoningTraces?: boolean;
@@ -1249,7 +1284,7 @@ export type RuntimeAPISelector<TValue> = (apis: RuntimeAPIs) => TValue;
type SkillsCatalogSourceId = string;
type SkillsCatalogSourceType = 'github' | 'clawdhub';
type SkillsCatalogSourceType = 'github';
export interface SkillsCatalogSource {
id: SkillsCatalogSourceId;
@@ -1258,6 +1293,10 @@ export interface SkillsCatalogSource {
source: string;
defaultSubpath?: string;
sourceType?: SkillsCatalogSourceType;
/** GitHub repository star count (null when unavailable) */
stars?: number | null;
/** GitHub repository last-push timestamp, ISO (null when unavailable) */
repoUpdatedAt?: string | null;
}
interface SkillsCatalogItemInstalledBadge {
@@ -1266,18 +1305,6 @@ interface SkillsCatalogItemInstalledBadge {
source?: 'opencode' | 'agents' | 'claude';
}
interface ClawdHubSkillMetadata {
slug: string;
version: string;
displayName?: string;
owner?: string;
downloads?: number;
stars?: number;
versionsCount?: number;
createdAt?: number;
updatedAt?: number;
}
export interface SkillsCatalogItem {
sourceId: SkillsCatalogSourceId;
repoSource: string;
@@ -1290,22 +1317,18 @@ export interface SkillsCatalogItem {
installable: boolean;
warnings?: string[];
installed?: SkillsCatalogItemInstalledBadge;
/** ClawdHub-specific metadata (present only for ClawdHub sources) */
clawdhub?: ClawdHubSkillMetadata;
}
export interface SkillsCatalogResponse {
ok: boolean;
sources?: SkillsCatalogSource[];
itemsBySource?: Record<SkillsCatalogSourceId, SkillsCatalogItem[]>;
pageInfoBySource?: Record<SkillsCatalogSourceId, { nextCursor?: string | null }>;
error?: { kind: string; message: string };
}
export interface SkillsCatalogSourceResponse {
ok: boolean;
items?: SkillsCatalogItem[];
nextCursor?: string | null;
error?: { kind: string; message: string };
}
@@ -1330,11 +1353,6 @@ export interface SkillsRepoScanResponse {
interface SkillsInstallSelection {
skillDir: string;
/** ClawdHub-specific metadata for installation */
clawdhub?: {
slug: string;
version: string;
};
}
export interface SkillsInstallRequest {