@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.
Files changed (53) hide show
  1. package/README.en.md +166 -59
  2. package/README.md +172 -62
  3. package/dist/assets/txt/template/skill-template-en-US.txt +50 -0
  4. package/dist/assets/txt/template/skill-template-zh-CN.txt +50 -0
  5. package/dist/chunks/blob-DOVEGVIE.cjs +1 -0
  6. package/dist/chunks/blob-JSMTOYEN.mjs +1 -0
  7. package/dist/chunks/chunk-2VZUPTI7.cjs +1 -0
  8. package/dist/chunks/chunk-2YVJ7YP6.mjs +22 -0
  9. package/dist/chunks/chunk-4R6NKPNW.mjs +3 -0
  10. package/dist/chunks/chunk-676OG55M.mjs +5 -0
  11. package/dist/chunks/chunk-6PJ3YQA7.mjs +2 -0
  12. package/dist/chunks/chunk-72DXY4B7.mjs +1 -0
  13. package/dist/chunks/chunk-CFMOYU7R.mjs +2 -0
  14. package/dist/chunks/chunk-GR2NJUJ6.mjs +255 -0
  15. package/dist/chunks/chunk-JFEBB5CL.cjs +22 -0
  16. package/dist/chunks/chunk-KV7EP6AW.cjs +255 -0
  17. package/dist/chunks/chunk-OWG6N2K6.cjs +5 -0
  18. package/dist/chunks/chunk-RWSBKHQ2.cjs +3 -0
  19. package/dist/chunks/chunk-RWZ4LFSN.mjs +1 -0
  20. package/dist/chunks/chunk-S6YNGR7S.cjs +2 -0
  21. package/dist/chunks/chunk-TCFGU43L.cjs +2 -0
  22. package/dist/chunks/chunk-VRHWDHQV.cjs +1 -0
  23. package/dist/chunks/chunk-WQGSYA5D.mjs +1 -0
  24. package/dist/chunks/chunk-XGUPIAAF.cjs +1 -0
  25. package/dist/chunks/cli-handler-RAJ42VDN.mjs +1 -0
  26. package/dist/chunks/cli-handler-YAJ5J5VA.cjs +1 -0
  27. package/dist/chunks/installer-FB26E7JZ.mjs +1 -0
  28. package/dist/chunks/installer-GOQTCUJ4.cjs +1 -0
  29. package/dist/chunks/interfaces-S47ZGORM.mjs +1 -0
  30. package/dist/chunks/interfaces-UIS44Q7A.cjs +1 -0
  31. package/dist/chunks/local-lock-4AA55ORE.cjs +1 -0
  32. package/dist/chunks/local-lock-LG5YL33V.mjs +1 -0
  33. package/dist/chunks/scan-QEVID2TF.mjs +1 -0
  34. package/dist/chunks/scan-XWU3FCE3.cjs +1 -0
  35. package/dist/chunks/skill-lock-KHPVP7AD.mjs +1 -0
  36. package/dist/chunks/skill-lock-LET33FVT.cjs +1 -0
  37. package/dist/chunks/store-3NRBE47N.mjs +1 -0
  38. package/dist/chunks/store-EHYH46YY.cjs +1 -0
  39. package/dist/chunks/telemetry-7T6MUW5A.mjs +1 -0
  40. package/dist/chunks/telemetry-LCGTSJDM.cjs +1 -0
  41. package/dist/cli.cjs +1 -1
  42. package/dist/cli.mjs +1 -1
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.d.cts +347 -106
  45. package/dist/index.d.ts +347 -106
  46. package/dist/index.mjs +1 -1
  47. package/package.json +4 -5
  48. package/dist/chunks/blob-3ZTTX2CZ.mjs +0 -1
  49. package/dist/chunks/blob-UAS6F4BG.cjs +0 -1
  50. package/dist/chunks/chunk-645XWVJB.mjs +0 -208
  51. package/dist/chunks/chunk-DLDPJGDD.cjs +0 -208
  52. package/dist/chunks/chunk-XDSGBJHO.cjs +0 -2
  53. package/dist/chunks/chunk-ZEMGS5WR.mjs +0 -2
package/dist/index.d.ts 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
- declare function getUniversalAgents(): AgentType[];
48
- declare function getVisibleUniversalAgents(): AgentType[];
49
- declare function getNonUniversalAgents(): AgentType[];
50
- declare function isUniversalAgent(type: AgentType): boolean;
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
- type WellKnownIndex = WellKnownIndexV1 | WellKnownIndexV2;
112
- type WellKnownSkillEntry = WellKnownSkillEntryV1 | WellKnownSkillEntryV2;
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
- global?: boolean;
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<void>;
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[]): Promise<void>;
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
- skillFolderHash: string;
526
+ computedHash: string;
323
527
  installedAt: string;
324
528
  updatedAt: string;
325
- pluginName?: string;
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[]): UpdateCheckOptions;
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[]): Promise<void>;
600
+ declare function runUpdate(args?: string[], callOptions?: {
601
+ cwd?: string;
602
+ }): Promise<void>;
387
603
 
388
- declare function runInstallFromLock(args: string[]): Promise<void>;
604
+ declare function runDoctor(args: string[], callOptions?: {
605
+ cwd?: string;
606
+ }): Promise<void>;
389
607
 
390
- interface SyncOptions {
391
- agent?: string[];
392
- yes?: boolean;
608
+ interface StoreOptions {
393
609
  force?: boolean;
610
+ yes?: boolean;
611
+ json?: boolean;
394
612
  }
395
- declare function runSync(args: string[], options?: SyncOptions): Promise<void>;
396
- declare function parseSyncOptions(args: string[]): {
397
- options: SyncOptions;
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 SyncTelemetryData {
550
- event: 'experimental_sync';
551
- skillCount: string;
552
- successCount: string;
553
- agents: string;
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 | SyncTelemetryData;
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?: 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
- export { AGENTS_DIR, type AddOptions, type AgentConfig, type AgentProcess, type AgentSpawn, type AgentType, type AuditResponse, BLOB_ALLOWED_REPOS, type BlobInstallResult, type BlobSkill, DEFAULT_CLONE_TIMEOUT, type DiscoverSkillsOptions, type DismissedPrompts, EVE_SUBAGENTS_DIR, type FindOptions, GitCloneError, type HostProvider, type InstallMode, type InstalledSkill, type LocalSkillLockEntry, type LocalSkillLockFile, type MaterializedUseSkill, type ParseFindOptionsResult, type ParseUseOptionsResult, type ParsedSource, type PartnerAudit, 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 SyncOptions, type TreeEntry, UNIVERSAL_SKILLS_DIR, 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, addSkillToLocalLock, addSkillToLock, agents, buildUsePrompt, cleanupTempDir, cloneRepo, computeContentHash, computeSkillFolderHash, detectAgent, detectInstalledAgents, discoverSkills, dismissPrompt, fetchAuditData, fetchRepoTree, fetchSkillFolderHash, filterSkills, findProvider, findSkillMdPaths, flushTelemetry, getAgentAdapter, getAgentBaseDir, getAgentConfig, getAgentName, getAgentType, getAllLockedSkills, getCanonicalPath, getCanonicalSkillsDir, getEveSubagentSkillsDir, getEveSubagents, getGitHubToken, getGlobal, getHomeDir, getInstallPath, getInstance, getLastSelectedAgents, getLocalLockPath, getNonUniversalAgents, getOpenClawGlobalSkillsDir, getOwnerRepo, getProjectDirectory, getProviders, getSkillDisplayName, getSkillFolderHashFromTree, getSkillFromLock, getSkillLockPath, getSkillsBySource, getUniversalAgents, getVisibleUniversalAgents, getXdgCache, getXdgConfig, getXdgData, getXdgState, handleSkillsCli, hasAgentAdapter, hasProjectSkills, initTelemetry, installBlobSkillForAgent, installRemoteSkillForAgent, installSkillForAgent, installWellKnownSkillForAgent, isGitHubHttpsCloneUrl, isGitHubSsoAuthError, isPromptDismissed, isRepoPrivate, isRunningInAgent, isSkillInstalled, isSubpathSafe, isUniversalAgent, launchAgentInteractively, listInstalledSkills, matchesSkillFilter, materializeUseSkill, parseAddOptions, parseFindOptions, parseFrontmatter, parseGitHubRepoUrl, parseListOptions, parseOwnerRepo, parseRemoveOptions, parseSkillMd, parseSource, parseSyncOptions, parseUpdateOptions, parseUseOptions, readLocalLock, readSkillLock, registerProvider, registry, removeCommand, removeSkillFromLocalLock, removeSkillFromLock, renderBanner, renderHelp, requireAgentAdapter, resetGhAuthWarning, resetGlobalAdapter, resetInstanceAdapter, resetRepoTreeAuthState, resolveUpdateScope, runAdd, runFind, runInstallFromLock, runList, runSync, runUpdate, runUse, sanitizeMetadata, sanitizeName, sanitizeSubpath, saveSelectedAgents, searchSkillsAPI, setAgentAdapter, setDetectedAgent, setGlobalAdapter, setInstanceAdapter, setVersion, shouldInstallInternalSkills, stripTerminalEscapes, toSkillSlug, track, tryBlobInstall, wellKnownProvider, writeLocalLock, writeSkillLock };
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 };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{Y as AGENTS_DIR,f as DEFAULT_CLONE_TIMEOUT,S as EVE_SUBAGENTS_DIR,g as GitCloneError,Z as SKILLS_SUBDIR,_ as UNIVERSAL_SKILLS_DIR,ya as WellKnownProvider,q as addSkillToLocalLock,Ha as addSkillToLock,P as agents,hb as buildUsePrompt,l as cleanupTempDir,k as cloneRepo,Da as computeContentHash,p as computeSkillFolderHash,qa as detectAgent,Q as detectInstalledAgents,v as discoverSkills,Na as dismissPrompt,na as fetchAuditData,Ga as fetchSkillFolderHash,x as filterSkills,wa as findProvider,pa as flushTelemetry,F as getAgentAdapter,ca as getAgentBaseDir,R as getAgentConfig,sa as getAgentName,ta as getAgentType,Ka as getAllLockedSkills,ga as getCanonicalPath,aa as getCanonicalSkillsDir,ba as getEveSubagentSkillsDir,T as getEveSubagents,Fa as getGitHubToken,A as getGlobal,I as getHomeDir,fa as getInstallPath,D as getInstance,Oa as getLastSelectedAgents,m as getLocalLockPath,W as getNonUniversalAgents,O as getOpenClawGlobalSkillsDir,a as getOwnerRepo,N as getProjectDirectory,xa as getProviders,w as getSkillDisplayName,Ja as getSkillFromLock,Aa as getSkillLockPath,La as getSkillsBySource,U as getUniversalAgents,V as getVisibleUniversalAgents,M as getXdgCache,J as getXdgConfig,K as getXdgData,L as getXdgState,nb as handleSkillsCli,G as hasAgentAdapter,cb as hasProjectSkills,Qa as initTelemetry,ja as installBlobSkillForAgent,ha as installRemoteSkillForAgent,da as installSkillForAgent,ia as installWellKnownSkillForAgent,i as isGitHubHttpsCloneUrl,j as isGitHubSsoAuthError,Ma as isPromptDismissed,c as isRepoPrivate,ra as isRunningInAgent,ea as isSkillInstalled,u as isSubpathSafe,X as isUniversalAgent,kb as launchAgentInteractively,ka as listInstalledSkills,eb as matchesSkillFilter,ib as materializeUseSkill,Sa as parseAddOptions,Ta as parseFindOptions,h as parseGitHubRepoUrl,Za as parseListOptions,b as parseOwnerRepo,ab as parseRemoveOptions,t as parseSkillMd,e as parseSource,Xa as parseSyncOptions,bb as parseUpdateOptions,gb as parseUseOptions,n as readLocalLock,Ba as readSkillLock,va as registerProvider,ua as registry,$a as removeCommand,r as removeSkillFromLocalLock,Ia as removeSkillFromLock,lb as renderBanner,mb as renderHelp,H as requireAgentAdapter,Ea as resetGhAuthWarning,z as resetGlobalAdapter,C as resetInstanceAdapter,db as resolveUpdateScope,Ra as runAdd,Va as runFind,Ya as runInstallFromLock,_a as runList,Wa as runSync,fb as runUpdate,jb as runUse,$ as sanitizeName,d as sanitizeSubpath,Pa as saveSelectedAgents,Ua as searchSkillsAPI,E as setAgentAdapter,la as setDetectedAgent,y as setGlobalAdapter,B as setInstanceAdapter,ma as setVersion,s as shouldInstallInternalSkills,oa as track,za as wellKnownProvider,o as writeLocalLock,Ca as writeSkillLock}from'./chunks/chunk-645XWVJB.mjs';export{e as BLOB_ALLOWED_REPOS,h as fetchRepoTree,j as findSkillMdPaths,i as getSkillFolderHashFromTree,d as parseFrontmatter,g as resetRepoTreeAuthState,c as sanitizeMetadata,b as stripTerminalEscapes,f as toSkillSlug,k as tryBlobInstall}from'./chunks/chunk-ZEMGS5WR.mjs';
1
+ export{c as applyActions,d as buildMatrix,G as buildUsePrompt,f as detectAgent,h as getAgentName,i as getAgentType,M as handleSkillsCli,k as hasProjectSkills,o as initTelemetry,g as isRunningInAgent,J as launchAgentInteractively,m as matchesSkillFilter,H as materializeUseSkill,q as parseAddOptions,x as parseFindOptions,A as parseListOptions,D as parseRemoveOptions,r as parseStoreOptions,j as parseUpdateOptions,F as parseUseOptions,b as planActions,a as probeCell,C as removeCommand,K as renderBanner,L as renderHelp,l as resolveUpdateScope,p as runAdd,E as runDoctor,z as runFind,B as runList,e as runPostInstallReconcile,s as runStore,u as runStoreClean,t as runStoreList,w as runStoreRemove,v as runStoreUpdate,n as runUpdate,I as runUse,y as searchSkillsAPI}from'./chunks/chunk-GR2NJUJ6.mjs';export{c as fetchAuditData,e as flushTelemetry,a as setDetectedAgent,b as setVersion,d as track}from'./chunks/chunk-CFMOYU7R.mjs';export{i as addSkillToLock,e as computeContentHash,p as dismissPrompt,h as fetchSkillFolderHash,l as getAllLockedSkills,g as getGitHubToken,k as getSkillFromLock,b as getSkillLockPath,m as getSkillsBySource,n as isPromptDismissed,c as readSkillLock,j as removeSkillFromLock,f as resetGhAuthWarning,d as writeSkillLock}from'./chunks/chunk-4R6NKPNW.mjs';import'./chunks/chunk-72DXY4B7.mjs';export{a as AGENTS_DIR,b as SKILLS_SUBDIR,c as UNIVERSAL_SKILLS_DIR,g as getAgentBaseDir,o as getCanonicalPath,e as getCanonicalSkillsDir,f as getEveSubagentSkillsDir,m as getInstallPath,r as installBlobSkillForAgent,p as installRemoteSkillForAgent,h as installSkillForAgent,q as installWellKnownSkillForAgent,k as isSkillInstalled,s as listInstalledSkills,d as sanitizeName}from'./chunks/chunk-676OG55M.mjs';import {n,B}from'./chunks/chunk-2YVJ7YP6.mjs';export{f as DEFAULT_CLONE_TIMEOUT,g as GitCloneError,m as WellKnownProvider,R as acquireSourceClone,w as addSkillToLocalLock,ka as cleanCache,ja as cleanCachedRepo,l as cleanupTempDir,k as cloneRepo,v as computeSkillFolderHash,B as discoverSkills,da as ensureCachedSource,D as filterSkills,Q as getCacheRepoDir,O as getCacheRoot,r as getLocalLockPath,a as getOwnerRepo,C as getSkillDisplayName,J as getSourceDir,ia as installFromCache,i as isGitHubHttpsCloneUrl,j as isGitHubSsoAuthError,c as isRepoPrivate,A as isSubpathSafe,h as parseGitHubRepoUrl,b as parseOwnerRepo,z as parseSkillMd,e as parseSource,t as readLocalLock,x as removeSkillFromLocalLock,d as sanitizeSubpath,y as shouldInstallInternalSkills,n as wellKnownProvider,u as writeLocalLock}from'./chunks/chunk-2YVJ7YP6.mjs';export{w as BLOB_ALLOWED_REPOS,h as EVE_SUBAGENTS_DIR,m as PROJECT_SKILLS_DIR_PATTERN,e as agents,f as detectInstalledAgents,A as fetchRepoTree,C as findSkillMdPaths,g as getAgentConfig,o as getAgentGlobalSkillDirs,q as getAgentProjectSkillContainerPrefixes,n as getAgentProjectSkillDirs,p as getAgentSkillDirs,i as getEveSubagents,l as getNonUniversalAgents,d as getOpenClawGlobalSkillsDir,B as getSkillFolderHashFromTree,k as getUniversalAgents,r as isUniversalAgent,j as matchesUniversalScope,c as parseFrontmatter,z as resetRepoTreeAuthState,b as sanitizeMetadata,a as stripTerminalEscapes,y as toSkillSlug,D as tryBlobInstall}from'./chunks/chunk-6PJ3YQA7.mjs';export{h as getAgentAdapter,c as getGlobal,k as getHomeDir,f as getInstance,p as getProjectDirectory,o as getXdgCache,l as getXdgConfig,m as getXdgData,n as getXdgState,i as hasAgentAdapter,j as requireAgentAdapter,b as resetGlobalAdapter,e as resetInstanceAdapter,g as setAgentAdapter,a as setGlobalAdapter,d as setInstanceAdapter}from'./chunks/chunk-RWZ4LFSN.mjs';import {b}from'./chunks/chunk-WQGSYA5D.mjs';import {join}from'path';var d=class{constructor(){b(this,"providers",[]);}register(o){if(this.providers.some(t=>t.id===o.id))throw new Error(`Provider with id "${o.id}" already registered`);this.providers.push(o);}findProvider(o){for(let t of this.providers)if(t.match(o).matches)return t;return null}getProviders(){return [...this.providers]}},p=new d;function at(e){p.register(e);}function ct(e){return p.findProvider(e)}function ut(){return p.getProviders()}var u=new Map;function k(e){if(u.has(e.id))throw new Error(`PluginSource with id "${e.id}" already registered`);u.set(e.id,e);}function S(){return Array.from(u.values()).map(e=>e)}function P(e){return u.get(e)??null}function y(e){return Array.from(u.values()).filter(o=>o.category===e)}async function x(){let e=S();return await Promise.all(e.map(async t=>{try{let r=await t.fetch();return {sourceId:t.id,entries:r}}catch(r){return {sourceId:t.id,error:r instanceof Error?r:new Error(String(r))}}}))}function pt(e){return {name:e.name,description:e.description,scope:"all"}}function h(e){return {id:e.id??`well-known:${new URL(e.url).hostname}`,category:"well-known",async fetch(){return (await n.fetchAllSkills(e.url)).map(r=>({id:r.name,name:r.name,description:r.description,location:r.sourceUrl,category:"well-known",metadata:{installName:r.installName,sourceIdentifier:n.getSourceIdentifier(e.url),sourceUrl:r.sourceUrl}}))},async load(t){let l=(await n.fetchAllSkills(e.url)).find(n=>n.name===t.id);if(!l)throw new Error(`Skill "${t.id}" not found in well-known source ${e.url}`);return {skills:[pt(l)],version:"well-known",author:{name:new URL(e.url).hostname}}}}}async function A(e){try{let t=await(await import('fs/promises')).readFile(e,"utf-8");return JSON.parse(t)}catch{return null}}function w(e){let o=e.basePath.split(/[\\/]/).filter(Boolean).pop()??"local";return {id:e.id??`local:${o}`,category:"file",async fetch(){let r=[],l=await A(join(e.basePath,".claude-plugin/plugin.json"));l?.name&&r.push({id:l.name,name:l.name,description:l.description,location:e.basePath,category:"file",metadata:{skills:l.skills,manifest:"plugin.json"}});let n=await A(join(e.basePath,".claude-plugin/marketplace.json"));if(n?.plugins)for(let i of n.plugins)i.name&&(typeof i.source!="string"&&i.source!==void 0||r.push({id:i.name,name:i.name,description:i.description,location:i.source?join(e.basePath,n.metadata?.pluginRoot??"",i.source):e.basePath,category:"file",metadata:{skills:i.skills,manifest:"marketplace.json",pluginRoot:n.metadata?.pluginRoot}}));return r},async load(r){return {skills:(await B(r.location)).map(i=>({name:i.name,description:i.description,scope:"all"})),version:"local",author:{name:o}}}}}export{w as createLocalPluginSource,h as createWellKnownSource,ct as findProvider,P as findSource,y as findSourcesByCategory,ut as getProviders,x as listAllEntries,S as listSources,at as registerProvider,k as registerSource,p as registry};