kiro-agents 1.9.0 → 1.10.0

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.
@@ -27,6 +27,7 @@ var __filename2 = fileURLToPath(import.meta.url);
27
27
  var __dirname2 = dirname(__filename2);
28
28
  var STEERING_INSTALL_DIR = join(homedir(), ".kiro", "steering", "kiro-agents");
29
29
  var POWER_INSTALL_DIR = join(homedir(), ".kiro", "powers", "kiro-protocols");
30
+ var POWER_INSTALLED_DIR = join(homedir(), ".kiro", "powers", "installed", "kiro-protocols");
30
31
  var REGISTRY_PATH = join(homedir(), ".kiro", "powers", "registry.json");
31
32
  var STEERING_FILES = [
32
33
  "strict-mode.md",
@@ -86,6 +87,31 @@ async function extractPowerMetadata(powerMdPath) {
86
87
  author: extractField(/^author:\s*["']?([^"'\n]+)["']?$/m, "")
87
88
  };
88
89
  }
90
+ async function createSymbolicLinks() {
91
+ const { readdir, mkdir, symlink, rm, stat } = await import("fs/promises");
92
+ const { platform } = await import("os");
93
+ if (existsSync(POWER_INSTALLED_DIR)) {
94
+ await rm(POWER_INSTALLED_DIR, { recursive: true, force: true });
95
+ }
96
+ await mkdir(POWER_INSTALLED_DIR, { recursive: true });
97
+ const entries = await readdir(POWER_INSTALL_DIR);
98
+ for (const entry of entries) {
99
+ const sourcePath = join(POWER_INSTALL_DIR, entry);
100
+ const targetPath = join(POWER_INSTALLED_DIR, entry);
101
+ try {
102
+ const stats = await stat(sourcePath);
103
+ const isDirectory = stats.isDirectory();
104
+ if (platform() === "win32") {
105
+ await symlink(sourcePath, targetPath, isDirectory ? "junction" : "file");
106
+ } else {
107
+ await symlink(sourcePath, targetPath);
108
+ }
109
+ console.log(`✅ Linked: ${entry}`);
110
+ } catch (error) {
111
+ console.warn(`⚠️ Could not link ${entry}:`, error instanceof Error ? error.message : error);
112
+ }
113
+ }
114
+ }
89
115
  async function registerPowerInRegistry() {
90
116
  const { readFile, writeFile, mkdir } = await import("fs/promises");
91
117
  const registryDir = dirname(REGISTRY_PATH);
@@ -104,7 +130,7 @@ async function registerPowerInRegistry() {
104
130
  }
105
131
  const powerMdPath = join(POWER_INSTALL_DIR, "POWER.md");
106
132
  const metadata = await extractPowerMetadata(powerMdPath);
107
- const repoId = `npx-kiro-agents-${Date.now()}`;
133
+ const repoId = "local-kiro-protocols";
108
134
  registry.powers[metadata.name] = {
109
135
  name: metadata.name,
110
136
  displayName: metadata.displayName,
@@ -114,16 +140,16 @@ async function registerPowerInRegistry() {
114
140
  keywords: metadata.keywords,
115
141
  installed: true,
116
142
  installedAt: new Date().toISOString(),
117
- installPath: POWER_INSTALL_DIR,
143
+ installPath: POWER_INSTALLED_DIR,
118
144
  source: {
119
- type: "local",
145
+ type: "repo",
120
146
  repoId,
121
- repoName: "npx kiro-agents"
147
+ repoName: POWER_INSTALL_DIR
122
148
  },
123
149
  sourcePath: POWER_INSTALL_DIR
124
150
  };
125
151
  registry.repoSources[repoId] = {
126
- name: "npx kiro-agents",
152
+ name: POWER_INSTALL_DIR,
127
153
  type: "local",
128
154
  enabled: true,
129
155
  addedAt: new Date().toISOString(),
@@ -133,7 +159,7 @@ async function registerPowerInRegistry() {
133
159
  };
134
160
  registry.lastUpdated = new Date().toISOString();
135
161
  await writeFile(REGISTRY_PATH, JSON.stringify(registry, null, 2), "utf-8");
136
- console.log("✅ Registered power in Kiro registry");
162
+ console.log("✅ Power registered in Kiro registry");
137
163
  }
138
164
  async function installFile(relativePath, installDir, sourceDir) {
139
165
  const destPath = join(installDir, relativePath);
@@ -172,6 +198,14 @@ async function install() {
172
198
  await installFile(file, POWER_INSTALL_DIR, "power");
173
199
  }
174
200
  console.log(`
201
+ \uD83D\uDD17 Creating symbolic links in installed/ directory...`);
202
+ try {
203
+ await createSymbolicLinks();
204
+ } catch (error) {
205
+ console.warn("⚠️ Warning: Could not create symbolic links:", error instanceof Error ? error.message : error);
206
+ console.warn(" Power may not appear correctly in Kiro Powers UI.");
207
+ }
208
+ console.log(`
175
209
  \uD83D\uDCDD Registering power in Kiro registry...`);
176
210
  try {
177
211
  await registerPowerInRegistry();
@@ -186,6 +220,7 @@ async function install() {
186
220
  console.log(`
187
221
  \uD83D\uDCC1 Steering files: ${STEERING_INSTALL_DIR}`);
188
222
  console.log(`\uD83D\uDCC1 Power files: ${POWER_INSTALL_DIR}`);
223
+ console.log(`\uD83D\uDCC1 Installed links: ${POWER_INSTALLED_DIR}`);
189
224
  console.log(`
190
225
  \uD83D\uDCA1 The kiro-protocols power should now appear as installed in Kiro Powers UI.`);
191
226
  console.log("\uD83D\uDCA1 Files are set to read-only. To modify them, change permissions first.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiro-agents",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Advanced AI agent system for Kiro IDE - Create specialized AI agents, switch interaction modes, and enhance development workflows with minimal cognitive overhead",
5
5
  "homepage": "https://github.com/Theadd/kiro-agents#readme",
6
6
  "repository": {