Skip to content

Add a token for the HTTP mode, AgenC and quoted names; version 0.5.0 - #6

Merged
RunTimeAdmin merged 5 commits into
mainfrom
fix/outside-review-oct29
Oct 29, 2026
Merged

RunTimeAdmin merged 5 commits into
mainfrom
fix/outside-review-oct29

Conversation

@RunTimeAdmin

Copy link
Copy Markdown
Owner

What

Version 0.5.0 of the MCP package. It answers the second outside security review of 29 October 2026, each finding of which was checked against the code the same day. Five commits, one per change.

  • A token for the HTTP mode off this machine (F-01). --allow-remote alone no longer starts the server. It also needs NOOSCAPE_MCP_TOKEN, a secret of at least 24 characters, and every request must carry it as Authorization: Bearer <secret>. It is compared in constant time and checked before the path and the method, so a caller without it learns nothing else; a request without it gets a 401 with WWW-Authenticate. On this machine the Host and Origin checks still come first, and a token that is set is required on any address. A set token shorter than 24 characters stops the start. The README says the secret is one for everybody, that it travels in the clear unless TLS is in front, and that per-caller keys, limits and a log are a hosted product this is not.
  • Limits on a caller. 10 seconds for the headers, 30 for a whole request and 64 connections at once (Node's defaults are a minute, five minutes and no cap). Every request the server accepts makes one to the API with the server's one key.
  • solana_agenc is accepted wherever a Solana registry is chosen (get_agent, get_agent_history, the check). The API names four registries in an ambiguity answer and the tools took three.
  • Names are quoted (F-03). An agent's name is shown in quotation marks, with a quotation mark or backslash inside it escaped, so it cannot close its own quotes. Every owner field and a claim edit's new value get the same quoting. The instructions to the model say that names are the registrant's words and data. The JSON under each summary is unchanged. This lowers the chance that a model takes such text for an instruction. It does not remove it.
  • Version 0.5.0 in package.json, server.json (twice), manifest.json and the README's pin example. A minor version, because starting the HTTP mode off this machine now needs the token.

Checked

  • 132 tests pass (115 before), the type check passes and the build runs. npm pack --dry-run: 17 files, 24.2 kB, shasum f3b1fc7eaeb7f9bc4cfa4bb5b53cbd4717d4b226.
  • Each new test was shown to fail when the change it covers is taken out: 14 planted bugs across the four changes, each caught.
  • scripts/live-check.mjs against the live API: all 14 checks.
  • By hand with the built program: all four refusals exit 2 with a message that names NOOSCAPE_MCP_TOKEN and never echoes a token. A started server answers 401 without a token or with a wrong one and 200 with it, and a get_stats call through it reaches the live API. With --allow-remote on an address that is not local (127.0.0.2, so no port was opened to the network) it prints the warning and needs the token.
  • The commits are authored and committed as the account's noreply address.

Merge with squash. Publishing 0.5.0 to npm and the registry is done by hand from a clean checkout of main after the merge.

🤖 Generated with Claude Code

RunTimeAdmin and others added 5 commits October 29, 2026 06:38
--allow-remote on its own let anyone who could reach the port use the
server's one API key. It now also needs NOOSCAPE_MCP_TOKEN, a secret of at
least 24 characters, and the program refuses to start without it.

Every request must then carry the secret as Authorization: Bearer. It is
compared in constant time (both sides hashed first), checked before the
path and the method so a caller without it learns nothing else, and
answered with a 401 and a WWW-Authenticate line. On this machine the Host
and Origin checks still come first. A token that is set is required on any
address, and a set token shorter than 24 characters stops the start, so a
weak secret is never used quietly.

The help text and the README say the secret is one for everybody, that it
travels in the clear unless TLS is in front, and that per-caller keys,
limits and a log are a hosted product this is not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Every request the HTTP mode accepts makes one to the API with the server's
one key, so how long a caller may take to send a request and how many
connections it may hold are now limited: 10 seconds for the headers, 30
seconds for the whole request, 64 connections. Node's defaults are a
minute, five minutes and no cap.

Tests pin the three settings and show that the 65th connection is dropped
and that a place freed is used again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The API lists four Solana registries and answers an ambiguous address with
a 409 that names them, but the tools took three: a caller told to say which
registry could not name AgenC. get_agent, get_agent_history and the check
now accept solana_agenc, and a test ties the list to what the API names in
that answer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A registrant chooses an agent's name, and the summaries put it into a
sentence as if it were Nooscape's own words. Names now appear in quotation
marks, and the instructions to the model say that they are the registrant's
words and data, as an owner's text already was.

The quoting escapes a quotation mark or a backslash inside the text, so a
name cannot close its own quotes and let the rest read as part of the
summary. The same quoting now covers every owner field (name, website,
description, links) and a claim edit's new value, which were quoted only in
part or not at all.

The JSON under each summary is still the API's, exactly as it was given.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
package.json, server.json (twice), manifest.json and the README's pin
example now say 0.5.0. The release changes how the HTTP mode is started off
this machine (it needs NOOSCAPE_MCP_TOKEN), so it is a minor version.
Publishing to npm and the registry is done by hand from a clean checkout of
main after the merge.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@RunTimeAdmin
RunTimeAdmin merged commit c444326 into main Oct 29, 2026
1 check passed
@RunTimeAdmin
RunTimeAdmin deleted the fix/outside-review-oct29 branch November 2, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant