@easbot/skills 0.3.11 → 0.3.13
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 +167 -60
- package/README.md +173 -63
- package/dist/chunks/blob-3PZEQWTP.mjs +1 -0
- package/dist/chunks/blob-ZDEX2HRV.cjs +1 -0
- package/dist/chunks/chunk-4D5RQDWJ.mjs +5 -0
- package/dist/chunks/chunk-5BL3KG26.cjs +5 -0
- package/dist/chunks/chunk-5W7HC7BY.mjs +22 -0
- package/dist/chunks/chunk-CFMOYU7R.mjs +2 -0
- package/dist/chunks/chunk-CXH3OTTQ.cjs +22 -0
- package/dist/chunks/chunk-CY6UI6SJ.cjs +1 -0
- package/dist/chunks/chunk-E7AHWFZN.cjs +2 -0
- package/dist/chunks/chunk-ISMGLHYS.cjs +1 -0
- package/dist/chunks/chunk-K2XGYOXP.mjs +267 -0
- package/dist/chunks/chunk-ML6B4IQL.mjs +1 -0
- package/dist/chunks/chunk-NKIQLESR.mjs +3 -0
- package/dist/chunks/chunk-ROCFLAYZ.mjs +2 -0
- package/dist/chunks/chunk-RVR3DSD2.cjs +2 -0
- package/dist/chunks/chunk-RWZ4LFSN.mjs +1 -0
- package/dist/chunks/chunk-S6YNGR7S.cjs +2 -0
- package/dist/chunks/chunk-SXUY2J75.cjs +3 -0
- package/dist/chunks/chunk-UJWB7QQ6.cjs +267 -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/chunk-ZBKGF7PA.mjs +1 -0
- package/dist/chunks/chunk-ZYDDQV73.mjs +2 -0
- package/dist/chunks/cli-handler-667TYY4I.cjs +1 -0
- package/dist/chunks/cli-handler-YSDUNKKZ.mjs +1 -0
- package/dist/chunks/installer-REG45DC2.mjs +1 -0
- package/dist/chunks/installer-SOVGUW3M.cjs +1 -0
- package/dist/chunks/interfaces-S47ZGORM.mjs +1 -0
- package/dist/chunks/interfaces-UIS44Q7A.cjs +1 -0
- package/dist/chunks/local-lock-AWD3LLEY.mjs +1 -0
- package/dist/chunks/local-lock-GIZDVF3X.cjs +1 -0
- package/dist/chunks/scan-57D2H7LP.cjs +1 -0
- package/dist/chunks/scan-WAXGJM5N.mjs +1 -0
- package/dist/chunks/skill-lock-DZMA75MY.mjs +1 -0
- package/dist/chunks/skill-lock-XTWQYBRG.cjs +1 -0
- package/dist/chunks/store-F7PGGZIO.cjs +1 -0
- package/dist/chunks/store-IVDLGLET.mjs +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 +288 -129
- package/dist/index.d.ts +288 -129
- package/dist/index.mjs +1 -1
- package/package.json +4 -5
- package/dist/chunks/blob-LYSE5I24.mjs +0 -1
- package/dist/chunks/blob-NYUAIVUS.cjs +0 -1
- package/dist/chunks/chunk-4IO7TNWC.mjs +0 -223
- package/dist/chunks/chunk-IWCI7DET.mjs +0 -6
- package/dist/chunks/chunk-KJPMAUXZ.cjs +0 -1
- package/dist/chunks/chunk-L6KE3VIY.mjs +0 -2
- package/dist/chunks/chunk-PGDLW2JN.cjs +0 -2
- package/dist/chunks/chunk-S76WRD5J.cjs +0 -6
- package/dist/chunks/chunk-WQJKBJSM.cjs +0 -223
- package/dist/chunks/chunk-Y2X6FBMZ.mjs +0 -1
- package/dist/chunks/scan-47YPOLJX.mjs +0 -1
- package/dist/chunks/scan-5G765ZEF.cjs +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AgentResult } from '@vercel/detect-agent';
|
|
2
1
|
import { Lang } from '@easbot/utils';
|
|
3
2
|
import { IGlobal, IInstance, ISubAgentRunner } from '@easbot/types';
|
|
4
3
|
|
|
@@ -17,9 +16,6 @@ interface AgentConfig {
|
|
|
17
16
|
skillsDir: string;
|
|
18
17
|
globalSkillsDir: string | undefined;
|
|
19
18
|
detectInstalled: () => Promise<boolean>;
|
|
20
|
-
showInUniversalList?: boolean;
|
|
21
|
-
showInUniversalPrompt?: boolean;
|
|
22
|
-
isUniversalShared?: boolean;
|
|
23
19
|
}
|
|
24
20
|
interface ParsedSource {
|
|
25
21
|
type: 'github' | 'gitlab' | 'git' | 'local' | 'well-known';
|
|
@@ -47,8 +43,8 @@ declare const EVE_SUBAGENTS_DIR: string;
|
|
|
47
43
|
declare function getEveSubagents(cwd?: string): string[];
|
|
48
44
|
type UniversalScope = 'project' | 'global';
|
|
49
45
|
declare function matchesUniversalScope(type: AgentType, scope: UniversalScope): boolean;
|
|
50
|
-
declare function getUniversalAgents(): AgentType[];
|
|
51
|
-
declare function getNonUniversalAgents(): AgentType[];
|
|
46
|
+
declare function getUniversalAgents(scope: 'project' | 'global'): AgentType[];
|
|
47
|
+
declare function getNonUniversalAgents(scope: 'project' | 'global'): AgentType[];
|
|
52
48
|
declare const PROJECT_SKILLS_DIR_PATTERN: RegExp;
|
|
53
49
|
declare function getAgentProjectSkillDirs(): string[];
|
|
54
50
|
declare function getAgentGlobalSkillDirs(): string[];
|
|
@@ -59,7 +55,7 @@ interface AgentSkillDirsResult {
|
|
|
59
55
|
}
|
|
60
56
|
declare function getAgentSkillDirs(): AgentSkillDirsResult;
|
|
61
57
|
declare function getAgentProjectSkillContainerPrefixes(): string[];
|
|
62
|
-
declare function isUniversalAgent(type: AgentType): boolean;
|
|
58
|
+
declare function isUniversalAgent(type: AgentType, scope: 'project' | 'global'): boolean;
|
|
63
59
|
|
|
64
60
|
declare function shouldInstallInternalSkills(): boolean;
|
|
65
61
|
declare function parseSkillMd(skillMdPath: string, options?: {
|
|
@@ -71,7 +67,10 @@ interface DiscoverSkillsOptions {
|
|
|
71
67
|
}
|
|
72
68
|
declare function isSubpathSafe(basePath: string, subpath: string): boolean;
|
|
73
69
|
declare function discoverSkills(basePath: string, subpath?: string, options?: DiscoverSkillsOptions): Promise<Skill[]>;
|
|
74
|
-
declare function getSkillDisplayName(skill:
|
|
70
|
+
declare function getSkillDisplayName(skill: {
|
|
71
|
+
name: string;
|
|
72
|
+
path?: string;
|
|
73
|
+
}): string;
|
|
75
74
|
declare function filterSkills(skills: Skill[], inputNames: string[]): Skill[];
|
|
76
75
|
|
|
77
76
|
type InstallState = 'absent' | 'symlinked' | 'copied' | 'orphan' | 'divergent';
|
|
@@ -188,8 +187,23 @@ interface WellKnownSkillEntryV2 {
|
|
|
188
187
|
url: string;
|
|
189
188
|
digest: string;
|
|
190
189
|
}
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
interface WellKnownSkillEntryEasbotV1 {
|
|
191
|
+
name: string;
|
|
192
|
+
description: string;
|
|
193
|
+
sourceUrl: string;
|
|
194
|
+
installName?: string;
|
|
195
|
+
category?: string;
|
|
196
|
+
version?: string;
|
|
197
|
+
tags?: string[];
|
|
198
|
+
metadata?: Record<string, unknown>;
|
|
199
|
+
skillPath?: string;
|
|
200
|
+
}
|
|
201
|
+
interface WellKnownIndexEasbotV1 {
|
|
202
|
+
$schema: string;
|
|
203
|
+
skills: WellKnownSkillEntryEasbotV1[];
|
|
204
|
+
}
|
|
205
|
+
type WellKnownIndex = WellKnownIndexV1 | WellKnownIndexV2 | WellKnownIndexEasbotV1;
|
|
206
|
+
type WellKnownSkillEntry = WellKnownSkillEntryV1 | WellKnownSkillEntryV2 | WellKnownSkillEntryEasbotV1;
|
|
193
207
|
type WellKnownFileContent = string | Uint8Array;
|
|
194
208
|
type NormalizedWellKnownEntry = {
|
|
195
209
|
version: '0.1.0';
|
|
@@ -207,6 +221,13 @@ type NormalizedWellKnownEntry = {
|
|
|
207
221
|
artifactUrl: string;
|
|
208
222
|
digest: string;
|
|
209
223
|
indexEntry: WellKnownSkillEntryV2;
|
|
224
|
+
} | {
|
|
225
|
+
version: 'easbot-v1';
|
|
226
|
+
name: string;
|
|
227
|
+
description: string;
|
|
228
|
+
skillMdUrl: string;
|
|
229
|
+
installName?: string;
|
|
230
|
+
indexEntry: WellKnownSkillEntryEasbotV1;
|
|
210
231
|
};
|
|
211
232
|
interface WellKnownSkill extends RemoteSkill {
|
|
212
233
|
files: Map<string, WellKnownFileContent>;
|
|
@@ -230,10 +251,12 @@ declare class WellKnownProvider implements HostProvider {
|
|
|
230
251
|
private getLegacySkillBaseUrl;
|
|
231
252
|
private isValidSkillName;
|
|
232
253
|
private isSafeLegacyFilePath;
|
|
254
|
+
private isValidSkillEntryEasbotV1;
|
|
233
255
|
private isValidSkillEntryV1;
|
|
234
256
|
private isValidSkillEntryV2;
|
|
235
257
|
fetchSkill(url: string): Promise<RemoteSkill | null>;
|
|
236
258
|
fetchSkillByEntry(baseUrlOrEntry: string | NormalizedWellKnownEntry, legacyEntry?: WellKnownSkillEntryV1, legacyWellKnownPath?: string): Promise<WellKnownSkill | null>;
|
|
259
|
+
private fetchEasbotV1SkillByEntry;
|
|
237
260
|
private fetchLegacySkillByEntry;
|
|
238
261
|
private fetchArtifactSkillByEntry;
|
|
239
262
|
private createSkill;
|
|
@@ -262,6 +285,7 @@ interface InstallResult {
|
|
|
262
285
|
mode: InstallMode;
|
|
263
286
|
symlinkFailed?: boolean;
|
|
264
287
|
skipped?: boolean;
|
|
288
|
+
skippedReason?: 'overwrite' | 'up-to-date';
|
|
265
289
|
error?: string;
|
|
266
290
|
}
|
|
267
291
|
declare function sanitizeName(name: string): string;
|
|
@@ -323,7 +347,7 @@ interface InstalledSkill {
|
|
|
323
347
|
agents: AgentType[];
|
|
324
348
|
}
|
|
325
349
|
declare function listInstalledSkills(options?: {
|
|
326
|
-
|
|
350
|
+
scope?: 'project' | 'global' | 'both';
|
|
327
351
|
cwd?: string;
|
|
328
352
|
agentFilter?: AgentType[];
|
|
329
353
|
}): Promise<InstalledSkill[]>;
|
|
@@ -348,6 +372,7 @@ interface AddOptions {
|
|
|
348
372
|
fullDepth?: boolean;
|
|
349
373
|
copy?: boolean;
|
|
350
374
|
subagent?: string[];
|
|
375
|
+
json?: boolean;
|
|
351
376
|
}
|
|
352
377
|
declare function runAdd(args: string[], options?: AddOptions): Promise<void>;
|
|
353
378
|
declare function parseAddOptions(args: string[]): {
|
|
@@ -385,7 +410,110 @@ interface ListOptions {
|
|
|
385
410
|
yes?: boolean;
|
|
386
411
|
}
|
|
387
412
|
declare function parseListOptions(args: string[]): ListOptions;
|
|
388
|
-
declare function runList(args: string[]
|
|
413
|
+
declare function runList(args: string[], callOptions?: {
|
|
414
|
+
cwd?: string;
|
|
415
|
+
}): Promise<void>;
|
|
416
|
+
|
|
417
|
+
declare const DEFAULT_CLONE_TIMEOUT = 300000;
|
|
418
|
+
interface GitHubRepoInfo {
|
|
419
|
+
owner: string;
|
|
420
|
+
repo: string;
|
|
421
|
+
slug: string;
|
|
422
|
+
sshUrl: string;
|
|
423
|
+
}
|
|
424
|
+
declare class GitCloneError extends Error {
|
|
425
|
+
readonly url: string;
|
|
426
|
+
readonly isTimeout: boolean;
|
|
427
|
+
readonly isAuthError: boolean;
|
|
428
|
+
constructor(message: string, url: string, isTimeout?: boolean, isAuthError?: boolean);
|
|
429
|
+
}
|
|
430
|
+
declare function parseGitHubRepoUrl(url: string): GitHubRepoInfo | null;
|
|
431
|
+
declare function isGitHubHttpsCloneUrl(url: string): boolean;
|
|
432
|
+
declare function isGitHubSsoAuthError(message: string): boolean;
|
|
433
|
+
declare function cloneRepo(url: string, ref?: string, targetDir?: string): Promise<string>;
|
|
434
|
+
declare function cleanupTempDir(dir: string): Promise<void>;
|
|
435
|
+
|
|
436
|
+
interface SkillSnapshotFile {
|
|
437
|
+
path: string;
|
|
438
|
+
contents: string | Buffer;
|
|
439
|
+
}
|
|
440
|
+
interface SkillDownloadResponse {
|
|
441
|
+
files: SkillSnapshotFile[];
|
|
442
|
+
hash: string;
|
|
443
|
+
}
|
|
444
|
+
interface BlobSkill extends Skill {
|
|
445
|
+
files: SkillSnapshotFile[];
|
|
446
|
+
snapshotHash: string;
|
|
447
|
+
repoPath: string;
|
|
448
|
+
repoSubpath?: string;
|
|
449
|
+
}
|
|
450
|
+
declare const BLOB_ALLOWED_REPOS: Record<string, {
|
|
451
|
+
downloadUrl: (slug: string) => string;
|
|
452
|
+
}>;
|
|
453
|
+
declare function toSkillSlug(name: string): string;
|
|
454
|
+
interface TreeEntry {
|
|
455
|
+
path: string;
|
|
456
|
+
type: 'blob' | 'tree';
|
|
457
|
+
sha: string;
|
|
458
|
+
size?: number;
|
|
459
|
+
}
|
|
460
|
+
interface RepoTree {
|
|
461
|
+
sha: string;
|
|
462
|
+
branch: string;
|
|
463
|
+
tree: TreeEntry[];
|
|
464
|
+
}
|
|
465
|
+
declare function resetRepoTreeAuthState(): void;
|
|
466
|
+
declare function fetchRepoTree(ownerRepo: string, ref?: string, getToken?: () => string | null): Promise<RepoTree | null>;
|
|
467
|
+
declare function getSkillFolderHashFromTree(tree: RepoTree, skillPath: string): string | null;
|
|
468
|
+
declare function findSkillMdPaths(tree: RepoTree, options?: {
|
|
469
|
+
subpath?: string;
|
|
470
|
+
maxDepth?: number;
|
|
471
|
+
limit?: number;
|
|
472
|
+
}): string[];
|
|
473
|
+
interface BlobInstallResult {
|
|
474
|
+
skills: BlobSkill[];
|
|
475
|
+
tree: RepoTree;
|
|
476
|
+
subpath?: string;
|
|
477
|
+
snapshotHash?: string;
|
|
478
|
+
}
|
|
479
|
+
declare function tryBlobInstall(ownerRepo: string, options?: {
|
|
480
|
+
subpath?: string;
|
|
481
|
+
ref?: string;
|
|
482
|
+
getToken?: () => string | null;
|
|
483
|
+
includeInternal?: boolean;
|
|
484
|
+
}): Promise<BlobInstallResult | null>;
|
|
485
|
+
|
|
486
|
+
type InstallScope = 'project' | 'global';
|
|
487
|
+
type AcquireMode = 'install' | 'update';
|
|
488
|
+
interface AcquireInput extends ParsedSource {
|
|
489
|
+
mode?: AcquireMode;
|
|
490
|
+
skillNames?: string[];
|
|
491
|
+
scope?: InstallScope;
|
|
492
|
+
}
|
|
493
|
+
interface AcquireResult {
|
|
494
|
+
tempDir: string;
|
|
495
|
+
cacheHit: boolean;
|
|
496
|
+
source: 'local-cp' | 'cache-clone' | 'cache-pull' | 'well-known-fetch' | 'blob-fetch';
|
|
497
|
+
cloneError?: GitCloneError | null;
|
|
498
|
+
}
|
|
499
|
+
declare function getSourceDir({ scope }: {
|
|
500
|
+
scope: InstallScope;
|
|
501
|
+
}): string;
|
|
502
|
+
declare function getCacheRoot(): string;
|
|
503
|
+
declare function getCacheRepoDir(parsed: ParsedSource): string;
|
|
504
|
+
declare function acquireSourceClone(input: AcquireInput): Promise<AcquireResult>;
|
|
505
|
+
declare function ensureCachedSource(source: {
|
|
506
|
+
url: string;
|
|
507
|
+
ref?: string;
|
|
508
|
+
sourceId: string;
|
|
509
|
+
}): Promise<string>;
|
|
510
|
+
declare function installFromCache({ cachePath, skillName, scope, }: {
|
|
511
|
+
cachePath: string;
|
|
512
|
+
skillName: string;
|
|
513
|
+
scope: InstallScope;
|
|
514
|
+
}): Promise<string>;
|
|
515
|
+
declare function cleanCachedRepo(parsed: ParsedSource): Promise<void>;
|
|
516
|
+
declare function cleanCache(): Promise<void>;
|
|
389
517
|
|
|
390
518
|
interface RemoveOptions {
|
|
391
519
|
global?: boolean;
|
|
@@ -393,6 +521,7 @@ interface RemoveOptions {
|
|
|
393
521
|
skill?: string[];
|
|
394
522
|
yes?: boolean;
|
|
395
523
|
all?: boolean;
|
|
524
|
+
json?: boolean;
|
|
396
525
|
}
|
|
397
526
|
declare function removeCommand(skillNames: string[], options: RemoveOptions): Promise<void>;
|
|
398
527
|
declare function parseRemoveOptions(args: string[]): {
|
|
@@ -403,13 +532,14 @@ declare function parseRemoveOptions(args: string[]): {
|
|
|
403
532
|
interface SkillLockEntry {
|
|
404
533
|
source: string;
|
|
405
534
|
sourceType: string;
|
|
406
|
-
sourceUrl: string;
|
|
407
535
|
ref?: string;
|
|
408
536
|
skillPath?: string;
|
|
409
|
-
|
|
537
|
+
computedHash: string;
|
|
410
538
|
installedAt: string;
|
|
411
539
|
updatedAt: string;
|
|
412
|
-
|
|
540
|
+
marketId: string;
|
|
541
|
+
pluginId: string;
|
|
542
|
+
marketplaceId?: string;
|
|
413
543
|
}
|
|
414
544
|
interface DismissedPrompts {
|
|
415
545
|
findSkillsPrompt?: boolean;
|
|
@@ -418,7 +548,6 @@ interface SkillLockFile {
|
|
|
418
548
|
version: number;
|
|
419
549
|
skills: Record<string, SkillLockEntry>;
|
|
420
550
|
dismissed?: DismissedPrompts;
|
|
421
|
-
lastSelectedAgents?: string[];
|
|
422
551
|
}
|
|
423
552
|
declare function getSkillLockPath(): string;
|
|
424
553
|
declare function readSkillLock(): Promise<SkillLockFile>;
|
|
@@ -437,8 +566,6 @@ declare function getSkillsBySource(): Promise<Map<string, {
|
|
|
437
566
|
}>>;
|
|
438
567
|
declare function isPromptDismissed(promptKey: keyof DismissedPrompts): Promise<boolean>;
|
|
439
568
|
declare function dismissPrompt(promptKey: keyof DismissedPrompts): Promise<void>;
|
|
440
|
-
declare function getLastSelectedAgents(): Promise<string[] | undefined>;
|
|
441
|
-
declare function saveSelectedAgents(agents: string[]): Promise<void>;
|
|
442
569
|
|
|
443
570
|
interface LocalSkillLockEntry {
|
|
444
571
|
source: string;
|
|
@@ -446,6 +573,11 @@ interface LocalSkillLockEntry {
|
|
|
446
573
|
sourceType: string;
|
|
447
574
|
skillPath?: string;
|
|
448
575
|
computedHash: string;
|
|
576
|
+
installedAt: string;
|
|
577
|
+
updatedAt: string;
|
|
578
|
+
marketId: string;
|
|
579
|
+
pluginId: string;
|
|
580
|
+
marketplaceId?: string;
|
|
449
581
|
subagents?: string[];
|
|
450
582
|
}
|
|
451
583
|
interface LocalSkillLockFile {
|
|
@@ -455,36 +587,49 @@ interface LocalSkillLockFile {
|
|
|
455
587
|
declare function getLocalLockPath(cwd?: string): string;
|
|
456
588
|
declare function readLocalLock(cwd?: string): Promise<LocalSkillLockFile>;
|
|
457
589
|
declare function writeLocalLock(lock: LocalSkillLockFile, cwd?: string): Promise<void>;
|
|
458
|
-
declare function
|
|
459
|
-
declare function addSkillToLocalLock(skillName: string, entry: LocalSkillLockEntry, cwd?: string): Promise<void>;
|
|
590
|
+
declare function addSkillToLocalLock(skillName: string, entry: Omit<LocalSkillLockEntry, 'installedAt' | 'updatedAt'>, cwd?: string): Promise<void>;
|
|
460
591
|
declare function removeSkillFromLocalLock(skillName: string, cwd?: string): Promise<boolean>;
|
|
461
592
|
|
|
462
593
|
type UpdateScope = 'project' | 'global' | 'both';
|
|
463
594
|
interface UpdateCheckOptions {
|
|
595
|
+
cwd?: string;
|
|
464
596
|
global?: boolean;
|
|
465
597
|
project?: boolean;
|
|
466
598
|
yes?: boolean;
|
|
599
|
+
json?: boolean;
|
|
467
600
|
all?: boolean;
|
|
601
|
+
agent?: string[];
|
|
468
602
|
force?: boolean;
|
|
469
603
|
skills?: string[];
|
|
470
604
|
}
|
|
471
|
-
declare function parseUpdateOptions(args: string[]
|
|
605
|
+
declare function parseUpdateOptions(args: string[], callOptions?: {
|
|
606
|
+
cwd?: string;
|
|
607
|
+
}): UpdateCheckOptions;
|
|
472
608
|
declare function hasProjectSkills(cwd?: string): boolean;
|
|
473
609
|
declare function resolveUpdateScope(options: UpdateCheckOptions): Promise<UpdateScope>;
|
|
474
610
|
declare function matchesSkillFilter(name: string, filter?: string[]): boolean;
|
|
475
|
-
declare function runUpdate(args?: string[]
|
|
611
|
+
declare function runUpdate(args?: string[], callOptions?: {
|
|
612
|
+
cwd?: string;
|
|
613
|
+
}): Promise<void>;
|
|
476
614
|
|
|
477
|
-
declare function
|
|
615
|
+
declare function runDoctor(args: string[], callOptions?: {
|
|
616
|
+
cwd?: string;
|
|
617
|
+
}): Promise<void>;
|
|
478
618
|
|
|
479
|
-
interface
|
|
480
|
-
agent?: string[];
|
|
481
|
-
yes?: boolean;
|
|
619
|
+
interface StoreOptions {
|
|
482
620
|
force?: boolean;
|
|
621
|
+
yes?: boolean;
|
|
622
|
+
json?: boolean;
|
|
483
623
|
}
|
|
484
|
-
declare function
|
|
485
|
-
|
|
486
|
-
|
|
624
|
+
declare function parseStoreOptions(args: string[]): {
|
|
625
|
+
subcommand: string;
|
|
626
|
+
restArgs: string[];
|
|
487
627
|
};
|
|
628
|
+
declare function runStore(args: string[], options?: StoreOptions): Promise<number>;
|
|
629
|
+
declare function runStoreList(keyword: string | undefined, options?: StoreOptions): Promise<number>;
|
|
630
|
+
declare function runStoreClean(options?: StoreOptions): Promise<number>;
|
|
631
|
+
declare function runStoreUpdate(keyword: string | undefined, options?: StoreOptions): Promise<number>;
|
|
632
|
+
declare function runStoreRemove(restArgs: string[], options?: StoreOptions): Promise<number>;
|
|
488
633
|
|
|
489
634
|
interface UseOptions {
|
|
490
635
|
skill?: string;
|
|
@@ -492,6 +637,7 @@ interface UseOptions {
|
|
|
492
637
|
fullDepth?: boolean;
|
|
493
638
|
dangerouslyAcceptOpenclawRisks?: boolean;
|
|
494
639
|
help?: boolean;
|
|
640
|
+
json?: boolean;
|
|
495
641
|
}
|
|
496
642
|
interface ParseUseOptionsResult {
|
|
497
643
|
source: string[];
|
|
@@ -505,7 +651,7 @@ type UseSkill = {
|
|
|
505
651
|
rawContent: string;
|
|
506
652
|
files: Array<{
|
|
507
653
|
path: string;
|
|
508
|
-
contents: string;
|
|
654
|
+
contents: string | Buffer;
|
|
509
655
|
}>;
|
|
510
656
|
} | {
|
|
511
657
|
kind: 'disk';
|
|
@@ -542,67 +688,11 @@ declare function materializeUseSkill(skill: UseSkill): Promise<MaterializedUseSk
|
|
|
542
688
|
declare function runUse(sourceArgs: string[], options?: UseOptions, parseErrors?: string[]): Promise<void>;
|
|
543
689
|
declare function launchAgentInteractively(agent: AgentType, prompt: string, spawnImpl?: AgentSpawn): Promise<number>;
|
|
544
690
|
|
|
545
|
-
declare
|
|
546
|
-
|
|
547
|
-
owner: string;
|
|
548
|
-
repo: string;
|
|
549
|
-
slug: string;
|
|
550
|
-
sshUrl: string;
|
|
551
|
-
}
|
|
552
|
-
declare class GitCloneError extends Error {
|
|
553
|
-
readonly url: string;
|
|
554
|
-
readonly isTimeout: boolean;
|
|
555
|
-
readonly isAuthError: boolean;
|
|
556
|
-
constructor(message: string, url: string, isTimeout?: boolean, isAuthError?: boolean);
|
|
557
|
-
}
|
|
558
|
-
declare function parseGitHubRepoUrl(url: string): GitHubRepoInfo | null;
|
|
559
|
-
declare function isGitHubHttpsCloneUrl(url: string): boolean;
|
|
560
|
-
declare function isGitHubSsoAuthError(message: string): boolean;
|
|
561
|
-
declare function cloneRepo(url: string, ref?: string): Promise<string>;
|
|
562
|
-
declare function cleanupTempDir(dir: string): Promise<void>;
|
|
563
|
-
|
|
564
|
-
interface SkillSnapshotFile {
|
|
691
|
+
declare function computeFromDir(skillDir: string): Promise<string>;
|
|
692
|
+
declare function computeSnapshotHash(files: ReadonlyArray<{
|
|
565
693
|
path: string;
|
|
566
|
-
contents: string;
|
|
567
|
-
}
|
|
568
|
-
interface SkillDownloadResponse {
|
|
569
|
-
files: SkillSnapshotFile[];
|
|
570
|
-
hash: string;
|
|
571
|
-
}
|
|
572
|
-
interface BlobSkill extends Skill {
|
|
573
|
-
files: SkillSnapshotFile[];
|
|
574
|
-
snapshotHash: string;
|
|
575
|
-
repoPath: string;
|
|
576
|
-
}
|
|
577
|
-
declare const BLOB_ALLOWED_REPOS: Record<string, {
|
|
578
|
-
downloadUrl: (slug: string) => string;
|
|
579
|
-
}>;
|
|
580
|
-
declare function toSkillSlug(name: string): string;
|
|
581
|
-
interface TreeEntry {
|
|
582
|
-
path: string;
|
|
583
|
-
type: 'blob' | 'tree';
|
|
584
|
-
sha: string;
|
|
585
|
-
size?: number;
|
|
586
|
-
}
|
|
587
|
-
interface RepoTree {
|
|
588
|
-
sha: string;
|
|
589
|
-
branch: string;
|
|
590
|
-
tree: TreeEntry[];
|
|
591
|
-
}
|
|
592
|
-
declare function resetRepoTreeAuthState(): void;
|
|
593
|
-
declare function fetchRepoTree(ownerRepo: string, ref?: string, getToken?: () => string | null): Promise<RepoTree | null>;
|
|
594
|
-
declare function getSkillFolderHashFromTree(tree: RepoTree, skillPath: string): string | null;
|
|
595
|
-
declare function findSkillMdPaths(tree: RepoTree, subpath?: string): string[];
|
|
596
|
-
interface BlobInstallResult {
|
|
597
|
-
skills: BlobSkill[];
|
|
598
|
-
tree: RepoTree;
|
|
599
|
-
}
|
|
600
|
-
declare function tryBlobInstall(ownerRepo: string, options?: {
|
|
601
|
-
subpath?: string;
|
|
602
|
-
ref?: string;
|
|
603
|
-
getToken?: () => string | null;
|
|
604
|
-
includeInternal?: boolean;
|
|
605
|
-
}): Promise<BlobInstallResult | null>;
|
|
694
|
+
contents: string | Buffer;
|
|
695
|
+
}>): string;
|
|
606
696
|
|
|
607
697
|
interface InstallTelemetryData {
|
|
608
698
|
event: 'install';
|
|
@@ -635,12 +725,6 @@ interface FindTelemetryData {
|
|
|
635
725
|
interactive?: '1';
|
|
636
726
|
mode?: 'local' | 'remote';
|
|
637
727
|
}
|
|
638
|
-
interface SyncTelemetryData {
|
|
639
|
-
event: 'experimental_sync';
|
|
640
|
-
skillCount: string;
|
|
641
|
-
successCount: string;
|
|
642
|
-
agents: string;
|
|
643
|
-
}
|
|
644
728
|
interface CacheCleanAllTelemetryData {
|
|
645
729
|
event: 'cache_clean_all';
|
|
646
730
|
cacheRoot?: string;
|
|
@@ -654,7 +738,32 @@ interface CacheRemoveSourceTelemetryData {
|
|
|
654
738
|
source: string;
|
|
655
739
|
removedSkills?: string;
|
|
656
740
|
}
|
|
657
|
-
|
|
741
|
+
interface StoreCleanTelemetryData {
|
|
742
|
+
event: 'store_clean';
|
|
743
|
+
}
|
|
744
|
+
interface StoreCleanForceTelemetryData {
|
|
745
|
+
event: 'store_clean_force';
|
|
746
|
+
}
|
|
747
|
+
interface StoreUpdateTelemetryData {
|
|
748
|
+
event: 'store_update';
|
|
749
|
+
keyword?: string;
|
|
750
|
+
sourceCount?: string;
|
|
751
|
+
successCount?: string;
|
|
752
|
+
failCount?: string;
|
|
753
|
+
}
|
|
754
|
+
interface StoreRemoveTelemetryData {
|
|
755
|
+
event: 'store_remove';
|
|
756
|
+
source: string;
|
|
757
|
+
sourceType: string;
|
|
758
|
+
removedSkills?: string;
|
|
759
|
+
}
|
|
760
|
+
interface StoreRemoveForceTelemetryData {
|
|
761
|
+
event: 'store_remove_force';
|
|
762
|
+
source: string;
|
|
763
|
+
sourceType: string;
|
|
764
|
+
removedSkills?: string;
|
|
765
|
+
}
|
|
766
|
+
type TelemetryData = InstallTelemetryData | RemoveTelemetryData | UpdateTelemetryData | FindTelemetryData | CacheCleanAllTelemetryData | CacheCleanSourceTelemetryData | CacheRemoveSourceTelemetryData | StoreCleanTelemetryData | StoreCleanForceTelemetryData | StoreUpdateTelemetryData | StoreRemoveTelemetryData | StoreRemoveForceTelemetryData;
|
|
658
767
|
declare function setDetectedAgent(agentName: string | null): void;
|
|
659
768
|
declare function setVersion(version: string): void;
|
|
660
769
|
interface PartnerAudit {
|
|
@@ -672,6 +781,32 @@ declare function flushTelemetry(timeoutMs?: number): Promise<void>;
|
|
|
672
781
|
declare function stripTerminalEscapes(str: string): string;
|
|
673
782
|
declare function sanitizeMetadata(str: string): string;
|
|
674
783
|
|
|
784
|
+
declare const EASBOT: "easbot";
|
|
785
|
+
declare const CURSOR: "cursor";
|
|
786
|
+
declare const CURSOR_CLI: "cursor-cli";
|
|
787
|
+
declare const CLAUDE: "claude";
|
|
788
|
+
declare const COWORK: "cowork";
|
|
789
|
+
declare const DEVIN: "devin";
|
|
790
|
+
declare const REPLIT: "replit";
|
|
791
|
+
declare const GEMINI: "gemini";
|
|
792
|
+
declare const CODEX: "codex";
|
|
793
|
+
declare const ANTIGRAVITY: "antigravity";
|
|
794
|
+
declare const AUGMENT_CLI: "augment-cli";
|
|
795
|
+
declare const OPENCODE: "opencode";
|
|
796
|
+
declare const GITHUB_COPILOT: "github-copilot";
|
|
797
|
+
declare const V0: "v0";
|
|
798
|
+
type KnownAgentNames = typeof EASBOT | typeof CURSOR | typeof CURSOR_CLI | typeof CLAUDE | typeof COWORK | typeof DEVIN | typeof REPLIT | typeof GEMINI | typeof CODEX | typeof ANTIGRAVITY | typeof AUGMENT_CLI | typeof OPENCODE | typeof GITHUB_COPILOT | typeof V0;
|
|
799
|
+
interface KnownAgentDetails {
|
|
800
|
+
name: KnownAgentNames;
|
|
801
|
+
}
|
|
802
|
+
type AgentResult = {
|
|
803
|
+
isAgent: true;
|
|
804
|
+
agent: KnownAgentDetails;
|
|
805
|
+
} | {
|
|
806
|
+
isAgent: false;
|
|
807
|
+
agent: undefined;
|
|
808
|
+
};
|
|
809
|
+
|
|
675
810
|
declare function detectAgent(): Promise<AgentResult>;
|
|
676
811
|
declare function isRunningInAgent(): Promise<boolean>;
|
|
677
812
|
declare function getAgentName(): Promise<string | null>;
|
|
@@ -712,37 +847,6 @@ declare function renderBanner(deps?: SkillsCliDeps): void;
|
|
|
712
847
|
declare function renderHelp(deps?: SkillsCliDeps): void;
|
|
713
848
|
declare function handleSkillsCli(args: string[], deps?: SkillsCliDeps): Promise<SkillsCliResult>;
|
|
714
849
|
|
|
715
|
-
type InstallScope = 'project' | 'global';
|
|
716
|
-
type AcquireMode = 'install' | 'update';
|
|
717
|
-
interface AcquireInput extends ParsedSource {
|
|
718
|
-
mode?: AcquireMode;
|
|
719
|
-
skillNames?: string[];
|
|
720
|
-
scope?: InstallScope;
|
|
721
|
-
}
|
|
722
|
-
interface AcquireResult {
|
|
723
|
-
storeDir: string;
|
|
724
|
-
cacheHit: boolean;
|
|
725
|
-
source: 'local-cp' | 'cache-clone' | 'cache-pull' | 'well-known-fetch' | 'blob-fetch';
|
|
726
|
-
}
|
|
727
|
-
declare function getSourceDir({ scope }: {
|
|
728
|
-
scope: InstallScope;
|
|
729
|
-
}): string;
|
|
730
|
-
declare function getCacheRoot(): string;
|
|
731
|
-
declare function getCacheRepoDir(parsed: ParsedSource): string;
|
|
732
|
-
declare function acquireSourceClone(input: AcquireInput): Promise<AcquireResult>;
|
|
733
|
-
declare function ensureCachedSource(source: {
|
|
734
|
-
url: string;
|
|
735
|
-
ref?: string;
|
|
736
|
-
sourceId: string;
|
|
737
|
-
}): Promise<string>;
|
|
738
|
-
declare function installFromCache({ cachePath, skillName, scope, }: {
|
|
739
|
-
cachePath: string;
|
|
740
|
-
skillName: string;
|
|
741
|
-
scope: InstallScope;
|
|
742
|
-
}): Promise<string>;
|
|
743
|
-
declare function cleanCachedRepo(parsed: ParsedSource): Promise<void>;
|
|
744
|
-
declare function cleanCache(): Promise<void>;
|
|
745
|
-
|
|
746
850
|
interface SkillsAgentAdapter {
|
|
747
851
|
global: IGlobal;
|
|
748
852
|
instance: IInstance;
|
|
@@ -771,4 +875,59 @@ declare function getXdgState(): string;
|
|
|
771
875
|
declare function getXdgCache(): string;
|
|
772
876
|
declare function getProjectDirectory(): string;
|
|
773
877
|
|
|
774
|
-
|
|
878
|
+
interface SkillDefinition {
|
|
879
|
+
name: string;
|
|
880
|
+
description: string;
|
|
881
|
+
scope?: 'general' | 'coder' | 'all';
|
|
882
|
+
}
|
|
883
|
+
type PluginSourceCategory = 'builtin' | 'project' | 'global' | 'marketplace' | 'well-known' | 'git' | 'file' | 'local';
|
|
884
|
+
interface PluginSourceEntry {
|
|
885
|
+
id: string;
|
|
886
|
+
name: string;
|
|
887
|
+
description?: string;
|
|
888
|
+
location: string;
|
|
889
|
+
category: PluginSourceCategory;
|
|
890
|
+
metadata?: Record<string, unknown>;
|
|
891
|
+
}
|
|
892
|
+
interface PluginSourceLoadResult {
|
|
893
|
+
skills: SkillDefinition[];
|
|
894
|
+
version?: string;
|
|
895
|
+
author?: {
|
|
896
|
+
name: string;
|
|
897
|
+
email?: string;
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
interface PluginSource {
|
|
901
|
+
readonly id: string;
|
|
902
|
+
readonly category: PluginSourceCategory;
|
|
903
|
+
fetch(): Promise<PluginSourceEntry[]>;
|
|
904
|
+
load(entry: PluginSourceEntry): Promise<PluginSourceLoadResult>;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
interface WellKnownSourceOptions {
|
|
908
|
+
url: string;
|
|
909
|
+
id?: string;
|
|
910
|
+
displayName?: string;
|
|
911
|
+
}
|
|
912
|
+
declare function createWellKnownSource(opts: WellKnownSourceOptions): PluginSource;
|
|
913
|
+
|
|
914
|
+
interface LocalPluginSourceOptions {
|
|
915
|
+
basePath: string;
|
|
916
|
+
id?: string;
|
|
917
|
+
displayName?: string;
|
|
918
|
+
}
|
|
919
|
+
declare function createLocalPluginSource(opts: LocalPluginSourceOptions): PluginSource;
|
|
920
|
+
|
|
921
|
+
declare function registerSource(source: PluginSource): void;
|
|
922
|
+
declare function listSources(): PluginSource[];
|
|
923
|
+
declare function findSource(id: string): PluginSource | null;
|
|
924
|
+
declare function findSourcesByCategory(category: PluginSourceCategory): PluginSource[];
|
|
925
|
+
declare function listAllEntries(): Promise<Array<{
|
|
926
|
+
sourceId: string;
|
|
927
|
+
entries: PluginSourceEntry[];
|
|
928
|
+
} | {
|
|
929
|
+
sourceId: string;
|
|
930
|
+
error: Error;
|
|
931
|
+
}>>;
|
|
932
|
+
|
|
933
|
+
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, computeFromDir, computeSnapshotHash, 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 };
|