@cleocode/caamp 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,144 @@
2
2
  * CAAMP - Central AI Agent Managed Packages
3
3
  * Core type definitions
4
4
  */
5
+ /**
6
+ * Skill entry from the `@cleocode/ct-skills` skills.json catalog.
7
+ *
8
+ * Mirrors the `SkillEntry` type from `@cleocode/ct-skills/index.d.ts`.
9
+ */
10
+ interface CtSkillEntry {
11
+ /** Skill name (e.g. `"ct-research-agent"`). */
12
+ name: string;
13
+ /** Human-readable description. */
14
+ description: string;
15
+ /** Semantic version string. */
16
+ version: string;
17
+ /** Relative path within the skills library. */
18
+ path: string;
19
+ /** File references used by the skill. */
20
+ references: string[];
21
+ /** Whether this is a core skill. */
22
+ core: boolean;
23
+ /** Skill category tier. */
24
+ category: "core" | "recommended" | "specialist" | "composition" | "meta";
25
+ /** Numeric tier (0-3). */
26
+ tier: number;
27
+ /** Associated protocol name, or `null`. */
28
+ protocol: string | null;
29
+ /** Direct dependency skill names. */
30
+ dependencies: string[];
31
+ /** Shared resource names this skill uses. */
32
+ sharedResources: string[];
33
+ /** Compatible agent/context types. */
34
+ compatibility: string[];
35
+ /** SPDX license identifier. */
36
+ license: string;
37
+ /** Arbitrary metadata. */
38
+ metadata: Record<string, unknown>;
39
+ }
40
+ /**
41
+ * Validation result from ct-skills frontmatter validation.
42
+ */
43
+ interface CtValidationResult {
44
+ /** Whether the skill passed validation (no error-level issues). */
45
+ valid: boolean;
46
+ /** Individual validation issues. */
47
+ issues: CtValidationIssue[];
48
+ }
49
+ /**
50
+ * A single validation issue from ct-skills.
51
+ */
52
+ interface CtValidationIssue {
53
+ /** Severity level. */
54
+ level: "error" | "warn";
55
+ /** Field that triggered the issue. */
56
+ field: string;
57
+ /** Human-readable message. */
58
+ message: string;
59
+ }
60
+ /**
61
+ * Profile definition from ct-skills profiles.
62
+ */
63
+ interface CtProfileDefinition {
64
+ /** Profile name (e.g. `"minimal"`, `"core"`, `"recommended"`, `"full"`). */
65
+ name: string;
66
+ /** Human-readable description. */
67
+ description: string;
68
+ /** Name of parent profile to extend. */
69
+ extends?: string;
70
+ /** Skill names included in this profile. */
71
+ skills: string[];
72
+ /** Whether to include _shared resources. */
73
+ includeShared?: boolean;
74
+ /** Protocol names to include. */
75
+ includeProtocols: string[];
76
+ }
77
+ /**
78
+ * Dispatch matrix from ct-skills manifest.json.
79
+ */
80
+ interface CtDispatchMatrix {
81
+ /** Task type to skill mapping. */
82
+ by_task_type: Record<string, string>;
83
+ /** Keyword to skill mapping. */
84
+ by_keyword: Record<string, string>;
85
+ /** Protocol to skill mapping. */
86
+ by_protocol: Record<string, string>;
87
+ }
88
+ /**
89
+ * Full manifest structure from ct-skills.
90
+ */
91
+ interface CtManifest {
92
+ /** JSON schema reference. */
93
+ $schema: string;
94
+ /** Metadata. */
95
+ _meta: Record<string, unknown>;
96
+ /** Dispatch matrix for skill routing. */
97
+ dispatch_matrix: CtDispatchMatrix;
98
+ /** Manifest skill entries. */
99
+ skills: CtManifestSkill[];
100
+ }
101
+ /**
102
+ * Skill entry within the ct-skills manifest.
103
+ */
104
+ interface CtManifestSkill {
105
+ /** Skill name. */
106
+ name: string;
107
+ /** Version. */
108
+ version: string;
109
+ /** Description. */
110
+ description: string;
111
+ /** Path within library. */
112
+ path: string;
113
+ /** Tags. */
114
+ tags: string[];
115
+ /** Status. */
116
+ status: string;
117
+ /** Tier. */
118
+ tier: number;
119
+ /** Token budget. */
120
+ token_budget: number;
121
+ /** References. */
122
+ references: string[];
123
+ /** Capabilities. */
124
+ capabilities: {
125
+ inputs: string[];
126
+ outputs: string[];
127
+ dependencies: string[];
128
+ dispatch_triggers: string[];
129
+ compatible_subagent_types: string[];
130
+ chains_to: string[];
131
+ dispatch_keywords: {
132
+ primary: string[];
133
+ secondary: string[];
134
+ };
135
+ };
136
+ /** Constraints. */
137
+ constraints: {
138
+ max_context_tokens: number;
139
+ requires_session: boolean;
140
+ requires_epic: boolean;
141
+ };
142
+ }
5
143
  /**
6
144
  * Supported configuration file formats.
7
145
  *
@@ -34,7 +172,7 @@ type TransportType = "stdio" | "sse" | "http";
34
172
  *
35
173
  * - `"binary"` - Check if a CLI binary exists on PATH
36
174
  * - `"directory"` - Check if known config/data directories exist
37
- * - `"appBundle"` - Check for macOS .app bundle in /Applications
175
+ * - `"appBundle"` - Check for macOS .app bundle in standard app directories
38
176
  * - `"flatpak"` - Check for Flatpak installation on Linux
39
177
  */
40
178
  type DetectionMethod = "binary" | "directory" | "appBundle" | "flatpak";
@@ -245,10 +383,13 @@ interface SkillMetadata {
245
383
  *
246
384
  * @example
247
385
  * ```typescript
386
+ * import { getCanonicalSkillsDir } from "./core/paths/standard.js";
387
+ * import { join } from "node:path";
388
+ *
248
389
  * const entry: SkillEntry = {
249
390
  * name: "my-skill",
250
391
  * scopedName: "my-skill",
251
- * path: "/home/user/.agents/skills/my-skill",
392
+ * path: join(getCanonicalSkillsDir(), "my-skill"),
252
393
  * metadata: { name: "my-skill", description: "A skill" },
253
394
  * };
254
395
  * ```
@@ -270,6 +411,9 @@ interface SkillEntry {
270
411
  *
271
412
  * @example
272
413
  * ```typescript
414
+ * import { getCanonicalSkillsDir } from "./core/paths/standard.js";
415
+ * import { join } from "node:path";
416
+ *
273
417
  * const entry: LockEntry = {
274
418
  * name: "my-skill",
275
419
  * scopedName: "my-skill",
@@ -277,7 +421,7 @@ interface SkillEntry {
277
421
  * sourceType: "github",
278
422
  * installedAt: "2025-01-15T10:30:00.000Z",
279
423
  * agents: ["claude-code", "cursor"],
280
- * canonicalPath: "/home/user/.agents/skills/my-skill",
424
+ * canonicalPath: join(getCanonicalSkillsDir(), "my-skill"),
281
425
  * isGlobal: true,
282
426
  * };
283
427
  * ```
@@ -307,7 +451,7 @@ interface LockEntry {
307
451
  projectDir?: string;
308
452
  }
309
453
  /**
310
- * The CAAMP lock file structure, stored at `~/.agents/.caamp-lock.json`.
454
+ * The CAAMP lock file structure, stored at the resolved canonical lock path.
311
455
  *
312
456
  * Tracks all installed skills and MCP servers along with their sources,
313
457
  * versions, and linked agents.
@@ -532,7 +676,7 @@ interface InjectionCheckResult {
532
676
  * providerId: "claude-code",
533
677
  * providerName: "Claude Code",
534
678
  * scope: "project",
535
- * configPath: "/project/.claude/settings.json",
679
+ * configPath: "/project/<provider-project-config>",
536
680
  * config: { command: "npx", args: ["-y", "@mcp/server-filesystem"] },
537
681
  * };
538
682
  * ```
@@ -610,6 +754,10 @@ interface DetectionResult {
610
754
  /** Whether the provider has project-level config in the current directory. */
611
755
  projectDetected: boolean;
612
756
  }
757
+ interface DetectionCacheOptions {
758
+ forceRefresh?: boolean;
759
+ ttlMs?: number;
760
+ }
613
761
  /**
614
762
  * Detect if a single provider is installed on the system.
615
763
  *
@@ -643,7 +791,7 @@ declare function detectProvider(provider: Provider): DetectionResult;
643
791
  * console.log(`${installed.length} agents detected`);
644
792
  * ```
645
793
  */
646
- declare function detectAllProviders(): DetectionResult[];
794
+ declare function detectAllProviders(options?: DetectionCacheOptions): DetectionResult[];
647
795
  /**
648
796
  * Get only providers that are currently installed on the system.
649
797
  *
@@ -658,7 +806,7 @@ declare function detectAllProviders(): DetectionResult[];
658
806
  * console.log(installed.map(p => p.toolName).join(", "));
659
807
  * ```
660
808
  */
661
- declare function getInstalledProviders(): Provider[];
809
+ declare function getInstalledProviders(options?: DetectionCacheOptions): Provider[];
662
810
  /**
663
811
  * Detect all providers and enrich results with project-level presence.
664
812
  *
@@ -678,7 +826,8 @@ declare function getInstalledProviders(): Provider[];
678
826
  * }
679
827
  * ```
680
828
  */
681
- declare function detectProjectProviders(projectDir: string): DetectionResult[];
829
+ declare function detectProjectProviders(projectDir: string, options?: DetectionCacheOptions): DetectionResult[];
830
+ declare function resetDetectionCache(): void;
682
831
 
683
832
  /**
684
833
  * MCP config installer
@@ -814,7 +963,7 @@ interface SkillInstallResult {
814
963
  /**
815
964
  * Install a skill from a local path to the canonical location and link to agents.
816
965
  *
817
- * Copies the skill directory to `~/.agents/skills/<name>/` and creates symlinks
966
+ * Copies the skill directory to the canonical skills directory and creates symlinks
818
967
  * (or copies on Windows) from each provider's skills directory to the canonical path.
819
968
  *
820
969
  * @param sourcePath - Local path to the skill directory to install
@@ -834,7 +983,7 @@ declare function installSkill(sourcePath: string, skillName: string, providers:
834
983
  * Remove a skill from the canonical location and all agent symlinks.
835
984
  *
836
985
  * Removes symlinks from each provider's skills directory and then removes the
837
- * canonical copy from `~/.agents/skills/<name>/`.
986
+ * canonical copy from the centralized canonical skills directory.
838
987
  *
839
988
  * @param skillName - Name of the skill to remove
840
989
  * @param providers - Providers to unlink the skill from
@@ -852,7 +1001,7 @@ declare function removeSkill(skillName: string, providers: Provider[], isGlobal:
852
1001
  errors: string[];
853
1002
  }>;
854
1003
  /**
855
- * List all skills installed in the canonical directory (`~/.agents/skills/`).
1004
+ * List all skills installed in the canonical skills directory.
856
1005
  *
857
1006
  * Returns the directory names of all skills, which correspond to skill names.
858
1007
  *
@@ -938,6 +1087,12 @@ interface MarketplaceAdapter {
938
1087
  search(query: string, limit?: number): Promise<MarketplaceResult[]>;
939
1088
  getSkill(scopedName: string): Promise<MarketplaceResult | null>;
940
1089
  }
1090
+ /**
1091
+ * Normalized marketplace record returned by all adapters.
1092
+ *
1093
+ * This model captures a single skill listing with enough information
1094
+ * for search display and install resolution to GitHub sources.
1095
+ */
941
1096
  interface MarketplaceResult {
942
1097
  name: string;
943
1098
  scopedName: string;
@@ -1315,6 +1470,74 @@ declare function getProviderCount(): number;
1315
1470
  */
1316
1471
  declare function getRegistryVersion(): string;
1317
1472
 
1473
+ type PathScope = "project" | "global";
1474
+ interface PlatformLocations {
1475
+ home: string;
1476
+ config: string;
1477
+ vscodeConfig: string;
1478
+ zedConfig: string;
1479
+ claudeDesktopConfig: string;
1480
+ applications: string[];
1481
+ }
1482
+ declare function getPlatformLocations(): PlatformLocations;
1483
+ declare function getAgentsHome(): string;
1484
+ declare function getProjectAgentsDir(projectRoot?: string): string;
1485
+ declare function getCanonicalSkillsDir(): string;
1486
+ declare function getLockFilePath(): string;
1487
+ /**
1488
+ * Get the MCP directory within `.agents/`.
1489
+ *
1490
+ * @param scope - `"global"` for `~/.agents/mcp/`, `"project"` for `<project>/.agents/mcp/`
1491
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1492
+ */
1493
+ declare function getAgentsMcpDir(scope?: PathScope, projectDir?: string): string;
1494
+ /**
1495
+ * Get the MCP servers.json path within `.agents/`.
1496
+ *
1497
+ * Per the `.agents/` standard (Section 9), this is the canonical MCP
1498
+ * server registry that should be checked before legacy per-provider configs.
1499
+ *
1500
+ * @param scope - `"global"` for `~/.agents/mcp/servers.json`, `"project"` for `<project>/.agents/mcp/servers.json`
1501
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1502
+ */
1503
+ declare function getAgentsMcpServersPath(scope?: PathScope, projectDir?: string): string;
1504
+ /**
1505
+ * Get the primary AGENTS.md instruction file path within `.agents/`.
1506
+ *
1507
+ * @param scope - `"global"` for `~/.agents/AGENTS.md`, `"project"` for `<project>/.agents/AGENTS.md`
1508
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1509
+ */
1510
+ declare function getAgentsInstructFile(scope?: PathScope, projectDir?: string): string;
1511
+ /**
1512
+ * Get the config.toml path within `.agents/`.
1513
+ *
1514
+ * @param scope - `"global"` for `~/.agents/config.toml`, `"project"` for `<project>/.agents/config.toml`
1515
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1516
+ */
1517
+ declare function getAgentsConfigPath(scope?: PathScope, projectDir?: string): string;
1518
+ /**
1519
+ * Get the wiki directory within `.agents/`.
1520
+ *
1521
+ * @param scope - `"global"` or `"project"`
1522
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1523
+ */
1524
+ declare function getAgentsWikiDir(scope?: PathScope, projectDir?: string): string;
1525
+ /**
1526
+ * Get the spec directory within `.agents/`.
1527
+ *
1528
+ * @param scope - `"global"` or `"project"`
1529
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1530
+ */
1531
+ declare function getAgentsSpecDir(scope?: PathScope, projectDir?: string): string;
1532
+ /**
1533
+ * Get the links directory within `.agents/`.
1534
+ *
1535
+ * @param scope - `"global"` or `"project"`
1536
+ * @param projectDir - Project root (defaults to `process.cwd()`)
1537
+ */
1538
+ declare function getAgentsLinksDir(scope?: PathScope, projectDir?: string): string;
1539
+ declare function resolveRegistryTemplatePath(template: string): string;
1540
+
1318
1541
  /**
1319
1542
  * Source URL/path classifier
1320
1543
  *
@@ -1360,6 +1583,99 @@ declare function parseSource(input: string): ParsedSource;
1360
1583
  */
1361
1584
  declare function isMarketplaceScoped(input: string): boolean;
1362
1585
 
1586
+ /**
1587
+ * ESM adapter for @cleocode/ct-skills (CommonJS module)
1588
+ *
1589
+ * Wraps the ct-skills library API with typed exports for use in CAAMP's
1590
+ * ESM codebase. Uses createRequire() for CJS interop.
1591
+ */
1592
+
1593
+ /** All skill entries from skills.json */
1594
+ declare function getSkills(): CtSkillEntry[];
1595
+ /** Parsed manifest.json dispatch registry */
1596
+ declare function getManifest(): CtManifest;
1597
+ /** List all skill names */
1598
+ declare function listSkills(): string[];
1599
+ /** Get skill metadata from skills.json by name */
1600
+ declare function getSkill(name: string): CtSkillEntry | undefined;
1601
+ /** Resolve absolute path to a skill's SKILL.md file */
1602
+ declare function getSkillPath(name: string): string;
1603
+ /** Resolve absolute path to a skill's directory */
1604
+ declare function getSkillDir(name: string): string;
1605
+ /** Read a skill's SKILL.md content as a string */
1606
+ declare function readSkillContent(name: string): string;
1607
+ /** Get all skills where core === true */
1608
+ declare function getCoreSkills(): CtSkillEntry[];
1609
+ /** Get skills filtered by category */
1610
+ declare function getSkillsByCategory(category: CtSkillEntry["category"]): CtSkillEntry[];
1611
+ /** Get direct dependency names for a skill */
1612
+ declare function getSkillDependencies(name: string): string[];
1613
+ /** Resolve full dependency tree for a set of skill names (includes transitive deps) */
1614
+ declare function resolveDependencyTree(names: string[]): string[];
1615
+ /** List available profile names */
1616
+ declare function listProfiles(): string[];
1617
+ /** Get a profile definition by name */
1618
+ declare function getProfile(name: string): CtProfileDefinition | undefined;
1619
+ /** Resolve a profile to its full skill list (follows extends, resolves deps) */
1620
+ declare function resolveProfile(name: string): string[];
1621
+ /** List available shared resource names */
1622
+ declare function listSharedResources(): string[];
1623
+ /** Get absolute path to a shared resource file */
1624
+ declare function getSharedResourcePath(name: string): string | undefined;
1625
+ /** Read a shared resource file content */
1626
+ declare function readSharedResource(name: string): string | undefined;
1627
+ /** List available protocol names */
1628
+ declare function listProtocols(): string[];
1629
+ /** Get absolute path to a protocol file */
1630
+ declare function getProtocolPath(name: string): string | undefined;
1631
+ /** Read a protocol file content */
1632
+ declare function readProtocol(name: string): string | undefined;
1633
+ /** Validate a single skill's frontmatter */
1634
+ declare function validateSkillFrontmatter(name: string): CtValidationResult;
1635
+ /** Validate all skills */
1636
+ declare function validateAll(): Map<string, CtValidationResult>;
1637
+ /** Get the dispatch matrix from manifest.json */
1638
+ declare function getDispatchMatrix(): CtDispatchMatrix;
1639
+ /** Package version from ct-skills package.json */
1640
+ declare function getVersion(): string;
1641
+ /** Absolute path to the ct-skills package root directory */
1642
+ declare function getLibraryRoot(): string;
1643
+ /**
1644
+ * Check if @cleocode/ct-skills is available.
1645
+ * Returns false if the package is not installed.
1646
+ */
1647
+ declare function isCatalogAvailable(): boolean;
1648
+
1649
+ declare const catalog_getCoreSkills: typeof getCoreSkills;
1650
+ declare const catalog_getDispatchMatrix: typeof getDispatchMatrix;
1651
+ declare const catalog_getLibraryRoot: typeof getLibraryRoot;
1652
+ declare const catalog_getManifest: typeof getManifest;
1653
+ declare const catalog_getProfile: typeof getProfile;
1654
+ declare const catalog_getProtocolPath: typeof getProtocolPath;
1655
+ declare const catalog_getSharedResourcePath: typeof getSharedResourcePath;
1656
+ declare const catalog_getSkill: typeof getSkill;
1657
+ declare const catalog_getSkillDependencies: typeof getSkillDependencies;
1658
+ declare const catalog_getSkillDir: typeof getSkillDir;
1659
+ declare const catalog_getSkillPath: typeof getSkillPath;
1660
+ declare const catalog_getSkills: typeof getSkills;
1661
+ declare const catalog_getSkillsByCategory: typeof getSkillsByCategory;
1662
+ declare const catalog_getVersion: typeof getVersion;
1663
+ declare const catalog_isCatalogAvailable: typeof isCatalogAvailable;
1664
+ declare const catalog_listProfiles: typeof listProfiles;
1665
+ declare const catalog_listProtocols: typeof listProtocols;
1666
+ declare const catalog_listSharedResources: typeof listSharedResources;
1667
+ declare const catalog_listSkills: typeof listSkills;
1668
+ declare const catalog_readProtocol: typeof readProtocol;
1669
+ declare const catalog_readSharedResource: typeof readSharedResource;
1670
+ declare const catalog_readSkillContent: typeof readSkillContent;
1671
+ declare const catalog_resolveDependencyTree: typeof resolveDependencyTree;
1672
+ declare const catalog_resolveProfile: typeof resolveProfile;
1673
+ declare const catalog_validateAll: typeof validateAll;
1674
+ declare const catalog_validateSkillFrontmatter: typeof validateSkillFrontmatter;
1675
+ declare namespace catalog {
1676
+ export { catalog_getCoreSkills as getCoreSkills, catalog_getDispatchMatrix as getDispatchMatrix, catalog_getLibraryRoot as getLibraryRoot, catalog_getManifest as getManifest, catalog_getProfile as getProfile, catalog_getProtocolPath as getProtocolPath, catalog_getSharedResourcePath as getSharedResourcePath, catalog_getSkill as getSkill, catalog_getSkillDependencies as getSkillDependencies, catalog_getSkillDir as getSkillDir, catalog_getSkillPath as getSkillPath, catalog_getSkills as getSkills, catalog_getSkillsByCategory as getSkillsByCategory, catalog_getVersion as getVersion, catalog_isCatalogAvailable as isCatalogAvailable, catalog_listProfiles as listProfiles, catalog_listProtocols as listProtocols, catalog_listSharedResources as listSharedResources, catalog_listSkills as listSkills, catalog_readProtocol as readProtocol, catalog_readSharedResource as readSharedResource, catalog_readSkillContent as readSkillContent, catalog_resolveDependencyTree as resolveDependencyTree, catalog_resolveProfile as resolveProfile, catalog_validateAll as validateAll, catalog_validateSkillFrontmatter as validateSkillFrontmatter };
1677
+ }
1678
+
1363
1679
  /**
1364
1680
  * Local skill discovery
1365
1681
  *
@@ -1395,7 +1711,10 @@ declare function parseSkillFile(filePath: string): Promise<SkillMetadata | null>
1395
1711
  *
1396
1712
  * @example
1397
1713
  * ```typescript
1398
- * const skill = await discoverSkill("/home/user/.agents/skills/my-skill");
1714
+ * import { getCanonicalSkillsDir } from "../paths/standard.js";
1715
+ * import { join } from "node:path";
1716
+ *
1717
+ * const skill = await discoverSkill(join(getCanonicalSkillsDir(), "my-skill"));
1399
1718
  * if (skill) {
1400
1719
  * console.log(`Found: ${skill.name}`);
1401
1720
  * }
@@ -1413,7 +1732,9 @@ declare function discoverSkill(skillDir: string): Promise<SkillEntry | null>;
1413
1732
  *
1414
1733
  * @example
1415
1734
  * ```typescript
1416
- * const skills = await discoverSkills("/home/user/.agents/skills");
1735
+ * import { getCanonicalSkillsDir } from "../paths/standard.js";
1736
+ *
1737
+ * const skills = await discoverSkills(getCanonicalSkillsDir());
1417
1738
  * console.log(`Found ${skills.length} skills`);
1418
1739
  * ```
1419
1740
  */
@@ -1467,7 +1788,9 @@ declare function scanFile(filePath: string, rules?: AuditRule[]): Promise<AuditR
1467
1788
  *
1468
1789
  * @example
1469
1790
  * ```typescript
1470
- * const results = await scanDirectory("/home/user/.agents/skills");
1791
+ * import { getCanonicalSkillsDir } from "../../paths/standard.js";
1792
+ *
1793
+ * const results = await scanDirectory(getCanonicalSkillsDir());
1471
1794
  * const failing = results.filter(r => !r.passed);
1472
1795
  * ```
1473
1796
  */
@@ -1538,7 +1861,7 @@ declare function getTransform(providerId: string): ((name: string, config: McpSe
1538
1861
  * @example
1539
1862
  * ```typescript
1540
1863
  * const path = resolveConfigPath(provider, "project", "/home/user/my-project");
1541
- * // "/home/user/my-project/.claude/settings.json"
1864
+ * // Returns provider-specific project config path
1542
1865
  * ```
1543
1866
  */
1544
1867
  declare function resolveConfigPath(provider: Provider, scope: "project" | "global", projectDir?: string): string | null;
@@ -1562,11 +1885,25 @@ declare function resolveConfigPath(provider: Provider, scope: "project" | "globa
1562
1885
  * ```
1563
1886
  */
1564
1887
  declare function listMcpServers(provider: Provider, scope: "project" | "global", projectDir?: string): Promise<McpServerEntry[]>;
1888
+ /**
1889
+ * List MCP servers from the `.agents/mcp/servers.json` standard location.
1890
+ *
1891
+ * Per the `.agents/` standard (Section 9), this file is the canonical
1892
+ * provider-agnostic MCP server registry. It should be checked before
1893
+ * per-provider legacy config files.
1894
+ *
1895
+ * @param scope - `"global"` for `~/.agents/mcp/servers.json`, `"project"` for project-level
1896
+ * @param projectDir - Project directory (defaults to `process.cwd()`)
1897
+ * @returns Array of MCP server entries found in the `.agents/` servers.json
1898
+ */
1899
+ declare function listAgentsMcpServers(scope: "project" | "global", projectDir?: string): Promise<McpServerEntry[]>;
1565
1900
  /**
1566
1901
  * List MCP servers across all given providers, deduplicating by config path.
1567
1902
  *
1568
- * Multiple providers may share the same config file. This function ensures each
1569
- * config file is read only once to avoid duplicate entries.
1903
+ * Per the `.agents/` standard (Section 9.4), checks `.agents/mcp/servers.json`
1904
+ * first, then falls back to per-provider legacy config files. Multiple providers
1905
+ * may share the same config file; this function ensures each config file is read
1906
+ * only once to avoid duplicate entries.
1570
1907
  *
1571
1908
  * @param providers - Array of providers to query
1572
1909
  * @param scope - Whether to read project or global config
@@ -1598,7 +1935,7 @@ declare function removeMcpServer(provider: Provider, serverName: string, scope:
1598
1935
  /**
1599
1936
  * Shared lock file utilities
1600
1937
  *
1601
- * Single source of truth for reading/writing ~/.agents/.caamp-lock.json.
1938
+ * Single source of truth for reading/writing the canonical CAAMP lock file path.
1602
1939
  * Both MCP and skills lock modules import from here.
1603
1940
  */
1604
1941
 
@@ -1609,7 +1946,7 @@ declare function readLockFile(): Promise<CaampLockFile>;
1609
1946
  * MCP lock file management
1610
1947
  *
1611
1948
  * Tracks installed MCP servers with source and agent metadata.
1612
- * Stored at ~/.agents/.caamp-lock.json (shared with skills lock).
1949
+ * Stored in the canonical CAAMP lock file (shared with skills lock).
1613
1950
  */
1614
1951
 
1615
1952
  /**
@@ -1685,7 +2022,7 @@ declare function getLastSelectedAgents(): Promise<string[] | undefined>;
1685
2022
  /**
1686
2023
  * Skills lock file management
1687
2024
  *
1688
- * Shares the same lock file as MCP (~/.agents/.caamp-lock.json).
2025
+ * Shares the same canonical lock file as MCP.
1689
2026
  */
1690
2027
 
1691
2028
  /**
@@ -1706,9 +2043,12 @@ declare function getLastSelectedAgents(): Promise<string[] | undefined>;
1706
2043
  *
1707
2044
  * @example
1708
2045
  * ```typescript
2046
+ * import { getCanonicalSkillsDir } from "../paths/standard.js";
2047
+ * import { join } from "node:path";
2048
+ *
1709
2049
  * await recordSkillInstall(
1710
2050
  * "my-skill", "my-skill", "owner/repo", "github",
1711
- * ["claude-code"], "/home/user/.agents/skills/my-skill", true,
2051
+ * ["claude-code"], join(getCanonicalSkillsDir(), "my-skill"), true,
1712
2052
  * );
1713
2053
  * ```
1714
2054
  */
@@ -2147,4 +2487,4 @@ declare function isVerbose(): boolean;
2147
2487
  */
2148
2488
  declare function isQuiet(): boolean;
2149
2489
 
2150
- export { type AuditFinding, type AuditResult, type AuditRule, type AuditSeverity, type BatchInstallOptions, type BatchInstallResult, type CaampLockFile, type ConfigFormat, type ConflictPolicy, type DetectionResult, type DualScopeConfigureOptions, type DualScopeConfigureResult, type GlobalOptions, type InjectionCheckResult, type InjectionStatus, type InstallResult, type InstructionUpdateSummary, type LockEntry, MarketplaceClient, type MarketplaceResult, type MarketplaceSearchResult, type MarketplaceSkill, type McpBatchOperation, type McpConflict, type McpConflictCode, type McpPlanApplyResult, type McpServerConfig, type McpServerEntry, type NormalizedRecommendationCriteria, type ParsedSource, type Provider, type ProviderPriority, type ProviderStatus, RECOMMENDATION_ERROR_CODES, type RankedSkillRecommendation, type RecommendSkillsResult, type RecommendationCriteriaInput, type RecommendationErrorCode, type RecommendationOptions, type RecommendationReason, type RecommendationReasonCode, type RecommendationScoreBreakdown, type RecommendationValidationIssue, type RecommendationValidationResult, type RecommendationWeights, type SkillBatchOperation, type SkillEntry, type SkillInstallResult, type SkillMetadata, type SourceType, type TransportType, type ValidationIssue, type ValidationResult, applyMcpInstallWithPolicy, buildServerConfig, checkAllInjections, checkInjection, checkSkillUpdate, configureProviderGlobalAndProject, deepMerge, detectAllProviders, detectMcpConfigConflicts, detectProjectProviders, detectProvider, discoverSkill, discoverSkills, ensureDir, formatSkillRecommendations, generateInjectionContent, getAllProviders, getInstalledProviders, getInstructionFiles, getLastSelectedAgents, getNestedValue, getProvider, getProviderCount, getProvidersByInstructFile, getProvidersByPriority, getProvidersByStatus, getRegistryVersion, getTrackedMcpServers, getTrackedSkills, getTransform, groupByInstructFile, inject, injectAll, installBatchWithRollback, installMcpServer, installMcpServerToAll, installSkill, isMarketplaceScoped, isQuiet, isVerbose, listAllMcpServers, listCanonicalSkills, listMcpServers, normalizeRecommendationCriteria, parseSkillFile, parseSource, rankSkills, readConfig, readLockFile, recommendSkills, recordMcpInstall, recordSkillInstall, removeConfig, removeInjection, removeMcpFromLock, removeMcpServer, removeSkill, removeSkillFromLock, resolveAlias, resolveConfigPath, saveLastSelectedAgents, scanDirectory, scanFile, scoreSkillRecommendation, searchSkills, selectProvidersByMinimumPriority, setQuiet, setVerbose, toSarif, tokenizeCriteriaValue, updateInstructionsSingleOperation, validateRecommendationCriteria, validateSkill, writeConfig };
2490
+ export { type AuditFinding, type AuditResult, type AuditRule, type AuditSeverity, type BatchInstallOptions, type BatchInstallResult, type CaampLockFile, type ConfigFormat, type ConflictPolicy, type CtDispatchMatrix, type CtManifest, type CtManifestSkill, type CtProfileDefinition, type CtSkillEntry, type CtValidationIssue, type CtValidationResult, type DetectionCacheOptions, type DetectionResult, type DualScopeConfigureOptions, type DualScopeConfigureResult, type GlobalOptions, type InjectionCheckResult, type InjectionStatus, type InstallResult, type InstructionUpdateSummary, type LockEntry, MarketplaceClient, type MarketplaceResult, type MarketplaceSearchResult, type MarketplaceSkill, type McpBatchOperation, type McpConflict, type McpConflictCode, type McpPlanApplyResult, type McpServerConfig, type McpServerEntry, type NormalizedRecommendationCriteria, type ParsedSource, type Provider, type ProviderPriority, type ProviderStatus, RECOMMENDATION_ERROR_CODES, type RankedSkillRecommendation, type RecommendSkillsResult, type RecommendationCriteriaInput, type RecommendationErrorCode, type RecommendationOptions, type RecommendationReason, type RecommendationReasonCode, type RecommendationScoreBreakdown, type RecommendationValidationIssue, type RecommendationValidationResult, type RecommendationWeights, type SkillBatchOperation, type SkillEntry, type SkillInstallResult, type SkillMetadata, type SourceType, type TransportType, type ValidationIssue, type ValidationResult, applyMcpInstallWithPolicy, buildServerConfig, catalog, checkAllInjections, checkInjection, checkSkillUpdate, configureProviderGlobalAndProject, deepMerge, detectAllProviders, detectMcpConfigConflicts, detectProjectProviders, detectProvider, discoverSkill, discoverSkills, ensureDir, formatSkillRecommendations, generateInjectionContent, getAgentsConfigPath, getAgentsHome, getAgentsInstructFile, getAgentsLinksDir, getAgentsMcpDir, getAgentsMcpServersPath, getAgentsSpecDir, getAgentsWikiDir, getAllProviders, getCanonicalSkillsDir, getInstalledProviders, getInstructionFiles, getLastSelectedAgents, getLockFilePath, getNestedValue, getPlatformLocations, getProjectAgentsDir, getProvider, getProviderCount, getProvidersByInstructFile, getProvidersByPriority, getProvidersByStatus, getRegistryVersion, getTrackedMcpServers, getTrackedSkills, getTransform, groupByInstructFile, inject, injectAll, installBatchWithRollback, installMcpServer, installMcpServerToAll, installSkill, isMarketplaceScoped, isQuiet, isVerbose, listAgentsMcpServers, listAllMcpServers, listCanonicalSkills, listMcpServers, normalizeRecommendationCriteria, parseSkillFile, parseSource, rankSkills, readConfig, readLockFile, recommendSkills, recordMcpInstall, recordSkillInstall, removeConfig, removeInjection, removeMcpFromLock, removeMcpServer, removeSkill, removeSkillFromLock, resetDetectionCache, resolveAlias, resolveConfigPath, resolveRegistryTemplatePath, saveLastSelectedAgents, scanDirectory, scanFile, scoreSkillRecommendation, searchSkills, selectProvidersByMinimumPriority, setQuiet, setVerbose, toSarif, tokenizeCriteriaValue, updateInstructionsSingleOperation, validateRecommendationCriteria, validateSkill, writeConfig };
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  RECOMMENDATION_ERROR_CODES,
4
4
  applyMcpInstallWithPolicy,
5
5
  buildServerConfig,
6
+ catalog_exports,
6
7
  checkAllInjections,
7
8
  checkInjection,
8
9
  checkSkillUpdate,
@@ -17,11 +18,23 @@ import {
17
18
  ensureDir,
18
19
  formatSkillRecommendations,
19
20
  generateInjectionContent,
21
+ getAgentsConfigPath,
22
+ getAgentsHome,
23
+ getAgentsInstructFile,
24
+ getAgentsLinksDir,
25
+ getAgentsMcpDir,
26
+ getAgentsMcpServersPath,
27
+ getAgentsSpecDir,
28
+ getAgentsWikiDir,
20
29
  getAllProviders,
30
+ getCanonicalSkillsDir,
21
31
  getInstalledProviders,
22
32
  getInstructionFiles,
23
33
  getLastSelectedAgents,
34
+ getLockFilePath,
24
35
  getNestedValue,
36
+ getPlatformLocations,
37
+ getProjectAgentsDir,
25
38
  getProvider,
26
39
  getProviderCount,
27
40
  getProvidersByInstructFile,
@@ -41,6 +54,7 @@ import {
41
54
  isMarketplaceScoped,
42
55
  isQuiet,
43
56
  isVerbose,
57
+ listAgentsMcpServers,
44
58
  listAllMcpServers,
45
59
  listCanonicalSkills,
46
60
  listMcpServers,
@@ -59,8 +73,10 @@ import {
59
73
  removeMcpServer,
60
74
  removeSkill,
61
75
  removeSkillFromLock,
76
+ resetDetectionCache,
62
77
  resolveAlias,
63
78
  resolveConfigPath,
79
+ resolveRegistryTemplatePath,
64
80
  saveLastSelectedAgents,
65
81
  scanDirectory,
66
82
  scanFile,
@@ -75,12 +91,13 @@ import {
75
91
  validateRecommendationCriteria,
76
92
  validateSkill,
77
93
  writeConfig
78
- } from "./chunk-ZYINKJDE.js";
94
+ } from "./chunk-YCSZGZ5W.js";
79
95
  export {
80
96
  MarketplaceClient,
81
97
  RECOMMENDATION_ERROR_CODES,
82
98
  applyMcpInstallWithPolicy,
83
99
  buildServerConfig,
100
+ catalog_exports as catalog,
84
101
  checkAllInjections,
85
102
  checkInjection,
86
103
  checkSkillUpdate,
@@ -95,11 +112,23 @@ export {
95
112
  ensureDir,
96
113
  formatSkillRecommendations,
97
114
  generateInjectionContent,
115
+ getAgentsConfigPath,
116
+ getAgentsHome,
117
+ getAgentsInstructFile,
118
+ getAgentsLinksDir,
119
+ getAgentsMcpDir,
120
+ getAgentsMcpServersPath,
121
+ getAgentsSpecDir,
122
+ getAgentsWikiDir,
98
123
  getAllProviders,
124
+ getCanonicalSkillsDir,
99
125
  getInstalledProviders,
100
126
  getInstructionFiles,
101
127
  getLastSelectedAgents,
128
+ getLockFilePath,
102
129
  getNestedValue,
130
+ getPlatformLocations,
131
+ getProjectAgentsDir,
103
132
  getProvider,
104
133
  getProviderCount,
105
134
  getProvidersByInstructFile,
@@ -119,6 +148,7 @@ export {
119
148
  isMarketplaceScoped,
120
149
  isQuiet,
121
150
  isVerbose,
151
+ listAgentsMcpServers,
122
152
  listAllMcpServers,
123
153
  listCanonicalSkills,
124
154
  listMcpServers,
@@ -137,8 +167,10 @@ export {
137
167
  removeMcpServer,
138
168
  removeSkill,
139
169
  removeSkillFromLock,
170
+ resetDetectionCache,
140
171
  resolveAlias,
141
172
  resolveConfigPath,
173
+ resolveRegistryTemplatePath,
142
174
  saveLastSelectedAgents,
143
175
  scanDirectory,
144
176
  scanFile,
package/dist/index.js.map CHANGED
File without changes