@cleocode/adapters 2026.4.24 → 2026.4.25
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.js +40 -5
- package/dist/index.js.map +3 -3
- package/dist/providers/claude-code/install.d.ts +12 -1
- package/dist/providers/claude-code/install.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/providers/claude-code/commands/orchestrator.md +132 -0
- package/src/providers/claude-code/install.ts +50 -4
package/dist/index.js
CHANGED
|
@@ -387,9 +387,14 @@ var init_hooks = __esm({
|
|
|
387
387
|
});
|
|
388
388
|
|
|
389
389
|
// packages/adapters/src/providers/claude-code/install.ts
|
|
390
|
-
import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
390
|
+
import { copyFileSync, existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, readdirSync, writeFileSync as writeFileSync2 } from "node:fs";
|
|
391
391
|
import { homedir as homedir3 } from "node:os";
|
|
392
|
-
import { join as join4 } from "node:path";
|
|
392
|
+
import { dirname as dirname2, join as join4 } from "node:path";
|
|
393
|
+
import { fileURLToPath } from "node:url";
|
|
394
|
+
function getAdapterCommandsDir() {
|
|
395
|
+
const thisDir = dirname2(fileURLToPath(import.meta.url));
|
|
396
|
+
return join4(thisDir, "commands");
|
|
397
|
+
}
|
|
393
398
|
var INSTRUCTION_REFERENCES, ClaudeCodeInstallProvider;
|
|
394
399
|
var init_install = __esm({
|
|
395
400
|
"packages/adapters/src/providers/claude-code/install.ts"() {
|
|
@@ -411,6 +416,10 @@ var init_install = __esm({
|
|
|
411
416
|
if (instructionFileUpdated) {
|
|
412
417
|
details.instructionFile = join4(projectDir, "CLAUDE.md");
|
|
413
418
|
}
|
|
419
|
+
const commandsInstalled = this.installCommands(projectDir);
|
|
420
|
+
if (commandsInstalled.length > 0) {
|
|
421
|
+
details.commands = commandsInstalled;
|
|
422
|
+
}
|
|
414
423
|
const pluginResult = this.registerPlugin();
|
|
415
424
|
if (pluginResult) {
|
|
416
425
|
details.plugin = pluginResult;
|
|
@@ -485,6 +494,32 @@ var init_install = __esm({
|
|
|
485
494
|
writeFileSync2(claudeMdPath, content, "utf-8");
|
|
486
495
|
return true;
|
|
487
496
|
}
|
|
497
|
+
/**
|
|
498
|
+
* Install Claude Code-specific commands to .claude/commands/ in the project.
|
|
499
|
+
*
|
|
500
|
+
* These commands extend CLEO's provider-neutral skills with Claude Code-specific
|
|
501
|
+
* operational patterns (Agent tool spawn templates, model assignment, context guardrails).
|
|
502
|
+
*
|
|
503
|
+
* @param projectDir - Project root directory
|
|
504
|
+
* @returns Array of installed command filenames
|
|
505
|
+
*/
|
|
506
|
+
installCommands(projectDir) {
|
|
507
|
+
const adapterCommandsDir = getAdapterCommandsDir();
|
|
508
|
+
if (!existsSync2(adapterCommandsDir)) {
|
|
509
|
+
return [];
|
|
510
|
+
}
|
|
511
|
+
const targetDir = join4(projectDir, ".claude", "commands");
|
|
512
|
+
mkdirSync(targetDir, { recursive: true });
|
|
513
|
+
const installed = [];
|
|
514
|
+
const files = readdirSync(adapterCommandsDir).filter((f) => f.endsWith(".md"));
|
|
515
|
+
for (const file of files) {
|
|
516
|
+
const src = join4(adapterCommandsDir, file);
|
|
517
|
+
const dest = join4(targetDir, file);
|
|
518
|
+
copyFileSync(src, dest);
|
|
519
|
+
installed.push(file);
|
|
520
|
+
}
|
|
521
|
+
return installed;
|
|
522
|
+
}
|
|
488
523
|
/**
|
|
489
524
|
* Register the CLEO brain plugin in ~/.claude/settings.json.
|
|
490
525
|
*
|
|
@@ -3175,12 +3210,12 @@ init_opencode();
|
|
|
3175
3210
|
|
|
3176
3211
|
// packages/adapters/src/registry.ts
|
|
3177
3212
|
import { readFileSync as readFileSync9 } from "node:fs";
|
|
3178
|
-
import { dirname as
|
|
3179
|
-
import { fileURLToPath } from "node:url";
|
|
3213
|
+
import { dirname as dirname3, join as join22, resolve } from "node:path";
|
|
3214
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
3180
3215
|
var PROVIDER_IDS = ["claude-code", "opencode", "cursor"];
|
|
3181
3216
|
function getProviderManifests() {
|
|
3182
3217
|
const manifests = [];
|
|
3183
|
-
const baseDir = resolve(
|
|
3218
|
+
const baseDir = resolve(dirname3(fileURLToPath2(import.meta.url)), "providers");
|
|
3184
3219
|
for (const providerId of PROVIDER_IDS) {
|
|
3185
3220
|
try {
|
|
3186
3221
|
const manifestPath = join22(baseDir, providerId, "manifest.json");
|