@seastudio/sdk 3.3.1 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2SQFLDTT.cjs → chunk-3STW46ME.cjs} +4 -1
- package/dist/chunk-GCE3TTCJ.cjs +184 -0
- package/dist/{chunk-BUC7WN5U.js → chunk-HXP4V4WE.js} +4 -1
- package/dist/chunk-O2C4Z5B5.cjs +65 -0
- package/dist/chunk-OVBIWRAB.js +170 -0
- package/dist/chunk-ZOGVKB2Z.js +57 -0
- package/dist/index.cjs +93 -11
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/mcp/core/index.d.cts +2 -2
- package/dist/mcp/core/index.d.ts +2 -2
- package/dist/mcp/index.cjs +11 -11
- package/dist/mcp/index.d.cts +2 -2
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/seastudio/index.d.cts +1 -1
- package/dist/mcp/seastudio/index.d.ts +1 -1
- package/dist/registry-OS2Xo46V.d.cts +138 -0
- package/dist/registry-OS2Xo46V.d.ts +138 -0
- package/dist/skill/index.cjs +87 -0
- package/dist/skill/index.d.cts +60 -0
- package/dist/skill/index.d.ts +60 -0
- package/dist/skill/index.js +2 -0
- package/dist/skill/registry.cjs +34 -0
- package/dist/skill/registry.d.cts +1 -0
- package/dist/skill/registry.d.ts +1 -0
- package/dist/skill/registry.js +1 -0
- package/dist/{types-CUFTi2bZ.d.cts → types-DY867NzA.d.cts} +1 -0
- package/dist/{types-CUFTi2bZ.d.ts → types-DY867NzA.d.ts} +1 -0
- package/package.json +11 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { DialogBody, DialogBodyProps, DialogButton, DialogButtonProps, DialogContainer, DialogContainerProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogOverlay, DialogOverlayProps, HostContextMenuItem, HostContextMenuResult, MenuContainer, MenuContainerProps, MenuEmpty, MenuEmptyProps, MenuItem, MenuItemProps, MenuSeparator, MenuSeparatorProps, Tab, TabProps, cn, showHostContextMenu } from './ui/index.js';
|
|
2
2
|
export { MCPAvailableTool, MCPPackageId, MCPPackageInfo, MCPToolCapabilityMetadata, MCPToolCapabilityRisk, MCP_PACKAGES, OpenAITool, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from './mcp/index.js';
|
|
3
|
-
export {
|
|
3
|
+
export { P as PublishSkillReleaseResult, R as RegistrySkillSummary, S as ScannedRoot, a as Skill, b as SkillContent, c as SkillDetailResponse, d as SkillProjectInfo, e as SkillRegistryListResponse, f as SkillRegistryTransport, g as SkillReleaseRecord, h as SkillReleaseStatus, i as SkillScanResult, j as SkillScope, k as SkillSource, l as getMarketSkill, m as getSkillRegistryTransport, n as listMarketSkills, p as publishSkill, s as selectPublishSkillFile, o as setSkillRegistryTransport, u as useElectronSkillRegistryTransport } from './registry-OS2Xo46V.js';
|
|
4
|
+
export { SkillChangedListener, SkillFrontmatter, SkillTransport, SkillUninstallResult, buildSkillId, getSkill, getSkillTransport, listSkillProjects, listSkills, onSkillsChanged, parseSkillFrontmatter, rescanSkills, setSkillEnabled, setSkillScope, setSkillTransport, uninstallSkill, useElectronSkillTransport } from './skill/index.js';
|
|
5
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, g as MCPTool, h as MCPToolAnnotations, i as MCPToolCallRequest, j as MCPToolInputSchema, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from './types-DY867NzA.js';
|
|
4
6
|
export { FileModifiedParams, FileOpenRequestedParams, FileSavedParams, FileSendRequestedParams, FilesChangedParams, RootsChangedParams, SeastudioDragDropParams, SeastudioDragEnterParams, SeastudioDragFileData, SeastudioDragRootId, SeastudioDragStartParams, SeastudioFileDownloadOptions, SeastudioFileTreeOptions, SeastudioNotifications, SeastudioRequests, TextSendRequestedParams, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './mcp/seastudio/index.js';
|
|
5
7
|
export { MCPClient, MCPClientOptions, MCPRequestOptions, MCPServer, MCPToolCallOptions, MCPToolHandler, MCPTransport, NormalizeMCPToolInputSchemaOptions, PostMessageTransport, PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './mcp/core/index.js';
|
|
6
8
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { buildSkillId, getSkill, getSkillTransport, listSkillProjects, listSkills, onSkillsChanged, parseSkillFrontmatter, rescanSkills, setSkillEnabled, setSkillScope, setSkillTransport, uninstallSkill, useElectronSkillTransport } from './chunk-OVBIWRAB.js';
|
|
2
|
+
export { getMarketSkill, getSkillRegistryTransport, listMarketSkills, publishSkill, selectPublishSkillFile, setSkillRegistryTransport, useElectronSkillRegistryTransport } from './chunk-ZOGVKB2Z.js';
|
|
3
|
+
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from './chunk-HXP4V4WE.js';
|
|
2
4
|
export { DialogBody, DialogButton, DialogContainer, DialogFooter, DialogHeader, DialogOverlay, MenuContainer, MenuEmpty, MenuItem, MenuSeparator, Tab, cn, showHostContextMenu } from './chunk-X62SRZS4.js';
|
|
3
5
|
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './chunk-IZRKT6NQ.js';
|
|
4
6
|
export { MCPClient, MCPServer, PostMessageTransport, callHostTool, callHostToolText, createMCPClient, createMCPServer, createNotification, createRequest, createResponse, getDefaultClient, getDefaultServer, getDefaultTransport, isMCPMessage, isNotification, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './chunk-TJ3CGHWJ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as MCPToolInputSchema, g as MCPTool, b as JSONRPCMessage, k as MCPToolResult, N as NotificationHandler, d as JSONRPCRequest, e as JSONRPCResponse } from '../../types-
|
|
2
|
-
export { F as FileItem, a as FileNode, J as JSONRPCError, c as JSONRPCNotification, M as MCPMessageEnvelope, f as MCPMethod, h as MCPToolAnnotations, i as MCPToolCallRequest, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../../types-
|
|
1
|
+
import { j as MCPToolInputSchema, g as MCPTool, b as JSONRPCMessage, k as MCPToolResult, N as NotificationHandler, d as JSONRPCRequest, e as JSONRPCResponse } from '../../types-DY867NzA.cjs';
|
|
2
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, c as JSONRPCNotification, M as MCPMessageEnvelope, f as MCPMethod, h as MCPToolAnnotations, i as MCPToolCallRequest, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../../types-DY867NzA.cjs';
|
|
3
3
|
|
|
4
4
|
interface NormalizeMCPToolInputSchemaOptions {
|
|
5
5
|
defaultType?: MCPToolInputSchema['type'];
|
package/dist/mcp/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as MCPToolInputSchema, g as MCPTool, b as JSONRPCMessage, k as MCPToolResult, N as NotificationHandler, d as JSONRPCRequest, e as JSONRPCResponse } from '../../types-
|
|
2
|
-
export { F as FileItem, a as FileNode, J as JSONRPCError, c as JSONRPCNotification, M as MCPMessageEnvelope, f as MCPMethod, h as MCPToolAnnotations, i as MCPToolCallRequest, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../../types-
|
|
1
|
+
import { j as MCPToolInputSchema, g as MCPTool, b as JSONRPCMessage, k as MCPToolResult, N as NotificationHandler, d as JSONRPCRequest, e as JSONRPCResponse } from '../../types-DY867NzA.js';
|
|
2
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, c as JSONRPCNotification, M as MCPMessageEnvelope, f as MCPMethod, h as MCPToolAnnotations, i as MCPToolCallRequest, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../../types-DY867NzA.js';
|
|
3
3
|
|
|
4
4
|
interface NormalizeMCPToolInputSchemaOptions {
|
|
5
5
|
defaultType?: MCPToolInputSchema['type'];
|
package/dist/mcp/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3STW46ME_cjs = require('../chunk-3STW46ME.cjs');
|
|
4
4
|
var chunkUXBJODKS_cjs = require('../chunk-UXBJODKS.cjs');
|
|
5
5
|
var chunk3I7UM66P_cjs = require('../chunk-3I7UM66P.cjs');
|
|
6
6
|
|
|
@@ -8,43 +8,43 @@ var chunk3I7UM66P_cjs = require('../chunk-3I7UM66P.cjs');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "MCP_PACKAGES", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunk3STW46ME_cjs.MCP_PACKAGES; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "getMCPPackageIdForTool", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunk3STW46ME_cjs.getMCPPackageIdForTool; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "getMCPPackages", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunk3STW46ME_cjs.getMCPPackages; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "getMCPToolPackageIndex", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunk3STW46ME_cjs.getMCPToolPackageIndex; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "getToolsForLLM", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunk3STW46ME_cjs.getToolsForLLM; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "listAllTools", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunk3STW46ME_cjs.listAllTools; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "listAvailableTools", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunk3STW46ME_cjs.listAvailableTools; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "listAvailableToolsForLLM", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunk3STW46ME_cjs.listAvailableToolsForLLM; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "loadPlugin", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunk3STW46ME_cjs.loadPlugin; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "mcpToolToOpenAI", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunk3STW46ME_cjs.mcpToolToOpenAI; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "SeastudioNotifications", {
|
|
50
50
|
enumerable: true,
|
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-
|
|
2
|
-
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-DY867NzA.cjs';
|
|
2
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-DY867NzA.cjs';
|
|
3
3
|
export { MCPClient, MCPClientOptions, MCPRequestOptions, MCPServer, MCPToolCallOptions, MCPToolHandler, MCPTransport, NormalizeMCPToolInputSchemaOptions, PostMessageTransport, PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './core/index.cjs';
|
|
4
4
|
export { FileModifiedParams, FileOpenRequestedParams, FileSavedParams, FileSendRequestedParams, FilesChangedParams, RootsChangedParams, SeastudioDragDropParams, SeastudioDragEnterParams, SeastudioDragFileData, SeastudioDragRootId, SeastudioDragStartParams, SeastudioFileDownloadOptions, SeastudioFileTreeOptions, SeastudioNotifications, SeastudioRequests, TextSendRequestedParams, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './seastudio/index.cjs';
|
|
5
5
|
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-
|
|
2
|
-
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema } from '../types-DY867NzA.js';
|
|
2
|
+
export { F as FileItem, a as FileNode, J as JSONRPCError, b as JSONRPCMessage, c as JSONRPCNotification, d as JSONRPCRequest, e as JSONRPCResponse, M as MCPMessageEnvelope, f as MCPMethod, i as MCPToolCallRequest, k as MCPToolResult, N as NotificationHandler, P as PluginMCPManifest, l as PluginMCPModuleExports, m as PublishParams, S as SubscribeParams, n as createNotification, o as createRequest, p as createResponse, q as isMCPMessage, r as isNotification } from '../types-DY867NzA.js';
|
|
3
3
|
export { MCPClient, MCPClientOptions, MCPRequestOptions, MCPServer, MCPToolCallOptions, MCPToolHandler, MCPTransport, NormalizeMCPToolInputSchemaOptions, PostMessageTransport, PostMessageTransportOptions, callHostTool, callHostToolText, createMCPClient, createMCPServer, getDefaultClient, getDefaultServer, getDefaultTransport, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from './core/index.js';
|
|
4
4
|
export { FileModifiedParams, FileOpenRequestedParams, FileSavedParams, FileSendRequestedParams, FilesChangedParams, RootsChangedParams, SeastudioDragDropParams, SeastudioDragEnterParams, SeastudioDragFileData, SeastudioDragRootId, SeastudioDragStartParams, SeastudioFileDownloadOptions, SeastudioFileTreeOptions, SeastudioNotifications, SeastudioRequests, TextSendRequestedParams, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from './seastudio/index.js';
|
|
5
5
|
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-
|
|
1
|
+
export { MCP_PACKAGES, getMCPPackageIdForTool, getMCPPackages, getMCPToolPackageIndex, getToolsForLLM, listAllTools, listAvailableTools, listAvailableToolsForLLM, loadPlugin, mcpToolToOpenAI } from '../chunk-HXP4V4WE.js';
|
|
2
2
|
export { SeastudioNotifications, SeastudioRequests, agentManagementTools, agentTabTools, fileTools, pluginManagementTools, pluginTabTools, seaCloudTools, seastudio, allTools as seastudioAllTools, tools as seastudioTools, shellTools } from '../chunk-IZRKT6NQ.js';
|
|
3
3
|
export { MCPClient, MCPServer, PostMessageTransport, callHostTool, callHostToolText, createMCPClient, createMCPServer, createNotification, createRequest, createResponse, getDefaultClient, getDefaultServer, getDefaultTransport, isMCPMessage, isNotification, normalizeMCPTool, normalizeMCPToolInputSchema, normalizeMCPToolObjectSchema, setDefaultClient, setDefaultTransport, startDefaultServer } from '../chunk-TJ3CGHWJ.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-DY867NzA.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* File MCP Tools
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-
|
|
1
|
+
import { g as MCPTool, h as MCPToolAnnotations, j as MCPToolInputSchema, k as MCPToolResult } from '../../types-DY867NzA.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* File MCP Tools
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill 数据模型
|
|
3
|
+
*
|
|
4
|
+
* 表示一个外部 Agent Skill(Claude Code / Codex / Cursor / SeaStudio 自带)的
|
|
5
|
+
* 基础元信息和加载入口。识别约定:每个 skill 是一个目录,里面包含 SKILL.md。
|
|
6
|
+
*/
|
|
7
|
+
type SkillSource = 'seastudio' | 'claude-code' | 'codex' | 'cursor' | 'custom';
|
|
8
|
+
interface SkillScope {
|
|
9
|
+
/** 是否对当前用户「个人」全局生效(不限项目) */
|
|
10
|
+
personal: boolean;
|
|
11
|
+
/** 在哪些项目(projectId)下生效 */
|
|
12
|
+
projects: string[];
|
|
13
|
+
}
|
|
14
|
+
interface SkillProjectInfo {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
interface Skill {
|
|
19
|
+
/** 稳定 id:`${source}:${dirName}` */
|
|
20
|
+
id: string;
|
|
21
|
+
/** 显示名(来自 frontmatter.name 或目录名) */
|
|
22
|
+
name: string;
|
|
23
|
+
/** 描述(来自 frontmatter.description,缺失则空字符串) */
|
|
24
|
+
description: string;
|
|
25
|
+
/** 版本号(若 frontmatter 含 version 则填充) */
|
|
26
|
+
version?: string;
|
|
27
|
+
/** 标签(来自 frontmatter.tags) */
|
|
28
|
+
tags?: string[];
|
|
29
|
+
/** Skill 目录的绝对路径 */
|
|
30
|
+
path: string;
|
|
31
|
+
/** 入口文件绝对路径(通常为 SKILL.md) */
|
|
32
|
+
entryFile: string;
|
|
33
|
+
/** 来源类型 */
|
|
34
|
+
source: SkillSource;
|
|
35
|
+
/** 来源的人类可读标签,例如 "Claude Code (~/.claude/skills)" */
|
|
36
|
+
sourceLabel?: string;
|
|
37
|
+
/** 是否启用(持久化到 <userData>/skills-state.json) */
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
/** 生效范围(持久化到 <userData>/skills-state.json) */
|
|
40
|
+
scope?: SkillScope;
|
|
41
|
+
/** 其它 frontmatter 原样字段,便于上层扩展 */
|
|
42
|
+
metadata?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
interface SkillContent {
|
|
45
|
+
id: string;
|
|
46
|
+
/** SKILL.md 的完整文本内容 */
|
|
47
|
+
content: string;
|
|
48
|
+
metadata: {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
tags?: string[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
interface ScannedRoot {
|
|
55
|
+
source: SkillSource;
|
|
56
|
+
path: string;
|
|
57
|
+
label: string;
|
|
58
|
+
exists: boolean;
|
|
59
|
+
count: number;
|
|
60
|
+
}
|
|
61
|
+
interface SkillScanResult {
|
|
62
|
+
skills: Skill[];
|
|
63
|
+
scannedRoots: ScannedRoot[];
|
|
64
|
+
}
|
|
65
|
+
type SkillReleaseStatus = 'draft' | 'published' | 'hidden' | 'pending_review';
|
|
66
|
+
interface RegistrySkillSummary {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
protocol_host?: string;
|
|
71
|
+
icon_url?: string;
|
|
72
|
+
tags?: string[];
|
|
73
|
+
official: boolean;
|
|
74
|
+
builtin: boolean;
|
|
75
|
+
version: string;
|
|
76
|
+
filename: string;
|
|
77
|
+
download_url: string;
|
|
78
|
+
checksum?: string;
|
|
79
|
+
size?: number;
|
|
80
|
+
status: SkillReleaseStatus;
|
|
81
|
+
created_at: string;
|
|
82
|
+
updated_at: string;
|
|
83
|
+
}
|
|
84
|
+
interface SkillReleaseRecord {
|
|
85
|
+
version: string;
|
|
86
|
+
filename: string;
|
|
87
|
+
download_url: string;
|
|
88
|
+
checksum?: string;
|
|
89
|
+
size?: number;
|
|
90
|
+
status: SkillReleaseStatus;
|
|
91
|
+
created_at: string;
|
|
92
|
+
}
|
|
93
|
+
interface SkillDetailResponse {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
protocol_host?: string;
|
|
98
|
+
icon_url?: string;
|
|
99
|
+
tags?: string[];
|
|
100
|
+
official: boolean;
|
|
101
|
+
builtin: boolean;
|
|
102
|
+
releases: SkillReleaseRecord[];
|
|
103
|
+
}
|
|
104
|
+
interface SkillRegistryListResponse {
|
|
105
|
+
updated_at: string;
|
|
106
|
+
skills: RegistrySkillSummary[];
|
|
107
|
+
}
|
|
108
|
+
interface PublishSkillReleaseResult {
|
|
109
|
+
success: boolean;
|
|
110
|
+
skill_id: string;
|
|
111
|
+
version: string;
|
|
112
|
+
status: SkillReleaseStatus;
|
|
113
|
+
download_url: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Skill 市场(DataServer 注册表)SDK Client
|
|
118
|
+
*
|
|
119
|
+
* 与 [client.ts](./client.ts) 保持一致的"transport 由宿主注入 + Electron 自动桥接"模式。
|
|
120
|
+
* Renderer 通过 `window.electronAPI.engine.skillRegistry` 走 IPC,
|
|
121
|
+
* 其它环境(测试 / Node)调用 `setSkillRegistryTransport(...)` 注入自定义实现。
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
interface SkillRegistryTransport {
|
|
125
|
+
list(): Promise<SkillRegistryListResponse>;
|
|
126
|
+
detail(id: string): Promise<SkillDetailResponse>;
|
|
127
|
+
selectPublishFile?(): Promise<string | null>;
|
|
128
|
+
publishFile?(archivePath: string, publishPassword?: string): Promise<PublishSkillReleaseResult>;
|
|
129
|
+
}
|
|
130
|
+
declare function setSkillRegistryTransport(transport: SkillRegistryTransport | null): void;
|
|
131
|
+
declare function getSkillRegistryTransport(): SkillRegistryTransport;
|
|
132
|
+
declare function listMarketSkills(): Promise<RegistrySkillSummary[]>;
|
|
133
|
+
declare function getMarketSkill(id: string): Promise<SkillDetailResponse>;
|
|
134
|
+
declare function selectPublishSkillFile(): Promise<string | null>;
|
|
135
|
+
declare function publishSkill(archivePath: string, publishPassword?: string): Promise<PublishSkillReleaseResult>;
|
|
136
|
+
declare function useElectronSkillRegistryTransport(): boolean;
|
|
137
|
+
|
|
138
|
+
export { type PublishSkillReleaseResult as P, type RegistrySkillSummary as R, type ScannedRoot as S, type Skill as a, type SkillContent as b, type SkillDetailResponse as c, type SkillProjectInfo as d, type SkillRegistryListResponse as e, type SkillRegistryTransport as f, type SkillReleaseRecord as g, type SkillReleaseStatus as h, type SkillScanResult as i, type SkillScope as j, type SkillSource as k, getMarketSkill as l, getSkillRegistryTransport as m, listMarketSkills as n, setSkillRegistryTransport as o, publishSkill as p, selectPublishSkillFile as s, useElectronSkillRegistryTransport as u };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill 数据模型
|
|
3
|
+
*
|
|
4
|
+
* 表示一个外部 Agent Skill(Claude Code / Codex / Cursor / SeaStudio 自带)的
|
|
5
|
+
* 基础元信息和加载入口。识别约定:每个 skill 是一个目录,里面包含 SKILL.md。
|
|
6
|
+
*/
|
|
7
|
+
type SkillSource = 'seastudio' | 'claude-code' | 'codex' | 'cursor' | 'custom';
|
|
8
|
+
interface SkillScope {
|
|
9
|
+
/** 是否对当前用户「个人」全局生效(不限项目) */
|
|
10
|
+
personal: boolean;
|
|
11
|
+
/** 在哪些项目(projectId)下生效 */
|
|
12
|
+
projects: string[];
|
|
13
|
+
}
|
|
14
|
+
interface SkillProjectInfo {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
interface Skill {
|
|
19
|
+
/** 稳定 id:`${source}:${dirName}` */
|
|
20
|
+
id: string;
|
|
21
|
+
/** 显示名(来自 frontmatter.name 或目录名) */
|
|
22
|
+
name: string;
|
|
23
|
+
/** 描述(来自 frontmatter.description,缺失则空字符串) */
|
|
24
|
+
description: string;
|
|
25
|
+
/** 版本号(若 frontmatter 含 version 则填充) */
|
|
26
|
+
version?: string;
|
|
27
|
+
/** 标签(来自 frontmatter.tags) */
|
|
28
|
+
tags?: string[];
|
|
29
|
+
/** Skill 目录的绝对路径 */
|
|
30
|
+
path: string;
|
|
31
|
+
/** 入口文件绝对路径(通常为 SKILL.md) */
|
|
32
|
+
entryFile: string;
|
|
33
|
+
/** 来源类型 */
|
|
34
|
+
source: SkillSource;
|
|
35
|
+
/** 来源的人类可读标签,例如 "Claude Code (~/.claude/skills)" */
|
|
36
|
+
sourceLabel?: string;
|
|
37
|
+
/** 是否启用(持久化到 <userData>/skills-state.json) */
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
/** 生效范围(持久化到 <userData>/skills-state.json) */
|
|
40
|
+
scope?: SkillScope;
|
|
41
|
+
/** 其它 frontmatter 原样字段,便于上层扩展 */
|
|
42
|
+
metadata?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
interface SkillContent {
|
|
45
|
+
id: string;
|
|
46
|
+
/** SKILL.md 的完整文本内容 */
|
|
47
|
+
content: string;
|
|
48
|
+
metadata: {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
tags?: string[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
interface ScannedRoot {
|
|
55
|
+
source: SkillSource;
|
|
56
|
+
path: string;
|
|
57
|
+
label: string;
|
|
58
|
+
exists: boolean;
|
|
59
|
+
count: number;
|
|
60
|
+
}
|
|
61
|
+
interface SkillScanResult {
|
|
62
|
+
skills: Skill[];
|
|
63
|
+
scannedRoots: ScannedRoot[];
|
|
64
|
+
}
|
|
65
|
+
type SkillReleaseStatus = 'draft' | 'published' | 'hidden' | 'pending_review';
|
|
66
|
+
interface RegistrySkillSummary {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
protocol_host?: string;
|
|
71
|
+
icon_url?: string;
|
|
72
|
+
tags?: string[];
|
|
73
|
+
official: boolean;
|
|
74
|
+
builtin: boolean;
|
|
75
|
+
version: string;
|
|
76
|
+
filename: string;
|
|
77
|
+
download_url: string;
|
|
78
|
+
checksum?: string;
|
|
79
|
+
size?: number;
|
|
80
|
+
status: SkillReleaseStatus;
|
|
81
|
+
created_at: string;
|
|
82
|
+
updated_at: string;
|
|
83
|
+
}
|
|
84
|
+
interface SkillReleaseRecord {
|
|
85
|
+
version: string;
|
|
86
|
+
filename: string;
|
|
87
|
+
download_url: string;
|
|
88
|
+
checksum?: string;
|
|
89
|
+
size?: number;
|
|
90
|
+
status: SkillReleaseStatus;
|
|
91
|
+
created_at: string;
|
|
92
|
+
}
|
|
93
|
+
interface SkillDetailResponse {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
protocol_host?: string;
|
|
98
|
+
icon_url?: string;
|
|
99
|
+
tags?: string[];
|
|
100
|
+
official: boolean;
|
|
101
|
+
builtin: boolean;
|
|
102
|
+
releases: SkillReleaseRecord[];
|
|
103
|
+
}
|
|
104
|
+
interface SkillRegistryListResponse {
|
|
105
|
+
updated_at: string;
|
|
106
|
+
skills: RegistrySkillSummary[];
|
|
107
|
+
}
|
|
108
|
+
interface PublishSkillReleaseResult {
|
|
109
|
+
success: boolean;
|
|
110
|
+
skill_id: string;
|
|
111
|
+
version: string;
|
|
112
|
+
status: SkillReleaseStatus;
|
|
113
|
+
download_url: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Skill 市场(DataServer 注册表)SDK Client
|
|
118
|
+
*
|
|
119
|
+
* 与 [client.ts](./client.ts) 保持一致的"transport 由宿主注入 + Electron 自动桥接"模式。
|
|
120
|
+
* Renderer 通过 `window.electronAPI.engine.skillRegistry` 走 IPC,
|
|
121
|
+
* 其它环境(测试 / Node)调用 `setSkillRegistryTransport(...)` 注入自定义实现。
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
interface SkillRegistryTransport {
|
|
125
|
+
list(): Promise<SkillRegistryListResponse>;
|
|
126
|
+
detail(id: string): Promise<SkillDetailResponse>;
|
|
127
|
+
selectPublishFile?(): Promise<string | null>;
|
|
128
|
+
publishFile?(archivePath: string, publishPassword?: string): Promise<PublishSkillReleaseResult>;
|
|
129
|
+
}
|
|
130
|
+
declare function setSkillRegistryTransport(transport: SkillRegistryTransport | null): void;
|
|
131
|
+
declare function getSkillRegistryTransport(): SkillRegistryTransport;
|
|
132
|
+
declare function listMarketSkills(): Promise<RegistrySkillSummary[]>;
|
|
133
|
+
declare function getMarketSkill(id: string): Promise<SkillDetailResponse>;
|
|
134
|
+
declare function selectPublishSkillFile(): Promise<string | null>;
|
|
135
|
+
declare function publishSkill(archivePath: string, publishPassword?: string): Promise<PublishSkillReleaseResult>;
|
|
136
|
+
declare function useElectronSkillRegistryTransport(): boolean;
|
|
137
|
+
|
|
138
|
+
export { type PublishSkillReleaseResult as P, type RegistrySkillSummary as R, type ScannedRoot as S, type Skill as a, type SkillContent as b, type SkillDetailResponse as c, type SkillProjectInfo as d, type SkillRegistryListResponse as e, type SkillRegistryTransport as f, type SkillReleaseRecord as g, type SkillReleaseStatus as h, type SkillScanResult as i, type SkillScope as j, type SkillSource as k, getMarketSkill as l, getSkillRegistryTransport as m, listMarketSkills as n, setSkillRegistryTransport as o, publishSkill as p, selectPublishSkillFile as s, useElectronSkillRegistryTransport as u };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkGCE3TTCJ_cjs = require('../chunk-GCE3TTCJ.cjs');
|
|
4
|
+
var chunkO2C4Z5B5_cjs = require('../chunk-O2C4Z5B5.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "buildSkillId", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkGCE3TTCJ_cjs.buildSkillId; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "getSkill", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkGCE3TTCJ_cjs.getSkill; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "getSkillTransport", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkGCE3TTCJ_cjs.getSkillTransport; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "listSkillProjects", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkGCE3TTCJ_cjs.listSkillProjects; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "listSkills", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkGCE3TTCJ_cjs.listSkills; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "onSkillsChanged", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkGCE3TTCJ_cjs.onSkillsChanged; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "parseSkillFrontmatter", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkGCE3TTCJ_cjs.parseSkillFrontmatter; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "rescanSkills", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkGCE3TTCJ_cjs.rescanSkills; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "setSkillEnabled", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkGCE3TTCJ_cjs.setSkillEnabled; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "setSkillScope", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkGCE3TTCJ_cjs.setSkillScope; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "setSkillTransport", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkGCE3TTCJ_cjs.setSkillTransport; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "uninstallSkill", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkGCE3TTCJ_cjs.uninstallSkill; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "useElectronSkillTransport", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunkGCE3TTCJ_cjs.useElectronSkillTransport; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "getMarketSkill", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunkO2C4Z5B5_cjs.getMarketSkill; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "getSkillRegistryTransport", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunkO2C4Z5B5_cjs.getSkillRegistryTransport; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "listMarketSkills", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkO2C4Z5B5_cjs.listMarketSkills; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "publishSkill", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkO2C4Z5B5_cjs.publishSkill; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "selectPublishSkillFile", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return chunkO2C4Z5B5_cjs.selectPublishSkillFile; }
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "setSkillRegistryTransport", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return chunkO2C4Z5B5_cjs.setSkillRegistryTransport; }
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "useElectronSkillRegistryTransport", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () { return chunkO2C4Z5B5_cjs.useElectronSkillRegistryTransport; }
|
|
87
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { k as SkillSource, a as Skill, b as SkillContent, j as SkillScope, d as SkillProjectInfo } from '../registry-OS2Xo46V.cjs';
|
|
2
|
+
export { P as PublishSkillReleaseResult, R as RegistrySkillSummary, S as ScannedRoot, c as SkillDetailResponse, e as SkillRegistryListResponse, f as SkillRegistryTransport, g as SkillReleaseRecord, h as SkillReleaseStatus, i as SkillScanResult, l as getMarketSkill, m as getSkillRegistryTransport, n as listMarketSkills, p as publishSkill, s as selectPublishSkillFile, o as setSkillRegistryTransport, u as useElectronSkillRegistryTransport } from '../registry-OS2Xo46V.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Skill 解析工具
|
|
6
|
+
*
|
|
7
|
+
* 提供零依赖的 SKILL.md frontmatter 解析与 id 生成。
|
|
8
|
+
* 仅识别简单的 `key: value` 与 `key: [a, b, c]` 形式,足够覆盖
|
|
9
|
+
* Anthropic / Codex / Cursor 等约定的 SKILL.md 头部。
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface SkillFrontmatter {
|
|
13
|
+
name?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
/** 其它原样字段(字符串值) */
|
|
17
|
+
extra?: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
declare function parseSkillFrontmatter(markdown: string): SkillFrontmatter;
|
|
20
|
+
declare function buildSkillId(source: SkillSource, dirName: string): string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Skill SDK Client
|
|
24
|
+
*
|
|
25
|
+
* 给 Agent / UI 提供统一的 Skill 访问接口。SDK 本身不做扫描,
|
|
26
|
+
* 由宿主(SeaStudio 主程序)实现 SkillTransport 并通过 setSkillTransport 注入。
|
|
27
|
+
*
|
|
28
|
+
* 在 Electron renderer 中,preload 暴露的 `window.electronAPI.engine.skill`
|
|
29
|
+
* 与本接口一一对应,调用 `useElectronSkillTransport()` 即可自动桥接。
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
type SkillChangedListener = () => void;
|
|
33
|
+
interface SkillUninstallResult {
|
|
34
|
+
success: boolean;
|
|
35
|
+
error?: string;
|
|
36
|
+
}
|
|
37
|
+
interface SkillTransport {
|
|
38
|
+
list(): Promise<Skill[]>;
|
|
39
|
+
get(id: string): Promise<SkillContent | null>;
|
|
40
|
+
rescan(): Promise<Skill[]>;
|
|
41
|
+
onChanged?(listener: SkillChangedListener): () => void;
|
|
42
|
+
setEnabled?(id: string, value: boolean): Promise<Skill[]>;
|
|
43
|
+
setScope?(id: string, scope: SkillScope): Promise<Skill[]>;
|
|
44
|
+
uninstall?(id: string): Promise<SkillUninstallResult>;
|
|
45
|
+
listProjects?(): Promise<SkillProjectInfo[]>;
|
|
46
|
+
}
|
|
47
|
+
declare function setSkillTransport(transport: SkillTransport | null): void;
|
|
48
|
+
declare function getSkillTransport(): SkillTransport;
|
|
49
|
+
declare function listSkills(): Promise<Skill[]>;
|
|
50
|
+
declare function getSkill(id: string): Promise<SkillContent | null>;
|
|
51
|
+
declare function rescanSkills(): Promise<Skill[]>;
|
|
52
|
+
declare function onSkillsChanged(listener: SkillChangedListener): () => void;
|
|
53
|
+
declare function setSkillEnabled(id: string, value: boolean): Promise<Skill[]>;
|
|
54
|
+
declare function setSkillScope(id: string, scope: SkillScope): Promise<Skill[]>;
|
|
55
|
+
declare function uninstallSkill(id: string): Promise<SkillUninstallResult>;
|
|
56
|
+
declare function listSkillProjects(): Promise<SkillProjectInfo[]>;
|
|
57
|
+
/** 显式绑定 Electron 桥接(在 renderer 启动时调用一次即可)。 */
|
|
58
|
+
declare function useElectronSkillTransport(): boolean;
|
|
59
|
+
|
|
60
|
+
export { Skill, type SkillChangedListener, SkillContent, type SkillFrontmatter, SkillProjectInfo, SkillScope, SkillSource, type SkillTransport, type SkillUninstallResult, buildSkillId, getSkill, getSkillTransport, listSkillProjects, listSkills, onSkillsChanged, parseSkillFrontmatter, rescanSkills, setSkillEnabled, setSkillScope, setSkillTransport, uninstallSkill, useElectronSkillTransport };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { k as SkillSource, a as Skill, b as SkillContent, j as SkillScope, d as SkillProjectInfo } from '../registry-OS2Xo46V.js';
|
|
2
|
+
export { P as PublishSkillReleaseResult, R as RegistrySkillSummary, S as ScannedRoot, c as SkillDetailResponse, e as SkillRegistryListResponse, f as SkillRegistryTransport, g as SkillReleaseRecord, h as SkillReleaseStatus, i as SkillScanResult, l as getMarketSkill, m as getSkillRegistryTransport, n as listMarketSkills, p as publishSkill, s as selectPublishSkillFile, o as setSkillRegistryTransport, u as useElectronSkillRegistryTransport } from '../registry-OS2Xo46V.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Skill 解析工具
|
|
6
|
+
*
|
|
7
|
+
* 提供零依赖的 SKILL.md frontmatter 解析与 id 生成。
|
|
8
|
+
* 仅识别简单的 `key: value` 与 `key: [a, b, c]` 形式,足够覆盖
|
|
9
|
+
* Anthropic / Codex / Cursor 等约定的 SKILL.md 头部。
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
interface SkillFrontmatter {
|
|
13
|
+
name?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
/** 其它原样字段(字符串值) */
|
|
17
|
+
extra?: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
declare function parseSkillFrontmatter(markdown: string): SkillFrontmatter;
|
|
20
|
+
declare function buildSkillId(source: SkillSource, dirName: string): string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Skill SDK Client
|
|
24
|
+
*
|
|
25
|
+
* 给 Agent / UI 提供统一的 Skill 访问接口。SDK 本身不做扫描,
|
|
26
|
+
* 由宿主(SeaStudio 主程序)实现 SkillTransport 并通过 setSkillTransport 注入。
|
|
27
|
+
*
|
|
28
|
+
* 在 Electron renderer 中,preload 暴露的 `window.electronAPI.engine.skill`
|
|
29
|
+
* 与本接口一一对应,调用 `useElectronSkillTransport()` 即可自动桥接。
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
type SkillChangedListener = () => void;
|
|
33
|
+
interface SkillUninstallResult {
|
|
34
|
+
success: boolean;
|
|
35
|
+
error?: string;
|
|
36
|
+
}
|
|
37
|
+
interface SkillTransport {
|
|
38
|
+
list(): Promise<Skill[]>;
|
|
39
|
+
get(id: string): Promise<SkillContent | null>;
|
|
40
|
+
rescan(): Promise<Skill[]>;
|
|
41
|
+
onChanged?(listener: SkillChangedListener): () => void;
|
|
42
|
+
setEnabled?(id: string, value: boolean): Promise<Skill[]>;
|
|
43
|
+
setScope?(id: string, scope: SkillScope): Promise<Skill[]>;
|
|
44
|
+
uninstall?(id: string): Promise<SkillUninstallResult>;
|
|
45
|
+
listProjects?(): Promise<SkillProjectInfo[]>;
|
|
46
|
+
}
|
|
47
|
+
declare function setSkillTransport(transport: SkillTransport | null): void;
|
|
48
|
+
declare function getSkillTransport(): SkillTransport;
|
|
49
|
+
declare function listSkills(): Promise<Skill[]>;
|
|
50
|
+
declare function getSkill(id: string): Promise<SkillContent | null>;
|
|
51
|
+
declare function rescanSkills(): Promise<Skill[]>;
|
|
52
|
+
declare function onSkillsChanged(listener: SkillChangedListener): () => void;
|
|
53
|
+
declare function setSkillEnabled(id: string, value: boolean): Promise<Skill[]>;
|
|
54
|
+
declare function setSkillScope(id: string, scope: SkillScope): Promise<Skill[]>;
|
|
55
|
+
declare function uninstallSkill(id: string): Promise<SkillUninstallResult>;
|
|
56
|
+
declare function listSkillProjects(): Promise<SkillProjectInfo[]>;
|
|
57
|
+
/** 显式绑定 Electron 桥接(在 renderer 启动时调用一次即可)。 */
|
|
58
|
+
declare function useElectronSkillTransport(): boolean;
|
|
59
|
+
|
|
60
|
+
export { Skill, type SkillChangedListener, SkillContent, type SkillFrontmatter, SkillProjectInfo, SkillScope, SkillSource, type SkillTransport, type SkillUninstallResult, buildSkillId, getSkill, getSkillTransport, listSkillProjects, listSkills, onSkillsChanged, parseSkillFrontmatter, rescanSkills, setSkillEnabled, setSkillScope, setSkillTransport, uninstallSkill, useElectronSkillTransport };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { buildSkillId, getSkill, getSkillTransport, listSkillProjects, listSkills, onSkillsChanged, parseSkillFrontmatter, rescanSkills, setSkillEnabled, setSkillScope, setSkillTransport, uninstallSkill, useElectronSkillTransport } from '../chunk-OVBIWRAB.js';
|
|
2
|
+
export { getMarketSkill, getSkillRegistryTransport, listMarketSkills, publishSkill, selectPublishSkillFile, setSkillRegistryTransport, useElectronSkillRegistryTransport } from '../chunk-ZOGVKB2Z.js';
|