@nifrajs/cli 2.7.0 → 2.8.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/dist/check.d.ts.map +1 -1
- package/dist/check.js +161 -12
- package/dist/check.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +42 -55
- package/dist/cli.js.map +1 -1
- package/dist/dev-bun-config.d.ts +36 -0
- package/dist/dev-bun-config.d.ts.map +1 -0
- package/dist/dev-bun-config.js +179 -0
- package/dist/dev-bun-config.js.map +1 -0
- package/dist/mcp-app-tool.d.ts +1 -1
- package/dist/mcp-app-tool.d.ts.map +1 -1
- package/dist/mcp-app-tool.js +8 -4
- package/dist/mcp-app-tool.js.map +1 -1
- package/dist/mcp-docs-tools.js +1 -1
- package/dist/mcp-docs-tools.js.map +1 -1
- package/dist/mcp-http.d.ts +3 -3
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +4 -4
- package/dist/mcp-http.js.map +1 -1
- package/docs/llms-full.txt +54 -27
- package/docs/types.json +13 -6
- package/package.json +9 -9
- package/src/check.ts +174 -12
- package/src/cli.ts +47 -60
- package/src/dev-bun-config.ts +204 -0
- package/src/mcp-app-tool.ts +8 -4
- package/src/mcp-docs-tools.ts +1 -1
- package/src/mcp-http.ts +4 -4
package/src/mcp-http.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The PUBLIC nifra docs MCP - Streamable-HTTP transport exposing the project-INDEPENDENT tools
|
|
3
|
-
* (`nifra_docs`, `nifra_example`, `nifra_types`, `nifra_learn` + the `
|
|
3
|
+
* (`nifra_docs`, `nifra_example`, `nifra_types`, `nifra_learn` + the `nifra_gallery` MCP Apps widget)
|
|
4
4
|
* so any remote AI agent can learn nifra without a local checkout. They read the bundled corpus
|
|
5
5
|
* (llms-full.txt / examples.json / types.json shipped in this package) and ignore `cwd`, so they reuse the
|
|
6
6
|
* exact definitions from {@link projectTools} - one source, no drift.
|
|
@@ -29,7 +29,7 @@ export { docsTools } from "./mcp-docs-tools.ts"
|
|
|
29
29
|
export type { TypeEntry } from "./types-search.ts"
|
|
30
30
|
|
|
31
31
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
32
|
-
const VERSION = "2.
|
|
32
|
+
const VERSION = "2.8.0"
|
|
33
33
|
const SERVER_INFO = { name: "nifra-docs", version: VERSION }
|
|
34
34
|
// Derive the GET/health tool list from the tools actually served, so the line can never drift from them.
|
|
35
35
|
const docsHealth = (tools: McpTool[]): string =>
|
|
@@ -38,7 +38,7 @@ const docsHealth = (tools: McpTool[]): string =>
|
|
|
38
38
|
.join(", ")}.`
|
|
39
39
|
|
|
40
40
|
/** The project-independent tools, reading the package's bundled corpus from disk (CLI use): the text
|
|
41
|
-
* docs tools plus the `
|
|
41
|
+
* docs tools plus the `nifra_gallery` MCP Apps widget tool. */
|
|
42
42
|
export function publicDocsTools(): McpTool[] {
|
|
43
43
|
return [
|
|
44
44
|
...docsTools(loadDocsCorpus, loadExamplesCorpus, loadTypesCorpus),
|
|
@@ -60,7 +60,7 @@ export function respondMcpHttp(
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/** The CLI HTTP handler: serves the disk-backed corpus tools + registers the examples widget's `ui://`
|
|
63
|
-
* resource so MCP Apps hosts can render `
|
|
63
|
+
* resource so MCP Apps hosts can render `nifra_gallery`. (`nifra docs-mcp` / `bun run` this file.) */
|
|
64
64
|
export function handleMcpHttp(request: Request): Promise<Response> {
|
|
65
65
|
return respondMcpHttp(request, publicDocsTools(), {
|
|
66
66
|
features: {
|