@nera-static/mcp 1.4.0 → 1.4.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nera",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Create, edit, build, validate, preview and publish websites made with Nera, a static site generator: the Nera skill plus the Nera MCP server, which works only inside the sites folder you pick on enable.",
5
5
  "author": {
6
6
  "name": "Michael Becker"
@@ -29,7 +29,7 @@
29
29
  "command": "npx",
30
30
  "args": [
31
31
  "-y",
32
- "@nera-static/mcp@1.4.0",
32
+ "@nera-static/mcp@1.4.1",
33
33
  "--root",
34
34
  "${user_config.root}"
35
35
  ]
package/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ All notable changes to this project 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
+ ## [1.4.1] - 2026-11-28
9
+
10
+ ### Fixed
11
+
12
+ - `read_page` and `write_page`, local and hosted, split a page into frontmatter and body exactly as the build does: a lone carriage return counts as a line break, and a first line with text after `---` is no frontmatter fence. An unquoted date in the frontmatter (`date: 2026-11-28`) is read back as the text that was written.
13
+ - The hosted `validate` reads pages the way `@nera-static/validate` does: merge keys (`<<`) in a page's frontmatter resolve, an unclosed fence is no frontmatter, pages in dot folders (e.g. `pages/.drafts/`) are skipped, and a folder whose name starts with `..` (e.g. `..pages`) counts as inside the repository.
14
+ - `list_sites` and the hosted `list_sites` sort by code unit, so the order is the same on every machine instead of depending on the locale.
15
+ - A hosted file path with a DEL or C1 control character is refused like one with any other control character, as its message already said.
16
+
17
+ ### Changed
18
+
19
+ - The generic helpers (path containment, frontmatter splitting, package names, sorting, version floors, HTML escaping, the server's own version) come from `@nera-static/plugin-utils` 1.9.0 instead of local copies, and `@nera-static/nera` is required at ^1.31.0. Tool names, input schemas, result shapes, resources and prompts are unchanged.
20
+ - The repository is linted with `@nera-static/stan` and tested on `@nera-static/test-utils` (development only).
21
+
8
22
  ## [1.4.0] - 2026-11-23
9
23
 
10
24
  ### Added
package/bin/nera-mcp.js CHANGED
@@ -80,10 +80,10 @@ if (options.help) {
80
80
  process.exit(0)
81
81
  }
82
82
 
83
- const { default: pkg } = await import('../package.json', { with: { type: 'json' } })
83
+ const { SERVER_INFO: { version } } = await import('../src/server-info.js')
84
84
 
85
85
  if (options.version) {
86
- process.stdout.write(`${pkg.version}\n`)
86
+ process.stdout.write(`${version}\n`)
87
87
  process.exit(0)
88
88
  }
89
89
 
@@ -108,7 +108,9 @@ if (options.http) {
108
108
  /** The local mode: one server for one client, over stdin and stdout. */
109
109
  async function serveStdio() {
110
110
  // the server and the Nera packages it loads come last: only the server needs them
111
- const [{ StdioServerTransport }, { createServer }, { createProcesses }, { PathError }, { setupRuntime }] = await Promise.all([
111
+ const [
112
+ { StdioServerTransport }, { createServer }, { createProcesses }, { PathError }, { setupRuntime },
113
+ ] = await Promise.all([
112
114
  import('@modelcontextprotocol/sdk/server/stdio.js'),
113
115
  import('../src/server.js'),
114
116
  import('../src/processes.js'),
@@ -165,7 +167,7 @@ async function serveStdio() {
165
167
  process.stdout.on('error', () => shutdown(0))
166
168
 
167
169
  await server.connect(new StdioServerTransport())
168
- console.error(`nera-mcp ${pkg.version}: serving Nera sites under ${options.root} over stdio`)
170
+ console.error(`nera-mcp ${version}: serving Nera sites under ${options.root} over stdio`)
169
171
  }
170
172
 
171
173
  /**
@@ -179,7 +181,8 @@ async function serveHttp() {
179
181
  // before anything imports the store: on an older Node, `node:sqlite` would
180
182
  // fail with an error that does not say what to do
181
183
  if (!hasNodeSqlite(process.versions.node)) {
182
- fail(`the hosted mode (--http) needs Node 22.13 or later (for node:sqlite); this is Node ${process.versions.node}.`)
184
+ fail('the hosted mode (--http) needs Node 22.13 or later (for node:sqlite); this is ' +
185
+ `Node ${process.versions.node}.`)
183
186
  }
184
187
 
185
188
  let config
@@ -195,7 +198,9 @@ async function serveHttp() {
195
198
  }
196
199
  const host = options.host ?? DEFAULT_HOST
197
200
 
198
- const [{ createServer }, { createHostedApp, GITHUB_CALLBACK_PATH }, { createGitHubClient }, { createStore }] = await Promise.all([
201
+ const [
202
+ { createServer }, { createHostedApp, GITHUB_CALLBACK_PATH }, { createGitHubClient }, { createStore },
203
+ ] = await Promise.all([
199
204
  import('node:http'),
200
205
  import('../src/hosted/app.js'),
201
206
  import('../src/hosted/github.js'),
@@ -262,5 +267,6 @@ async function serveHttp() {
262
267
  process.on('SIGTERM', shutdown)
263
268
 
264
269
  const address = server.address()
265
- console.error(`nera-mcp ${pkg.version}: hosted mode for ${new URL(config.issuer).origin}, listening on ${address.address}:${address.port}`)
270
+ console.error(`nera-mcp ${version}: hosted mode for ${new URL(config.issuer).origin}, listening ` +
271
+ `on ${address.address}:${address.port}`)
266
272
  }