@phnx-labs/agents-cli 1.18.2 → 1.18.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 +88 -0
- package/README.md +14 -7
- package/dist/commands/browser.js +355 -118
- package/dist/commands/plugins.js +58 -14
- package/dist/commands/view.js +16 -7
- package/dist/lib/browser/devices.d.ts +11 -0
- package/dist/lib/browser/devices.js +14 -3
- package/dist/lib/browser/ipc.js +29 -9
- package/dist/lib/browser/profiles.d.ts +23 -1
- package/dist/lib/browser/profiles.js +63 -3
- package/dist/lib/browser/service.d.ts +41 -10
- package/dist/lib/browser/service.js +321 -64
- package/dist/lib/browser/types.d.ts +55 -2
- package/dist/lib/browser/types.js +20 -0
- package/dist/lib/help.js +30 -3
- package/dist/lib/plugin-marketplace.d.ts +93 -0
- package/dist/lib/plugin-marketplace.js +239 -0
- package/dist/lib/plugins.d.ts +25 -13
- package/dist/lib/plugins.js +350 -566
- package/dist/lib/types.d.ts +18 -1
- package/package.json +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native plugin marketplace install path for Claude / OpenClaw.
|
|
3
|
+
*
|
|
4
|
+
* Plugins managed by agents-cli are exposed as a synthetic local marketplace
|
|
5
|
+
* named "agents-cli" under each version's plugin directory:
|
|
6
|
+
*
|
|
7
|
+
* <versionHome>/.{claude,openclaw}/plugins/
|
|
8
|
+
* known_marketplaces.json # registers the "agents-cli" marketplace
|
|
9
|
+
* marketplaces/agents-cli/
|
|
10
|
+
* .claude-plugin/marketplace.json # synthesized catalog
|
|
11
|
+
* plugins/<plugin>/ # copied plugin source
|
|
12
|
+
*
|
|
13
|
+
* Plus the version's settings.json gets `enabledPlugins["<plugin>@agents-cli"] = true`.
|
|
14
|
+
*
|
|
15
|
+
* This produces native `/plugin:skill` slash namespacing, visibility in `/plugins`,
|
|
16
|
+
* and `/plugin enable|disable` support — matching the Claude Code spec at
|
|
17
|
+
* https://code.claude.com/docs/en/plugins and /plugin-marketplaces.
|
|
18
|
+
*/
|
|
19
|
+
import type { AgentId, DiscoveredPlugin } from './types.js';
|
|
20
|
+
export declare const MARKETPLACE_NAME = "agents-cli";
|
|
21
|
+
interface MarketplacePluginEntry {
|
|
22
|
+
name: string;
|
|
23
|
+
source: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
version?: string;
|
|
26
|
+
author?: {
|
|
27
|
+
name: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface MarketplaceManifest {
|
|
32
|
+
$schema?: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
owner: {
|
|
36
|
+
name: string;
|
|
37
|
+
email?: string;
|
|
38
|
+
};
|
|
39
|
+
plugins: MarketplacePluginEntry[];
|
|
40
|
+
}
|
|
41
|
+
export declare function marketplaceRoot(agent: AgentId, versionHome: string): string;
|
|
42
|
+
export declare function marketplaceManifestPath(agent: AgentId, versionHome: string): string;
|
|
43
|
+
export declare function pluginInstallDir(plugin: DiscoveredPlugin, agent: AgentId, versionHome: string): string;
|
|
44
|
+
export declare function knownMarketplacesPath(agent: AgentId, versionHome: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Copy plugin source into marketplace install dir.
|
|
47
|
+
* Source of truth remains ~/.agents/plugins/<name>/ — this is a per-version snapshot.
|
|
48
|
+
*/
|
|
49
|
+
export declare function copyPluginToMarketplace(plugin: DiscoveredPlugin, agent: AgentId, versionHome: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Re-synthesize <marketplace>/.claude-plugin/marketplace.json from the list of
|
|
52
|
+
* plugins installed under <marketplace>/plugins/. Always run after add or remove
|
|
53
|
+
* so the manifest stays in lockstep with on-disk contents.
|
|
54
|
+
*/
|
|
55
|
+
export declare function syncMarketplaceManifest(agent: AgentId, versionHome: string): MarketplaceManifest | null;
|
|
56
|
+
/**
|
|
57
|
+
* Register the agents-cli marketplace in known_marketplaces.json so Claude Code
|
|
58
|
+
* discovers it on startup. Idempotent: re-running just refreshes lastUpdated.
|
|
59
|
+
*/
|
|
60
|
+
export declare function registerMarketplace(agent: AgentId, versionHome: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Drop the agents-cli marketplace entry from known_marketplaces.json.
|
|
63
|
+
* Called when the last plugin under it is removed.
|
|
64
|
+
*/
|
|
65
|
+
export declare function unregisterMarketplace(agent: AgentId, versionHome: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Mark a plugin as enabled in <versionHome>/.{agent}/settings.json under
|
|
68
|
+
* enabledPlugins["<plugin>@agents-cli"]: true. Reads, mutates, writes —
|
|
69
|
+
* preserving every other key.
|
|
70
|
+
*/
|
|
71
|
+
export declare function enablePluginInSettings(pluginName: string, agent: AgentId, versionHome: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Remove the enabledPlugins key for this plugin. Inverse of enablePluginInSettings.
|
|
74
|
+
*/
|
|
75
|
+
export declare function disablePluginInSettings(pluginName: string, agent: AgentId, versionHome: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Remove a plugin's installed marketplace directory. Returns true if the dir
|
|
78
|
+
* existed and was removed.
|
|
79
|
+
*/
|
|
80
|
+
export declare function removePluginFromMarketplace(pluginName: string, agent: AgentId, versionHome: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Return true if the marketplace has no plugins left under it.
|
|
83
|
+
*/
|
|
84
|
+
export declare function marketplaceIsEmpty(agent: AgentId, versionHome: string): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Drop the entire marketplace directory. Called after the last plugin removal.
|
|
87
|
+
*/
|
|
88
|
+
export declare function removeEmptyMarketplaceDir(agent: AgentId, versionHome: string): void;
|
|
89
|
+
/**
|
|
90
|
+
* Detect whether a plugin is installed via the native marketplace path.
|
|
91
|
+
*/
|
|
92
|
+
export declare function isInstalledInMarketplace(pluginName: string, agent: AgentId, versionHome: string): boolean;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native plugin marketplace install path for Claude / OpenClaw.
|
|
3
|
+
*
|
|
4
|
+
* Plugins managed by agents-cli are exposed as a synthetic local marketplace
|
|
5
|
+
* named "agents-cli" under each version's plugin directory:
|
|
6
|
+
*
|
|
7
|
+
* <versionHome>/.{claude,openclaw}/plugins/
|
|
8
|
+
* known_marketplaces.json # registers the "agents-cli" marketplace
|
|
9
|
+
* marketplaces/agents-cli/
|
|
10
|
+
* .claude-plugin/marketplace.json # synthesized catalog
|
|
11
|
+
* plugins/<plugin>/ # copied plugin source
|
|
12
|
+
*
|
|
13
|
+
* Plus the version's settings.json gets `enabledPlugins["<plugin>@agents-cli"] = true`.
|
|
14
|
+
*
|
|
15
|
+
* This produces native `/plugin:skill` slash namespacing, visibility in `/plugins`,
|
|
16
|
+
* and `/plugin enable|disable` support — matching the Claude Code spec at
|
|
17
|
+
* https://code.claude.com/docs/en/plugins and /plugin-marketplaces.
|
|
18
|
+
*/
|
|
19
|
+
import * as fs from 'fs';
|
|
20
|
+
import * as path from 'path';
|
|
21
|
+
export const MARKETPLACE_NAME = 'agents-cli';
|
|
22
|
+
function pluginsRootForVersion(agent, versionHome) {
|
|
23
|
+
return path.join(versionHome, `.${agent}`, 'plugins');
|
|
24
|
+
}
|
|
25
|
+
export function marketplaceRoot(agent, versionHome) {
|
|
26
|
+
return path.join(pluginsRootForVersion(agent, versionHome), 'marketplaces', MARKETPLACE_NAME);
|
|
27
|
+
}
|
|
28
|
+
export function marketplaceManifestPath(agent, versionHome) {
|
|
29
|
+
return path.join(marketplaceRoot(agent, versionHome), '.claude-plugin', 'marketplace.json');
|
|
30
|
+
}
|
|
31
|
+
export function pluginInstallDir(plugin, agent, versionHome) {
|
|
32
|
+
return path.join(marketplaceRoot(agent, versionHome), 'plugins', plugin.name);
|
|
33
|
+
}
|
|
34
|
+
export function knownMarketplacesPath(agent, versionHome) {
|
|
35
|
+
return path.join(pluginsRootForVersion(agent, versionHome), 'known_marketplaces.json');
|
|
36
|
+
}
|
|
37
|
+
function settingsPath(agent, versionHome) {
|
|
38
|
+
return path.join(versionHome, `.${agent}`, 'settings.json');
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Copy plugin source into marketplace install dir.
|
|
42
|
+
* Source of truth remains ~/.agents/plugins/<name>/ — this is a per-version snapshot.
|
|
43
|
+
*/
|
|
44
|
+
export function copyPluginToMarketplace(plugin, agent, versionHome) {
|
|
45
|
+
const dest = pluginInstallDir(plugin, agent, versionHome);
|
|
46
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
47
|
+
if (fs.existsSync(dest)) {
|
|
48
|
+
fs.rmSync(dest, { recursive: true, force: true });
|
|
49
|
+
}
|
|
50
|
+
fs.cpSync(plugin.root, dest, { recursive: true, dereference: false });
|
|
51
|
+
return dest;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Re-synthesize <marketplace>/.claude-plugin/marketplace.json from the list of
|
|
55
|
+
* plugins installed under <marketplace>/plugins/. Always run after add or remove
|
|
56
|
+
* so the manifest stays in lockstep with on-disk contents.
|
|
57
|
+
*/
|
|
58
|
+
export function syncMarketplaceManifest(agent, versionHome) {
|
|
59
|
+
const root = marketplaceRoot(agent, versionHome);
|
|
60
|
+
const pluginsDir = path.join(root, 'plugins');
|
|
61
|
+
if (!fs.existsSync(pluginsDir))
|
|
62
|
+
return null;
|
|
63
|
+
const entries = [];
|
|
64
|
+
for (const entry of fs.readdirSync(pluginsDir, { withFileTypes: true })) {
|
|
65
|
+
if (!entry.isDirectory() || entry.name.startsWith('.'))
|
|
66
|
+
continue;
|
|
67
|
+
const manifestFile = path.join(pluginsDir, entry.name, '.claude-plugin', 'plugin.json');
|
|
68
|
+
if (!fs.existsSync(manifestFile))
|
|
69
|
+
continue;
|
|
70
|
+
let manifest;
|
|
71
|
+
try {
|
|
72
|
+
manifest = JSON.parse(fs.readFileSync(manifestFile, 'utf-8'));
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
entries.push({
|
|
78
|
+
name: manifest.name,
|
|
79
|
+
source: `./plugins/${manifest.name}`,
|
|
80
|
+
description: manifest.description,
|
|
81
|
+
version: manifest.version,
|
|
82
|
+
...(manifest.author ? { author: manifest.author } : {}),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const manifest = {
|
|
86
|
+
$schema: 'https://anthropic.com/claude-code/marketplace.schema.json',
|
|
87
|
+
name: MARKETPLACE_NAME,
|
|
88
|
+
description: 'Plugins managed by agents-cli',
|
|
89
|
+
owner: { name: 'agents-cli' },
|
|
90
|
+
plugins: entries.sort((a, b) => a.name.localeCompare(b.name)),
|
|
91
|
+
};
|
|
92
|
+
const manifestPath = marketplaceManifestPath(agent, versionHome);
|
|
93
|
+
fs.mkdirSync(path.dirname(manifestPath), { recursive: true });
|
|
94
|
+
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n', 'utf-8');
|
|
95
|
+
return manifest;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Register the agents-cli marketplace in known_marketplaces.json so Claude Code
|
|
99
|
+
* discovers it on startup. Idempotent: re-running just refreshes lastUpdated.
|
|
100
|
+
*/
|
|
101
|
+
export function registerMarketplace(agent, versionHome) {
|
|
102
|
+
const root = marketplaceRoot(agent, versionHome);
|
|
103
|
+
const knownPath = knownMarketplacesPath(agent, versionHome);
|
|
104
|
+
let known = {};
|
|
105
|
+
if (fs.existsSync(knownPath)) {
|
|
106
|
+
try {
|
|
107
|
+
known = JSON.parse(fs.readFileSync(knownPath, 'utf-8'));
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
known = {};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
known[MARKETPLACE_NAME] = {
|
|
114
|
+
source: { source: 'local', path: root },
|
|
115
|
+
installLocation: root,
|
|
116
|
+
lastUpdated: new Date().toISOString(),
|
|
117
|
+
};
|
|
118
|
+
fs.mkdirSync(path.dirname(knownPath), { recursive: true });
|
|
119
|
+
fs.writeFileSync(knownPath, JSON.stringify(known, null, 2) + '\n', 'utf-8');
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Drop the agents-cli marketplace entry from known_marketplaces.json.
|
|
123
|
+
* Called when the last plugin under it is removed.
|
|
124
|
+
*/
|
|
125
|
+
export function unregisterMarketplace(agent, versionHome) {
|
|
126
|
+
const knownPath = knownMarketplacesPath(agent, versionHome);
|
|
127
|
+
if (!fs.existsSync(knownPath))
|
|
128
|
+
return;
|
|
129
|
+
let known;
|
|
130
|
+
try {
|
|
131
|
+
known = JSON.parse(fs.readFileSync(knownPath, 'utf-8'));
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (!(MARKETPLACE_NAME in known))
|
|
137
|
+
return;
|
|
138
|
+
delete known[MARKETPLACE_NAME];
|
|
139
|
+
if (Object.keys(known).length === 0) {
|
|
140
|
+
try {
|
|
141
|
+
fs.unlinkSync(knownPath);
|
|
142
|
+
}
|
|
143
|
+
catch { /* ignore */ }
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
fs.writeFileSync(knownPath, JSON.stringify(known, null, 2) + '\n', 'utf-8');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Mark a plugin as enabled in <versionHome>/.{agent}/settings.json under
|
|
151
|
+
* enabledPlugins["<plugin>@agents-cli"]: true. Reads, mutates, writes —
|
|
152
|
+
* preserving every other key.
|
|
153
|
+
*/
|
|
154
|
+
export function enablePluginInSettings(pluginName, agent, versionHome) {
|
|
155
|
+
const sPath = settingsPath(agent, versionHome);
|
|
156
|
+
let settings = {};
|
|
157
|
+
if (fs.existsSync(sPath)) {
|
|
158
|
+
try {
|
|
159
|
+
settings = JSON.parse(fs.readFileSync(sPath, 'utf-8'));
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
settings = {};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (!settings.enabledPlugins || typeof settings.enabledPlugins !== 'object') {
|
|
166
|
+
settings.enabledPlugins = {};
|
|
167
|
+
}
|
|
168
|
+
const enabled = settings.enabledPlugins;
|
|
169
|
+
const key = `${pluginName}@${MARKETPLACE_NAME}`;
|
|
170
|
+
if (enabled[key] === true)
|
|
171
|
+
return;
|
|
172
|
+
enabled[key] = true;
|
|
173
|
+
fs.mkdirSync(path.dirname(sPath), { recursive: true });
|
|
174
|
+
fs.writeFileSync(sPath, JSON.stringify(settings, null, 2) + '\n', 'utf-8');
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Remove the enabledPlugins key for this plugin. Inverse of enablePluginInSettings.
|
|
178
|
+
*/
|
|
179
|
+
export function disablePluginInSettings(pluginName, agent, versionHome) {
|
|
180
|
+
const sPath = settingsPath(agent, versionHome);
|
|
181
|
+
if (!fs.existsSync(sPath))
|
|
182
|
+
return;
|
|
183
|
+
let settings;
|
|
184
|
+
try {
|
|
185
|
+
settings = JSON.parse(fs.readFileSync(sPath, 'utf-8'));
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const enabled = settings.enabledPlugins;
|
|
191
|
+
if (!enabled)
|
|
192
|
+
return;
|
|
193
|
+
const key = `${pluginName}@${MARKETPLACE_NAME}`;
|
|
194
|
+
if (!(key in enabled))
|
|
195
|
+
return;
|
|
196
|
+
delete enabled[key];
|
|
197
|
+
if (Object.keys(enabled).length === 0) {
|
|
198
|
+
delete settings.enabledPlugins;
|
|
199
|
+
}
|
|
200
|
+
fs.writeFileSync(sPath, JSON.stringify(settings, null, 2) + '\n', 'utf-8');
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Remove a plugin's installed marketplace directory. Returns true if the dir
|
|
204
|
+
* existed and was removed.
|
|
205
|
+
*/
|
|
206
|
+
export function removePluginFromMarketplace(pluginName, agent, versionHome) {
|
|
207
|
+
const installed = path.join(marketplaceRoot(agent, versionHome), 'plugins', pluginName);
|
|
208
|
+
if (!fs.existsSync(installed))
|
|
209
|
+
return false;
|
|
210
|
+
fs.rmSync(installed, { recursive: true, force: true });
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Return true if the marketplace has no plugins left under it.
|
|
215
|
+
*/
|
|
216
|
+
export function marketplaceIsEmpty(agent, versionHome) {
|
|
217
|
+
const pluginsDir = path.join(marketplaceRoot(agent, versionHome), 'plugins');
|
|
218
|
+
if (!fs.existsSync(pluginsDir))
|
|
219
|
+
return true;
|
|
220
|
+
const remaining = fs.readdirSync(pluginsDir, { withFileTypes: true })
|
|
221
|
+
.filter(d => d.isDirectory() && !d.name.startsWith('.'));
|
|
222
|
+
return remaining.length === 0;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Drop the entire marketplace directory. Called after the last plugin removal.
|
|
226
|
+
*/
|
|
227
|
+
export function removeEmptyMarketplaceDir(agent, versionHome) {
|
|
228
|
+
const root = marketplaceRoot(agent, versionHome);
|
|
229
|
+
if (!fs.existsSync(root))
|
|
230
|
+
return;
|
|
231
|
+
fs.rmSync(root, { recursive: true, force: true });
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Detect whether a plugin is installed via the native marketplace path.
|
|
235
|
+
*/
|
|
236
|
+
export function isInstalledInMarketplace(pluginName, agent, versionHome) {
|
|
237
|
+
const installed = path.join(marketplaceRoot(agent, versionHome), 'plugins', pluginName);
|
|
238
|
+
return fs.existsSync(path.join(installed, '.claude-plugin', 'plugin.json'));
|
|
239
|
+
}
|
package/dist/lib/plugins.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export declare function discoverPluginCommands(pluginRoot: string): string[];
|
|
|
35
35
|
export declare function discoverPluginAgentDefs(pluginRoot: string): string[];
|
|
36
36
|
/** Discover executable files in a plugin's bin/ directory. */
|
|
37
37
|
export declare function discoverPluginBin(pluginRoot: string): string[];
|
|
38
|
+
/** Discover MCP server names from .mcp.json at the plugin root. */
|
|
39
|
+
export declare function discoverPluginMcpServers(pluginRoot: string): string[];
|
|
40
|
+
/** Discover LSP server keys from .lsp.json at the plugin root. */
|
|
41
|
+
export declare function discoverPluginLspServers(pluginRoot: string): string[];
|
|
42
|
+
/** Discover monitor names from monitors/monitors.json. */
|
|
43
|
+
export declare function discoverPluginMonitors(pluginRoot: string): string[];
|
|
38
44
|
/**
|
|
39
45
|
* Expand plugin variables in a string.
|
|
40
46
|
*
|
|
@@ -60,15 +66,18 @@ export declare function checkPluginDependencies(manifest: PluginManifest): strin
|
|
|
60
66
|
/**
|
|
61
67
|
* Sync a plugin to a specific agent version's home directory.
|
|
62
68
|
*
|
|
63
|
-
* For
|
|
64
|
-
* 1. Copy plugin
|
|
65
|
-
* 2.
|
|
66
|
-
* 3.
|
|
67
|
-
* 4.
|
|
68
|
-
* 5.
|
|
69
|
-
* 6.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
69
|
+
* For plugins-capable agents (claude, openclaw):
|
|
70
|
+
* 1. Copy plugin source into <versionHome>/.<agent>/plugins/marketplaces/agents-cli/plugins/<name>/
|
|
71
|
+
* 2. Pre-expand ${user_config.*} variables in copied text files (Claude doesn't know this var).
|
|
72
|
+
* 3. (Re-)synthesize the marketplace.json catalog from the installed plugins.
|
|
73
|
+
* 4. Register the synthetic marketplace in known_marketplaces.json.
|
|
74
|
+
* 5. Mark <plugin>@agents-cli enabled in settings.json#enabledPlugins.
|
|
75
|
+
* 6. Migrate (remove) legacy dual-dash skills/commands/agents/bin/hooks/mcp entries.
|
|
76
|
+
*
|
|
77
|
+
* Claude/OpenClaw natively handle the plugin's skills, commands, agents, hooks,
|
|
78
|
+
* MCP servers, bin/, settings.json, and permissions once the plugin lives at the
|
|
79
|
+
* native install path and is marked enabled — see
|
|
80
|
+
* https://code.claude.com/docs/en/plugins.
|
|
72
81
|
*/
|
|
73
82
|
export declare function syncPluginToVersion(plugin: DiscoveredPlugin, agent: AgentId, versionHome: string): {
|
|
74
83
|
success: boolean;
|
|
@@ -82,8 +91,9 @@ export declare function syncPluginToVersion(plugin: DiscoveredPlugin, agent: Age
|
|
|
82
91
|
settings: boolean;
|
|
83
92
|
};
|
|
84
93
|
/**
|
|
85
|
-
* Check if a plugin is synced to a version
|
|
86
|
-
*
|
|
94
|
+
* Check if a plugin is synced to a version. True when the plugin lives at the
|
|
95
|
+
* native marketplace install path. Legacy dual-dash entries are not counted —
|
|
96
|
+
* they're treated as stale and migrated away on the next sync.
|
|
87
97
|
*/
|
|
88
98
|
export declare function isPluginSynced(plugin: DiscoveredPlugin, agent: AgentId, versionHome: string): boolean;
|
|
89
99
|
/**
|
|
@@ -102,8 +112,10 @@ export declare function removePluginFromVersion(pluginName: string, pluginRoot:
|
|
|
102
112
|
mcp: number;
|
|
103
113
|
};
|
|
104
114
|
/**
|
|
105
|
-
* Remove orphaned plugin
|
|
106
|
-
* Soft-deletes
|
|
115
|
+
* Remove orphaned plugin entries from a version home. An entry is "orphan" if
|
|
116
|
+
* its plugin name is not in the active plugin set. Soft-deletes the affected
|
|
117
|
+
* marketplace plugin dir to ~/.agents/.trash/plugins/. Also cleans up any
|
|
118
|
+
* legacy dual-dash skills/ directories from older agents-cli versions.
|
|
107
119
|
*/
|
|
108
120
|
export declare function cleanOrphanedPluginSkills(agent: AgentId, versionHome: string, activePluginNames: Set<string>, version?: string): string[];
|
|
109
121
|
export interface VersionPluginDiff {
|