feat(experts): add built-in expert skills with per-agent activation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ import type {
|
||||
AgentSkillItem,
|
||||
AgentSkillsListResult,
|
||||
AgentSkillContent,
|
||||
ExpertListItem,
|
||||
ExpertInstallStatus,
|
||||
FolderHistoryEntry,
|
||||
FolderDetail,
|
||||
DbConversationSummary,
|
||||
@@ -332,6 +334,46 @@ export async function acpDeleteAgentSkill(params: {
|
||||
})
|
||||
}
|
||||
|
||||
// ─── Experts (built-in expert skills) ───────────────────────────────────
|
||||
|
||||
export async function expertsList(): Promise<ExpertListItem[]> {
|
||||
return getTransport().call("experts_list")
|
||||
}
|
||||
|
||||
export async function expertsGetInstallStatus(
|
||||
expertId: string
|
||||
): Promise<ExpertInstallStatus[]> {
|
||||
return getTransport().call("experts_get_install_status", { expertId })
|
||||
}
|
||||
|
||||
export async function expertsLinkToAgent(params: {
|
||||
expertId: string
|
||||
agentType: AgentType
|
||||
}): Promise<ExpertInstallStatus> {
|
||||
return getTransport().call("experts_link_to_agent", {
|
||||
expertId: params.expertId,
|
||||
agentType: params.agentType,
|
||||
})
|
||||
}
|
||||
|
||||
export async function expertsUnlinkFromAgent(params: {
|
||||
expertId: string
|
||||
agentType: AgentType
|
||||
}): Promise<void> {
|
||||
return getTransport().call("experts_unlink_from_agent", {
|
||||
expertId: params.expertId,
|
||||
agentType: params.agentType,
|
||||
})
|
||||
}
|
||||
|
||||
export async function expertsReadContent(expertId: string): Promise<string> {
|
||||
return getTransport().call("experts_read_content", { expertId })
|
||||
}
|
||||
|
||||
export async function expertsOpenCentralDir(): Promise<string> {
|
||||
return getTransport().call("experts_open_central_dir")
|
||||
}
|
||||
|
||||
export async function getSystemProxySettings(): Promise<SystemProxySettings> {
|
||||
return getTransport().call("get_system_proxy_settings")
|
||||
}
|
||||
|
||||
@@ -521,6 +521,45 @@ export interface AgentSkillContent {
|
||||
content: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Built-in expert skills, sourced from obra/superpowers and bundled into
|
||||
* the codeg binary. Experts live in a central store at `~/.codeg/skills/`
|
||||
* and are linked into agent skill directories on demand.
|
||||
*/
|
||||
export interface ExpertMetadata {
|
||||
id: string
|
||||
category: string
|
||||
icon: string | null
|
||||
sort_order: number
|
||||
display_name: Record<string, string>
|
||||
description: Record<string, string>
|
||||
bundled_hash: string
|
||||
}
|
||||
|
||||
export interface ExpertListItem {
|
||||
metadata: ExpertMetadata
|
||||
installed_centrally: boolean
|
||||
user_modified: boolean
|
||||
central_path: string
|
||||
}
|
||||
|
||||
export type ExpertLinkState =
|
||||
| "not_linked"
|
||||
| "linked_to_codeg"
|
||||
| "linked_elsewhere"
|
||||
| "blocked_by_real_directory"
|
||||
| "broken"
|
||||
|
||||
export interface ExpertInstallStatus {
|
||||
expertId: string
|
||||
agentType: AgentType
|
||||
state: ExpertLinkState
|
||||
linkPath: string
|
||||
targetPath: string | null
|
||||
expectedTargetPath: string
|
||||
copyMode: boolean
|
||||
}
|
||||
|
||||
export interface SystemProxySettings {
|
||||
enabled: boolean
|
||||
proxy_url: string | null
|
||||
|
||||
Reference in New Issue
Block a user