@cleocode/caamp 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -15
- package/dist/{chunk-VAFYP7CI.js → chunk-762HFAUU.js} +42 -29
- package/dist/chunk-762HFAUU.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +13 -5
- package/dist/chunk-VAFYP7CI.js.map +0 -1
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<img src="https://img.shields.io/node/v/@cleocode/caamp" alt="node version" />
|
|
9
9
|
<img src="https://img.shields.io/badge/providers-44-green" alt="providers" />
|
|
10
10
|
<img src="https://img.shields.io/badge/TypeScript-strict-blue" alt="typescript" />
|
|
11
|
+
<a href="https://codluv.gitbook.io/caamp/"><img src="https://img.shields.io/badge/docs-GitBook-blue?logo=gitbook" alt="docs" /></a>
|
|
11
12
|
</p>
|
|
12
13
|
|
|
13
14
|
# CAAMP - Central AI Agent Managed Packages
|
|
@@ -64,7 +65,7 @@ const installed = getInstalledProviders();
|
|
|
64
65
|
const servers = await listAllMcpServers(installed, "global");
|
|
65
66
|
```
|
|
66
67
|
|
|
67
|
-
See [API Reference](
|
|
68
|
+
See [API Reference](https://codluv.gitbook.io/caamp/api-and-reference/api-reference) for full programmatic API documentation.
|
|
68
69
|
|
|
69
70
|
## CLI Commands
|
|
70
71
|
|
|
@@ -209,23 +210,25 @@ Each provider uses a different key name for MCP server configuration:
|
|
|
209
210
|
|
|
210
211
|
## Documentation
|
|
211
212
|
|
|
213
|
+
**[Read the full documentation on GitBook](https://codluv.gitbook.io/caamp/)**
|
|
214
|
+
|
|
212
215
|
| Document | Description |
|
|
213
216
|
|----------|-------------|
|
|
214
|
-
| [API Reference](
|
|
215
|
-
| [Advanced CLI](
|
|
216
|
-
| [Advanced Recipes](
|
|
217
|
-
| [Provider Configuration Guide](
|
|
218
|
-
| [Migration Guide](
|
|
219
|
-
| [Troubleshooting](
|
|
220
|
-
| [CLI Help Examples](
|
|
221
|
-
| [
|
|
222
|
-
| [
|
|
223
|
-
| [
|
|
224
|
-
| [
|
|
225
|
-
| [
|
|
226
|
-
| [Technical Specification](claudedocs/specs/CAAMP-SPEC.md) | RFC 2119 spec covering all subsystems |
|
|
217
|
+
| [API Reference](https://codluv.gitbook.io/caamp/api-and-reference/api-reference) | Full library API (signatures and examples) |
|
|
218
|
+
| [Advanced CLI](https://codluv.gitbook.io/caamp/advanced-usage/advanced-cli) | LAFS-compliant advanced command wrappers and input/output schemas |
|
|
219
|
+
| [Advanced Recipes](https://codluv.gitbook.io/caamp/advanced-usage/advanced-recipes) | Production TypeScript patterns for tier filtering, rollback, conflict handling, and dual-scope operations |
|
|
220
|
+
| [Provider Configuration Guide](https://codluv.gitbook.io/caamp/user-guides/provider-configuration) | Config keys, formats, scopes, and provider mapping guidance |
|
|
221
|
+
| [Migration Guide](https://codluv.gitbook.io/caamp/getting-started/migration-v1) | Upgrade notes for moving to v1.0.0 |
|
|
222
|
+
| [Troubleshooting](https://codluv.gitbook.io/caamp/user-guides/troubleshooting) | Common failure modes and remediation steps |
|
|
223
|
+
| [CLI Help Examples](https://codluv.gitbook.io/caamp/user-guides/cli-help-examples) | `--help` command examples for every command group |
|
|
224
|
+
| [Skills Recommendations](https://codluv.gitbook.io/caamp/advanced-usage/skills-recommendations) | Marketplace search and recommendation engine |
|
|
225
|
+
| [Contributing](https://codluv.gitbook.io/caamp/contributing/contributing) | Development workflow and PR expectations |
|
|
226
|
+
| [Security Policy](https://codluv.gitbook.io/caamp/contributing/security) | Private vulnerability disclosure process |
|
|
227
|
+
| [LAFS Compliance Profile](https://codluv.gitbook.io/caamp/api-and-reference/lafs-compliance) | CAAMP-specific LAFS adoption scope and compliance mapping |
|
|
228
|
+
| [Agents Directory Standard](https://codluv.gitbook.io/caamp/api-and-reference/agents-directory-standard) | `.agents/` standard directory structure |
|
|
227
229
|
| [LAFS Specification](https://github.com/kryptobaseddev/lafs-protocol/blob/main/lafs.md) | Canonical cross-language LLM-agent-first protocol |
|
|
228
|
-
| [
|
|
230
|
+
| [Technical Specification](claudedocs/specs/CAAMP-SPEC.md) | RFC 2119 spec covering all subsystems |
|
|
231
|
+
| [Vision & Architecture](claudedocs/VISION.md) | Project vision, design philosophy, and architecture |
|
|
229
232
|
| [Gap Analysis & Roadmap](claudedocs/GAP-ANALYSIS.md) | Current state vs plan, v0.2.0+ roadmap |
|
|
230
233
|
|
|
231
234
|
## Contributing
|
|
@@ -435,8 +435,8 @@ function resetDetectionCache() {
|
|
|
435
435
|
|
|
436
436
|
// src/core/sources/parser.ts
|
|
437
437
|
var GITHUB_SHORTHAND = /^([a-zA-Z0-9_.-]+)\/([a-zA-Z0-9_.-]+)(?:\/(.+))?$/;
|
|
438
|
-
var GITHUB_URL = /^https?:\/\/(?:www\.)?github\.com\/([^/]+)\/([^/]+)(?:\/tree\/([^/]+)(?:\/(.+))?)?/;
|
|
439
|
-
var GITLAB_URL = /^https?:\/\/(?:www\.)?gitlab\.com\/([^/]+)\/([^/]+)(?:\/-\/tree\/([^/]+)(?:\/(.+))?)?/;
|
|
438
|
+
var GITHUB_URL = /^https?:\/\/(?:www\.)?github\.com\/([^/]+)\/([^/]+)(?:\/(?:tree|blob)\/([^/]+)(?:\/(.+))?)?/;
|
|
439
|
+
var GITLAB_URL = /^https?:\/\/(?:www\.)?gitlab\.com\/([^/]+)\/([^/]+)(?:\/-\/(?:tree|blob)\/([^/]+)(?:\/(.+))?)?/;
|
|
440
440
|
var HTTP_URL = /^https?:\/\//;
|
|
441
441
|
var NPM_SCOPED = /^@[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/;
|
|
442
442
|
var NPM_PACKAGE = /^[a-zA-Z0-9_.-]+$/;
|
|
@@ -488,34 +488,38 @@ function parseSource(input) {
|
|
|
488
488
|
if (ghUrlMatch) {
|
|
489
489
|
const owner = ghUrlMatch[1];
|
|
490
490
|
const repo = ghUrlMatch[2];
|
|
491
|
+
const path = ghUrlMatch[4];
|
|
491
492
|
if (!owner || !repo) {
|
|
492
493
|
return { type: "command", value: input, inferredName: inferName(input, "command") };
|
|
493
494
|
}
|
|
495
|
+
const inferredName = path ? path.split("/").pop() ?? repo : repo;
|
|
494
496
|
return {
|
|
495
497
|
type: "github",
|
|
496
498
|
value: input,
|
|
497
|
-
inferredName
|
|
499
|
+
inferredName,
|
|
498
500
|
owner,
|
|
499
501
|
repo,
|
|
500
502
|
ref: ghUrlMatch[3],
|
|
501
|
-
path
|
|
503
|
+
path
|
|
502
504
|
};
|
|
503
505
|
}
|
|
504
506
|
const glUrlMatch = input.match(GITLAB_URL);
|
|
505
507
|
if (glUrlMatch) {
|
|
506
508
|
const owner = glUrlMatch[1];
|
|
507
509
|
const repo = glUrlMatch[2];
|
|
510
|
+
const path = glUrlMatch[4];
|
|
508
511
|
if (!owner || !repo) {
|
|
509
512
|
return { type: "command", value: input, inferredName: inferName(input, "command") };
|
|
510
513
|
}
|
|
514
|
+
const inferredName = path ? path.split("/").pop() ?? repo : repo;
|
|
511
515
|
return {
|
|
512
516
|
type: "gitlab",
|
|
513
517
|
value: input,
|
|
514
|
-
inferredName
|
|
518
|
+
inferredName,
|
|
515
519
|
owner,
|
|
516
520
|
repo,
|
|
517
521
|
ref: glUrlMatch[3],
|
|
518
|
-
path
|
|
522
|
+
path
|
|
519
523
|
};
|
|
520
524
|
}
|
|
521
525
|
if (HTTP_URL.test(input)) {
|
|
@@ -536,16 +540,18 @@ function parseSource(input) {
|
|
|
536
540
|
if (ghShorthand && !NPM_SCOPED.test(input)) {
|
|
537
541
|
const owner = ghShorthand[1];
|
|
538
542
|
const repo = ghShorthand[2];
|
|
543
|
+
const path = ghShorthand[3];
|
|
539
544
|
if (!owner || !repo) {
|
|
540
545
|
return { type: "command", value: input, inferredName: inferName(input, "command") };
|
|
541
546
|
}
|
|
547
|
+
const inferredName = path ? path.split("/").pop() ?? repo : repo;
|
|
542
548
|
return {
|
|
543
549
|
type: "github",
|
|
544
550
|
value: `https://github.com/${owner}/${repo}`,
|
|
545
|
-
inferredName
|
|
551
|
+
inferredName,
|
|
546
552
|
owner,
|
|
547
553
|
repo,
|
|
548
|
-
path
|
|
554
|
+
path
|
|
549
555
|
};
|
|
550
556
|
}
|
|
551
557
|
if (NPM_SCOPED.test(input)) {
|
|
@@ -573,29 +579,26 @@ function isMarketplaceScoped(input) {
|
|
|
573
579
|
}
|
|
574
580
|
|
|
575
581
|
// src/core/skills/installer.ts
|
|
576
|
-
import { mkdir, symlink, rm, cp } from "fs/promises";
|
|
577
582
|
import { existsSync as existsSync3, lstatSync } from "fs";
|
|
583
|
+
import { cp, mkdir, rm, symlink } from "fs/promises";
|
|
578
584
|
import { join as join3 } from "path";
|
|
579
|
-
|
|
580
|
-
// src/core/paths/agents.ts
|
|
581
|
-
var AGENTS_HOME = getAgentsHome();
|
|
582
|
-
var LOCK_FILE_PATH = getLockFilePath();
|
|
583
|
-
var CANONICAL_SKILLS_DIR = getCanonicalSkillsDir();
|
|
584
|
-
var AGENTS_MCP_DIR = getAgentsMcpDir();
|
|
585
|
-
var AGENTS_MCP_SERVERS_PATH = getAgentsMcpServersPath();
|
|
586
|
-
var AGENTS_CONFIG_PATH = getAgentsConfigPath();
|
|
587
|
-
|
|
588
|
-
// src/core/skills/installer.ts
|
|
589
585
|
async function ensureCanonicalDir() {
|
|
590
|
-
await mkdir(
|
|
586
|
+
await mkdir(getCanonicalSkillsDir(), { recursive: true });
|
|
591
587
|
}
|
|
592
588
|
async function installToCanonical(sourcePath, skillName) {
|
|
593
589
|
await ensureCanonicalDir();
|
|
594
|
-
const targetDir = join3(
|
|
595
|
-
|
|
596
|
-
|
|
590
|
+
const targetDir = join3(getCanonicalSkillsDir(), skillName);
|
|
591
|
+
await rm(targetDir, { recursive: true, force: true });
|
|
592
|
+
try {
|
|
593
|
+
await cp(sourcePath, targetDir, { recursive: true });
|
|
594
|
+
} catch (err) {
|
|
595
|
+
if (err && typeof err === "object" && "code" in err && err.code === "EEXIST") {
|
|
596
|
+
await rm(targetDir, { recursive: true, force: true });
|
|
597
|
+
await cp(sourcePath, targetDir, { recursive: true });
|
|
598
|
+
} else {
|
|
599
|
+
throw err;
|
|
600
|
+
}
|
|
597
601
|
}
|
|
598
|
-
await cp(sourcePath, targetDir, { recursive: true });
|
|
599
602
|
return targetDir;
|
|
600
603
|
}
|
|
601
604
|
async function linkToAgent(canonicalPath, provider, skillName, isGlobal, projectDir) {
|
|
@@ -672,7 +675,7 @@ async function removeSkill(skillName, providers, isGlobal, projectDir) {
|
|
|
672
675
|
}
|
|
673
676
|
}
|
|
674
677
|
}
|
|
675
|
-
const canonicalPath = join3(
|
|
678
|
+
const canonicalPath = join3(getCanonicalSkillsDir(), skillName);
|
|
676
679
|
if (existsSync3(canonicalPath)) {
|
|
677
680
|
try {
|
|
678
681
|
await rm(canonicalPath, { recursive: true });
|
|
@@ -683,15 +686,25 @@ async function removeSkill(skillName, providers, isGlobal, projectDir) {
|
|
|
683
686
|
return { removed, errors };
|
|
684
687
|
}
|
|
685
688
|
async function listCanonicalSkills() {
|
|
686
|
-
if (!existsSync3(
|
|
689
|
+
if (!existsSync3(getCanonicalSkillsDir())) return [];
|
|
687
690
|
const { readdir: readdir2 } = await import("fs/promises");
|
|
688
|
-
const entries = await readdir2(
|
|
691
|
+
const entries = await readdir2(getCanonicalSkillsDir(), { withFileTypes: true });
|
|
689
692
|
return entries.filter((e) => e.isDirectory() || e.isSymbolicLink()).map((e) => e.name);
|
|
690
693
|
}
|
|
691
694
|
|
|
692
695
|
// src/core/lock-utils.ts
|
|
693
696
|
import { open, readFile, writeFile, mkdir as mkdir2, rm as rm2, rename } from "fs/promises";
|
|
694
697
|
import { existsSync as existsSync4 } from "fs";
|
|
698
|
+
|
|
699
|
+
// src/core/paths/agents.ts
|
|
700
|
+
var AGENTS_HOME = getAgentsHome();
|
|
701
|
+
var LOCK_FILE_PATH = getLockFilePath();
|
|
702
|
+
var CANONICAL_SKILLS_DIR = getCanonicalSkillsDir();
|
|
703
|
+
var AGENTS_MCP_DIR = getAgentsMcpDir();
|
|
704
|
+
var AGENTS_MCP_SERVERS_PATH = getAgentsMcpServersPath();
|
|
705
|
+
var AGENTS_CONFIG_PATH = getAgentsConfigPath();
|
|
706
|
+
|
|
707
|
+
// src/core/lock-utils.ts
|
|
695
708
|
var LOCK_GUARD_PATH = `${LOCK_FILE_PATH}.lock`;
|
|
696
709
|
function sleep(ms) {
|
|
697
710
|
return new Promise((resolve3) => setTimeout(resolve3, ms));
|
|
@@ -3239,10 +3252,10 @@ export {
|
|
|
3239
3252
|
resetDetectionCache,
|
|
3240
3253
|
parseSource,
|
|
3241
3254
|
isMarketplaceScoped,
|
|
3242
|
-
CANONICAL_SKILLS_DIR,
|
|
3243
3255
|
installSkill,
|
|
3244
3256
|
removeSkill,
|
|
3245
3257
|
listCanonicalSkills,
|
|
3258
|
+
CANONICAL_SKILLS_DIR,
|
|
3246
3259
|
readLockFile,
|
|
3247
3260
|
recordSkillInstall,
|
|
3248
3261
|
removeSkillFromLock,
|
|
@@ -3308,4 +3321,4 @@ export {
|
|
|
3308
3321
|
updateInstructionsSingleOperation,
|
|
3309
3322
|
configureProviderGlobalAndProject
|
|
3310
3323
|
};
|
|
3311
|
-
//# sourceMappingURL=chunk-
|
|
3324
|
+
//# sourceMappingURL=chunk-762HFAUU.js.map
|