feat: integrate Pi backend and Pi Web

This commit is contained in:
luckyyzh
2026-07-30 19:37:53 +08:00
commit 7392ab9dd7
1390 changed files with 337197 additions and 0 deletions
+105
View File
@@ -0,0 +1,105 @@
import type { ResourceDiagnostic } from "@earendil-works/pi-coding-agent";
export interface SkillSearchResult {
package: string;
installs: string;
url: string;
}
export type SkillInstallScope = "global" | "project";
export interface SkillInstallInfo {
package: string;
scope: SkillInstallScope;
source: string;
sourceType?: string;
skillsShUrl?: string;
skillPath?: string;
ref?: string;
versionHash?: string;
canCheckForUpdates: boolean;
}
export type SkillUpdateState =
| "up-to-date"
| "update-available"
| "unsupported"
| "error";
export interface SkillUpdateResult {
package: string;
scope: SkillInstallScope;
state: SkillUpdateState;
currentVersion?: string;
latestVersion?: string;
message?: string;
}
export interface SkillInfo {
name: string;
description: string;
filePath: string;
baseDir: string;
disableModelInvocation: boolean;
sourceInfo: {
source?: string;
scope?: string;
};
install?: SkillInstallInfo;
}
export interface SkillsResponse {
skills: SkillInfo[];
diagnostics: ResourceDiagnostic[];
projectResourcesLoaded: boolean;
}
export interface ProjectTrustStatus {
requiresTrust: boolean;
trusted: boolean;
}
export type PluginScope = "global" | "project";
export type PluginResourceKind = "extension" | "skill" | "prompt" | "theme";
export interface PluginResourceCounts {
extensions: number;
skills: number;
prompts: number;
themes: number;
}
export interface PluginDiagnostic {
type: "warning" | "error";
message: string;
source?: string;
path?: string;
}
export interface PluginResourceInfo {
kind: PluginResourceKind;
name: string;
path: string;
relativePath: string;
}
export interface PluginPackageInfo {
source: string;
scope: PluginScope;
filtered: boolean;
disabled: boolean;
installedPath?: string;
packageName?: string;
version?: string;
configuredVersion?: string;
counts: PluginResourceCounts;
resources: PluginResourceInfo[];
status: "loaded" | "installed" | "missing" | "disabled";
}
export interface PluginsResponse {
packages: PluginPackageInfo[];
totals: PluginResourceCounts;
diagnostics: PluginDiagnostic[];
projectResourcesLoaded: boolean;
}