Files

124 lines
2.6 KiB
TypeScript

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;
}
export type ExtensionScope = "global" | "project" | "builtin";
export type ExtensionStatus = "enabled" | "disabled" | "blocked";
export interface ExtensionInfo {
name: string;
path: string;
relativePath: string;
source: string;
scope: ExtensionScope;
status: ExtensionStatus;
}
export interface ExtensionsResponse {
extensions: ExtensionInfo[];
diagnostics: PluginDiagnostic[];
projectResourcesLoaded: boolean;
}