@easbot/skills 0.2.48

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.
@@ -0,0 +1,648 @@
1
+ import { AgentResult } from '@vercel/detect-agent';
2
+ import { IGlobal, IInstance, ISubAgentRunner } from '@easbot/types';
3
+
4
+ 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';
5
+ interface Skill {
6
+ name: string;
7
+ description: string;
8
+ path: string;
9
+ rawContent?: string;
10
+ pluginName?: string;
11
+ metadata?: Record<string, unknown>;
12
+ }
13
+ interface AgentConfig {
14
+ name: string;
15
+ displayName: string;
16
+ skillsDir: string;
17
+ globalSkillsDir: string | undefined;
18
+ detectInstalled: () => Promise<boolean>;
19
+ showInUniversalList?: boolean;
20
+ showInUniversalPrompt?: boolean;
21
+ }
22
+ interface ParsedSource {
23
+ type: 'github' | 'gitlab' | 'git' | 'local' | 'well-known';
24
+ url: string;
25
+ subpath?: string;
26
+ localPath?: string;
27
+ ref?: string;
28
+ skillFilter?: string;
29
+ }
30
+ interface RemoteSkill$1 {
31
+ name: string;
32
+ description: string;
33
+ content: string;
34
+ installName: string;
35
+ sourceUrl: string;
36
+ providerId: string;
37
+ sourceIdentifier: string;
38
+ metadata?: Record<string, unknown>;
39
+ }
40
+
41
+ declare function getOpenClawGlobalSkillsDir(homeDir?: string, pathExists?: (path: string) => boolean): string;
42
+ declare const agents: Record<AgentType, AgentConfig>;
43
+ declare function detectInstalledAgents(): Promise<AgentType[]>;
44
+ declare function getAgentConfig(type: AgentType): AgentConfig;
45
+ declare const EVE_SUBAGENTS_DIR: string;
46
+ 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;
51
+
52
+ declare function shouldInstallInternalSkills(): boolean;
53
+ declare function parseSkillMd(skillMdPath: string, options?: {
54
+ includeInternal?: boolean;
55
+ }): Promise<Skill | null>;
56
+ interface DiscoverSkillsOptions {
57
+ includeInternal?: boolean;
58
+ fullDepth?: boolean;
59
+ }
60
+ declare function isSubpathSafe(basePath: string, subpath: string): boolean;
61
+ declare function discoverSkills(basePath: string, subpath?: string, options?: DiscoverSkillsOptions): Promise<Skill[]>;
62
+ declare function getSkillDisplayName(skill: Skill): string;
63
+ declare function filterSkills(skills: Skill[], inputNames: string[]): Skill[];
64
+
65
+ interface RemoteSkill {
66
+ name: string;
67
+ description: string;
68
+ content: string;
69
+ installName: string;
70
+ sourceUrl: string;
71
+ metadata?: Record<string, unknown>;
72
+ }
73
+ interface ProviderMatch {
74
+ matches: boolean;
75
+ sourceIdentifier?: string;
76
+ }
77
+ interface HostProvider {
78
+ readonly id: string;
79
+ readonly displayName: string;
80
+ match(url: string): ProviderMatch;
81
+ fetchSkill(url: string): Promise<RemoteSkill | null>;
82
+ toRawUrl(url: string): string;
83
+ getSourceIdentifier(url: string): string;
84
+ }
85
+ interface ProviderRegistry {
86
+ register(provider: HostProvider): void;
87
+ findProvider(url: string): HostProvider | null;
88
+ getProviders(): HostProvider[];
89
+ }
90
+
91
+ declare const DISCOVERY_SCHEMA_V2 = "https://schemas.agentskills.io/discovery/0.2.0/schema.json";
92
+ interface WellKnownIndexV1 {
93
+ skills: WellKnownSkillEntryV1[];
94
+ }
95
+ interface WellKnownSkillEntryV1 {
96
+ name: string;
97
+ description: string;
98
+ files: string[];
99
+ }
100
+ interface WellKnownIndexV2 {
101
+ $schema: typeof DISCOVERY_SCHEMA_V2;
102
+ skills: WellKnownSkillEntryV2[];
103
+ }
104
+ interface WellKnownSkillEntryV2 {
105
+ name: string;
106
+ type: 'skill-md' | 'archive';
107
+ description: string;
108
+ url: string;
109
+ digest: string;
110
+ }
111
+ type WellKnownIndex = WellKnownIndexV1 | WellKnownIndexV2;
112
+ type WellKnownSkillEntry = WellKnownSkillEntryV1 | WellKnownSkillEntryV2;
113
+ type WellKnownFileContent = string | Uint8Array;
114
+ type NormalizedWellKnownEntry = {
115
+ version: '0.1.0';
116
+ name: string;
117
+ description: string;
118
+ files: string[];
119
+ baseUrl: string;
120
+ wellKnownPath: string;
121
+ indexEntry: WellKnownSkillEntryV1;
122
+ } | {
123
+ version: '0.2.0';
124
+ name: string;
125
+ description: string;
126
+ type: 'skill-md' | 'archive';
127
+ artifactUrl: string;
128
+ digest: string;
129
+ indexEntry: WellKnownSkillEntryV2;
130
+ };
131
+ interface WellKnownSkill extends RemoteSkill {
132
+ files: Map<string, WellKnownFileContent>;
133
+ indexEntry: WellKnownSkillEntry;
134
+ }
135
+ declare class WellKnownProvider implements HostProvider {
136
+ readonly id = "well-known";
137
+ readonly displayName = "Well-Known Skills";
138
+ private readonly WELL_KNOWN_PATHS;
139
+ private readonly INDEX_FILE;
140
+ match(url: string): ProviderMatch;
141
+ fetchIndex(baseUrl: string): Promise<{
142
+ index: WellKnownIndex;
143
+ entries: NormalizedWellKnownEntry[];
144
+ resolvedBaseUrl: string;
145
+ resolvedWellKnownPath: string;
146
+ indexUrl: string;
147
+ } | null>;
148
+ private fetchIndexCandidates;
149
+ private normalizeIndex;
150
+ private getLegacySkillBaseUrl;
151
+ private isValidSkillName;
152
+ private isSafeLegacyFilePath;
153
+ private isValidSkillEntryV1;
154
+ private isValidSkillEntryV2;
155
+ fetchSkill(url: string): Promise<RemoteSkill | null>;
156
+ fetchSkillByEntry(baseUrlOrEntry: string | NormalizedWellKnownEntry, legacyEntry?: WellKnownSkillEntryV1, legacyWellKnownPath?: string): Promise<WellKnownSkill | null>;
157
+ private fetchLegacySkillByEntry;
158
+ private fetchArtifactSkillByEntry;
159
+ private createSkill;
160
+ fetchAllSkills(url: string): Promise<WellKnownSkill[]>;
161
+ private computeDigest;
162
+ private extractArchive;
163
+ private isZipArchive;
164
+ private isTarGzArchive;
165
+ private normalizeArchivePath;
166
+ private addArchiveFile;
167
+ private extractTarGz;
168
+ private readTarString;
169
+ private extractZip;
170
+ private findZipEndOfCentralDirectory;
171
+ toRawUrl(url: string): string;
172
+ getSourceIdentifier(url: string): string;
173
+ hasSkillsIndex(url: string): Promise<boolean>;
174
+ }
175
+ declare const wellKnownProvider: WellKnownProvider;
176
+
177
+ type InstallMode = 'symlink' | 'copy';
178
+ interface InstallResult {
179
+ success: boolean;
180
+ path: string;
181
+ canonicalPath?: string;
182
+ mode: InstallMode;
183
+ symlinkFailed?: boolean;
184
+ skipped?: boolean;
185
+ error?: string;
186
+ }
187
+ declare function sanitizeName(name: string): string;
188
+ declare function getCanonicalSkillsDir(global: boolean, cwd?: string): string;
189
+ declare function getEveSubagentSkillsDir(subagent: string, cwd?: string): string;
190
+ declare function getAgentBaseDir(agentType: AgentType, global: boolean, cwd?: string, eveSubagent?: string): string;
191
+ declare function installSkillForAgent(skill: Skill, agentType: AgentType, options?: {
192
+ global?: boolean;
193
+ cwd?: string;
194
+ mode?: InstallMode;
195
+ eveSubagent?: string;
196
+ }): Promise<InstallResult>;
197
+ declare function isSkillInstalled(skillName: string, agentType: AgentType, options?: {
198
+ global?: boolean;
199
+ cwd?: string;
200
+ eveSubagent?: string;
201
+ }): Promise<boolean>;
202
+ declare function getInstallPath(skillName: string, agentType: AgentType, options?: {
203
+ global?: boolean;
204
+ cwd?: string;
205
+ eveSubagent?: string;
206
+ }): string;
207
+ declare function getCanonicalPath(skillName: string, options?: {
208
+ global?: boolean;
209
+ cwd?: string;
210
+ agent?: AgentType;
211
+ eveSubagent?: string;
212
+ }): string;
213
+ declare function installRemoteSkillForAgent(skill: RemoteSkill$1, agentType: AgentType, options?: {
214
+ global?: boolean;
215
+ cwd?: string;
216
+ mode?: InstallMode;
217
+ eveSubagent?: string;
218
+ }): Promise<InstallResult>;
219
+ declare function installWellKnownSkillForAgent(skill: WellKnownSkill, agentType: AgentType, options?: {
220
+ global?: boolean;
221
+ cwd?: string;
222
+ mode?: InstallMode;
223
+ eveSubagent?: string;
224
+ }): Promise<InstallResult>;
225
+ declare function installBlobSkillForAgent(skill: {
226
+ installName: string;
227
+ files: Array<{
228
+ path: string;
229
+ contents: string;
230
+ }>;
231
+ }, agentType: AgentType, options?: {
232
+ global?: boolean;
233
+ cwd?: string;
234
+ mode?: InstallMode;
235
+ eveSubagent?: string;
236
+ }): Promise<InstallResult>;
237
+ interface InstalledSkill {
238
+ name: string;
239
+ description: string;
240
+ path: string;
241
+ canonicalPath: string;
242
+ scope: 'project' | 'global';
243
+ agents: AgentType[];
244
+ }
245
+ declare function listInstalledSkills(options?: {
246
+ global?: boolean;
247
+ cwd?: string;
248
+ agentFilter?: AgentType[];
249
+ }): Promise<InstalledSkill[]>;
250
+
251
+ declare function getOwnerRepo(parsed: ParsedSource): string | null;
252
+ declare function parseOwnerRepo(ownerRepo: string): {
253
+ owner: string;
254
+ repo: string;
255
+ } | null;
256
+ declare function isRepoPrivate(owner: string, repo: string): Promise<boolean | null>;
257
+ declare function sanitizeSubpath(subpath: string): string;
258
+ declare function parseSource(input: string): ParsedSource;
259
+
260
+ declare function initTelemetry(version: string): void;
261
+ interface AddOptions {
262
+ global?: boolean;
263
+ agent?: string[];
264
+ yes?: boolean;
265
+ skill?: string[];
266
+ list?: boolean;
267
+ all?: boolean;
268
+ fullDepth?: boolean;
269
+ copy?: boolean;
270
+ subagent?: string[];
271
+ }
272
+ declare function runAdd(args: string[], options?: AddOptions): Promise<void>;
273
+ declare function parseAddOptions(args: string[]): {
274
+ source: string[];
275
+ options: AddOptions;
276
+ };
277
+
278
+ interface SearchSkill {
279
+ name: string;
280
+ slug: string;
281
+ source: string;
282
+ installs: number;
283
+ }
284
+ interface FindOptions {
285
+ owner?: string;
286
+ }
287
+ interface ParseFindOptionsResult {
288
+ query: string;
289
+ options: FindOptions;
290
+ errors: string[];
291
+ }
292
+ declare function parseFindOptions(args: string[]): ParseFindOptionsResult;
293
+ declare function searchSkillsAPI(query: string, owner?: string): Promise<SearchSkill[]>;
294
+ declare function runFind(args: string[]): Promise<void>;
295
+
296
+ interface ListOptions {
297
+ global?: boolean;
298
+ agent?: string[];
299
+ json?: boolean;
300
+ }
301
+ declare function parseListOptions(args: string[]): ListOptions;
302
+ declare function runList(args: string[]): Promise<void>;
303
+
304
+ interface RemoveOptions {
305
+ global?: boolean;
306
+ agent?: string[];
307
+ yes?: boolean;
308
+ all?: boolean;
309
+ }
310
+ declare function removeCommand(skillNames: string[], options: RemoveOptions): Promise<void>;
311
+ declare function parseRemoveOptions(args: string[]): {
312
+ skills: string[];
313
+ options: RemoveOptions;
314
+ };
315
+
316
+ interface SkillLockEntry {
317
+ source: string;
318
+ sourceType: string;
319
+ sourceUrl: string;
320
+ ref?: string;
321
+ skillPath?: string;
322
+ skillFolderHash: string;
323
+ installedAt: string;
324
+ updatedAt: string;
325
+ pluginName?: string;
326
+ }
327
+ interface DismissedPrompts {
328
+ findSkillsPrompt?: boolean;
329
+ }
330
+ interface SkillLockFile {
331
+ version: number;
332
+ skills: Record<string, SkillLockEntry>;
333
+ dismissed?: DismissedPrompts;
334
+ lastSelectedAgents?: string[];
335
+ }
336
+ declare function getSkillLockPath(): string;
337
+ declare function readSkillLock(): Promise<SkillLockFile>;
338
+ declare function writeSkillLock(lock: SkillLockFile): Promise<void>;
339
+ declare function computeContentHash(content: string): string;
340
+ declare function resetGhAuthWarning(): void;
341
+ declare function getGitHubToken(): string | null;
342
+ declare function fetchSkillFolderHash(ownerRepo: string, skillPath: string, getToken?: (() => string | null) | null, ref?: string): Promise<string | null>;
343
+ declare function addSkillToLock(skillName: string, entry: Omit<SkillLockEntry, 'installedAt' | 'updatedAt'>): Promise<void>;
344
+ declare function removeSkillFromLock(skillName: string): Promise<boolean>;
345
+ declare function getSkillFromLock(skillName: string): Promise<SkillLockEntry | null>;
346
+ declare function getAllLockedSkills(): Promise<Record<string, SkillLockEntry>>;
347
+ declare function getSkillsBySource(): Promise<Map<string, {
348
+ skills: string[];
349
+ entry: SkillLockEntry;
350
+ }>>;
351
+ declare function isPromptDismissed(promptKey: keyof DismissedPrompts): Promise<boolean>;
352
+ declare function dismissPrompt(promptKey: keyof DismissedPrompts): Promise<void>;
353
+ declare function getLastSelectedAgents(): Promise<string[] | undefined>;
354
+ declare function saveSelectedAgents(agents: string[]): Promise<void>;
355
+
356
+ interface LocalSkillLockEntry {
357
+ source: string;
358
+ ref?: string;
359
+ sourceType: string;
360
+ skillPath?: string;
361
+ computedHash: string;
362
+ subagents?: string[];
363
+ }
364
+ interface LocalSkillLockFile {
365
+ version: number;
366
+ skills: Record<string, LocalSkillLockEntry>;
367
+ }
368
+ declare function getLocalLockPath(cwd?: string): string;
369
+ declare function readLocalLock(cwd?: string): Promise<LocalSkillLockFile>;
370
+ declare function writeLocalLock(lock: LocalSkillLockFile, cwd?: string): Promise<void>;
371
+ declare function computeSkillFolderHash(skillDir: string): Promise<string>;
372
+ declare function addSkillToLocalLock(skillName: string, entry: LocalSkillLockEntry, cwd?: string): Promise<void>;
373
+ declare function removeSkillFromLocalLock(skillName: string, cwd?: string): Promise<boolean>;
374
+
375
+ type UpdateScope = 'project' | 'global' | 'both';
376
+ interface UpdateCheckOptions {
377
+ global?: boolean;
378
+ project?: boolean;
379
+ yes?: boolean;
380
+ skills?: string[];
381
+ }
382
+ declare function parseUpdateOptions(args: string[]): UpdateCheckOptions;
383
+ declare function hasProjectSkills(cwd?: string): boolean;
384
+ declare function resolveUpdateScope(options: UpdateCheckOptions): Promise<UpdateScope>;
385
+ declare function matchesSkillFilter(name: string, filter?: string[]): boolean;
386
+ declare function runUpdate(args?: string[]): Promise<void>;
387
+
388
+ declare function runInstallFromLock(args: string[]): Promise<void>;
389
+
390
+ interface SyncOptions {
391
+ agent?: string[];
392
+ yes?: boolean;
393
+ force?: boolean;
394
+ }
395
+ declare function runSync(args: string[], options?: SyncOptions): Promise<void>;
396
+ declare function parseSyncOptions(args: string[]): {
397
+ options: SyncOptions;
398
+ };
399
+
400
+ interface UseOptions {
401
+ skill?: string;
402
+ agent?: string[];
403
+ fullDepth?: boolean;
404
+ dangerouslyAcceptOpenclawRisks?: boolean;
405
+ help?: boolean;
406
+ }
407
+ interface ParseUseOptionsResult {
408
+ source: string[];
409
+ options: UseOptions;
410
+ errors: string[];
411
+ }
412
+ type UseSkill = {
413
+ kind: 'blob';
414
+ name: string;
415
+ directoryName: string;
416
+ rawContent: string;
417
+ files: Array<{
418
+ path: string;
419
+ contents: string;
420
+ }>;
421
+ } | {
422
+ kind: 'disk';
423
+ name: string;
424
+ directoryName: string;
425
+ rawContent?: string;
426
+ path: string;
427
+ } | {
428
+ kind: 'well-known';
429
+ name: string;
430
+ directoryName: string;
431
+ rawContent: string;
432
+ files: Map<string, WellKnownFileContent>;
433
+ };
434
+ interface MaterializedUseSkill {
435
+ tempRoot: string;
436
+ skillDir: string;
437
+ skillMd: string;
438
+ hasSupportingFiles: boolean;
439
+ }
440
+ interface AgentProcess {
441
+ on: (event: 'error' | 'close', listener: (...args: any[]) => void) => AgentProcess;
442
+ }
443
+ type AgentSpawn = (command: string, args: string[], options: {
444
+ stdio: 'inherit';
445
+ }) => AgentProcess;
446
+ declare function parseUseOptions(args: string[]): ParseUseOptionsResult;
447
+ declare function buildUsePrompt(input: {
448
+ skillMd: string;
449
+ supportDir?: string;
450
+ hasSupportingFiles: boolean;
451
+ }): string;
452
+ declare function materializeUseSkill(skill: UseSkill): Promise<MaterializedUseSkill>;
453
+ declare function runUse(sourceArgs: string[], options?: UseOptions, parseErrors?: string[]): Promise<void>;
454
+ declare function launchAgentInteractively(agent: AgentType, prompt: string, spawnImpl?: AgentSpawn): Promise<number>;
455
+
456
+ declare const DEFAULT_CLONE_TIMEOUT_MS = 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
+ interface InstallTelemetryData {
520
+ event: 'install';
521
+ source: string;
522
+ skills: string;
523
+ agents: string;
524
+ global?: '1';
525
+ skillFiles?: string;
526
+ sourceType?: string;
527
+ }
528
+ interface RemoveTelemetryData {
529
+ event: 'remove';
530
+ source?: string;
531
+ skills: string;
532
+ agents: string;
533
+ global?: '1';
534
+ sourceType?: string;
535
+ }
536
+ interface UpdateTelemetryData {
537
+ event: 'update';
538
+ scope?: string;
539
+ skillCount: string;
540
+ successCount: string;
541
+ failCount: string;
542
+ }
543
+ interface FindTelemetryData {
544
+ event: 'find';
545
+ query: string;
546
+ resultCount: string;
547
+ interactive?: '1';
548
+ }
549
+ interface SyncTelemetryData {
550
+ event: 'experimental_sync';
551
+ skillCount: string;
552
+ successCount: string;
553
+ agents: string;
554
+ }
555
+ type TelemetryData = InstallTelemetryData | RemoveTelemetryData | UpdateTelemetryData | FindTelemetryData | SyncTelemetryData;
556
+ declare function setDetectedAgent(agentName: string | null): void;
557
+ declare function setVersion(version: string): void;
558
+ interface PartnerAudit {
559
+ risk: 'safe' | 'low' | 'medium' | 'high' | 'critical' | 'unknown';
560
+ alerts?: number;
561
+ score?: number;
562
+ analyzedAt: string;
563
+ }
564
+ type SkillAuditData = Record<string, PartnerAudit>;
565
+ type AuditResponse = Record<string, SkillAuditData>;
566
+ declare function fetchAuditData(source: string, skillSlugs: string[], timeoutMs?: number): Promise<AuditResponse | null>;
567
+ declare function track(data: TelemetryData): void;
568
+ declare function flushTelemetry(timeoutMs?: number): Promise<void>;
569
+
570
+ declare function stripTerminalEscapes(str: string): string;
571
+ declare function sanitizeMetadata(str: string): string;
572
+
573
+ declare function detectAgent(): Promise<AgentResult>;
574
+ declare function isRunningInAgent(): Promise<boolean>;
575
+ declare function getAgentName(): Promise<string | null>;
576
+ declare function getAgentType(agentName: string): AgentType | null;
577
+
578
+ declare class ProviderRegistryImpl implements ProviderRegistry {
579
+ private providers;
580
+ register(provider: HostProvider): void;
581
+ findProvider(url: string): HostProvider | null;
582
+ getProviders(): HostProvider[];
583
+ }
584
+ declare const registry: ProviderRegistryImpl;
585
+ declare function registerProvider(provider: HostProvider): void;
586
+ declare function findProvider(url: string): HostProvider | null;
587
+ declare function getProviders(): HostProvider[];
588
+
589
+ declare const AGENTS_DIR = ".agents";
590
+ declare const SKILLS_SUBDIR = "skills";
591
+ declare const UNIVERSAL_SKILLS_DIR = ".agents/skills";
592
+
593
+ declare function parseFrontmatter(raw: string): {
594
+ data: Record<string, unknown>;
595
+ content: string;
596
+ };
597
+
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
+ interface SkillsCliDeps {
606
+ version?: string;
607
+ cwd?: string;
608
+ inAgent?: boolean;
609
+ locale?: Locale;
610
+ }
611
+ interface SkillsCliResult {
612
+ code: number;
613
+ handled: boolean;
614
+ command?: string;
615
+ }
616
+ declare function renderBanner(deps?: SkillsCliDeps): void;
617
+ declare function renderHelp(deps?: SkillsCliDeps): void;
618
+ declare function handleSkillsCli(args: string[], deps?: SkillsCliDeps): Promise<SkillsCliResult>;
619
+
620
+ interface SkillsAgentAdapter {
621
+ global: IGlobal;
622
+ instance: IInstance;
623
+ subAgentRunner?: ISubAgentRunner;
624
+ localAgentRunner?: unknown;
625
+ triggerEvent?: (event: string, input: unknown, context?: Record<string, unknown>) => Promise<{
626
+ success: boolean;
627
+ output: unknown;
628
+ modified: boolean;
629
+ }>;
630
+ }
631
+ declare function setGlobalAdapter(global: IGlobal | null): void;
632
+ declare function resetGlobalAdapter(): void;
633
+ declare function getGlobal(): IGlobal;
634
+ declare function setInstanceAdapter(instance: IInstance | null): void;
635
+ declare function resetInstanceAdapter(): void;
636
+ declare function getInstance(): IInstance;
637
+ declare function setAgentAdapter(adapter: SkillsAgentAdapter | null): void;
638
+ declare function getAgentAdapter(): SkillsAgentAdapter | null;
639
+ declare function hasAgentAdapter(): boolean;
640
+ declare function requireAgentAdapter(): SkillsAgentAdapter;
641
+ declare function getHomeDir(): string;
642
+ declare function getXdgConfig(): string;
643
+ declare function getXdgData(): string;
644
+ declare function getXdgState(): string;
645
+ declare function getXdgCache(): string;
646
+ declare function getProjectDirectory(): string;
647
+
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_MS, 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 };