Feat kql expert#137
Merged
Merged
Conversation
…hlighting - Add kql-expert skill (SKILL.md) with 35 triggers, requires-mcp: fabric-rti-mcp - Add requires-mcp frontmatter support in skill-loader + approach-resolver - Add MCP enrichment wiring in agent index.ts - Add --mcp setup-fabric-rti CLI command - Clean generic triggers across 7 skills to prevent false matches - Add hljs-kql.ts grammar (derived from @kusto/monaco-kusto MIT) - Register KQL/Kusto syntax highlighting in markdown-renderer via createRequire - Add intent-matcher regression tests (27 tests: 22 positive + 5 guards) - Add skill-loader tests (8 tests) and approach-resolver MCP tests (8 tests) All 2396 tests pass. Typecheck clean. Fmt clean. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
- Rust: gate [hyperlight-analysis] eprintln! behind HYPERAGENT_VERBOSE/DEBUG env vars - MCP: gate [mcp] Connected/Auth success messages behind isVerbose() - MCP: pipe subprocess stderr when not verbose to suppress Python INFO logs - KQL skill: remove azuremcpserver reference, add anti-pattern to use fabric-rti-mcp only Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
- Add all 9 skills to tables in docs/SKILLS.md, README.md, skills/CLAUDE.md, and .github/instructions/skills.instructions.md (was missing kql-expert, xlsx-expert, mcp-services in various files) - Document requires-mcp frontmatter field in docs/SKILLS.md - Add requires-mcp to YAML examples in instruction files - Alphabetise skill tables for consistency Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds MCP-aware skill support, centered on a new KQL/Kusto expert skill that uses a Fabric RTI MCP server, and updates guidance, CLI setup, rendering, and tests around that workflow.
Changes:
- Adds
requires-mcpskill metadata and propagates MCP requirements into approach guidance. - Adds Fabric RTI setup plumbing and KQL syntax highlighting.
- Expands/refines skill definitions, documentation, and intent/loader/resolver tests.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
src/agent/skill-loader.ts |
Parses requires-mcp metadata into loaded skills. |
src/agent/approach-resolver.ts |
Adds required MCP/status fields and MCP guidance formatting. |
src/agent/index.ts |
Enriches auto-generated guidance with runtime MCP server status. |
src/agent/cli-parser.ts |
Adds --mcp-setup-fabric-rti CLI parsing. |
src/agent/mcp/setup-commands.ts |
Adds Fabric RTI MCP setup command. |
src/agent/mcp/client-manager.ts |
Adjusts MCP logging/stderr verbosity handling. |
src/agent/markdown-renderer.ts |
Registers KQL highlighting for terminal markdown. |
src/agent/hljs-kql.ts |
Adds highlight.js grammar for KQL/Kusto. |
src/code-validator/guest/host/src/runtime.rs |
Gates runtime lifecycle logs behind verbose/debug env vars. |
skills/kql-expert/SKILL.md |
Adds new KQL expert skill requiring Fabric RTI MCP. |
skills/api-explorer/SKILL.md |
Refines API triggers. |
skills/data-processor/SKILL.md |
Refines data-processing triggers. |
skills/mcp-services/SKILL.md |
Refines MCP service triggers. |
skills/pdf-expert/SKILL.md |
Refines PDF triggers. |
skills/report-builder/SKILL.md |
Refines report triggers. |
skills/research-synthesiser/SKILL.md |
Refines research triggers. |
skills/web-scraper/SKILL.md |
Refines scraping triggers. |
skills/CLAUDE.md |
Updates skill documentation and metadata template. |
.github/instructions/skills.instructions.md |
Updates skill instruction template/list. |
docs/SKILLS.md |
Documents MCP dependencies and updated skills. |
README.md |
Adds KQL expert to the skills overview. |
tests/skill-loader.test.ts |
Adds skill loader coverage, including requires-mcp. |
tests/approach-resolver.test.ts |
Adds MCP requirement/status formatting tests. |
tests/intent-matcher.test.ts |
Adds real skill intent matching regression tests. |
Comments suppressed due to low confidence (1)
src/agent/hljs-kql.ts:350
- Because the shorter alternatives (
create,alter,set, etc.) appear before their hyphenated forms and\bmatches before-, commands such as.create-or-alterand.set-or-appendwill be highlighted only as.create/.set. Put longer hyphenated commands first or use a boundary that does not split on hyphens.
const COMMAND: Mode = {
className: "meta",
begin:
/\.(show|create|alter|drop|set|append|delete|rename|move|replace|ingest|export|create-or-alter|alter-merge|create-merge|set-or-append|set-or-replace|drop-pretend)\b/,
};
Comment on lines
+694
to
+699
| * Returns true when HYPERAGENT_VERBOSE=1 or HYPERAGENT_DEBUG=1. | ||
| */ | ||
| function isVerbose(): boolean { | ||
| return ( | ||
| process.env.HYPERAGENT_VERBOSE === "1" || | ||
| process.env.HYPERAGENT_DEBUG === "1" |
Comment on lines
+470
to
+473
| // When not in verbose/debug mode, pipe subprocess stderr so MCP server | ||
| // log output (e.g. Python INFO lines) doesn't leak to the terminal. | ||
| // In verbose mode, inherit so the user sees everything. | ||
| const stderr = isVerbose() ? "inherit" : "pipe"; |
- Fix hyperlight-dev#2: Use MCP_SETUP_COMMANDS lookup for correct CLI setup hints (was generating 'setup-rti-mcp' instead of '--mcp-setup-fabric-rti') - Fix hyperlight-dev#3: Show unconfigured status when mcpManager is null - Fix hyperlight-dev#4: Update test assertion to match corrected setup command - Fix hyperlight-dev#5: Add highlight.js ^10.7.3 as explicit dependency (was transitive) - Fix hyperlight-dev#6: Validate Fabric RTI options — reject missing values & unknown flags - Fix hyperlight-dev#7: Set HYPERAGENT_VERBOSE=1 from cli.verbose flag - Fix hyperlight-dev#8: Update skill count from 9 to 10 in docs/SKILLS.md - Fix hyperlight-dev#9: Use stderr 'ignore' instead of 'pipe' to avoid back-pressure - Fix hyperlight-dev#10: Add CLI parser test for --mcp-setup-fabric-rti flag Comment hyperlight-dev#1 (hljs types) is invalid — typecheck passes with /// <reference>. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
simongdavies
added a commit
that referenced
this pull request
May 15, 2026
* docs: changelog for v0.6.0 Move [Unreleased] section to [v0.6.0] - 2026-05-15 covering the 23 commits landed on upstream/main since v0.5.0: Added: - User-generated skills from session learnings (#139) - KQL expert skill with requires-mcp frontmatter and Kusto highlighting (#137) - Terminal markdown rendering via marked + marked-terminal (#135, #136) - Verbose/debug gating for diagnostic output (#137) - execute_bash large output interception (#134) Fixed: - marked v15 + marked-terminal v7 incompat in markdown-renderer (#138) - HybridFs sandbox /tmp path mapping + adapter refactor (#134) - Prettier mangling of nested template literals in styled output (#134) - Full error text now wrapped in C.err() across 11 paths (#135) - /markdown toggle now flips sessionNeedsRebuild (#136) - looksLikeMarkdown false positives on bold/unordered-list (#136) Changed: - Dependency bumps: msal-node 5.2.1, tsx 4.22.0, @types/node 25.8.0, tokio in code-validator guest (#142, #143, #146, #147) Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> * fix: address PR #148 review feedback (3 issues) CHANGELOG.md: - Fabric RTI CLI flag: `--mcp setup-fabric-rti` was wrong, actual flag in src/agent/cli-parser.ts is `--mcp-setup-fabric-rti` (single hyphenated token). Users copy-pasting the old form would hit "unknown argument" - Terminal markdown rendering default: said "raw streaming remains the default" but cli-parser.ts sets `markdown: process.env.HYPERAGENT_MARKDOWN !== "0"` (default ON) and `--[no-]markdown` help text confirms default: on. Reworded to make default-on explicit and document the three opt-out paths - Missing link reference: added `[v0.6.0]: https://github.com/hyperlight-dev/hyperagent/releases/tag/v0.6.0` to match the existing reference-style link section No code changes. Prettier clean. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> --------- Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for skills that require connection to external MCP (Modular Control Plane) servers, such as Fabric RTI for Kusto/KQL queries. It updates the skill documentation and metadata formats to declare MCP server dependencies, extends the approach resolver to collect and report MCP server requirements and statuses, and enhances CLI tooling for MCP server setup. The changes also expand and clarify the available skills and their triggers across documentation and skill files.
Skill system enhancements:
requires-mcpfield to skill metadata (in.mdandSKILL.mdfiles) to declare MCP server dependencies for skills. This allows the agent to check and report required external server connections for a skill to function.docs/SKILLS.md,README.md, and skill files) to explain MCP server dependencies, enumerate new and existing skills, and clarify their descriptions and triggers.Approach resolver and runtime guidance:
MaterialisedGuidanceinterface and approach resolver logic to collect required MCP servers (requiredMcp) and their runtime statuses (mcpStatus). This enables the agent to inform the LLM and user about MCP connection requirements and current connection state.CLI tooling:
--mcp-setup-fabric-rtifor configuring the Fabric RTI (Kusto/KQL) MCP server, supporting easier setup for skills that require this backend.Skill trigger and pattern improvements:
api-explorer,data-processor,pdf-expert,report-builder,research-synthesiser,web-scraper,mcp-services) to improve skill matching and clarify their capabilities.