agent-ctrl-cli 0.1.6 → 0.1.7
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 +39 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8403,45 +8403,62 @@ class QwenAdapter {
|
|
|
8403
8403
|
// src/infrastructure/features/kilo/adapters/KiloAdapter.ts
|
|
8404
8404
|
import { homedir as homedir15 } from "node:os";
|
|
8405
8405
|
import { resolve as resolve26 } from "node:path";
|
|
8406
|
+
import { mkdir as mkdir8 } from "node:fs/promises";
|
|
8407
|
+
var KILO_VSCODE_DIR = ".kilo";
|
|
8408
|
+
var KILO_CLI_DIR = ".kilocode";
|
|
8409
|
+
function getKiloConfigRoots(basePath) {
|
|
8410
|
+
return [resolve26(basePath, KILO_VSCODE_DIR), resolve26(basePath, KILO_CLI_DIR)];
|
|
8411
|
+
}
|
|
8412
|
+
async function ensureDirExists(path) {
|
|
8413
|
+
await mkdir8(path, { recursive: true });
|
|
8414
|
+
}
|
|
8415
|
+
|
|
8406
8416
|
class KiloAdapter {
|
|
8407
8417
|
platformName = "kilo";
|
|
8408
8418
|
sourceLoader = new ApplySourceLoader;
|
|
8409
8419
|
async resolveTarget(projectPath, request) {
|
|
8410
8420
|
const scope = resolveApplyScope(request?.targetScope, "user", true);
|
|
8411
|
-
const
|
|
8421
|
+
const targetPath = scope === "project" ? projectPath : request?.userConfigRootPath ?? resolve26(homedir15());
|
|
8422
|
+
const [vscodeRoot, cliRoot] = getKiloConfigRoots(targetPath);
|
|
8423
|
+
await ensureDirExists(vscodeRoot);
|
|
8424
|
+
await ensureDirExists(cliRoot);
|
|
8412
8425
|
return {
|
|
8413
|
-
configPath:
|
|
8426
|
+
configPath: vscodeRoot,
|
|
8414
8427
|
scope,
|
|
8415
8428
|
surface: "rules-workflows-skills-agents-mcp"
|
|
8416
8429
|
};
|
|
8417
8430
|
}
|
|
8418
8431
|
async applyAppyIntegration(request) {
|
|
8419
|
-
const
|
|
8432
|
+
const scope = resolveApplyScope(request?.targetScope, "user", true);
|
|
8433
|
+
const targetPath = scope === "project" ? request.projectPath : request?.userConfigRootPath ?? resolve26(homedir15());
|
|
8434
|
+
const targetRoots = getKiloConfigRoots(targetPath);
|
|
8420
8435
|
const source = await this.sourceLoader.load(request.projectPath);
|
|
8421
8436
|
let changed = false;
|
|
8422
8437
|
const fileChanges = [];
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
+
for (const targetRoot of targetRoots) {
|
|
8439
|
+
const rulesResult = await syncRulesAsFiles(source.rules, resolve26(targetRoot, "rules"), (rule, content) => ({ relativePath: `${rule.id}.md`, content: content.trimEnd() }), Boolean(request.dryRun));
|
|
8440
|
+
changed = rulesResult.changed || changed;
|
|
8441
|
+
fileChanges.push(...rulesResult.paths);
|
|
8442
|
+
const workflowsResult = await syncCommandsAsMarkdown(source.commands, resolve26(targetRoot, "commands"), Boolean(request.dryRun), CommandRendererFactory.getRenderer("workflow"), ":");
|
|
8443
|
+
changed = workflowsResult.changed || changed;
|
|
8444
|
+
fileChanges.push(...workflowsResult.paths);
|
|
8445
|
+
const skillsResult = await syncSkills(source.skills, resolve26(targetRoot, "skills"), Boolean(request.dryRun));
|
|
8446
|
+
changed = skillsResult.changed || changed;
|
|
8447
|
+
fileChanges.push(...skillsResult.paths);
|
|
8448
|
+
const agentsResult = await syncAgentsAsMarkdown(source.agents, resolve26(targetRoot, "agents"), Boolean(request.dryRun), true);
|
|
8449
|
+
changed = agentsResult.changed || changed;
|
|
8450
|
+
fileChanges.push(...agentsResult.paths);
|
|
8451
|
+
const mcpResult = await mergeJsonObjectFile(resolve26(targetRoot, "kilo.json"), (existing) => renderOpencodeMcpConfig(existing, source.mcpServers), Boolean(request.dryRun));
|
|
8452
|
+
changed = mcpResult.changed || changed;
|
|
8453
|
+
fileChanges.push(...mcpResult.paths);
|
|
8454
|
+
}
|
|
8438
8455
|
return {
|
|
8439
8456
|
platform: this.platformName,
|
|
8440
|
-
configPath:
|
|
8441
|
-
scope
|
|
8442
|
-
surface:
|
|
8457
|
+
configPath: targetRoots.join(", "),
|
|
8458
|
+
scope,
|
|
8459
|
+
surface: "rules-workflows-skills-agents-mcp",
|
|
8443
8460
|
status: toStatus(changed),
|
|
8444
|
-
message: "Applied Kilo rules, workflows, skills, agents, and MCP servers.",
|
|
8461
|
+
message: "Applied Kilo rules, workflows, skills, agents, and MCP servers to both .kilo and .kilocode directories.",
|
|
8445
8462
|
fileChanges,
|
|
8446
8463
|
warnings: source.warnings
|
|
8447
8464
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-ctrl-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "A centralized CLI tool for managing AI agent configurations with standard directory-based patterns.",
|
|
5
5
|
"author": "Ahmet Cetinkaya <ahmetcetinkaya@tutamail.com> (https://github.com/ahmet-cetinkaya)",
|
|
6
6
|
"license": "GPL-3.0",
|