@easbot/skills 0.3.10 → 0.3.12
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/README.en.md +166 -59
- package/README.md +172 -62
- package/dist/assets/txt/template/skill-template-en-US.txt +50 -0
- package/dist/assets/txt/template/skill-template-zh-CN.txt +50 -0
- package/dist/chunks/blob-DOVEGVIE.cjs +1 -0
- package/dist/chunks/blob-JSMTOYEN.mjs +1 -0
- package/dist/chunks/chunk-2VZUPTI7.cjs +1 -0
- package/dist/chunks/chunk-2YVJ7YP6.mjs +22 -0
- package/dist/chunks/chunk-4R6NKPNW.mjs +3 -0
- package/dist/chunks/chunk-676OG55M.mjs +5 -0
- package/dist/chunks/chunk-6PJ3YQA7.mjs +2 -0
- package/dist/chunks/chunk-72DXY4B7.mjs +1 -0
- package/dist/chunks/chunk-CFMOYU7R.mjs +2 -0
- package/dist/chunks/chunk-GR2NJUJ6.mjs +255 -0
- package/dist/chunks/chunk-JFEBB5CL.cjs +22 -0
- package/dist/chunks/chunk-KV7EP6AW.cjs +255 -0
- package/dist/chunks/chunk-OWG6N2K6.cjs +5 -0
- package/dist/chunks/chunk-RWSBKHQ2.cjs +3 -0
- package/dist/chunks/chunk-RWZ4LFSN.mjs +1 -0
- package/dist/chunks/chunk-S6YNGR7S.cjs +2 -0
- package/dist/chunks/chunk-TCFGU43L.cjs +2 -0
- package/dist/chunks/chunk-VRHWDHQV.cjs +1 -0
- package/dist/chunks/chunk-WQGSYA5D.mjs +1 -0
- package/dist/chunks/chunk-XGUPIAAF.cjs +1 -0
- package/dist/chunks/cli-handler-RAJ42VDN.mjs +1 -0
- package/dist/chunks/cli-handler-YAJ5J5VA.cjs +1 -0
- package/dist/chunks/installer-FB26E7JZ.mjs +1 -0
- package/dist/chunks/installer-GOQTCUJ4.cjs +1 -0
- package/dist/chunks/interfaces-S47ZGORM.mjs +1 -0
- package/dist/chunks/interfaces-UIS44Q7A.cjs +1 -0
- package/dist/chunks/local-lock-4AA55ORE.cjs +1 -0
- package/dist/chunks/local-lock-LG5YL33V.mjs +1 -0
- package/dist/chunks/scan-QEVID2TF.mjs +1 -0
- package/dist/chunks/scan-XWU3FCE3.cjs +1 -0
- package/dist/chunks/skill-lock-KHPVP7AD.mjs +1 -0
- package/dist/chunks/skill-lock-LET33FVT.cjs +1 -0
- package/dist/chunks/store-3NRBE47N.mjs +1 -0
- package/dist/chunks/store-EHYH46YY.cjs +1 -0
- package/dist/chunks/telemetry-7T6MUW5A.mjs +1 -0
- package/dist/chunks/telemetry-LCGTSJDM.cjs +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +347 -106
- package/dist/index.d.ts +347 -106
- package/dist/index.mjs +1 -1
- package/package.json +4 -5
- package/dist/chunks/blob-3ZTTX2CZ.mjs +0 -1
- package/dist/chunks/blob-UAS6F4BG.cjs +0 -1
- package/dist/chunks/chunk-645XWVJB.mjs +0 -208
- package/dist/chunks/chunk-DLDPJGDD.cjs +0 -208
- package/dist/chunks/chunk-XDSGBJHO.cjs +0 -2
- package/dist/chunks/chunk-ZEMGS5WR.mjs +0 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentResult } from '@vercel/detect-agent';
|
|
2
|
+
import { Lang } from '@easbot/utils';
|
|
2
3
|
import { IGlobal, IInstance, ISubAgentRunner } from '@easbot/types';
|
|
3
4
|
|
|
4
5
|
type AgentType = 'aider-desk' | 'amp' | 'antigravity' | 'easbot' | 'antigravity-cli' | 'astrbot' | 'autohand-code' | 'augment' | 'bob' | 'claude-code' | 'openclaw' | 'cline' | 'codearts-agent' | 'codebuddy' | 'codemaker' | 'codestudio' | 'codex' | 'command-code' | 'continue' | 'cortex' | 'crush' | 'cursor' | 'deepagents' | 'devin' | 'dexto' | 'droid' | 'eve' | 'firebender' | 'forgecode' | 'gemini-cli' | 'github-copilot' | 'goose' | 'hermes-agent' | 'inference-sh' | 'iflow-cli' | 'jazz' | 'junie' | 'kilo' | 'kimi-code-cli' | 'kiro-cli' | 'kode' | 'lingma' | 'loaf' | 'mcpjam' | 'mistral-vibe' | 'moxby' | 'mux' | 'neovate' | 'opencode' | 'openhands' | 'ona' | 'pi' | 'qoder' | 'qoder-cn' | 'qwen-code' | 'replit' | 'reasonix' | 'roo' | 'rovodev' | 'tabnine-cli' | 'terramind' | 'tinycloud' | 'trae' | 'trae-cn' | 'warp' | 'windsurf' | 'zed' | 'zencoder' | 'zenflow' | 'pochi' | 'promptscript' | 'adal' | 'universal';
|
|
@@ -16,8 +17,6 @@ interface AgentConfig {
|
|
|
16
17
|
skillsDir: string;
|
|
17
18
|
globalSkillsDir: string | undefined;
|
|
18
19
|
detectInstalled: () => Promise<boolean>;
|
|
19
|
-
showInUniversalList?: boolean;
|
|
20
|
-
showInUniversalPrompt?: boolean;
|
|
21
20
|
}
|
|
22
21
|
interface ParsedSource {
|
|
23
22
|
type: 'github' | 'gitlab' | 'git' | 'local' | 'well-known';
|
|
@@ -25,7 +24,6 @@ interface ParsedSource {
|
|
|
25
24
|
subpath?: string;
|
|
26
25
|
localPath?: string;
|
|
27
26
|
ref?: string;
|
|
28
|
-
skillFilter?: string;
|
|
29
27
|
}
|
|
30
28
|
interface RemoteSkill$1 {
|
|
31
29
|
name: string;
|
|
@@ -44,10 +42,21 @@ declare function detectInstalledAgents(): Promise<AgentType[]>;
|
|
|
44
42
|
declare function getAgentConfig(type: AgentType): AgentConfig;
|
|
45
43
|
declare const EVE_SUBAGENTS_DIR: string;
|
|
46
44
|
declare function getEveSubagents(cwd?: string): string[];
|
|
47
|
-
|
|
48
|
-
declare function
|
|
49
|
-
declare function
|
|
50
|
-
declare function
|
|
45
|
+
type UniversalScope = 'project' | 'global';
|
|
46
|
+
declare function matchesUniversalScope(type: AgentType, scope: UniversalScope): boolean;
|
|
47
|
+
declare function getUniversalAgents(scope: 'project' | 'global'): AgentType[];
|
|
48
|
+
declare function getNonUniversalAgents(scope: 'project' | 'global'): AgentType[];
|
|
49
|
+
declare const PROJECT_SKILLS_DIR_PATTERN: RegExp;
|
|
50
|
+
declare function getAgentProjectSkillDirs(): string[];
|
|
51
|
+
declare function getAgentGlobalSkillDirs(): string[];
|
|
52
|
+
interface AgentSkillDirsResult {
|
|
53
|
+
readonly project: string[];
|
|
54
|
+
readonly global: string[];
|
|
55
|
+
readonly all: string[];
|
|
56
|
+
}
|
|
57
|
+
declare function getAgentSkillDirs(): AgentSkillDirsResult;
|
|
58
|
+
declare function getAgentProjectSkillContainerPrefixes(): string[];
|
|
59
|
+
declare function isUniversalAgent(type: AgentType, scope: 'project' | 'global'): boolean;
|
|
51
60
|
|
|
52
61
|
declare function shouldInstallInternalSkills(): boolean;
|
|
53
62
|
declare function parseSkillMd(skillMdPath: string, options?: {
|
|
@@ -62,6 +71,74 @@ declare function discoverSkills(basePath: string, subpath?: string, options?: Di
|
|
|
62
71
|
declare function getSkillDisplayName(skill: Skill): string;
|
|
63
72
|
declare function filterSkills(skills: Skill[], inputNames: string[]): Skill[];
|
|
64
73
|
|
|
74
|
+
type InstallState = 'absent' | 'symlinked' | 'copied' | 'orphan' | 'divergent';
|
|
75
|
+
type CellScope = 'global' | 'project';
|
|
76
|
+
interface InstallCell {
|
|
77
|
+
readonly scope: CellScope;
|
|
78
|
+
readonly state: InstallState;
|
|
79
|
+
readonly targetPath: string;
|
|
80
|
+
readonly sourceRealpath?: string;
|
|
81
|
+
readonly sourceDir: string;
|
|
82
|
+
}
|
|
83
|
+
interface AgentInstallMatrix {
|
|
84
|
+
readonly agentId: AgentType;
|
|
85
|
+
readonly cells: {
|
|
86
|
+
readonly global: InstallCell;
|
|
87
|
+
readonly project: InstallCell;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
type CellAction = {
|
|
91
|
+
readonly kind: 'install';
|
|
92
|
+
readonly agentId: AgentType;
|
|
93
|
+
readonly scope: CellScope;
|
|
94
|
+
readonly mode: InstallMode;
|
|
95
|
+
readonly targetPath: string;
|
|
96
|
+
} | {
|
|
97
|
+
readonly kind: 'skip';
|
|
98
|
+
readonly agentId: AgentType;
|
|
99
|
+
readonly scope: CellScope;
|
|
100
|
+
readonly state: 'symlinked' | 'copied';
|
|
101
|
+
} | {
|
|
102
|
+
readonly kind: 'report';
|
|
103
|
+
readonly agentId: AgentType;
|
|
104
|
+
readonly scope: CellScope;
|
|
105
|
+
readonly state: 'divergent' | 'orphan';
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
interface PostInstallInput {
|
|
109
|
+
readonly skillId: string;
|
|
110
|
+
readonly sourceDir: string;
|
|
111
|
+
readonly targetAgents: readonly AgentType[];
|
|
112
|
+
readonly installGlobally: boolean;
|
|
113
|
+
readonly defaultMode: 'symlink' | 'copy';
|
|
114
|
+
readonly assumeYes: boolean;
|
|
115
|
+
readonly cwd?: string;
|
|
116
|
+
readonly includeEveSubagents?: boolean;
|
|
117
|
+
}
|
|
118
|
+
interface PostInstallResult {
|
|
119
|
+
readonly skipped: boolean;
|
|
120
|
+
readonly installed: readonly CellAction[];
|
|
121
|
+
readonly reported: readonly CellAction[];
|
|
122
|
+
readonly matrix?: readonly AgentInstallMatrix[];
|
|
123
|
+
}
|
|
124
|
+
declare function probeCell(targetPath: string, sourceDir: string): Promise<InstallState>;
|
|
125
|
+
declare function planActions(matrix: readonly AgentInstallMatrix[], defaultMode: 'symlink' | 'copy'): CellAction[];
|
|
126
|
+
declare function applyActions(actions: readonly CellAction[], ctx: {
|
|
127
|
+
readonly sourceDir: string;
|
|
128
|
+
readonly installGlobally: boolean;
|
|
129
|
+
readonly cwd: string;
|
|
130
|
+
}): Promise<{
|
|
131
|
+
installed: CellAction[];
|
|
132
|
+
reported: CellAction[];
|
|
133
|
+
}>;
|
|
134
|
+
declare function buildMatrix(targetAgents: readonly AgentType[], ctx: {
|
|
135
|
+
skillId: string;
|
|
136
|
+
sourceDir: string;
|
|
137
|
+
cwd: string;
|
|
138
|
+
includeEveSubagents?: boolean;
|
|
139
|
+
}): AgentInstallMatrix[];
|
|
140
|
+
declare function runPostInstallReconcile(input: PostInstallInput): Promise<PostInstallResult>;
|
|
141
|
+
|
|
65
142
|
interface RemoteSkill {
|
|
66
143
|
name: string;
|
|
67
144
|
description: string;
|
|
@@ -108,8 +185,23 @@ interface WellKnownSkillEntryV2 {
|
|
|
108
185
|
url: string;
|
|
109
186
|
digest: string;
|
|
110
187
|
}
|
|
111
|
-
|
|
112
|
-
|
|
188
|
+
interface WellKnownSkillEntryEasbotV1 {
|
|
189
|
+
name: string;
|
|
190
|
+
description: string;
|
|
191
|
+
sourceUrl: string;
|
|
192
|
+
installName?: string;
|
|
193
|
+
category?: string;
|
|
194
|
+
version?: string;
|
|
195
|
+
tags?: string[];
|
|
196
|
+
metadata?: Record<string, unknown>;
|
|
197
|
+
skillPath?: string;
|
|
198
|
+
}
|
|
199
|
+
interface WellKnownIndexEasbotV1 {
|
|
200
|
+
$schema: string;
|
|
201
|
+
skills: WellKnownSkillEntryEasbotV1[];
|
|
202
|
+
}
|
|
203
|
+
type WellKnownIndex = WellKnownIndexV1 | WellKnownIndexV2 | WellKnownIndexEasbotV1;
|
|
204
|
+
type WellKnownSkillEntry = WellKnownSkillEntryV1 | WellKnownSkillEntryV2 | WellKnownSkillEntryEasbotV1;
|
|
113
205
|
type WellKnownFileContent = string | Uint8Array;
|
|
114
206
|
type NormalizedWellKnownEntry = {
|
|
115
207
|
version: '0.1.0';
|
|
@@ -127,6 +219,13 @@ type NormalizedWellKnownEntry = {
|
|
|
127
219
|
artifactUrl: string;
|
|
128
220
|
digest: string;
|
|
129
221
|
indexEntry: WellKnownSkillEntryV2;
|
|
222
|
+
} | {
|
|
223
|
+
version: 'easbot-v1';
|
|
224
|
+
name: string;
|
|
225
|
+
description: string;
|
|
226
|
+
skillMdUrl: string;
|
|
227
|
+
installName?: string;
|
|
228
|
+
indexEntry: WellKnownSkillEntryEasbotV1;
|
|
130
229
|
};
|
|
131
230
|
interface WellKnownSkill extends RemoteSkill {
|
|
132
231
|
files: Map<string, WellKnownFileContent>;
|
|
@@ -150,10 +249,12 @@ declare class WellKnownProvider implements HostProvider {
|
|
|
150
249
|
private getLegacySkillBaseUrl;
|
|
151
250
|
private isValidSkillName;
|
|
152
251
|
private isSafeLegacyFilePath;
|
|
252
|
+
private isValidSkillEntryEasbotV1;
|
|
153
253
|
private isValidSkillEntryV1;
|
|
154
254
|
private isValidSkillEntryV2;
|
|
155
255
|
fetchSkill(url: string): Promise<RemoteSkill | null>;
|
|
156
256
|
fetchSkillByEntry(baseUrlOrEntry: string | NormalizedWellKnownEntry, legacyEntry?: WellKnownSkillEntryV1, legacyWellKnownPath?: string): Promise<WellKnownSkill | null>;
|
|
257
|
+
private fetchEasbotV1SkillByEntry;
|
|
157
258
|
private fetchLegacySkillByEntry;
|
|
158
259
|
private fetchArtifactSkillByEntry;
|
|
159
260
|
private createSkill;
|
|
@@ -182,6 +283,7 @@ interface InstallResult {
|
|
|
182
283
|
mode: InstallMode;
|
|
183
284
|
symlinkFailed?: boolean;
|
|
184
285
|
skipped?: boolean;
|
|
286
|
+
skippedReason?: 'overwrite' | 'up-to-date';
|
|
185
287
|
error?: string;
|
|
186
288
|
}
|
|
187
289
|
declare function sanitizeName(name: string): string;
|
|
@@ -243,7 +345,7 @@ interface InstalledSkill {
|
|
|
243
345
|
agents: AgentType[];
|
|
244
346
|
}
|
|
245
347
|
declare function listInstalledSkills(options?: {
|
|
246
|
-
|
|
348
|
+
scope?: 'project' | 'global' | 'both';
|
|
247
349
|
cwd?: string;
|
|
248
350
|
agentFilter?: AgentType[];
|
|
249
351
|
}): Promise<InstalledSkill[]>;
|
|
@@ -283,6 +385,9 @@ interface SearchSkill {
|
|
|
283
385
|
}
|
|
284
386
|
interface FindOptions {
|
|
285
387
|
owner?: string;
|
|
388
|
+
json?: boolean;
|
|
389
|
+
local?: boolean;
|
|
390
|
+
path?: string;
|
|
286
391
|
}
|
|
287
392
|
interface ParseFindOptionsResult {
|
|
288
393
|
query: string;
|
|
@@ -291,19 +396,119 @@ interface ParseFindOptionsResult {
|
|
|
291
396
|
}
|
|
292
397
|
declare function parseFindOptions(args: string[]): ParseFindOptionsResult;
|
|
293
398
|
declare function searchSkillsAPI(query: string, owner?: string): Promise<SearchSkill[]>;
|
|
294
|
-
declare function runFind(args: string[]): Promise<
|
|
399
|
+
declare function runFind(args: string[]): Promise<number>;
|
|
295
400
|
|
|
296
401
|
interface ListOptions {
|
|
297
402
|
global?: boolean;
|
|
403
|
+
project?: boolean;
|
|
298
404
|
agent?: string[];
|
|
299
405
|
json?: boolean;
|
|
406
|
+
all?: boolean;
|
|
407
|
+
yes?: boolean;
|
|
300
408
|
}
|
|
301
409
|
declare function parseListOptions(args: string[]): ListOptions;
|
|
302
|
-
declare function runList(args: string[]
|
|
410
|
+
declare function runList(args: string[], callOptions?: {
|
|
411
|
+
cwd?: string;
|
|
412
|
+
}): Promise<void>;
|
|
413
|
+
|
|
414
|
+
declare const DEFAULT_CLONE_TIMEOUT = 300000;
|
|
415
|
+
interface GitHubRepoInfo {
|
|
416
|
+
owner: string;
|
|
417
|
+
repo: string;
|
|
418
|
+
slug: string;
|
|
419
|
+
sshUrl: string;
|
|
420
|
+
}
|
|
421
|
+
declare class GitCloneError extends Error {
|
|
422
|
+
readonly url: string;
|
|
423
|
+
readonly isTimeout: boolean;
|
|
424
|
+
readonly isAuthError: boolean;
|
|
425
|
+
constructor(message: string, url: string, isTimeout?: boolean, isAuthError?: boolean);
|
|
426
|
+
}
|
|
427
|
+
declare function parseGitHubRepoUrl(url: string): GitHubRepoInfo | null;
|
|
428
|
+
declare function isGitHubHttpsCloneUrl(url: string): boolean;
|
|
429
|
+
declare function isGitHubSsoAuthError(message: string): boolean;
|
|
430
|
+
declare function cloneRepo(url: string, ref?: string, targetDir?: string): Promise<string>;
|
|
431
|
+
declare function cleanupTempDir(dir: string): Promise<void>;
|
|
432
|
+
|
|
433
|
+
interface SkillSnapshotFile {
|
|
434
|
+
path: string;
|
|
435
|
+
contents: string;
|
|
436
|
+
}
|
|
437
|
+
interface SkillDownloadResponse {
|
|
438
|
+
files: SkillSnapshotFile[];
|
|
439
|
+
hash: string;
|
|
440
|
+
}
|
|
441
|
+
interface BlobSkill extends Skill {
|
|
442
|
+
files: SkillSnapshotFile[];
|
|
443
|
+
snapshotHash: string;
|
|
444
|
+
repoPath: string;
|
|
445
|
+
}
|
|
446
|
+
declare const BLOB_ALLOWED_REPOS: Record<string, {
|
|
447
|
+
downloadUrl: (slug: string) => string;
|
|
448
|
+
}>;
|
|
449
|
+
declare function toSkillSlug(name: string): string;
|
|
450
|
+
interface TreeEntry {
|
|
451
|
+
path: string;
|
|
452
|
+
type: 'blob' | 'tree';
|
|
453
|
+
sha: string;
|
|
454
|
+
size?: number;
|
|
455
|
+
}
|
|
456
|
+
interface RepoTree {
|
|
457
|
+
sha: string;
|
|
458
|
+
branch: string;
|
|
459
|
+
tree: TreeEntry[];
|
|
460
|
+
}
|
|
461
|
+
declare function resetRepoTreeAuthState(): void;
|
|
462
|
+
declare function fetchRepoTree(ownerRepo: string, ref?: string, getToken?: () => string | null): Promise<RepoTree | null>;
|
|
463
|
+
declare function getSkillFolderHashFromTree(tree: RepoTree, skillPath: string): string | null;
|
|
464
|
+
declare function findSkillMdPaths(tree: RepoTree, subpath?: string): string[];
|
|
465
|
+
interface BlobInstallResult {
|
|
466
|
+
skills: BlobSkill[];
|
|
467
|
+
tree: RepoTree;
|
|
468
|
+
}
|
|
469
|
+
declare function tryBlobInstall(ownerRepo: string, options?: {
|
|
470
|
+
subpath?: string;
|
|
471
|
+
ref?: string;
|
|
472
|
+
getToken?: () => string | null;
|
|
473
|
+
includeInternal?: boolean;
|
|
474
|
+
}): Promise<BlobInstallResult | null>;
|
|
475
|
+
|
|
476
|
+
type InstallScope = 'project' | 'global';
|
|
477
|
+
type AcquireMode = 'install' | 'update';
|
|
478
|
+
interface AcquireInput extends ParsedSource {
|
|
479
|
+
mode?: AcquireMode;
|
|
480
|
+
skillNames?: string[];
|
|
481
|
+
scope?: InstallScope;
|
|
482
|
+
}
|
|
483
|
+
interface AcquireResult {
|
|
484
|
+
tempDir: string;
|
|
485
|
+
cacheHit: boolean;
|
|
486
|
+
source: 'local-cp' | 'cache-clone' | 'cache-pull' | 'well-known-fetch' | 'blob-fetch';
|
|
487
|
+
cloneError?: GitCloneError | null;
|
|
488
|
+
}
|
|
489
|
+
declare function getSourceDir({ scope }: {
|
|
490
|
+
scope: InstallScope;
|
|
491
|
+
}): string;
|
|
492
|
+
declare function getCacheRoot(): string;
|
|
493
|
+
declare function getCacheRepoDir(parsed: ParsedSource): string;
|
|
494
|
+
declare function acquireSourceClone(input: AcquireInput): Promise<AcquireResult>;
|
|
495
|
+
declare function ensureCachedSource(source: {
|
|
496
|
+
url: string;
|
|
497
|
+
ref?: string;
|
|
498
|
+
sourceId: string;
|
|
499
|
+
}): Promise<string>;
|
|
500
|
+
declare function installFromCache({ cachePath, skillName, scope, }: {
|
|
501
|
+
cachePath: string;
|
|
502
|
+
skillName: string;
|
|
503
|
+
scope: InstallScope;
|
|
504
|
+
}): Promise<string>;
|
|
505
|
+
declare function cleanCachedRepo(parsed: ParsedSource): Promise<void>;
|
|
506
|
+
declare function cleanCache(): Promise<void>;
|
|
303
507
|
|
|
304
508
|
interface RemoveOptions {
|
|
305
509
|
global?: boolean;
|
|
306
510
|
agent?: string[];
|
|
511
|
+
skill?: string[];
|
|
307
512
|
yes?: boolean;
|
|
308
513
|
all?: boolean;
|
|
309
514
|
}
|
|
@@ -316,13 +521,14 @@ declare function parseRemoveOptions(args: string[]): {
|
|
|
316
521
|
interface SkillLockEntry {
|
|
317
522
|
source: string;
|
|
318
523
|
sourceType: string;
|
|
319
|
-
sourceUrl: string;
|
|
320
524
|
ref?: string;
|
|
321
525
|
skillPath?: string;
|
|
322
|
-
|
|
526
|
+
computedHash: string;
|
|
323
527
|
installedAt: string;
|
|
324
528
|
updatedAt: string;
|
|
325
|
-
|
|
529
|
+
marketId: string;
|
|
530
|
+
pluginId: string;
|
|
531
|
+
marketplaceId?: string;
|
|
326
532
|
}
|
|
327
533
|
interface DismissedPrompts {
|
|
328
534
|
findSkillsPrompt?: boolean;
|
|
@@ -331,7 +537,6 @@ interface SkillLockFile {
|
|
|
331
537
|
version: number;
|
|
332
538
|
skills: Record<string, SkillLockEntry>;
|
|
333
539
|
dismissed?: DismissedPrompts;
|
|
334
|
-
lastSelectedAgents?: string[];
|
|
335
540
|
}
|
|
336
541
|
declare function getSkillLockPath(): string;
|
|
337
542
|
declare function readSkillLock(): Promise<SkillLockFile>;
|
|
@@ -350,8 +555,6 @@ declare function getSkillsBySource(): Promise<Map<string, {
|
|
|
350
555
|
}>>;
|
|
351
556
|
declare function isPromptDismissed(promptKey: keyof DismissedPrompts): Promise<boolean>;
|
|
352
557
|
declare function dismissPrompt(promptKey: keyof DismissedPrompts): Promise<void>;
|
|
353
|
-
declare function getLastSelectedAgents(): Promise<string[] | undefined>;
|
|
354
|
-
declare function saveSelectedAgents(agents: string[]): Promise<void>;
|
|
355
558
|
|
|
356
559
|
interface LocalSkillLockEntry {
|
|
357
560
|
source: string;
|
|
@@ -359,6 +562,11 @@ interface LocalSkillLockEntry {
|
|
|
359
562
|
sourceType: string;
|
|
360
563
|
skillPath?: string;
|
|
361
564
|
computedHash: string;
|
|
565
|
+
installedAt: string;
|
|
566
|
+
updatedAt: string;
|
|
567
|
+
marketId: string;
|
|
568
|
+
pluginId: string;
|
|
569
|
+
marketplaceId?: string;
|
|
362
570
|
subagents?: string[];
|
|
363
571
|
}
|
|
364
572
|
interface LocalSkillLockFile {
|
|
@@ -369,33 +577,48 @@ declare function getLocalLockPath(cwd?: string): string;
|
|
|
369
577
|
declare function readLocalLock(cwd?: string): Promise<LocalSkillLockFile>;
|
|
370
578
|
declare function writeLocalLock(lock: LocalSkillLockFile, cwd?: string): Promise<void>;
|
|
371
579
|
declare function computeSkillFolderHash(skillDir: string): Promise<string>;
|
|
372
|
-
declare function addSkillToLocalLock(skillName: string, entry: LocalSkillLockEntry, cwd?: string): Promise<void>;
|
|
580
|
+
declare function addSkillToLocalLock(skillName: string, entry: Omit<LocalSkillLockEntry, 'installedAt' | 'updatedAt'>, cwd?: string): Promise<void>;
|
|
373
581
|
declare function removeSkillFromLocalLock(skillName: string, cwd?: string): Promise<boolean>;
|
|
374
582
|
|
|
375
583
|
type UpdateScope = 'project' | 'global' | 'both';
|
|
376
584
|
interface UpdateCheckOptions {
|
|
585
|
+
cwd?: string;
|
|
377
586
|
global?: boolean;
|
|
378
587
|
project?: boolean;
|
|
379
588
|
yes?: boolean;
|
|
589
|
+
all?: boolean;
|
|
590
|
+
agent?: string[];
|
|
591
|
+
force?: boolean;
|
|
380
592
|
skills?: string[];
|
|
381
593
|
}
|
|
382
|
-
declare function parseUpdateOptions(args: string[]
|
|
594
|
+
declare function parseUpdateOptions(args: string[], callOptions?: {
|
|
595
|
+
cwd?: string;
|
|
596
|
+
}): UpdateCheckOptions;
|
|
383
597
|
declare function hasProjectSkills(cwd?: string): boolean;
|
|
384
598
|
declare function resolveUpdateScope(options: UpdateCheckOptions): Promise<UpdateScope>;
|
|
385
599
|
declare function matchesSkillFilter(name: string, filter?: string[]): boolean;
|
|
386
|
-
declare function runUpdate(args?: string[]
|
|
600
|
+
declare function runUpdate(args?: string[], callOptions?: {
|
|
601
|
+
cwd?: string;
|
|
602
|
+
}): Promise<void>;
|
|
387
603
|
|
|
388
|
-
declare function
|
|
604
|
+
declare function runDoctor(args: string[], callOptions?: {
|
|
605
|
+
cwd?: string;
|
|
606
|
+
}): Promise<void>;
|
|
389
607
|
|
|
390
|
-
interface
|
|
391
|
-
agent?: string[];
|
|
392
|
-
yes?: boolean;
|
|
608
|
+
interface StoreOptions {
|
|
393
609
|
force?: boolean;
|
|
610
|
+
yes?: boolean;
|
|
611
|
+
json?: boolean;
|
|
394
612
|
}
|
|
395
|
-
declare function
|
|
396
|
-
|
|
397
|
-
|
|
613
|
+
declare function parseStoreOptions(args: string[]): {
|
|
614
|
+
subcommand: string;
|
|
615
|
+
restArgs: string[];
|
|
398
616
|
};
|
|
617
|
+
declare function runStore(args: string[], options?: StoreOptions): Promise<number>;
|
|
618
|
+
declare function runStoreList(keyword: string | undefined, options?: StoreOptions): Promise<number>;
|
|
619
|
+
declare function runStoreClean(options?: StoreOptions): Promise<number>;
|
|
620
|
+
declare function runStoreUpdate(keyword: string | undefined, options?: StoreOptions): Promise<number>;
|
|
621
|
+
declare function runStoreRemove(restArgs: string[], options?: StoreOptions): Promise<number>;
|
|
399
622
|
|
|
400
623
|
interface UseOptions {
|
|
401
624
|
skill?: string;
|
|
@@ -453,69 +676,6 @@ declare function materializeUseSkill(skill: UseSkill): Promise<MaterializedUseSk
|
|
|
453
676
|
declare function runUse(sourceArgs: string[], options?: UseOptions, parseErrors?: string[]): Promise<void>;
|
|
454
677
|
declare function launchAgentInteractively(agent: AgentType, prompt: string, spawnImpl?: AgentSpawn): Promise<number>;
|
|
455
678
|
|
|
456
|
-
declare const DEFAULT_CLONE_TIMEOUT = 300000;
|
|
457
|
-
interface GitHubRepoInfo {
|
|
458
|
-
owner: string;
|
|
459
|
-
repo: string;
|
|
460
|
-
slug: string;
|
|
461
|
-
sshUrl: string;
|
|
462
|
-
}
|
|
463
|
-
declare class GitCloneError extends Error {
|
|
464
|
-
readonly url: string;
|
|
465
|
-
readonly isTimeout: boolean;
|
|
466
|
-
readonly isAuthError: boolean;
|
|
467
|
-
constructor(message: string, url: string, isTimeout?: boolean, isAuthError?: boolean);
|
|
468
|
-
}
|
|
469
|
-
declare function parseGitHubRepoUrl(url: string): GitHubRepoInfo | null;
|
|
470
|
-
declare function isGitHubHttpsCloneUrl(url: string): boolean;
|
|
471
|
-
declare function isGitHubSsoAuthError(message: string): boolean;
|
|
472
|
-
declare function cloneRepo(url: string, ref?: string): Promise<string>;
|
|
473
|
-
declare function cleanupTempDir(dir: string): Promise<void>;
|
|
474
|
-
|
|
475
|
-
interface SkillSnapshotFile {
|
|
476
|
-
path: string;
|
|
477
|
-
contents: string;
|
|
478
|
-
}
|
|
479
|
-
interface SkillDownloadResponse {
|
|
480
|
-
files: SkillSnapshotFile[];
|
|
481
|
-
hash: string;
|
|
482
|
-
}
|
|
483
|
-
interface BlobSkill extends Skill {
|
|
484
|
-
files: SkillSnapshotFile[];
|
|
485
|
-
snapshotHash: string;
|
|
486
|
-
repoPath: string;
|
|
487
|
-
}
|
|
488
|
-
declare const BLOB_ALLOWED_REPOS: Record<string, {
|
|
489
|
-
downloadUrl: (slug: string) => string;
|
|
490
|
-
}>;
|
|
491
|
-
declare function toSkillSlug(name: string): string;
|
|
492
|
-
interface TreeEntry {
|
|
493
|
-
path: string;
|
|
494
|
-
type: 'blob' | 'tree';
|
|
495
|
-
sha: string;
|
|
496
|
-
size?: number;
|
|
497
|
-
}
|
|
498
|
-
interface RepoTree {
|
|
499
|
-
sha: string;
|
|
500
|
-
branch: string;
|
|
501
|
-
tree: TreeEntry[];
|
|
502
|
-
}
|
|
503
|
-
declare function resetRepoTreeAuthState(): void;
|
|
504
|
-
declare function fetchRepoTree(ownerRepo: string, ref?: string, getToken?: () => string | null): Promise<RepoTree | null>;
|
|
505
|
-
declare function getSkillFolderHashFromTree(tree: RepoTree, skillPath: string): string | null;
|
|
506
|
-
declare function findSkillMdPaths(tree: RepoTree, subpath?: string): string[];
|
|
507
|
-
interface BlobInstallResult {
|
|
508
|
-
skills: BlobSkill[];
|
|
509
|
-
tree: RepoTree;
|
|
510
|
-
}
|
|
511
|
-
declare function tryBlobInstall(ownerRepo: string, options?: {
|
|
512
|
-
subpath?: string;
|
|
513
|
-
skillFilter?: string;
|
|
514
|
-
ref?: string;
|
|
515
|
-
getToken?: () => string | null;
|
|
516
|
-
includeInternal?: boolean;
|
|
517
|
-
}): Promise<BlobInstallResult | null>;
|
|
518
|
-
|
|
519
679
|
interface InstallTelemetryData {
|
|
520
680
|
event: 'install';
|
|
521
681
|
source: string;
|
|
@@ -545,14 +705,47 @@ interface FindTelemetryData {
|
|
|
545
705
|
query: string;
|
|
546
706
|
resultCount: string;
|
|
547
707
|
interactive?: '1';
|
|
708
|
+
mode?: 'local' | 'remote';
|
|
548
709
|
}
|
|
549
|
-
interface
|
|
550
|
-
event: '
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
710
|
+
interface CacheCleanAllTelemetryData {
|
|
711
|
+
event: 'cache_clean_all';
|
|
712
|
+
cacheRoot?: string;
|
|
713
|
+
}
|
|
714
|
+
interface CacheCleanSourceTelemetryData {
|
|
715
|
+
event: 'cache_clean_source';
|
|
716
|
+
source: string;
|
|
717
|
+
}
|
|
718
|
+
interface CacheRemoveSourceTelemetryData {
|
|
719
|
+
event: 'cache_remove_source';
|
|
720
|
+
source: string;
|
|
721
|
+
removedSkills?: string;
|
|
722
|
+
}
|
|
723
|
+
interface StoreCleanTelemetryData {
|
|
724
|
+
event: 'store_clean';
|
|
725
|
+
}
|
|
726
|
+
interface StoreCleanForceTelemetryData {
|
|
727
|
+
event: 'store_clean_force';
|
|
728
|
+
}
|
|
729
|
+
interface StoreUpdateTelemetryData {
|
|
730
|
+
event: 'store_update';
|
|
731
|
+
keyword?: string;
|
|
732
|
+
sourceCount?: string;
|
|
733
|
+
successCount?: string;
|
|
734
|
+
failCount?: string;
|
|
735
|
+
}
|
|
736
|
+
interface StoreRemoveTelemetryData {
|
|
737
|
+
event: 'store_remove';
|
|
738
|
+
source: string;
|
|
739
|
+
sourceType: string;
|
|
740
|
+
removedSkills?: string;
|
|
741
|
+
}
|
|
742
|
+
interface StoreRemoveForceTelemetryData {
|
|
743
|
+
event: 'store_remove_force';
|
|
744
|
+
source: string;
|
|
745
|
+
sourceType: string;
|
|
746
|
+
removedSkills?: string;
|
|
554
747
|
}
|
|
555
|
-
type TelemetryData = InstallTelemetryData | RemoveTelemetryData | UpdateTelemetryData | FindTelemetryData |
|
|
748
|
+
type TelemetryData = InstallTelemetryData | RemoveTelemetryData | UpdateTelemetryData | FindTelemetryData | CacheCleanAllTelemetryData | CacheCleanSourceTelemetryData | CacheRemoveSourceTelemetryData | StoreCleanTelemetryData | StoreCleanForceTelemetryData | StoreUpdateTelemetryData | StoreRemoveTelemetryData | StoreRemoveForceTelemetryData;
|
|
556
749
|
declare function setDetectedAgent(agentName: string | null): void;
|
|
557
750
|
declare function setVersion(version: string): void;
|
|
558
751
|
interface PartnerAudit {
|
|
@@ -595,18 +788,11 @@ declare function parseFrontmatter(raw: string): {
|
|
|
595
788
|
content: string;
|
|
596
789
|
};
|
|
597
790
|
|
|
598
|
-
declare const I18n: {
|
|
599
|
-
readonly defaultLocale: "zh-CN";
|
|
600
|
-
readonly timeZone: "Asia/Shanghai";
|
|
601
|
-
readonly locales: string[];
|
|
602
|
-
};
|
|
603
|
-
type Locale = (typeof I18n)['locales'][number];
|
|
604
|
-
|
|
605
791
|
interface SkillsCliDeps {
|
|
606
792
|
version?: string;
|
|
607
793
|
cwd?: string;
|
|
608
794
|
inAgent?: boolean;
|
|
609
|
-
locale?:
|
|
795
|
+
locale?: Lang;
|
|
610
796
|
}
|
|
611
797
|
interface SkillsCliResult {
|
|
612
798
|
code: number;
|
|
@@ -645,4 +831,59 @@ declare function getXdgState(): string;
|
|
|
645
831
|
declare function getXdgCache(): string;
|
|
646
832
|
declare function getProjectDirectory(): string;
|
|
647
833
|
|
|
648
|
-
|
|
834
|
+
interface SkillDefinition {
|
|
835
|
+
name: string;
|
|
836
|
+
description: string;
|
|
837
|
+
scope?: 'general' | 'coder' | 'all';
|
|
838
|
+
}
|
|
839
|
+
type PluginSourceCategory = 'builtin' | 'project' | 'global' | 'marketplace' | 'well-known' | 'git' | 'file' | 'local';
|
|
840
|
+
interface PluginSourceEntry {
|
|
841
|
+
id: string;
|
|
842
|
+
name: string;
|
|
843
|
+
description?: string;
|
|
844
|
+
location: string;
|
|
845
|
+
category: PluginSourceCategory;
|
|
846
|
+
metadata?: Record<string, unknown>;
|
|
847
|
+
}
|
|
848
|
+
interface PluginSourceLoadResult {
|
|
849
|
+
skills: SkillDefinition[];
|
|
850
|
+
version?: string;
|
|
851
|
+
author?: {
|
|
852
|
+
name: string;
|
|
853
|
+
email?: string;
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
interface PluginSource {
|
|
857
|
+
readonly id: string;
|
|
858
|
+
readonly category: PluginSourceCategory;
|
|
859
|
+
fetch(): Promise<PluginSourceEntry[]>;
|
|
860
|
+
load(entry: PluginSourceEntry): Promise<PluginSourceLoadResult>;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
interface WellKnownSourceOptions {
|
|
864
|
+
url: string;
|
|
865
|
+
id?: string;
|
|
866
|
+
displayName?: string;
|
|
867
|
+
}
|
|
868
|
+
declare function createWellKnownSource(opts: WellKnownSourceOptions): PluginSource;
|
|
869
|
+
|
|
870
|
+
interface LocalPluginSourceOptions {
|
|
871
|
+
basePath: string;
|
|
872
|
+
id?: string;
|
|
873
|
+
displayName?: string;
|
|
874
|
+
}
|
|
875
|
+
declare function createLocalPluginSource(opts: LocalPluginSourceOptions): PluginSource;
|
|
876
|
+
|
|
877
|
+
declare function registerSource(source: PluginSource): void;
|
|
878
|
+
declare function listSources(): PluginSource[];
|
|
879
|
+
declare function findSource(id: string): PluginSource | null;
|
|
880
|
+
declare function findSourcesByCategory(category: PluginSourceCategory): PluginSource[];
|
|
881
|
+
declare function listAllEntries(): Promise<Array<{
|
|
882
|
+
sourceId: string;
|
|
883
|
+
entries: PluginSourceEntry[];
|
|
884
|
+
} | {
|
|
885
|
+
sourceId: string;
|
|
886
|
+
error: Error;
|
|
887
|
+
}>>;
|
|
888
|
+
|
|
889
|
+
export { AGENTS_DIR, type AddOptions, type AgentConfig, type AgentInstallMatrix, type AgentProcess, type AgentSkillDirsResult, type AgentSpawn, type AgentType, type AuditResponse, BLOB_ALLOWED_REPOS, type BlobInstallResult, type BlobSkill, type CellAction, type CellScope, DEFAULT_CLONE_TIMEOUT, type DiscoverSkillsOptions, type DismissedPrompts, EVE_SUBAGENTS_DIR, type FindOptions, GitCloneError, type HostProvider, type InstallCell, type InstallMode, type InstallScope, type InstallState, type InstalledSkill, type LocalPluginSourceOptions, type LocalSkillLockEntry, type LocalSkillLockFile, type MaterializedUseSkill, PROJECT_SKILLS_DIR_PATTERN, type ParseFindOptionsResult, type ParseUseOptionsResult, type ParsedSource, type PartnerAudit, type PluginSource, type PluginSourceCategory, type PluginSourceEntry, type PluginSourceLoadResult, type PostInstallInput, type PostInstallResult, type ProviderMatch, type ProviderRegistry, type RemoteSkill as ProviderRemoteSkill, type RemoteSkill$1 as RemoteSkill, type RemoveOptions, type RepoTree, SKILLS_SUBDIR, type SearchSkill, type Skill, type SkillAuditData, type SkillDownloadResponse, type SkillLockEntry, type SkillLockFile, type SkillSnapshotFile, type SkillsAgentAdapter, type SkillsCliDeps, type SkillsCliResult, type StoreOptions, type TreeEntry, UNIVERSAL_SKILLS_DIR, type UniversalScope, type UpdateCheckOptions, type UpdateScope, type UseOptions, type UseSkill, type WellKnownFileContent, type WellKnownIndex, type WellKnownIndexV1, type WellKnownIndexV2, WellKnownProvider, type WellKnownSkill, type WellKnownSkillEntry, type WellKnownSkillEntryV1, type WellKnownSkillEntryV2, type WellKnownSourceOptions, acquireSourceClone, addSkillToLocalLock, addSkillToLock, agents, applyActions, buildMatrix, buildUsePrompt, cleanCache, cleanCachedRepo, cleanupTempDir, cloneRepo, computeContentHash, computeSkillFolderHash, createLocalPluginSource, createWellKnownSource, detectAgent, detectInstalledAgents, discoverSkills, dismissPrompt, ensureCachedSource, fetchAuditData, fetchRepoTree, fetchSkillFolderHash, filterSkills, findProvider, findSkillMdPaths, findSource, findSourcesByCategory, flushTelemetry, getAgentAdapter, getAgentBaseDir, getAgentConfig, getAgentGlobalSkillDirs, getAgentName, getAgentProjectSkillContainerPrefixes, getAgentProjectSkillDirs, getAgentSkillDirs, getAgentType, getAllLockedSkills, getCacheRepoDir, getCacheRoot, getCanonicalPath, getCanonicalSkillsDir, getEveSubagentSkillsDir, getEveSubagents, getGitHubToken, getGlobal, getHomeDir, getInstallPath, getInstance, getLocalLockPath, getNonUniversalAgents, getOpenClawGlobalSkillsDir, getOwnerRepo, getProjectDirectory, getProviders, getSkillDisplayName, getSkillFolderHashFromTree, getSkillFromLock, getSkillLockPath, getSkillsBySource, getSourceDir, getUniversalAgents, getXdgCache, getXdgConfig, getXdgData, getXdgState, handleSkillsCli, hasAgentAdapter, hasProjectSkills, initTelemetry, installBlobSkillForAgent, installFromCache, installRemoteSkillForAgent, installSkillForAgent, installWellKnownSkillForAgent, isGitHubHttpsCloneUrl, isGitHubSsoAuthError, isPromptDismissed, isRepoPrivate, isRunningInAgent, isSkillInstalled, isSubpathSafe, isUniversalAgent, launchAgentInteractively, listAllEntries, listInstalledSkills, listSources, matchesSkillFilter, matchesUniversalScope, materializeUseSkill, parseAddOptions, parseFindOptions, parseFrontmatter, parseGitHubRepoUrl, parseListOptions, parseOwnerRepo, parseRemoveOptions, parseSkillMd, parseSource, parseStoreOptions, parseUpdateOptions, parseUseOptions, planActions, probeCell, readLocalLock, readSkillLock, registerProvider, registerSource, registry, removeCommand, removeSkillFromLocalLock, removeSkillFromLock, renderBanner, renderHelp, requireAgentAdapter, resetGhAuthWarning, resetGlobalAdapter, resetInstanceAdapter, resetRepoTreeAuthState, resolveUpdateScope, runAdd, runDoctor, runFind, runList, runPostInstallReconcile, runStore, runStoreClean, runStoreList, runStoreRemove, runStoreUpdate, runUpdate, runUse, sanitizeMetadata, sanitizeName, sanitizeSubpath, searchSkillsAPI, setAgentAdapter, setDetectedAgent, setGlobalAdapter, setInstanceAdapter, setVersion, shouldInstallInternalSkills, stripTerminalEscapes, toSkillSlug, track, tryBlobInstall, wellKnownProvider, writeLocalLock, writeSkillLock };
|