blun-king-cli 9.1.525 → 9.1.526
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 +6 -0
- package/LIESMICH.txt +1 -1
- package/README.md +1 -1
- package/bin/reload-plugin-bootstrap.cjs +18 -0
- package/blun.mjs +1 -0
- package/package.json +3 -2
- package/scripts/check-reload-agent-spine-regression.js +76 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.1.526 - 2026-09-01
|
|
4
|
+
|
|
5
|
+
- Materializes the AgentSpine version bundled with the current package before `/reload` rebuilds the plugin catalogue and MCP configuration.
|
|
6
|
+
- Preserves unrelated plugin records and reuses an unchanged managed AgentSpine tree without rewriting `installed.json`.
|
|
7
|
+
- Adds a red-to-green regression against 9.1.525 for bootstrap ordering, managed-plugin adoption, and idempotent reload behavior.
|
|
8
|
+
|
|
3
9
|
## 9.1.525 - 2026-09-01
|
|
4
10
|
|
|
5
11
|
- Starts every local shell command in its own process group on Windows as well as POSIX, so programs cannot attach to the BLUN TUI's controlling console and consume `Escape`, `Ctrl+S`, or other editor input.
|
package/LIESMICH.txt
CHANGED
package/README.md
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
|
|
5
|
+
const { installManagedAgentSpinePlugin } = require('./plugin-bootstrap');
|
|
6
|
+
|
|
7
|
+
function installBundledAgentSpineForReload(options = {}) {
|
|
8
|
+
const packageRoot = path.resolve(options.packageRoot || path.join(__dirname, '..'));
|
|
9
|
+
const blunDir = String(options.blunDir || '').trim();
|
|
10
|
+
if (blunDir.length === 0) throw new Error('BLUN profile directory is required for plugin reload');
|
|
11
|
+
return installManagedAgentSpinePlugin({
|
|
12
|
+
packageRoot,
|
|
13
|
+
blunDir: path.resolve(blunDir),
|
|
14
|
+
now: options.now,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = { installBundledAgentSpineForReload };
|
package/blun.mjs
CHANGED
|
@@ -317353,6 +317353,7 @@ var init_core_impl = __esmMin((() => {
|
|
|
317353
317353
|
if (active?.hasActiveTurn === true) throw new BlunError(ErrorCodes.TURN_AGENT_BUSY, `Session "${summary.id}" cannot be reloaded while a turn is running`, { details: { sessionId: summary.id } });
|
|
317354
317354
|
this.reloadProviderManager();
|
|
317355
317355
|
this.clearRuntimeCache();
|
|
317356
|
+
createRequire(import.meta.url)("./bin/reload-plugin-bootstrap.cjs").installBundledAgentSpineForReload({ blunDir: this.homeDir });
|
|
317356
317357
|
await this.reloadPlugins({});
|
|
317357
317358
|
if (active !== void 0) {
|
|
317358
317359
|
await active.closeForReload();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blun-king-cli",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.526",
|
|
4
4
|
"description": "BLUN CLI - your own AI agent with a Telegram channel. Get it done. With BLUN.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "node --test test/*.test.js",
|
|
12
|
-
"prepack": "node scripts/check-release-metadata.js && node scripts/check-shell-terminal-isolation-regression.js && node scripts/check-todo-loop-regression.js && node scripts/check-telegram-loop-exactly-once-regression.js && node scripts/check-session-picker-resume-metrics-regression.js && node scripts/check-bundled-agent-spine-regression.js && node scripts/check-todo-recovery-catalog-regression.js && node scripts/check-historical-tool-result-preview-regression.js && node scripts/check-session-start-hook-context-regression.js && node scripts/check-queue-controls-regression.js && node scripts/check-approval-queue-shortcuts-regression.js && node scripts/check-approval-observability-regression.js && node scripts/check-slash-escape-regression.js && node scripts/check-telegram-bridge-watchdog.js && node scripts/check-resume-replay-regression.js && node scripts/check-session-cancel-regression.js && node scripts/check-plugin-startup-regression.js && node scripts/check-active-profile-plugin-startup.js && node scripts/check-mcp-startup-wait-budget.js",
|
|
12
|
+
"prepack": "node scripts/check-release-metadata.js && node scripts/check-shell-terminal-isolation-regression.js && node scripts/check-todo-loop-regression.js && node scripts/check-telegram-loop-exactly-once-regression.js && node scripts/check-session-picker-resume-metrics-regression.js && node scripts/check-bundled-agent-spine-regression.js && node scripts/check-reload-agent-spine-regression.js && node scripts/check-todo-recovery-catalog-regression.js && node scripts/check-historical-tool-result-preview-regression.js && node scripts/check-session-start-hook-context-regression.js && node scripts/check-queue-controls-regression.js && node scripts/check-approval-queue-shortcuts-regression.js && node scripts/check-approval-observability-regression.js && node scripts/check-slash-escape-regression.js && node scripts/check-telegram-bridge-watchdog.js && node scripts/check-resume-replay-regression.js && node scripts/check-session-cancel-regression.js && node scripts/check-plugin-startup-regression.js && node scripts/check-active-profile-plugin-startup.js && node scripts/check-mcp-startup-wait-budget.js",
|
|
13
13
|
"release:verify": "node scripts/check-release-metadata.js --external",
|
|
14
14
|
"postinstall": "node scripts/fix-node-pty-perms.js"
|
|
15
15
|
},
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"scripts/check-active-profile-plugin-startup.js",
|
|
40
40
|
"scripts/check-approval-queue-shortcuts-regression.js",
|
|
41
41
|
"scripts/check-bundled-agent-spine-regression.js",
|
|
42
|
+
"scripts/check-reload-agent-spine-regression.js",
|
|
42
43
|
"scripts/check-approval-observability-regression.js",
|
|
43
44
|
"scripts/check-slash-escape-regression.js",
|
|
44
45
|
"scripts/check-mcp-startup-wait-budget.js",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const assert = require('node:assert/strict');
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const os = require('node:os');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
|
|
8
|
+
const rootArg = process.argv.find((value) => value.startsWith('--root='));
|
|
9
|
+
const packageRoot = rootArg ? path.resolve(rootArg.slice('--root='.length)) : path.resolve(__dirname, '..');
|
|
10
|
+
const bundle = fs.readFileSync(path.join(packageRoot, 'blun.mjs'), 'utf8');
|
|
11
|
+
const reloadStart = bundle.indexOf('async reloadSession(input) {');
|
|
12
|
+
const bootstrapCall = bundle.indexOf('installBundledAgentSpineForReload({ blunDir: this.homeDir });', reloadStart);
|
|
13
|
+
const pluginReload = bundle.indexOf('await this.reloadPlugins({});', reloadStart);
|
|
14
|
+
|
|
15
|
+
assert.notEqual(reloadStart, -1, 'reloadSession must exist');
|
|
16
|
+
assert.ok(
|
|
17
|
+
bootstrapCall > reloadStart && bootstrapCall < pluginReload,
|
|
18
|
+
'/reload must materialize bundled AgentSpine before reloading the plugin catalogue',
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const helperPath = path.join(packageRoot, 'bin', 'reload-plugin-bootstrap.cjs');
|
|
22
|
+
assert.ok(fs.existsSync(helperPath), 'reload plugin bootstrap helper must be packaged');
|
|
23
|
+
const { installBundledAgentSpineForReload } = require(helperPath);
|
|
24
|
+
|
|
25
|
+
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'blun-reload-agent-spine-'));
|
|
26
|
+
const profile = path.join(root, 'profile');
|
|
27
|
+
const pluginsDir = path.join(profile, 'plugins');
|
|
28
|
+
const installedFile = path.join(pluginsDir, 'installed.json');
|
|
29
|
+
const unrelatedRoot = path.join(root, 'unrelated-plugin');
|
|
30
|
+
fs.mkdirSync(pluginsDir, { recursive: true });
|
|
31
|
+
fs.mkdirSync(unrelatedRoot, { recursive: true });
|
|
32
|
+
fs.writeFileSync(installedFile, `${JSON.stringify({
|
|
33
|
+
version: 1,
|
|
34
|
+
plugins: [{
|
|
35
|
+
id: 'unrelated',
|
|
36
|
+
root: unrelatedRoot,
|
|
37
|
+
source: 'local-path',
|
|
38
|
+
enabled: false,
|
|
39
|
+
capabilities: {},
|
|
40
|
+
}],
|
|
41
|
+
}, null, 2)}\n`);
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
const first = installBundledAgentSpineForReload({
|
|
45
|
+
packageRoot,
|
|
46
|
+
blunDir: profile,
|
|
47
|
+
now: '2026-09-01T00:00:00.000Z',
|
|
48
|
+
});
|
|
49
|
+
const installed = JSON.parse(fs.readFileSync(installedFile, 'utf8'));
|
|
50
|
+
const agentSpine = installed.plugins.find((plugin) => plugin.id === 'agent-spine');
|
|
51
|
+
const unrelated = installed.plugins.find((plugin) => plugin.id === 'unrelated');
|
|
52
|
+
|
|
53
|
+
assert.ok(agentSpine, 'reload bootstrap must add bundled AgentSpine');
|
|
54
|
+
assert.equal(agentSpine.root, first.pluginRoot);
|
|
55
|
+
assert.equal(agentSpine.enabled, true);
|
|
56
|
+
assert.equal(agentSpine.capabilities.mcpServers['agent-spine'].enabled, true);
|
|
57
|
+
assert.equal(unrelated.root, unrelatedRoot, 'reload bootstrap must preserve unrelated plugins');
|
|
58
|
+
assert.equal(unrelated.enabled, false, 'reload bootstrap must preserve unrelated plugin state');
|
|
59
|
+
assert.equal(
|
|
60
|
+
fs.readFileSync(path.join(agentSpine.root, 'package.json'), 'utf8'),
|
|
61
|
+
fs.readFileSync(path.join(packageRoot, 'agent-spine-plugin', 'package.json'), 'utf8'),
|
|
62
|
+
'managed AgentSpine must come from the current package bundle',
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const beforeSecondRun = fs.readFileSync(installedFile, 'utf8');
|
|
66
|
+
const second = installBundledAgentSpineForReload({
|
|
67
|
+
packageRoot,
|
|
68
|
+
blunDir: profile,
|
|
69
|
+
now: '2026-09-01T00:01:00.000Z',
|
|
70
|
+
});
|
|
71
|
+
assert.equal(second.reused, true, 'an unchanged bundle must be reused');
|
|
72
|
+
assert.equal(fs.readFileSync(installedFile, 'utf8'), beforeSecondRun, 'idempotent reload must not rewrite installed.json');
|
|
73
|
+
process.stdout.write('Reload AgentSpine regression gate: PASS\n');
|
|
74
|
+
} finally {
|
|
75
|
+
fs.rmSync(root, { recursive: true, force: true });
|
|
76
|
+
}
|