@nexrall/code-core 1.4.66 → 1.4.68
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/agent/agentRegistry.d.ts +27 -0
- package/dist/agent/agentRegistry.d.ts.map +1 -1
- package/dist/agent/agentRegistry.js +45 -0
- package/dist/agent/agentTypes.d.ts +6 -2
- package/dist/agent/agentTypes.d.ts.map +1 -1
- package/dist/agent/agentTypes.js +13 -4
- package/dist/agent/askOnce.d.ts +12 -0
- package/dist/agent/askOnce.d.ts.map +1 -0
- package/dist/agent/askOnce.js +41 -0
- package/dist/agent/compaction.d.ts +244 -0
- package/dist/agent/compaction.d.ts.map +1 -0
- package/dist/agent/compaction.js +976 -0
- package/dist/agent/fileLocks.d.ts +34 -0
- package/dist/agent/fileLocks.d.ts.map +1 -0
- package/dist/agent/fileLocks.js +114 -0
- package/dist/agent/hooks.d.ts +331 -0
- package/dist/agent/hooks.d.ts.map +1 -0
- package/dist/agent/hooks.js +1239 -0
- package/dist/agent/iterationPolicy.d.ts +121 -0
- package/dist/agent/iterationPolicy.d.ts.map +1 -0
- package/dist/agent/iterationPolicy.js +297 -0
- package/dist/agent/lifecycleHost.d.ts +55 -0
- package/dist/agent/lifecycleHost.d.ts.map +1 -0
- package/dist/agent/lifecycleHost.js +294 -0
- package/dist/agent/loop.d.ts +39 -491
- package/dist/agent/loop.d.ts.map +1 -1
- package/dist/agent/loop.js +538 -3069
- package/dist/agent/planMode.d.ts.map +1 -1
- package/dist/agent/planMode.js +1 -0
- package/dist/agent/sharedTasks.d.ts +7 -0
- package/dist/agent/sharedTasks.d.ts.map +1 -1
- package/dist/agent/sharedTasks.js +16 -0
- package/dist/agent/subAgentBudget.d.ts +65 -0
- package/dist/agent/subAgentBudget.d.ts.map +1 -0
- package/dist/agent/subAgentBudget.js +269 -0
- package/dist/agent/subTask.d.ts +15 -0
- package/dist/agent/subTask.d.ts.map +1 -0
- package/dist/agent/subTask.js +730 -0
- package/dist/agent/subTaskSupport.d.ts +167 -0
- package/dist/agent/subTaskSupport.d.ts.map +1 -0
- package/dist/agent/subTaskSupport.js +425 -0
- package/dist/agent/toolDescriptions.d.ts +3 -0
- package/dist/agent/toolDescriptions.d.ts.map +1 -0
- package/dist/agent/toolDescriptions.js +116 -0
- package/dist/api/client.d.ts +41 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +173 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/mcp/client.d.ts +104 -0
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js +136 -2
- package/dist/mcp/httpClient.d.ts +17 -1
- package/dist/mcp/httpClient.d.ts.map +1 -1
- package/dist/mcp/httpClient.js +120 -19
- package/dist/mcp/manager.d.ts +77 -2
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +275 -9
- package/dist/mcp/server.d.ts +39 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +189 -0
- package/dist/mcp/sseClient.d.ts +7 -1
- package/dist/mcp/sseClient.d.ts.map +1 -1
- package/dist/mcp/sseClient.js +45 -1
- package/dist/mcp/stats.d.ts +41 -0
- package/dist/mcp/stats.d.ts.map +1 -0
- package/dist/mcp/stats.js +108 -0
- package/dist/permissions/destructive.d.ts +2 -0
- package/dist/permissions/destructive.d.ts.map +1 -1
- package/dist/permissions/destructive.js +6 -2
- package/dist/permissions/destructiveTokens.d.ts +5 -0
- package/dist/permissions/destructiveTokens.d.ts.map +1 -1
- package/dist/permissions/destructiveTokens.js +9 -3
- package/dist/permissions/modePolicy.d.ts.map +1 -1
- package/dist/permissions/modePolicy.js +5 -2
- package/dist/permissions/rules.d.ts +4 -1
- package/dist/permissions/rules.d.ts.map +1 -1
- package/dist/permissions/rules.js +29 -0
- package/dist/plugins/data.d.ts +23 -0
- package/dist/plugins/data.d.ts.map +1 -0
- package/dist/plugins/data.js +141 -0
- package/dist/plugins/index.d.ts +14 -2
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +45 -4
- package/dist/plugins/installer.d.ts +83 -0
- package/dist/plugins/installer.d.ts.map +1 -1
- package/dist/plugins/installer.js +207 -1
- package/dist/types.d.ts +45 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/plugins/index.js
CHANGED
|
@@ -45,6 +45,7 @@ exports.pluginMcpServers = pluginMcpServers;
|
|
|
45
45
|
const fs = __importStar(require("fs"));
|
|
46
46
|
const path = __importStar(require("path"));
|
|
47
47
|
const os = __importStar(require("os"));
|
|
48
|
+
const data_1 = require("./data");
|
|
48
49
|
// ─── Enable / disable ──────────────────────────────────────────────────────────
|
|
49
50
|
//
|
|
50
51
|
// A marker file rather than a registry list, so the on/off state travels WITH
|
|
@@ -198,7 +199,13 @@ function pluginAssetDirs(workDir, kind) {
|
|
|
198
199
|
}
|
|
199
200
|
});
|
|
200
201
|
}
|
|
201
|
-
/** Merge hooks.json from every ENABLED plugin into a single hooks config (arrays concatenated).
|
|
202
|
+
/** Merge hooks.json from every ENABLED plugin into a single hooks config (arrays concatenated).
|
|
203
|
+
*
|
|
204
|
+
* Every handler is stamped with `plugin: <name>`. Provenance is the one thing the merge
|
|
205
|
+
* would otherwise destroy — and it is what lets the hook runner hand the plugin's own
|
|
206
|
+
* processes their NEXRALL_PLUGIN_DATA (see runHookHandler). Both entry forms are stamped:
|
|
207
|
+
* the flat one (the entry IS the handler) and the nested one (each item under `hooks`).
|
|
208
|
+
*/
|
|
202
209
|
function pluginHooks(workDir) {
|
|
203
210
|
const merged = {};
|
|
204
211
|
for (const p of loadPlugins(workDir)) {
|
|
@@ -215,14 +222,33 @@ function pluginHooks(workDir) {
|
|
|
215
222
|
for (const [phase, entries] of Object.entries(hooks)) {
|
|
216
223
|
if (!Array.isArray(entries))
|
|
217
224
|
continue;
|
|
218
|
-
merged[phase] = [...(merged[phase] ?? []), ...entries];
|
|
225
|
+
merged[phase] = [...(merged[phase] ?? []), ...entries.map((e) => stampPlugin(e, p.name))];
|
|
219
226
|
}
|
|
220
227
|
}
|
|
221
228
|
catch { /* no hooks.json or malformed — skip */ }
|
|
222
229
|
}
|
|
223
230
|
return merged;
|
|
224
231
|
}
|
|
225
|
-
/**
|
|
232
|
+
/** Add `plugin: <name>` to one hooks entry, whichever form it takes. */
|
|
233
|
+
function stampPlugin(entry, plugin) {
|
|
234
|
+
if (!entry || typeof entry !== 'object')
|
|
235
|
+
return entry;
|
|
236
|
+
const e = entry;
|
|
237
|
+
if (Array.isArray(e.hooks)) {
|
|
238
|
+
return {
|
|
239
|
+
...e,
|
|
240
|
+
hooks: e.hooks.map((h) => (h && typeof h === 'object' ? { ...h, plugin } : h)),
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
return { ...e, plugin };
|
|
244
|
+
}
|
|
245
|
+
/** MCP server maps declared by ENABLED plugins: { serverName → config } (first plugin wins on clash).
|
|
246
|
+
*
|
|
247
|
+
* A stdio server from a plugin gets NEXRALL_PLUGIN_DATA in its environment, pointing at the
|
|
248
|
+
* plugin's persistent data directory — the install directory is replaced on every update, so
|
|
249
|
+
* this is the only place a server can keep state. A plugin that set the variable itself keeps
|
|
250
|
+
* its own value: an explicit config value is never overridden here.
|
|
251
|
+
*/
|
|
226
252
|
function pluginMcpServers(workDir) {
|
|
227
253
|
const merged = {};
|
|
228
254
|
for (const p of loadPlugins(workDir)) {
|
|
@@ -237,11 +263,26 @@ function pluginMcpServers(workDir) {
|
|
|
237
263
|
const servers = (j.mcpServers ?? j);
|
|
238
264
|
for (const [name, cfg] of Object.entries(servers)) {
|
|
239
265
|
if (!(name in merged))
|
|
240
|
-
merged[name] = cfg;
|
|
266
|
+
merged[name] = withPluginDataEnv(cfg, p.name);
|
|
241
267
|
}
|
|
242
268
|
}
|
|
243
269
|
catch { /* no mcp.json — skip */ }
|
|
244
270
|
}
|
|
245
271
|
return merged;
|
|
246
272
|
}
|
|
273
|
+
/** Inject NEXRALL_PLUGIN_DATA into a stdio server config (opaque non-objects pass through). */
|
|
274
|
+
function withPluginDataEnv(cfg, plugin) {
|
|
275
|
+
if (!cfg || typeof cfg !== 'object' || Array.isArray(cfg))
|
|
276
|
+
return cfg;
|
|
277
|
+
const c = cfg;
|
|
278
|
+
// Only a stdio server spawns a process. An http/sse server never reads our env.
|
|
279
|
+
if (typeof c.command !== 'string' || !c.command)
|
|
280
|
+
return cfg;
|
|
281
|
+
const env = c.env && typeof c.env === 'object' && !Array.isArray(c.env)
|
|
282
|
+
? c.env
|
|
283
|
+
: {};
|
|
284
|
+
if (typeof env.NEXRALL_PLUGIN_DATA === 'string')
|
|
285
|
+
return cfg;
|
|
286
|
+
return { ...c, env: { ...env, NEXRALL_PLUGIN_DATA: (0, data_1.pluginDataDir)(plugin) } };
|
|
287
|
+
}
|
|
247
288
|
//# sourceMappingURL=index.js.map
|
|
@@ -19,7 +19,25 @@ export interface PluginInspection {
|
|
|
19
19
|
version?: string;
|
|
20
20
|
description?: string;
|
|
21
21
|
};
|
|
22
|
+
/** The manifest's declared dependencies — installed automatically (see installPlugin). */
|
|
23
|
+
dependencies: PluginDependency[];
|
|
22
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* One entry of a manifest's `dependencies` array.
|
|
27
|
+
*
|
|
28
|
+
* Both spellings a Claude Code manifest can use are accepted, so such a plugin
|
|
29
|
+
* installs unchanged: the bare string `"audit-logger"` and the object form
|
|
30
|
+
* `{ "name": "secrets-vault", "version": "~2.1.0" }`. A version range is
|
|
31
|
+
* RECORDED but not enforced — enforcing it needs a registry that maps versions to
|
|
32
|
+
* refs, which our git-spec sources do not have; installs print a notice instead of
|
|
33
|
+
* pretending the constraint was honoured (see the gap analysis, S9).
|
|
34
|
+
*/
|
|
35
|
+
export interface PluginDependency {
|
|
36
|
+
name: string;
|
|
37
|
+
version?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Read a manifest's `dependencies` list (either spelling), dropping malformed entries. */
|
|
40
|
+
export declare function parsePluginDependencies(dir: string): PluginDependency[];
|
|
23
41
|
export interface InstallReceipt {
|
|
24
42
|
source: string;
|
|
25
43
|
kind: 'github' | 'local';
|
|
@@ -39,6 +57,19 @@ export interface InstallReceipt {
|
|
|
39
57
|
* reason an install fails (see resolveCommitSha).
|
|
40
58
|
*/
|
|
41
59
|
sha?: string;
|
|
60
|
+
/**
|
|
61
|
+
* True when this plugin was installed automatically because another plugin
|
|
62
|
+
* declared it in `dependencies`. `nex plugin prune` removes exactly these once
|
|
63
|
+
* no installed plugin needs them — a plugin the user installed is never auto.
|
|
64
|
+
*/
|
|
65
|
+
auto?: boolean;
|
|
66
|
+
/** Audit/display: the plugin that pulled this one in (auto installs only). */
|
|
67
|
+
requiredBy?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Names this plugin declared as dependencies, recorded at install time so prune
|
|
70
|
+
* can compute what is still reachable without re-reading every manifest.
|
|
71
|
+
*/
|
|
72
|
+
dependencies?: string[];
|
|
42
73
|
}
|
|
43
74
|
export interface InstallResult {
|
|
44
75
|
name: string;
|
|
@@ -49,6 +80,16 @@ export interface InstallResult {
|
|
|
49
80
|
sha?: string;
|
|
50
81
|
/** For an update: the commit that was previously installed, when known. */
|
|
51
82
|
previousSha?: string;
|
|
83
|
+
/** Names of dependencies installed automatically alongside this plugin (including their own). */
|
|
84
|
+
installedDependencies?: string[];
|
|
85
|
+
/** Declared version constraints that were recorded but not enforced, one line each. */
|
|
86
|
+
dependencyWarnings?: string[];
|
|
87
|
+
/**
|
|
88
|
+
* Internal: every directory this install wrote — the plugin plus any auto-installed
|
|
89
|
+
* dependencies — so a caller (the parent install, on failure) can roll the whole
|
|
90
|
+
* subtree back. Empty for a dependency that was already installed.
|
|
91
|
+
*/
|
|
92
|
+
writtenDirs?: string[];
|
|
52
93
|
}
|
|
53
94
|
export interface RegistryPlugin {
|
|
54
95
|
name: string;
|
|
@@ -148,6 +189,11 @@ export interface InstallOptions {
|
|
|
148
189
|
confirm?: (inspection: PluginInspection, name: string, ctx?: InstallContext) => Promise<boolean> | boolean;
|
|
149
190
|
/** Internal: SHA previously installed, so an update can be described as a change. */
|
|
150
191
|
_previousSha?: string;
|
|
192
|
+
/** Internal: set by the dependency installer; marks the receipt `auto`. */
|
|
193
|
+
_auto?: {
|
|
194
|
+
requiredBy: string;
|
|
195
|
+
stack: string[];
|
|
196
|
+
};
|
|
151
197
|
}
|
|
152
198
|
/** Extra facts about what is being installed, for the confirmation prompt. */
|
|
153
199
|
export interface InstallContext {
|
|
@@ -157,16 +203,53 @@ export interface InstallContext {
|
|
|
157
203
|
previousSha?: string;
|
|
158
204
|
/** True when this replaces an existing install of the same name. */
|
|
159
205
|
isUpdate: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Set when this install is AUTOMATIC — a dependency of the named plugin. The
|
|
208
|
+
* confirmation gate still applies (a dependency can ship hooks just as easily),
|
|
209
|
+
* and the prompt should say what asked for it.
|
|
210
|
+
*/
|
|
211
|
+
requiredBy?: string;
|
|
160
212
|
}
|
|
161
213
|
export declare function installPlugin(spec: string, opts?: InstallOptions): Promise<InstallResult>;
|
|
162
214
|
export declare function readReceipt(pluginDir: string): InstallReceipt | null;
|
|
163
215
|
export declare function removePlugin(name: string, opts?: {
|
|
164
216
|
scope?: 'project' | 'global';
|
|
165
217
|
workDir?: string;
|
|
218
|
+
keepData?: boolean;
|
|
166
219
|
}): string;
|
|
167
220
|
export declare function updatePlugin(name: string, opts?: {
|
|
168
221
|
scope?: 'project' | 'global';
|
|
169
222
|
workDir?: string;
|
|
170
223
|
confirm?: InstallOptions['confirm'];
|
|
171
224
|
}): Promise<InstallResult>;
|
|
225
|
+
export interface PruneEntry {
|
|
226
|
+
name: string;
|
|
227
|
+
scope: 'project' | 'global';
|
|
228
|
+
dir: string;
|
|
229
|
+
/** The plugin whose install pulled this one in (auto installs carry it in the receipt). */
|
|
230
|
+
requiredBy?: string;
|
|
231
|
+
}
|
|
232
|
+
export interface PrunePlan {
|
|
233
|
+
/** Auto-installed plugins nothing needs any more — exactly what a prune removes. */
|
|
234
|
+
orphans: PruneEntry[];
|
|
235
|
+
/** Everything that stays, with why: a manual install, or still reachable. */
|
|
236
|
+
kept: Array<{
|
|
237
|
+
name: string;
|
|
238
|
+
scope: 'project' | 'global';
|
|
239
|
+
reason: 'manual' | 'needed';
|
|
240
|
+
}>;
|
|
241
|
+
}
|
|
242
|
+
/** What would `nex plugin prune` remove? Pure inspection — installs/removes nothing. */
|
|
243
|
+
export declare function planPluginPrune(opts?: {
|
|
244
|
+
scope?: 'project' | 'global';
|
|
245
|
+
workDir?: string;
|
|
246
|
+
}): PrunePlan;
|
|
247
|
+
/**
|
|
248
|
+
* Remove a plan's orphans. Returns what was actually removed — a directory that
|
|
249
|
+
* could not be deleted is left in the plan AND out of the result, so the caller
|
|
250
|
+
* reports reality rather than the intention.
|
|
251
|
+
*/
|
|
252
|
+
export declare function prunePlugins(plan: PrunePlan, opts?: {
|
|
253
|
+
keepData?: boolean;
|
|
254
|
+
}): PruneEntry[];
|
|
172
255
|
//# sourceMappingURL=installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/plugins/installer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/plugins/installer.ts"],"names":[],"mappings":"AAqCA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,E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AAI,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAA;KAAE,CAAC,CAAC;CACzF;AAED,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,SAAS,CAgDxG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,UAAU,EAAE,CAW7F"}
|
|
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.parsePluginDependencies = parsePluginDependencies;
|
|
36
37
|
exports.searchRegistry = searchRegistry;
|
|
37
38
|
exports.getRegistryPlugin = getRegistryPlugin;
|
|
38
39
|
exports.reportInstall = reportInstall;
|
|
@@ -44,14 +45,46 @@ exports.installPlugin = installPlugin;
|
|
|
44
45
|
exports.readReceipt = readReceipt;
|
|
45
46
|
exports.removePlugin = removePlugin;
|
|
46
47
|
exports.updatePlugin = updatePlugin;
|
|
48
|
+
exports.planPluginPrune = planPluginPrune;
|
|
49
|
+
exports.prunePlugins = prunePlugins;
|
|
47
50
|
const fs = __importStar(require("fs"));
|
|
48
51
|
const path = __importStar(require("path"));
|
|
49
52
|
const os = __importStar(require("os"));
|
|
50
53
|
const child_process_1 = require("child_process");
|
|
51
54
|
const client_1 = require("../api/client");
|
|
52
55
|
const index_1 = require("./index");
|
|
56
|
+
const data_1 = require("./data");
|
|
53
57
|
const sources_1 = require("./sources");
|
|
54
58
|
const frontmatter_1 = require("../util/frontmatter");
|
|
59
|
+
/** Read a manifest's `dependencies` list (either spelling), dropping malformed entries. */
|
|
60
|
+
function parsePluginDependencies(dir) {
|
|
61
|
+
const file = (0, index_1.resolvePluginFile)(dir, 'manifest');
|
|
62
|
+
if (!file)
|
|
63
|
+
return [];
|
|
64
|
+
try {
|
|
65
|
+
const j = JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
66
|
+
if (!Array.isArray(j.dependencies))
|
|
67
|
+
return [];
|
|
68
|
+
const out = [];
|
|
69
|
+
const seen = new Set();
|
|
70
|
+
for (const raw of j.dependencies) {
|
|
71
|
+
const obj = raw && typeof raw === 'object' ? raw : null;
|
|
72
|
+
const name = typeof raw === 'string' ? raw : typeof obj?.name === 'string' ? obj.name : '';
|
|
73
|
+
const trimmed = name.trim();
|
|
74
|
+
// Same rule as an install name: a dependency can never escape the plugins
|
|
75
|
+
// directory, and a repeat entry adds nothing.
|
|
76
|
+
if (!/^[\w.-]+$/.test(trimmed) || seen.has(trimmed))
|
|
77
|
+
continue;
|
|
78
|
+
seen.add(trimmed);
|
|
79
|
+
const version = typeof obj?.version === 'string' ? obj.version : undefined;
|
|
80
|
+
out.push(version ? { name: trimmed, version } : { name: trimmed });
|
|
81
|
+
}
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return []; // unreadable/malformed manifest — an install will report the real problem
|
|
86
|
+
}
|
|
87
|
+
}
|
|
55
88
|
const RECEIPT_FILE = '_install.json';
|
|
56
89
|
/** Search the registry (empty query = list all, official first). */
|
|
57
90
|
async function searchRegistry(query, limit = 50) {
|
|
@@ -170,6 +203,7 @@ function inspectPluginDir(dir) {
|
|
|
170
203
|
hasHooks: (0, index_1.resolvePluginFile)(dir, 'hooks') !== null,
|
|
171
204
|
hasMcp: (0, index_1.resolvePluginFile)(dir, 'mcp') !== null,
|
|
172
205
|
meta,
|
|
206
|
+
dependencies: parsePluginDependencies(dir),
|
|
173
207
|
};
|
|
174
208
|
}
|
|
175
209
|
/** Read a flat `commands/*.md` or `agents/*.md` directory, returning name + frontmatter description. */
|
|
@@ -428,6 +462,42 @@ function pluginsRoot(scope, workDir) {
|
|
|
428
462
|
? path.join(workDir || process.cwd(), '.nexrall', 'plugins')
|
|
429
463
|
: path.join(os.homedir(), '.nexrall', 'plugins');
|
|
430
464
|
}
|
|
465
|
+
/**
|
|
466
|
+
* Directory of an installed plugin of this name, from EITHER scope (project first,
|
|
467
|
+
* matching loader precedence), or null. Used to decide that a dependency is already
|
|
468
|
+
* satisfied: the loader serves both scopes into one session, so an install in either
|
|
469
|
+
* one is a plugin the plugin can actually use.
|
|
470
|
+
*/
|
|
471
|
+
function installedPluginDir(name, workDir) {
|
|
472
|
+
if (!/^[\w.-]+$/.test(name))
|
|
473
|
+
return null;
|
|
474
|
+
for (const scope of ['project', 'global']) {
|
|
475
|
+
const dir = path.join(pluginsRoot(scope, workDir), name);
|
|
476
|
+
if (fs.existsSync(dir))
|
|
477
|
+
return dir;
|
|
478
|
+
}
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Where would installing dependency `name` come from? A declared source alias wins
|
|
483
|
+
* (the more specific, locally-declared intent), then the registry — the same order
|
|
484
|
+
* `nex plugin install <name>` uses, so the two can never disagree about what a name
|
|
485
|
+
* means.
|
|
486
|
+
*/
|
|
487
|
+
async function resolveDependencySpec(name, workDir) {
|
|
488
|
+
const alias = (0, sources_1.resolveSourceAlias)(name, workDir ?? process.cwd(), { includeProject: true });
|
|
489
|
+
if (alias)
|
|
490
|
+
return { spec: alias.spec };
|
|
491
|
+
try {
|
|
492
|
+
const entry = await getRegistryPlugin(name);
|
|
493
|
+
if (entry)
|
|
494
|
+
return { spec: entry.source };
|
|
495
|
+
}
|
|
496
|
+
catch (err) {
|
|
497
|
+
return { error: `the registry could not be reached (${err.message})` };
|
|
498
|
+
}
|
|
499
|
+
return { error: 'it is not a declared source and not in the registry' };
|
|
500
|
+
}
|
|
431
501
|
async function installPlugin(spec, opts = {}) {
|
|
432
502
|
const source = parsePluginSource(spec);
|
|
433
503
|
const scope = opts.scope ?? 'global';
|
|
@@ -496,6 +566,7 @@ async function installPlugin(spec, opts = {}) {
|
|
|
496
566
|
sha: sha ?? undefined,
|
|
497
567
|
previousSha: opts._previousSha,
|
|
498
568
|
isUpdate: Boolean(opts._previousSha) || Boolean(opts.force),
|
|
569
|
+
...(opts._auto ? { requiredBy: opts._auto.requiredBy } : {}),
|
|
499
570
|
});
|
|
500
571
|
if (!ok)
|
|
501
572
|
throw new Error('Installation cancelled.');
|
|
@@ -509,6 +580,52 @@ async function installPlugin(spec, opts = {}) {
|
|
|
509
580
|
fs.rmSync(dest, { recursive: true, force: true });
|
|
510
581
|
}
|
|
511
582
|
copyPluginDir(pluginRoot, dest);
|
|
583
|
+
// 5b. Dependencies — install the ones that are missing, at the same scope.
|
|
584
|
+
// A plugin that calls another plugin's MCP server or skill is broken unless its
|
|
585
|
+
// dependency is present, and "install A, then go read A's manifest to find out
|
|
586
|
+
// what else to install" is exactly the step users skip. The safety gate still
|
|
587
|
+
// runs for each dependency: a dependency can ship hooks of its own.
|
|
588
|
+
const manifestDeps = parsePluginDependencies(pluginRoot).filter((d) => d.name !== name);
|
|
589
|
+
const dependencyWarnings = [];
|
|
590
|
+
const installedDependencies = [];
|
|
591
|
+
// Every directory this call wrote, newest last. A failed install removes them
|
|
592
|
+
// again — the point of a failure is that nothing changed, and a half-installed
|
|
593
|
+
// plugin directory is worse than no plugin at all: it LOADS.
|
|
594
|
+
const writtenDirs = [dest];
|
|
595
|
+
try {
|
|
596
|
+
for (const dep of manifestDeps) {
|
|
597
|
+
if (dep.version) {
|
|
598
|
+
dependencyWarnings.push(`"${dep.name}" declares version "${dep.version}", which is not enforced yet (sources are git specs, not versioned registry entries) — its default branch is used.`);
|
|
599
|
+
}
|
|
600
|
+
if ((opts._auto?.stack ?? []).includes(dep.name))
|
|
601
|
+
continue; // cycle: A → B → A
|
|
602
|
+
if (installedPluginDir(dep.name, opts.workDir))
|
|
603
|
+
continue; // satisfied by either scope
|
|
604
|
+
const resolved = await resolveDependencySpec(dep.name, opts.workDir);
|
|
605
|
+
if ('error' in resolved) {
|
|
606
|
+
throw new Error(`Dependency "${dep.name}" of "${name}": ${resolved.error}. Install it first: nex plugin install ${dep.name}`);
|
|
607
|
+
}
|
|
608
|
+
const child = await installPlugin(resolved.spec, {
|
|
609
|
+
scope,
|
|
610
|
+
workDir: opts.workDir,
|
|
611
|
+
name: dep.name,
|
|
612
|
+
confirm: opts.confirm,
|
|
613
|
+
_auto: { requiredBy: name, stack: [...(opts._auto?.stack ?? []), name] },
|
|
614
|
+
});
|
|
615
|
+
writtenDirs.push(...(child.writtenDirs ?? [child.dir]));
|
|
616
|
+
installedDependencies.push(dep.name, ...(child.installedDependencies ?? []));
|
|
617
|
+
dependencyWarnings.push(...(child.dependencyWarnings ?? []));
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
catch (err) {
|
|
621
|
+
for (const d of writtenDirs.reverse()) {
|
|
622
|
+
try {
|
|
623
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
624
|
+
}
|
|
625
|
+
catch { /* best effort */ }
|
|
626
|
+
}
|
|
627
|
+
throw err;
|
|
628
|
+
}
|
|
512
629
|
// 6. Receipt for `nex plugin update`
|
|
513
630
|
const receipt = {
|
|
514
631
|
source: source.raw,
|
|
@@ -517,9 +634,21 @@ async function installPlugin(spec, opts = {}) {
|
|
|
517
634
|
subdir: source.subdir,
|
|
518
635
|
installedAt: new Date().toISOString(),
|
|
519
636
|
...(sha ? { sha } : {}),
|
|
637
|
+
...(opts._auto ? { auto: true, requiredBy: opts._auto.requiredBy } : {}),
|
|
638
|
+
...(manifestDeps.length ? { dependencies: manifestDeps.map((d) => d.name) } : {}),
|
|
520
639
|
};
|
|
521
640
|
fs.writeFileSync(path.join(dest, RECEIPT_FILE), JSON.stringify(receipt, null, 2));
|
|
522
|
-
return {
|
|
641
|
+
return {
|
|
642
|
+
name,
|
|
643
|
+
dir: dest,
|
|
644
|
+
scope,
|
|
645
|
+
inspection,
|
|
646
|
+
sha: sha ?? undefined,
|
|
647
|
+
previousSha: opts._previousSha,
|
|
648
|
+
...(installedDependencies.length ? { installedDependencies } : {}),
|
|
649
|
+
...(dependencyWarnings.length ? { dependencyWarnings } : {}),
|
|
650
|
+
writtenDirs,
|
|
651
|
+
};
|
|
523
652
|
}
|
|
524
653
|
finally {
|
|
525
654
|
fs.rmSync(tmpBase, { recursive: true, force: true });
|
|
@@ -543,6 +672,11 @@ function removePlugin(name, opts = {}) {
|
|
|
543
672
|
const dir = path.join(pluginsRoot(s, opts.workDir), name);
|
|
544
673
|
if (fs.existsSync(dir)) {
|
|
545
674
|
fs.rmSync(dir, { recursive: true, force: true });
|
|
675
|
+
// Data goes with the plugin unless --keep-data: the install directory is gone,
|
|
676
|
+
// and leaving a database/cache behind with no owner is how a later reinstall
|
|
677
|
+
// silently inherits state nobody meant to keep.
|
|
678
|
+
if (!opts.keepData)
|
|
679
|
+
(0, data_1.removePluginData)(name);
|
|
546
680
|
return dir;
|
|
547
681
|
}
|
|
548
682
|
}
|
|
@@ -576,4 +710,76 @@ async function updatePlugin(name, opts = {}) {
|
|
|
576
710
|
}
|
|
577
711
|
throw new Error(`Plugin "${name}" is not installed.`);
|
|
578
712
|
}
|
|
713
|
+
/** What would `nex plugin prune` remove? Pure inspection — installs/removes nothing. */
|
|
714
|
+
function planPluginPrune(opts = {}) {
|
|
715
|
+
const scopes = opts.scope ? [opts.scope] : ['project', 'global'];
|
|
716
|
+
const rows = [];
|
|
717
|
+
for (const s of scopes) {
|
|
718
|
+
let entries;
|
|
719
|
+
try {
|
|
720
|
+
entries = fs.readdirSync(pluginsRoot(s, opts.workDir), { withFileTypes: true });
|
|
721
|
+
}
|
|
722
|
+
catch {
|
|
723
|
+
continue; // scope has no plugins directory — nothing to prune there
|
|
724
|
+
}
|
|
725
|
+
for (const e of entries) {
|
|
726
|
+
if (!e.isDirectory())
|
|
727
|
+
continue;
|
|
728
|
+
const dir = path.join(pluginsRoot(s, opts.workDir), e.name);
|
|
729
|
+
rows.push({ name: e.name, scope: s, dir, receipt: readReceipt(dir) });
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
const byName = new Map();
|
|
733
|
+
for (const r of rows)
|
|
734
|
+
byName.set(r.name, [...(byName.get(r.name) ?? []), r]);
|
|
735
|
+
const needed = new Set();
|
|
736
|
+
const stack = rows.filter((r) => !r.receipt?.auto).map((r) => r.name);
|
|
737
|
+
while (stack.length) {
|
|
738
|
+
const n = stack.pop();
|
|
739
|
+
if (needed.has(n))
|
|
740
|
+
continue;
|
|
741
|
+
needed.add(n);
|
|
742
|
+
for (const r of byName.get(n) ?? []) {
|
|
743
|
+
// Union of the receipt (what was installed) and the manifest as it stands now
|
|
744
|
+
// (a hand-edited manifest must not lead to pruning something it still names).
|
|
745
|
+
const deps = new Set([
|
|
746
|
+
...(r.receipt?.dependencies ?? []),
|
|
747
|
+
...parsePluginDependencies(r.dir).map((d) => d.name),
|
|
748
|
+
]);
|
|
749
|
+
for (const d of deps)
|
|
750
|
+
if (!needed.has(d))
|
|
751
|
+
stack.push(d);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
const orphans = [];
|
|
755
|
+
const kept = [];
|
|
756
|
+
for (const r of rows) {
|
|
757
|
+
if (r.receipt?.auto && !needed.has(r.name)) {
|
|
758
|
+
orphans.push({ name: r.name, scope: r.scope, dir: r.dir, requiredBy: r.receipt.requiredBy });
|
|
759
|
+
}
|
|
760
|
+
else {
|
|
761
|
+
kept.push({ name: r.name, scope: r.scope, reason: r.receipt?.auto ? 'needed' : 'manual' });
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
return { orphans, kept };
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Remove a plan's orphans. Returns what was actually removed — a directory that
|
|
768
|
+
* could not be deleted is left in the plan AND out of the result, so the caller
|
|
769
|
+
* reports reality rather than the intention.
|
|
770
|
+
*/
|
|
771
|
+
function prunePlugins(plan, opts = {}) {
|
|
772
|
+
const removed = [];
|
|
773
|
+
for (const o of plan.orphans) {
|
|
774
|
+
try {
|
|
775
|
+
fs.rmSync(o.dir, { recursive: true, force: true });
|
|
776
|
+
removed.push(o);
|
|
777
|
+
// Same rule as removePlugin: uninstalling takes the data unless told to keep it.
|
|
778
|
+
if (!opts.keepData)
|
|
779
|
+
(0, data_1.removePluginData)(o.name);
|
|
780
|
+
}
|
|
781
|
+
catch { /* locked directory, permissions — leave it and report the rest */ }
|
|
782
|
+
}
|
|
783
|
+
return removed;
|
|
784
|
+
}
|
|
579
785
|
//# sourceMappingURL=installer.js.map
|
package/dist/types.d.ts
CHANGED
|
@@ -273,6 +273,25 @@ export interface PermissionRequest {
|
|
|
273
273
|
description?: string;
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* What a permission gate may answer. Plain `true`/`false` stays supported — that is
|
|
278
|
+
* what every human-facing gate returns — and the object form is for gates that
|
|
279
|
+
* REWRITE the call: Claude Code's `--permission-prompt-tool` MCP tool may answer
|
|
280
|
+
* `{"behavior":"allow","updatedInput":{…}}`, and what IT approved is what must run.
|
|
281
|
+
*
|
|
282
|
+
* `updatedInput` does not widen any lock: the loop re-checks plan mode and worktree
|
|
283
|
+
* isolation against the rewritten input and refuses if the rewrite crosses either
|
|
284
|
+
* (see the requestPermission call site in agent/loop.ts).
|
|
285
|
+
*
|
|
286
|
+
* `message` is shown to the MODEL as the denial reason (Claude Code's deny
|
|
287
|
+
* `message`), so an approval service can say "no — use staging, not prod" and the
|
|
288
|
+
* agent can adapt instead of being told "denied by user".
|
|
289
|
+
*/
|
|
290
|
+
export type PermissionAnswer = boolean | {
|
|
291
|
+
granted: boolean;
|
|
292
|
+
updatedInput?: Record<string, unknown>;
|
|
293
|
+
message?: string;
|
|
294
|
+
};
|
|
276
295
|
/**
|
|
277
296
|
* Identity of one tool call, passed with every tool event. `id` is the model's
|
|
278
297
|
* tool_use id (unique per call); `parentId` is the id of the `task` call whose
|
|
@@ -417,10 +436,21 @@ export interface AgentLoopOptions {
|
|
|
417
436
|
* until they're updated to handle notices separately.
|
|
418
437
|
*/
|
|
419
438
|
onNotice?: (text: string) => void;
|
|
439
|
+
/**
|
|
440
|
+
* Called AFTER the loop compacted the conversation itself (history summarised
|
|
441
|
+
* mid-run). Hosts use it to record the compaction — without it an auto-compact
|
|
442
|
+
* left no trace at all, so `nex sessions --events` showed a long run as if its
|
|
443
|
+
* context had never been rewritten.
|
|
444
|
+
*/
|
|
445
|
+
onCompact?: (info: {
|
|
446
|
+
trigger: 'auto';
|
|
447
|
+
before: number;
|
|
448
|
+
after: number;
|
|
449
|
+
}) => void;
|
|
420
450
|
model?: string;
|
|
421
451
|
mode?: string;
|
|
422
452
|
effort?: string;
|
|
423
|
-
requestPermission: (req: PermissionRequest) => Promise<
|
|
453
|
+
requestPermission: (req: PermissionRequest) => Promise<PermissionAnswer>;
|
|
424
454
|
env?: EnvContext;
|
|
425
455
|
editorContext?: EditorContext | null;
|
|
426
456
|
nexrallMd?: string;
|
|
@@ -485,6 +515,15 @@ export interface AgentLoopOptions {
|
|
|
485
515
|
* Return null to fall through to the default executor.
|
|
486
516
|
*/
|
|
487
517
|
executeExternalTool?: (name: string, input: Record<string, unknown>) => Promise<ToolResult | null>;
|
|
518
|
+
/**
|
|
519
|
+
* Schemas for tools the HOST implements (run via executeExternalTool). Advertised to the model
|
|
520
|
+
* through the request's extraTools, so they need no backend catalogue entry.
|
|
521
|
+
*/
|
|
522
|
+
extraToolSchemas?: Array<{
|
|
523
|
+
name: string;
|
|
524
|
+
description: string;
|
|
525
|
+
input_schema: Record<string, unknown>;
|
|
526
|
+
}>;
|
|
488
527
|
/** MCP manager — provides extra tool definitions + executes MCP tool calls. */
|
|
489
528
|
mcpManager?: import('./mcp/manager').McpManager;
|
|
490
529
|
/** Checkpoint manager — snapshots files before mutations so the user can /rewind. */
|
|
@@ -638,6 +677,11 @@ export interface AgentLoopOptions {
|
|
|
638
677
|
_projectNexrallMd?: string;
|
|
639
678
|
/** Internal: hooks declared by THIS run's agent definition (not inherited by its children). */
|
|
640
679
|
_agentHooks?: import('./agent/agentTypes').AgentHooks;
|
|
680
|
+
/**
|
|
681
|
+
* `--bare` / `--safe-mode`: do not load the project's hook configuration at all
|
|
682
|
+
* (settings.json + plugins). Agent-definition hooks passed in `_agentHooks` still apply.
|
|
683
|
+
*/
|
|
684
|
+
disableHooks?: boolean;
|
|
641
685
|
/** Internal: MCP servers this run may use (intersection of ancestors' `mcpServers`). Absent = all. */
|
|
642
686
|
_mcpServerAllowlist?: Set<string>;
|
|
643
687
|
/** Internal: tools refused for this run and every run it spawns (union of `disallowedTools`). */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAKD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D;AAKD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAA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|
|
2
2
|
"name": "@nexrall/code-core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.68",
|
|
4
4
|
"description": "Core agent loop, tools, and extension primitives for Nexrall Code — embed an AI coding agent in any Node.js application.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nexrall <support@nexrall.com> (https://nexrall.com)",
|