@hmharness/cli 0.23.35 → 0.23.37
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/board/install-kaihongos.cjs +3 -3
- package/dist/mcp-server.js +25 -1
- package/package.json +15 -15
- package/release-notes.json +10 -0
|
@@ -63,9 +63,9 @@ let PACKAGES = ['cli', 'web', 'agent', 'kernel', 'sandbox', 'evolution',
|
|
|
63
63
|
// The release bot keeps versions synced; the NAMES must cover the full
|
|
64
64
|
// first-party set so the offline path cannot produce an incomplete tree.
|
|
65
65
|
const FALLBACK_PINS = {
|
|
66
|
-
cli: '0.23.
|
|
67
|
-
sandbox: '0.23.
|
|
68
|
-
evaluation: '0.23.
|
|
66
|
+
cli: '0.23.37', web: '0.23.37', agent: '0.23.37', kernel: '0.23.37',
|
|
67
|
+
sandbox: '0.23.37', evolution: '0.23.37', 'domain-ops': '0.23.37',
|
|
68
|
+
evaluation: '0.23.37', observability: '0.23.37', 'domain-harmony': '0.23.37',
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
// ---------- helpers ---------------------------------------------------------
|
package/dist/mcp-server.js
CHANGED
|
@@ -44,7 +44,16 @@ function exposedFilter() {
|
|
|
44
44
|
const pats = raw.split(',').map((s) => s.trim()).filter(Boolean);
|
|
45
45
|
return (t) => pats.some((p) => t.name === p || t.name.startsWith(p.endsWith('_') || p.endsWith('-') ? p : p + '_'));
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
// The user's REAL browser via the extension bridge: read-only trio by
|
|
48
|
+
// default. extension_page_act moves the user's logged-in pages and its
|
|
49
|
+
// per-call approval gate lives in the agent runner, NOT on this stdio
|
|
50
|
+
// surface — so it ships ONLY behind an explicit opt-in.
|
|
51
|
+
const allowAct = process.env.HMH_MCP_EXTENSION_ACT === '1';
|
|
52
|
+
return (t) => t.name.startsWith('harmony_')
|
|
53
|
+
|| t.name === 'extension_status'
|
|
54
|
+
|| t.name === 'extension_tabs'
|
|
55
|
+
|| t.name === 'extension_page_read'
|
|
56
|
+
|| (allowAct && t.name === 'extension_page_act');
|
|
48
57
|
}
|
|
49
58
|
export async function serveMcp() {
|
|
50
59
|
// stdout is the protocol channel: silence any library prints.
|
|
@@ -52,6 +61,21 @@ export async function serveMcp() {
|
|
|
52
61
|
console.log = (...a) => console.error(...a);
|
|
53
62
|
void realLog;
|
|
54
63
|
const { reg } = await buildRegistry({ mcp: false, announce: false });
|
|
64
|
+
// MCP hosts list tools ONCE at startup; a browser opened later must not
|
|
65
|
+
// leave the extension family invisible until the next host restart. If the
|
|
66
|
+
// agent's registry skipped it (bridge healthy but no extension connected
|
|
67
|
+
// YET), register on a healthy bridge alone — every call re-checks over
|
|
68
|
+
// HTTP and fails honestly with the next step when no browser is there.
|
|
69
|
+
if (!reg.list().some((t) => t.name === 'extension_status')) {
|
|
70
|
+
try {
|
|
71
|
+
const { discoverExtensionBridgeSync, extensionTools } = await import('@hmharness/extension');
|
|
72
|
+
const { pageReadSink } = await import('@hmharness/agent');
|
|
73
|
+
if (discoverExtensionBridgeSync(homeDir()).healthy) {
|
|
74
|
+
reg.registerAll(extensionTools({ home: homeDir(), onPageRead: pageReadSink(homeDir()) }));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch { /* extension optional: never block the MCP surface */ }
|
|
78
|
+
}
|
|
55
79
|
const tools = reg.list().filter(exposedFilter());
|
|
56
80
|
const byName = new Map(tools.map((t) => [t.name, t]));
|
|
57
81
|
const ctx = { cwd: process.cwd(), home: homeDir() };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cli",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.37",
|
|
4
4
|
"description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"build": "tsc -p tsconfig.build.json"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@hmharness/agent": "0.23.
|
|
49
|
-
"@hmharness/browser": "0.23.
|
|
50
|
-
"@hmharness/cognitive": "0.23.
|
|
51
|
-
"@hmharness/domain-harmony": "0.23.
|
|
52
|
-
"@hmharness/domain-ops": "0.23.
|
|
53
|
-
"@hmharness/environments": "0.23.
|
|
54
|
-
"@hmharness/evaluation": "0.23.
|
|
55
|
-
"@hmharness/evolution": "0.23.
|
|
56
|
-
"@hmharness/extension": "0.23.
|
|
57
|
-
"@hmharness/kernel": "0.23.
|
|
58
|
-
"@hmharness/observability": "0.23.
|
|
59
|
-
"@hmharness/sandbox": "0.23.
|
|
60
|
-
"@hmharness/web": "0.23.
|
|
48
|
+
"@hmharness/agent": "0.23.37",
|
|
49
|
+
"@hmharness/browser": "0.23.37",
|
|
50
|
+
"@hmharness/cognitive": "0.23.37",
|
|
51
|
+
"@hmharness/domain-harmony": "0.23.37",
|
|
52
|
+
"@hmharness/domain-ops": "0.23.37",
|
|
53
|
+
"@hmharness/environments": "0.23.37",
|
|
54
|
+
"@hmharness/evaluation": "0.23.37",
|
|
55
|
+
"@hmharness/evolution": "0.23.37",
|
|
56
|
+
"@hmharness/extension": "0.23.37",
|
|
57
|
+
"@hmharness/kernel": "0.23.37",
|
|
58
|
+
"@hmharness/observability": "0.23.37",
|
|
59
|
+
"@hmharness/sandbox": "0.23.37",
|
|
60
|
+
"@hmharness/web": "0.23.37",
|
|
61
61
|
"qrcode": "^1.5.4",
|
|
62
|
-
"@hmharness/lsp": "0.23.
|
|
62
|
+
"@hmharness/lsp": "0.23.37"
|
|
63
63
|
}
|
|
64
64
|
}
|
package/release-notes.json
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"notes": [
|
|
3
|
+
{
|
|
4
|
+
"v": "0.23.37",
|
|
5
|
+
"date": "2026-10-21",
|
|
6
|
+
"note": "ARC-AGI-3 证据链完备(随机六档+时间曲线 1.0→0.008+迁移 +0.4166 三形态一致:harness 层校准净贡献终局定论);墙钟压测仪器(2h 全过/8h 两轴判定);AGENTS.md 仓库指引"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"v": "0.23.36",
|
|
10
|
+
"date": "2026-10-18",
|
|
11
|
+
"note": "Web server 按路由域拆分为六模块(44 条中 38 条出仓,server.ts 减 44%,逐字搬运+每域真服务器冒烟锁定合约);MCP 面暴露浏览器扩展只读工具族(操作类需显式 opt-in)"
|
|
12
|
+
},
|
|
3
13
|
{
|
|
4
14
|
"v": "0.23.35",
|
|
5
15
|
"date": "2026-10-16",
|