agent-space-manager 1.0.3 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ---
8
8
 
9
+ ## [1.0.4] - 2026-11-17
10
+
11
+ ### Added / Changed
12
+ - **App Component Type (`agents.mjs`, `adapters.mjs`, `manager.mjs`)**: Added `App` as a first-class toggleable component type discovered from `<hubRoot>/app/<app-name>/` (`app.json`) and plugin-bundled `apps/`, with directory-junction syncing via `syncApps`, `apps.json` hub catalog, `agent-space-bridge.json` counts, and on-disk workability status verification.
13
+ - **Dashboard UI & `App` Tag (`page/index.html`, `page/style.css`, `page/app.js`)**: Added `Apps` metric tile (`#cnt-apps`), `Apps` category filter tab (`#cat-cnt-apps`), `.badge-app` (`App` tag) in Components & Plugins, and `#cpAppsInput` custom target path override.
14
+ - **Copy Prompt V1.7 (`page/app.js`, `page/index.html`, `.agents/rules/components-storage-upstream-rule.md`)**: Documented the `<Components Storage Path>/app/` directory layout, required `app.json` manifest structure, upstream/UTF-8 No BOM rules, and IDE `apps/` cleanup invariants.
15
+
16
+ ---
17
+
9
18
  ## [1.0.3] - 2026-11-14
10
19
 
11
20
  ### Added / Changed
package/adapters.mjs CHANGED
@@ -159,6 +159,8 @@ export function collectEnabledComponents(allPlugins = [], enabledMap = {}) {
159
159
  const seenAgents = new Set();
160
160
  const hooks = []; // { id, def, pluginId }
161
161
  const seenHooks = new Set();
162
+ const apps = []; // { id, name, sourceDir, pluginId, env, executable }
163
+ const seenApps = new Set();
162
164
  const conflicts = [];
163
165
 
164
166
  for (const plugin of allPlugins) {
@@ -169,6 +171,38 @@ export function collectEnabledComponents(allPlugins = [], enabledMap = {}) {
169
171
  );
170
172
  if (!isEnabled || !plugin.path || !fs.existsSync(plugin.path)) continue;
171
173
 
174
+ // 0. Apps (standalone <hubRoot>/app/<name> or plugin-bundled apps/)
175
+ if (plugin.isApp) {
176
+ const appName = plugin.appName || plugin.id;
177
+ if (!seenApps.has(appName)) {
178
+ seenApps.add(appName);
179
+ apps.push({
180
+ id: plugin.id,
181
+ name: appName,
182
+ sourceDir: plugin.path,
183
+ pluginId: plugin.id,
184
+ env: plugin.appEnv || null,
185
+ executable: plugin.appExecutable || null,
186
+ });
187
+ }
188
+ } else if (Array.isArray(plugin.apps) && plugin.apps.length > 0) {
189
+ for (const aName of plugin.apps) {
190
+ const appDirCandidates = [path.join(plugin.path, "apps", aName), path.join(plugin.path, "app", aName)];
191
+ const appDir = appDirCandidates.find((d) => fs.existsSync(d));
192
+ if (appDir && !seenApps.has(aName)) {
193
+ seenApps.add(aName);
194
+ apps.push({
195
+ id: `${plugin.id}/${aName}`,
196
+ name: aName,
197
+ sourceDir: appDir,
198
+ pluginId: plugin.id,
199
+ env: null,
200
+ executable: null,
201
+ });
202
+ }
203
+ }
204
+ }
205
+
172
206
  // 1. Skills
173
207
  for (const sName of plugin.skills || []) {
174
208
  const skillDir = plugin.isRootSkills
@@ -234,7 +268,7 @@ export function collectEnabledComponents(allPlugins = [], enabledMap = {}) {
234
268
  }
235
269
  }
236
270
 
237
- return { skills, mcpServers, rules, agents, hooks, conflicts };
271
+ return { skills, mcpServers, rules, agents, hooks, apps, conflicts };
238
272
  }
239
273
 
240
274
  /**
@@ -548,6 +582,147 @@ export function syncFlattenedSkills(
548
582
  return { nextLinks, results };
549
583
  }
550
584
 
585
+ /**
586
+ * Syncs enabled App components (e.g. ms-playwright) into an agent's apps/ directory using directory junctions/symlinks.
587
+ * Never duplicates large binary trees and strictly preserves foreign user directories and symlinks.
588
+ */
589
+ export function syncApps(
590
+ apps = [],
591
+ appsDir,
592
+ prevLinks = [],
593
+ createJunctionFn = null,
594
+ removeJunctionFn = null,
595
+ allPlugins = [],
596
+ ownerId = "asm"
597
+ ) {
598
+ const nextLinks = [];
599
+ const results = [];
600
+ if (!appsDir) return { nextLinks, results };
601
+
602
+ const desiredMap = new Map();
603
+ for (const a of apps || []) {
604
+ if (a?.name && a?.sourceDir && fs.existsSync(a.sourceDir)) {
605
+ desiredMap.set(a.name, a);
606
+ }
607
+ }
608
+
609
+ const prevSet = new Set((prevLinks || []).map((p) => path.resolve(p)));
610
+ const unlinkTarget = (targetPath) => {
611
+ if (removeJunctionFn) {
612
+ removeJunctionFn(targetPath);
613
+ } else {
614
+ try {
615
+ const st = fs.lstatSync(targetPath);
616
+ if (st.isSymbolicLink()) fs.unlinkSync(targetPath);
617
+ else if (isAsmOwnedDirectory(targetPath)) fs.rmSync(targetPath, { recursive: true, force: true });
618
+ } catch {}
619
+ }
620
+ };
621
+
622
+ // 1. Prune obsolete ASM-owned links in appsDir
623
+ if (fs.existsSync(appsDir)) {
624
+ try {
625
+ for (const entryName of fs.readdirSync(appsDir)) {
626
+ const entryPath = path.join(appsDir, entryName);
627
+ const resolvedEntry = path.resolve(entryPath);
628
+ try {
629
+ const stat = fs.lstatSync(entryPath);
630
+ if (stat.isSymbolicLink()) {
631
+ let currentTarget = "";
632
+ try {
633
+ currentTarget = fs.readlinkSync(entryPath);
634
+ } catch {}
635
+ const isOwned = prevSet.has(resolvedEntry) || isTargetInsideHub(currentTarget, allPlugins);
636
+ if (!isOwned) continue;
637
+
638
+ const desired = desiredMap.get(entryName);
639
+ const matchesDesired =
640
+ desired && currentTarget && path.resolve(currentTarget) === path.resolve(desired.sourceDir);
641
+ if (!matchesDesired) {
642
+ unlinkTarget(entryPath);
643
+ results.push({ app: entryName, action: "unlinked", success: true });
644
+ }
645
+ } else if (stat.isDirectory() && isAsmOwnedDirectory(entryPath) && !desiredMap.has(entryName)) {
646
+ fs.rmSync(entryPath, { recursive: true, force: true });
647
+ results.push({ app: entryName, action: "unlinked", success: true });
648
+ }
649
+ } catch {}
650
+ }
651
+ } catch {}
652
+ }
653
+
654
+ // Clean any prevLinks from a previous appsDir
655
+ for (const oldLink of prevLinks || []) {
656
+ if (path.dirname(path.resolve(oldLink)) !== path.resolve(appsDir)) {
657
+ unlinkTarget(oldLink);
658
+ }
659
+ }
660
+
661
+ if (desiredMap.size === 0) {
662
+ try {
663
+ if (fs.existsSync(appsDir) && fs.readdirSync(appsDir).length === 0) {
664
+ fs.rmSync(appsDir, { recursive: true, force: true });
665
+ }
666
+ } catch {}
667
+ return { nextLinks, results };
668
+ }
669
+
670
+ ensureDir(appsDir);
671
+
672
+ // 2. Link desired apps
673
+ for (const [appName, appDef] of desiredMap.entries()) {
674
+ const linkPath = path.join(appsDir, appName);
675
+ const resolvedLink = path.resolve(linkPath);
676
+
677
+ if (fs.existsSync(linkPath) || (() => { try { fs.lstatSync(linkPath); return true; } catch { return false; } })()) {
678
+ try {
679
+ const st = fs.lstatSync(linkPath);
680
+ if (st.isSymbolicLink()) {
681
+ let currentTarget = "";
682
+ try {
683
+ currentTarget = fs.readlinkSync(linkPath);
684
+ } catch {}
685
+ if (currentTarget && path.resolve(currentTarget) === path.resolve(appDef.sourceDir)) {
686
+ nextLinks.push(resolvedLink);
687
+ results.push({ app: appName, action: "linked", success: true });
688
+ continue;
689
+ }
690
+ const isOwned = prevSet.has(resolvedLink) || isTargetInsideHub(currentTarget, allPlugins);
691
+ if (!isOwned) {
692
+ results.push({ app: appName, action: "conflict", success: false, error: "Foreign symlink exists" });
693
+ continue;
694
+ }
695
+ unlinkTarget(linkPath);
696
+ } else {
697
+ results.push({ app: appName, action: "conflict", success: false, error: "User-owned directory exists" });
698
+ continue;
699
+ }
700
+ } catch {}
701
+ }
702
+
703
+ let ok = false;
704
+ if (createJunctionFn) {
705
+ const res = createJunctionFn(appDef.sourceDir, linkPath);
706
+ ok = Boolean(res === true || res?.success);
707
+ } else {
708
+ try {
709
+ fs.symlinkSync(appDef.sourceDir, linkPath, process.platform === "win32" ? "junction" : "dir");
710
+ ok = true;
711
+ } catch {
712
+ ok = false;
713
+ }
714
+ }
715
+ if (ok) {
716
+ nextLinks.push(resolvedLink);
717
+ results.push({ app: appName, action: "linked", success: true });
718
+ } else {
719
+ results.push({ app: appName, action: "failed", success: false, error: `Failed to link ${appName}` });
720
+ }
721
+ }
722
+
723
+ return { nextLinks, results };
724
+ }
725
+
551
726
  /**
552
727
  * Generates `/` quick-action slash command files (in ~/.config/opencode/commands, ~/.claude/commands,
553
728
  * ~/.cursor/commands, ~/.codeium/windsurf/global_workflows, Code/User/prompts, ~/.gemini/commands, etc.)
@@ -1106,8 +1281,29 @@ export function writeHubCommunicationFiles(hubRoot, hubConfig, allPlugins = [],
1106
1281
  const allRules = [];
1107
1282
  const allAgents = [];
1108
1283
  const allHooks = [];
1284
+ const allApps = [];
1109
1285
 
1110
1286
  for (const p of allPlugins) {
1287
+ if (p.isApp) {
1288
+ allApps.push({
1289
+ id: p.id,
1290
+ name: p.name,
1291
+ version: p.version,
1292
+ description: p.description,
1293
+ path: p.path,
1294
+ upstream: p.upstream || null,
1295
+ env: p.appEnv || null,
1296
+ });
1297
+ } else if (Array.isArray(p.apps)) {
1298
+ for (const a of p.apps) {
1299
+ allApps.push({
1300
+ id: `${p.id}/${a}`,
1301
+ name: a,
1302
+ pluginId: p.id,
1303
+ path: path.join(p.path, fs.existsSync(path.join(p.path, "apps", a)) ? "apps" : "app", a),
1304
+ });
1305
+ }
1306
+ }
1111
1307
  for (const s of p.skills || []) {
1112
1308
  if (!seenSkills.has(s)) {
1113
1309
  seenSkills.add(s);
@@ -1146,6 +1342,7 @@ export function writeHubCommunicationFiles(hubRoot, hubConfig, allPlugins = [],
1146
1342
  rules: allRules.length,
1147
1343
  agents: allAgents.length,
1148
1344
  hooks: allHooks.length,
1345
+ apps: allApps.length,
1149
1346
  },
1150
1347
  activeAgents,
1151
1348
  activeProjects,
@@ -1200,6 +1397,7 @@ export function writeHubCommunicationFiles(hubRoot, hubConfig, allPlugins = [],
1200
1397
  // 3. Consolidated root manifests
1201
1398
  try {
1202
1399
  fs.writeFileSync(path.join(hubRoot, "skills.json"), JSON.stringify({ skills: allSkills }, null, 2), "utf8");
1400
+ fs.writeFileSync(path.join(hubRoot, "apps.json"), JSON.stringify({ apps: allApps }, null, 2), "utf8");
1203
1401
  fs.writeFileSync(
1204
1402
  path.join(hubRoot, "plugins.json"),
1205
1403
  JSON.stringify(
@@ -1209,9 +1407,13 @@ export function writeHubCommunicationFiles(hubRoot, hubConfig, allPlugins = [],
1209
1407
  name: p.name,
1210
1408
  version: p.version,
1211
1409
  description: p.description,
1410
+ componentType: p.isApp ? "app" : "plugin",
1411
+ isApp: Boolean(p.isApp),
1212
1412
  skillsCount: p.skills?.length || 0,
1413
+ appsCount: p.isApp ? 1 : (p.apps?.length || 0),
1213
1414
  hasMcp: p.hasMcp,
1214
1415
  hasHooks: p.hasHooks,
1416
+ hasApp: Boolean(p.hasApp || p.isApp),
1215
1417
  })),
1216
1418
  },
1217
1419
  null,
package/agents.mjs CHANGED
@@ -66,7 +66,7 @@ export const AGENT_PROFILES = {
66
66
  label: "Antigravity (Google)",
67
67
  mode: "bundle",
68
68
  description: "Native plugin bundles (~/.gemini/config/plugins) + global skills/rules/agents (~/.gemini/config/skills)",
69
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true },
69
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true, apps: true },
70
70
  match: /\b(antigravity|agy)\b/i,
71
71
  exeNames: ["agy", "antigravity"],
72
72
  resolvePaths(home = getHomeDir()) {
@@ -75,6 +75,7 @@ export const AGENT_PROFILES = {
75
75
  primary: path.join(base, "plugins"),
76
76
  bundle: path.join(base, "plugins"),
77
77
  skills: path.join(base, "skills"),
78
+ apps: path.join(base, "apps"),
78
79
  rulesDir: { dir: path.join(base, "rules"), suffix: ".md", format: "antigravity-rule" },
79
80
  agentsDir: { dir: path.join(base, "agents"), suffix: ".md" },
80
81
  mcp: { file: path.join(base, "mcp_config.json"), format: "json", key: "mcpServers" },
@@ -100,7 +101,7 @@ export const AGENT_PROFILES = {
100
101
  label: "Claude Code (Anthropic)",
101
102
  mode: "convert",
102
103
  description: "Skills in ~/.claude/skills, /commands in ~/.claude/commands, MCP in ~/.claude.json, Rules in ~/.claude/CLAUDE.md, @agents in ~/.claude/agents, Hooks in ~/.claude/hooks.json",
103
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true },
104
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true, apps: true },
104
105
  match: /\bclaude\b/i,
105
106
  exeNames: ["claude"],
106
107
  resolvePaths(home = getHomeDir()) {
@@ -108,6 +109,7 @@ export const AGENT_PROFILES = {
108
109
  return {
109
110
  primary: path.join(claudeDir, "skills"),
110
111
  skills: path.join(claudeDir, "skills"),
112
+ apps: path.join(claudeDir, "apps"),
111
113
  commandsDir: { dir: path.join(claudeDir, "commands"), suffix: ".md", format: "claude-command" },
112
114
  agents: path.join(claudeDir, "agents"),
113
115
  mcp: { file: path.join(home, ".claude.json"), format: "json", key: "mcpServers" },
@@ -133,7 +135,7 @@ export const AGENT_PROFILES = {
133
135
  label: "Codex CLI (OpenAI)",
134
136
  mode: "convert",
135
137
  description: "Skills in ~/.codex/skills, /prompts in ~/.codex/prompts, MCP in ~/.codex/config.toml, Rules in ~/.codex/AGENTS.md, @agents in ~/.codex/agents",
136
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: false },
138
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: false, apps: true },
137
139
  match: /\bcodex\b/i,
138
140
  exeNames: ["codex"],
139
141
  resolvePaths(home = getHomeDir()) {
@@ -141,6 +143,7 @@ export const AGENT_PROFILES = {
141
143
  return {
142
144
  primary: path.join(codexDir, "skills"),
143
145
  skills: path.join(codexDir, "skills"),
146
+ apps: path.join(codexDir, "apps"),
144
147
  commandsDir: { dir: path.join(codexDir, "prompts"), suffix: ".md", format: "markdown-command" },
145
148
  agents: { dir: path.join(codexDir, "agents"), suffix: ".md" },
146
149
  mcp: { file: path.join(codexDir, "config.toml"), format: "toml-block" },
@@ -164,7 +167,7 @@ export const AGENT_PROFILES = {
164
167
  label: "OpenCode",
165
168
  mode: "convert",
166
169
  description: "Skills (@) in ~/.config/opencode/skills, Slash commands (/) in commands/, Subagents (@) in agents/, MCP in opencode.json, Rules in AGENTS.md",
167
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: false },
170
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: false, apps: true },
168
171
  match: /\bopencode\b/i,
169
172
  exeNames: ["opencode", "opencode-cli"],
170
173
  resolvePaths(home = getHomeDir()) {
@@ -172,6 +175,7 @@ export const AGENT_PROFILES = {
172
175
  return {
173
176
  primary: path.join(ocDir, "skills"),
174
177
  skills: path.join(ocDir, "skills"),
178
+ apps: path.join(ocDir, "apps"),
175
179
  commandsDir: { dir: path.join(ocDir, "commands"), suffix: ".md", format: "opencode-command" },
176
180
  agents: { dir: path.join(ocDir, "agents"), suffix: ".md", format: "opencode-agent" },
177
181
  mcp: { file: path.join(ocDir, "opencode.json"), format: "opencode-json", key: "mcp" },
@@ -195,7 +199,7 @@ export const AGENT_PROFILES = {
195
199
  label: "VS Code / GitHub Copilot",
196
200
  mode: "convert",
197
201
  description: "Skills in ~/.copilot/skills, MCP in Code/User/mcp.json, /Prompts, Instructions & @Agents in Code/User/prompts, Hooks in ~/.copilot/hooks",
198
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true },
202
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true, apps: true },
199
203
  match: /\b(vscode|copilot|visual\s*studio\s*code|code)\b/i,
200
204
  exeNames: ["code"],
201
205
  resolvePaths(home = getHomeDir(), appData = getAppDataDir(home)) {
@@ -203,6 +207,7 @@ export const AGENT_PROFILES = {
203
207
  return {
204
208
  primary: path.join(home, ".copilot", "skills"),
205
209
  skills: path.join(home, ".copilot", "skills"),
210
+ apps: path.join(home, ".copilot", "apps"),
206
211
  commandsDir: { dir: path.join(codeUser, "prompts"), suffix: ".prompt.md", format: "copilot-prompt" },
207
212
  mcp: { file: path.join(codeUser, "mcp.json"), format: "json", key: "servers" },
208
213
  rulesDir: { dir: path.join(codeUser, "prompts"), suffix: ".instructions.md" },
@@ -228,7 +233,7 @@ export const AGENT_PROFILES = {
228
233
  label: "Cursor AI",
229
234
  mode: "convert",
230
235
  description: "Skills in ~/.cursor/skills, /commands in ~/.cursor/commands, MCP in ~/.cursor/mcp.json, Rules in ~/.cursor/rules, @agents in ~/.cursor/agents, Hooks in ~/.cursor/hooks.json",
231
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true },
236
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true, apps: true },
232
237
  match: /\bcursor\b/i,
233
238
  exeNames: ["cursor"],
234
239
  resolvePaths(home = getHomeDir()) {
@@ -236,6 +241,7 @@ export const AGENT_PROFILES = {
236
241
  return {
237
242
  primary: path.join(curDir, "skills"),
238
243
  skills: path.join(curDir, "skills"),
244
+ apps: path.join(curDir, "apps"),
239
245
  commandsDir: { dir: path.join(curDir, "commands"), suffix: ".md", format: "markdown-command" },
240
246
  rulesDir: { dir: path.join(curDir, "rules"), suffix: ".mdc" },
241
247
  agentsDir: { dir: path.join(curDir, "agents"), suffix: ".md" },
@@ -261,7 +267,7 @@ export const AGENT_PROFILES = {
261
267
  label: "Windsurf (Codeium)",
262
268
  mode: "convert",
263
269
  description: "Skills in ~/.codeium/windsurf/skills, /workflows in global_workflows/, MCP in mcp_config.json, Rules in memories/global_rules.md, Hooks in hooks.json",
264
- capabilities: { skills: true, mcp: true, rules: true, agents: false, hooks: true },
270
+ capabilities: { skills: true, mcp: true, rules: true, agents: false, hooks: true, apps: true },
265
271
  match: /\b(windsurf|codeium)\b/i,
266
272
  exeNames: ["windsurf"],
267
273
  resolvePaths(home = getHomeDir()) {
@@ -269,6 +275,7 @@ export const AGENT_PROFILES = {
269
275
  return {
270
276
  primary: path.join(wsDir, "skills"),
271
277
  skills: path.join(wsDir, "skills"),
278
+ apps: path.join(wsDir, "apps"),
272
279
  commandsDir: { dir: path.join(wsDir, "global_workflows"), suffix: ".md", format: "markdown-command" },
273
280
  mcp: { file: path.join(wsDir, "mcp_config.json"), format: "json", key: "mcpServers" },
274
281
  rules: { file: path.join(wsDir, "memories", "global_rules.md"), format: "inline-block" },
@@ -291,7 +298,7 @@ export const AGENT_PROFILES = {
291
298
  label: "Gemini CLI (Standalone)",
292
299
  mode: "convert",
293
300
  description: "Skills in ~/.gemini/skills, /commands in ~/.gemini/commands, MCP in ~/.gemini/settings.json, Rules in ~/.gemini/GEMINI.md, @agents in ~/.gemini/agents, Hooks in ~/.gemini/hooks",
294
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true },
301
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true, apps: true },
295
302
  match: /\bgemini[-_\s]*cli\b/i,
296
303
  exeNames: ["gemini"],
297
304
  resolvePaths(home = getHomeDir()) {
@@ -299,6 +306,7 @@ export const AGENT_PROFILES = {
299
306
  return {
300
307
  primary: path.join(gemDir, "skills"),
301
308
  skills: path.join(gemDir, "skills"),
309
+ apps: path.join(gemDir, "apps"),
302
310
  commandsDir: { dir: path.join(gemDir, "commands"), suffix: ".toml", format: "gemini-toml-command" },
303
311
  agents: { dir: path.join(gemDir, "agents"), suffix: ".md" },
304
312
  mcp: { file: path.join(gemDir, "settings.json"), format: "json", key: "mcpServers" },
@@ -324,7 +332,7 @@ export const AGENT_PROFILES = {
324
332
  label: "Cline (VS Code Extension)",
325
333
  mode: "convert",
326
334
  description: "Skills in ~/.cline/skills, /workflows in ~/Documents/Cline/Workflows, MCP in cline_mcp_settings.json, Rules in ~/Documents/Cline/Rules, Hooks in ~/Documents/Cline/Hooks",
327
- capabilities: { skills: true, mcp: true, rules: true, agents: false, hooks: true },
335
+ capabilities: { skills: true, mcp: true, rules: true, agents: false, hooks: true, apps: true },
328
336
  match: /\b(cline|claude-dev)\b/i,
329
337
  exeNames: ["cline"],
330
338
  resolvePaths(home = getHomeDir(), appData = getAppDataDir(home)) {
@@ -332,6 +340,7 @@ export const AGENT_PROFILES = {
332
340
  return {
333
341
  primary: path.join(home, ".cline", "skills"),
334
342
  skills: path.join(home, ".cline", "skills"),
343
+ apps: path.join(home, ".cline", "apps"),
335
344
  commandsDir: { dir: path.join(home, "Documents", "Cline", "Workflows"), suffix: ".md", format: "markdown-command" },
336
345
  mcp: { file: path.join(storage, "cline_mcp_settings.json"), format: "json", key: "mcpServers" },
337
346
  rulesDir: { dir: path.join(home, "Documents", "Cline", "Rules"), suffix: ".md" },
@@ -352,7 +361,7 @@ export const AGENT_PROFILES = {
352
361
  label: "Roo Code",
353
362
  mode: "convert",
354
363
  description: "Skills in ~/.roo/skills, /commands in ~/.roo/commands, MCP in rooveterinaryinc.roo-cline mcp_settings.json, Rules in ~/.roo/rules, @agents in ~/.roo/agents",
355
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: false },
364
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: false, apps: true },
356
365
  match: /\b(roo|roo-code|roo-cline)\b/i,
357
366
  exeNames: ["roo"],
358
367
  resolvePaths(home = getHomeDir(), appData = getAppDataDir(home)) {
@@ -360,6 +369,7 @@ export const AGENT_PROFILES = {
360
369
  return {
361
370
  primary: path.join(home, ".roo", "skills"),
362
371
  skills: path.join(home, ".roo", "skills"),
372
+ apps: path.join(home, ".roo", "apps"),
363
373
  commandsDir: { dir: path.join(home, ".roo", "commands"), suffix: ".md", format: "markdown-command" },
364
374
  agents: { dir: path.join(home, ".roo", "agents"), suffix: ".md" },
365
375
  mcp: { file: path.join(storage, "mcp_settings.json"), format: "json", key: "mcpServers" },
@@ -383,7 +393,7 @@ export const AGENT_PROFILES = {
383
393
  label: "Kiro (AWS)",
384
394
  mode: "convert",
385
395
  description: "Skills in ~/.kiro/skills, /workflows in ~/.kiro/workflows, MCP in ~/.kiro/settings/mcp.json, Steering rules in ~/.kiro/steering, @agents in ~/.kiro/agents, Hooks in ~/.kiro/hooks",
386
- capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true },
396
+ capabilities: { skills: true, mcp: true, rules: true, agents: true, hooks: true, apps: true },
387
397
  match: /\bkiro\b/i,
388
398
  exeNames: ["kiro"],
389
399
  resolvePaths(home = getHomeDir()) {
@@ -391,6 +401,7 @@ export const AGENT_PROFILES = {
391
401
  return {
392
402
  primary: path.join(kiroDir, "skills"),
393
403
  skills: path.join(kiroDir, "skills"),
404
+ apps: path.join(kiroDir, "apps"),
394
405
  commandsDir: { dir: path.join(kiroDir, "workflows"), suffix: ".md", format: "markdown-command" },
395
406
  agents: { dir: path.join(kiroDir, "agents"), suffix: ".md" },
396
407
  mcp: { file: path.join(kiroDir, "settings", "mcp.json"), format: "json", key: "mcpServers" },
@@ -416,12 +427,12 @@ export const AGENT_PROFILES = {
416
427
  label: "Universal Agent Skills (~/.agents/skills)",
417
428
  mode: "convert",
418
429
  description: "Shared ~/.agents/skills directory read by OpenCode, Copilot, Codex, and Antigravity",
419
- capabilities: { skills: true, mcp: false, rules: false, agents: false, hooks: false },
430
+ capabilities: { skills: true, mcp: false, rules: false, agents: false, hooks: false, apps: true },
420
431
  match: /\b(agents-universal|universal|\.agents)\b/i,
421
432
  exeNames: [],
422
433
  resolvePaths(home = getHomeDir()) {
423
434
  const dir = path.join(home, ".agents", "skills");
424
- return { primary: dir, skills: dir };
435
+ return { primary: dir, skills: dir, apps: path.join(home, ".agents", "apps") };
425
436
  },
426
437
  resolveProjectPaths(repoPath) {
427
438
  return {
@@ -436,13 +447,13 @@ export const AGENT_PROFILES = {
436
447
  label: "Custom Agent / Directory",
437
448
  mode: "convert",
438
449
  description: "User-specified target directory (links individual skills or plugin bundles)",
439
- capabilities: { skills: true, mcp: false, rules: false, agents: false, hooks: false },
450
+ capabilities: { skills: true, mcp: false, rules: false, agents: false, hooks: false, apps: true },
440
451
  match: /^$/,
441
452
  exeNames: [],
442
453
  resolvePaths(home = getHomeDir(), _appData, customName = "agent") {
443
454
  const clean = (customName || "agent").toLowerCase().replace(/[^a-z0-9_-]/g, "") || "agent";
444
455
  const dir = path.join(home, `.${clean}`, "skills");
445
- return { primary: dir, skills: dir };
456
+ return { primary: dir, skills: dir, apps: path.join(home, `.${clean}`, "apps") };
446
457
  },
447
458
  resolveProjectPaths(repoPath) {
448
459
  return {
@@ -514,6 +525,7 @@ export function listAgentProfilesForUi() {
514
525
  primary: resolved.primary,
515
526
  bundle: resolved.bundle || (p.mode === "bundle" ? resolved.primary : null),
516
527
  skills: resolved.skills || (p.mode === "bundle" ? path.join(path.dirname(resolved.primary), "skills") : resolved.primary),
528
+ apps: resolved.apps || path.join(path.dirname(resolved.primary), "apps"),
517
529
  commands: resolved.commandsDir?.dir || null,
518
530
  mcp: resolved.mcp?.file || (p.mode === "bundle" ? path.join(path.dirname(resolved.primary), "mcp_config.json") : null),
519
531
  rules: resolved.rules?.file || resolved.rulesDir?.dir || (p.mode === "bundle" ? path.join(path.dirname(resolved.primary), "rules") : null),
@@ -596,6 +608,9 @@ export function resolveEffectiveAgentPaths(ide, home = getHomeDir(), appData = g
596
608
  ? { ...res.hooks, file: hFile }
597
609
  : { file: hFile, format: "json" };
598
610
  }
611
+ if (cp.apps) {
612
+ res.apps = expandHomePath(cp.apps, home, appData);
613
+ }
599
614
 
600
615
  // If primary configPath was explicitly passed on ide.configPath, expand it
601
616
  if (ide.configPath && !cp.bundle && !cp.skills) {
@@ -607,6 +622,10 @@ export function resolveEffectiveAgentPaths(ide, home = getHomeDir(), appData = g
607
622
  }
608
623
  }
609
624
 
625
+ if (!res.apps && (res.skills || res.bundle || res.primary)) {
626
+ res.apps = path.join(path.dirname(res.bundle || res.skills || res.primary), "apps");
627
+ }
628
+
610
629
  return res;
611
630
  }
612
631
 
@@ -649,5 +668,8 @@ export function resolveEffectiveProjectPaths(project, ide) {
649
668
  const file = expandHomePath(cp.hooks);
650
669
  res.hooks = typeof res.hooks === "object" ? { ...res.hooks, file } : { file, format: "json" };
651
670
  }
671
+ if (cp.apps) {
672
+ res.apps = expandHomePath(cp.apps);
673
+ }
652
674
  return res;
653
675
  }
package/index.mjs CHANGED
@@ -66,7 +66,7 @@ export {
66
66
 
67
67
  export const AgentSpaceManagerPlugin = {
68
68
  name: "agent-space-manager",
69
- version: "1.0.3",
69
+ version: "1.0.4",
70
70
  onRequest,
71
71
  onResponse,
72
72