@hyperfixi/mcp-server 2.11.0 → 3.0.0
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 +8 -0
- package/README.md +2 -2
- package/dist/index.js +21 -10
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to `@hyperfixi/mcp-server` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
> **Superseded by the root changelog.** Every package in this monorepo publishes
|
|
9
|
+
> in lockstep at the root version, and the entries below use an older
|
|
10
|
+
> per-package numbering that no published version ever matched. They are kept
|
|
11
|
+
> for the migration notes they carry; they are not a record of recent releases.
|
|
12
|
+
> **For anything since, see
|
|
13
|
+
> [the monorepo CHANGELOG](https://github.com/codetalcott/hyperfixi/blob/main/CHANGELOG.md)**
|
|
14
|
+
> and [GitHub Releases](https://github.com/codetalcott/hyperfixi/releases).
|
|
15
|
+
|
|
8
16
|
## [Unreleased]
|
|
9
17
|
|
|
10
18
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @hyperfixi/mcp-server
|
|
2
2
|
|
|
3
|
-
MCP (Model Context Protocol) server for hyperscript and multilingual DSL development. Provides **108 tools
|
|
3
|
+
MCP (Model Context Protocol) server for hyperscript and multilingual DSL development. Provides **103 tools** by default (**108** defined — the 5 MCP-sampling tools are opt-in and hidden unless `LOKASCRIPT_MCP_LLM_TOOLS=1`), **9 resources**, and **9 prompts** spanning: GRAIL workflow orchestration, validation, compilation, analysis, patterns, LSP bridge, language profiles, code generation, route extraction, 9 domain DSLs, IR conversion, cross-domain dispatch, MCP sampling (opt-in), AI-assisted debugging, template inventory, and the LSE round-trip pipeline.
|
|
4
4
|
|
|
5
5
|
## The agent loop
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ See **[GRAIL.md](GRAIL.md)** for full documentation, schema reference, and examp
|
|
|
80
80
|
|
|
81
81
|
## Available Tools
|
|
82
82
|
|
|
83
|
-
The **103** tools below, plus the **5** GRAIL tools above, total **108**.
|
|
83
|
+
The **103** tools below, plus the **5** GRAIL tools above, total **108** defined. The 5 MCP-sampling tools among them are hidden from `tools/list` unless `LOKASCRIPT_MCP_LLM_TOOLS=1`, so a default connection sees **103**.
|
|
84
84
|
|
|
85
85
|
### Validation & Semantic Tools (8)
|
|
86
86
|
|
package/dist/index.js
CHANGED
|
@@ -2145,12 +2145,8 @@ function getAdapterBundle(languages) {
|
|
|
2145
2145
|
}
|
|
2146
2146
|
function getBundleConfig(commands, blocks, languages, positional, runtime = "auto") {
|
|
2147
2147
|
const needsMultilingual = languages.length > 1 || languages.some((l) => l !== "en");
|
|
2148
|
-
let bundle = "hyperfixi-
|
|
2149
|
-
let bundleSize = "
|
|
2150
|
-
if (blocks.length > 0 || positional) {
|
|
2151
|
-
bundle = "hyperfixi-hybrid-complete.js";
|
|
2152
|
-
bundleSize = "6.7 KB";
|
|
2153
|
-
}
|
|
2148
|
+
let bundle = "hyperfixi-hx.js";
|
|
2149
|
+
let bundleSize = "21.5 KB";
|
|
2154
2150
|
if (needsMultilingual) {
|
|
2155
2151
|
bundle = "hyperfixi-multilingual.js";
|
|
2156
2152
|
bundleSize = "250 KB";
|
|
@@ -2811,8 +2807,16 @@ try {
|
|
|
2811
2807
|
"[mcp:lsp-bridge] @lokascript/framework not available \u2014 LSE bracket notation in hover disabled"
|
|
2812
2808
|
);
|
|
2813
2809
|
}
|
|
2810
|
+
var roleInferrer = null;
|
|
2811
|
+
try {
|
|
2812
|
+
({ schemaRoleInferrer: roleInferrer } = await import("@hyperfixi/core/multilingual"));
|
|
2813
|
+
} catch {
|
|
2814
|
+
console.error(
|
|
2815
|
+
"[mcp:lsp-bridge] @hyperfixi/core/multilingual not available \u2014 hover role inference limited to `set` and `go`"
|
|
2816
|
+
);
|
|
2817
|
+
}
|
|
2814
2818
|
console.error(
|
|
2815
|
-
`[mcp:lsp-bridge] capabilities: ast=${!!astToolkit}, parse=${!!parseFunction}, semantic=${!!semanticPackage2}, framework=${!!frameworkIR}`
|
|
2819
|
+
`[mcp:lsp-bridge] capabilities: ast=${!!astToolkit}, parse=${!!parseFunction}, semantic=${!!semanticPackage2}, framework=${!!frameworkIR}, roles=${!!roleInferrer}`
|
|
2816
2820
|
);
|
|
2817
2821
|
var cachedAnalyzer2 = null;
|
|
2818
2822
|
function getSemanticAnalyzer2() {
|
|
@@ -3455,7 +3459,10 @@ async function getHoverInfo(code, line, character, language) {
|
|
|
3455
3459
|
try {
|
|
3456
3460
|
const ast = parseFunction(code);
|
|
3457
3461
|
if (ast) {
|
|
3458
|
-
const interchange = astToolkit.fromCoreAST(
|
|
3462
|
+
const interchange = astToolkit.fromCoreAST(
|
|
3463
|
+
ast,
|
|
3464
|
+
roleInferrer ? { inferRoles: roleInferrer } : void 0
|
|
3465
|
+
);
|
|
3459
3466
|
const nodes = Array.isArray(interchange) ? interchange : [interchange];
|
|
3460
3467
|
const hoverOptions = {};
|
|
3461
3468
|
if (frameworkIR) {
|
|
@@ -5621,12 +5628,15 @@ var compilationTools = [
|
|
|
5621
5628
|
}
|
|
5622
5629
|
];
|
|
5623
5630
|
var REPAIR_HINT = "Next step: apply the diagnostics above and re-run validate_and_compile. If an error names a code (e.g. MISSING.ARGUMENT), get_code_fixes returns concrete fixes for it; get_command_docs lists the roles each command accepts.";
|
|
5631
|
+
var REVIEW_HINT = "This parsed, but the diagnostics above are non-empty. A warning such as UNCONSUMED_INPUT means tokens were parsed but bound to no role, so a role may have fallen back to a default (often `me`) \u2014 the result can look valid while doing something other than you intended. Compare the returned action/roles/trigger against your intent before compiling; score_fidelity can prove a rewrite kept the original meaning.";
|
|
5624
5632
|
function compileResult(result) {
|
|
5625
5633
|
const content = [
|
|
5626
5634
|
{ type: "text", text: JSON.stringify(result, null, 2) }
|
|
5627
5635
|
];
|
|
5628
5636
|
if (!result.ok) {
|
|
5629
5637
|
content.push({ type: "text", text: REPAIR_HINT });
|
|
5638
|
+
} else if (result.diagnostics?.some((d) => d.severity === "warning")) {
|
|
5639
|
+
content.push({ type: "text", text: REVIEW_HINT });
|
|
5630
5640
|
}
|
|
5631
5641
|
return { content, isError: !result.ok };
|
|
5632
5642
|
}
|
|
@@ -10567,6 +10577,7 @@ function readResource(uri) {
|
|
|
10567
10577
|
var registry = createDomainRegistry();
|
|
10568
10578
|
var { version: pkgVersion } = createRequire2(import.meta.url)("../package.json");
|
|
10569
10579
|
var LLM_SAMPLING_ENABLED = process.env.LOKASCRIPT_MCP_LLM_TOOLS === "1";
|
|
10580
|
+
var SAMPLING_TOOL_NAMES = new Set(samplingTools.map((t) => t.name));
|
|
10570
10581
|
var SERVER_INSTRUCTIONS = `Deterministic tooling for hyperscript (a compact DOM-behavior DSL) in 24 human languages. No tool here calls an LLM \u2014 every check is a real parser/compiler you can trust.
|
|
10571
10582
|
|
|
10572
10583
|
The core loop for GENERATING hyperscript:
|
|
@@ -10633,7 +10644,7 @@ function buildServer() {
|
|
|
10633
10644
|
if (stale.length > 0) {
|
|
10634
10645
|
return staleToolError(stale);
|
|
10635
10646
|
}
|
|
10636
|
-
if (name.startsWith("analyze_") || name === "explain_code" || name === "recognize_intent") {
|
|
10647
|
+
if (name.startsWith("analyze_") && !SAMPLING_TOOL_NAMES.has(name) || name === "explain_code" || name === "recognize_intent") {
|
|
10637
10648
|
return handleAnalysisTool(name, args);
|
|
10638
10649
|
}
|
|
10639
10650
|
if (name === "search_patterns" || name === "translate_hyperscript" || name === "get_pattern_stats") {
|
|
@@ -10674,7 +10685,7 @@ function buildServer() {
|
|
|
10674
10685
|
if (name === "extract_routes" || name === "generate_server_routes") {
|
|
10675
10686
|
return handleRouteTool(name, args);
|
|
10676
10687
|
}
|
|
10677
|
-
if (name
|
|
10688
|
+
if (SAMPLING_TOOL_NAMES.has(name)) {
|
|
10678
10689
|
if (!LLM_SAMPLING_ENABLED) {
|
|
10679
10690
|
return {
|
|
10680
10691
|
content: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperfixi/mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Model Context Protocol server for HyperFixi hyperscript development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"author": "LokaScript Contributors",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@hyperfixi/patterns-reference": "^
|
|
41
|
-
"@lokascript/compilation-service": "^
|
|
40
|
+
"@hyperfixi/patterns-reference": "^3.0.0",
|
|
41
|
+
"@lokascript/compilation-service": "^3.0.0",
|
|
42
42
|
"@lokascript/domains": "^2.11.1",
|
|
43
|
-
"@lokascript/framework": "^
|
|
44
|
-
"@lokascript/planner": "^
|
|
45
|
-
"@lokascript/semantic": "^
|
|
43
|
+
"@lokascript/framework": "^3.0.0",
|
|
44
|
+
"@lokascript/planner": "^3.0.0",
|
|
45
|
+
"@lokascript/semantic": "^3.0.0",
|
|
46
46
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
47
47
|
"yaml": "^2.8.3"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@hyperfixi/core": "^
|
|
51
|
-
"@hyperfixi/patterns-reference": "^
|
|
52
|
-
"@hyperfixi/server-bridge": "^
|
|
53
|
-
"@lokascript/compilation-service": "^
|
|
54
|
-
"@lokascript/framework": "^
|
|
55
|
-
"@lokascript/semantic": "^
|
|
50
|
+
"@hyperfixi/core": "^3.0.0",
|
|
51
|
+
"@hyperfixi/patterns-reference": "^3.0.0",
|
|
52
|
+
"@hyperfixi/server-bridge": "^3.0.0",
|
|
53
|
+
"@lokascript/compilation-service": "^3.0.0",
|
|
54
|
+
"@lokascript/framework": "^3.0.0",
|
|
55
|
+
"@lokascript/semantic": "^3.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"@lokascript/compilation-service": {
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@hyperfixi/core": "^
|
|
79
|
-
"@hyperfixi/patterns-reference": "^
|
|
80
|
-
"@hyperfixi/server-bridge": "^
|
|
81
|
-
"@lokascript/compilation-service": "^
|
|
82
|
-
"@lokascript/framework": "^
|
|
83
|
-
"@lokascript/semantic": "^
|
|
78
|
+
"@hyperfixi/core": "^3.0.0",
|
|
79
|
+
"@hyperfixi/patterns-reference": "^3.0.0",
|
|
80
|
+
"@hyperfixi/server-bridge": "^3.0.0",
|
|
81
|
+
"@lokascript/compilation-service": "^3.0.0",
|
|
82
|
+
"@lokascript/framework": "^3.0.0",
|
|
83
|
+
"@lokascript/semantic": "^3.0.0",
|
|
84
84
|
"@types/node": "^26.1.2",
|
|
85
85
|
"tsup": "^8.0.0",
|
|
86
86
|
"tsx": "^4.23.1",
|