faxforagents-mcp 0.5.8 → 0.5.9
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 +7 -0
- package/README.md +13 -1
- package/dist/index.js +8 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.9 (2026-11-18)
|
|
4
|
+
|
|
5
|
+
The server drops the trailing slashes of the API base URL and of the dashboard URL with a scan instead of the regex `/\/+$/`.
|
|
6
|
+
The regex took quadratic time when a long run of slashes did not end the URL: 24 s for 100,000 slashes on Node 22.
|
|
7
|
+
The base URL comes from `FAXFORAGENTS_API_URL`, so only the person who sets it could reach that path.
|
|
8
|
+
The tools, their schemas, the resources and the prompts did not change. `test/base-url.mjs` checks the trim and its time.
|
|
9
|
+
|
|
3
10
|
## 0.5.8 (2026-11-18)
|
|
4
11
|
|
|
5
12
|
The stdio server follows the hosted server at API 1.21.12. Every tool returns only the fields its output schema declares, as the hosted server does since 1.21.11.
|
package/README.md
CHANGED
|
@@ -298,7 +298,7 @@ A refusal from the REST API names the tool's argument, as the hosted server's do
|
|
|
298
298
|
This holds in `details.field`, `details.fields`, the `loc` of a validation error and a message that starts with the field. `test/argument-names.mjs` checks it.
|
|
299
299
|
Protocol errors, such as a non-object arguments container, remain JSON-RPC errors.
|
|
300
300
|
Tests use hosted responses recorded on 2026-11-02 and a local fake REST API. They need no hosted credentials.
|
|
301
|
-
The tool snapshot is the hosted server's `tools/list` of 2026-11-
|
|
301
|
+
The tool snapshot is the hosted server's `tools/list` of 2026-11-18 at API 1.21.12. Normal tests never contact the hosted server.
|
|
302
302
|
`test/hosted-unknown-arguments.json` holds what the hosted source answers for 20 calls with unknown arguments. `test/validation.mjs` compares each one.
|
|
303
303
|
The server does not start when a handler's inputs differ from the tool list. `test/inputs.mjs` calls every listed input over stdio. A wrong type has to be refused and the listed example accepted. An argument a tool does not list has to be refused by name.
|
|
304
304
|
To import definitions before deployment, run the following with the product checkout's Python environment.
|
|
@@ -310,6 +310,18 @@ python -B scripts/import-hosted.py /path/to/product-checkout
|
|
|
310
310
|
This copies tool definitions, output schemas, the snapshot, plugin tools and guide without writing to the product checkout.
|
|
311
311
|
The guide keeps this package's version and `FAXFORAGENTS_API_KEY` environment name.
|
|
312
312
|
|
|
313
|
+
### Releasing
|
|
314
|
+
|
|
315
|
+
1. Set the new version in `package.json` and its lock, `server.json`, `manifest.json`, `lhm.plugin.json`,
|
|
316
|
+
`.claude-plugin/plugin.json`, the tool-store manifest and `src/version.ts`, and add a `CHANGELOG.md` entry.
|
|
317
|
+
2. Merge, tag `vX.Y.Z` on `main` and publish a GitHub release for the tag. `publish.yml` then publishes to npm
|
|
318
|
+
and the MCP Registry. It refuses a tag that differs from `package.json` or `server.json`.
|
|
319
|
+
3. Refresh the LobeHub listing from the repository root. No workflow does this step.
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
npx -y @lobehub/market-cli plugin update # reads lhm.plugin.json; the owner signs in once with `lhm login`
|
|
323
|
+
```
|
|
324
|
+
|
|
313
325
|
## Licence
|
|
314
326
|
|
|
315
327
|
MIT. See [LICENSE](LICENSE). Security reports go to hello@faxforagents.com, see [SECURITY.md](SECURITY.md).
|
package/dist/index.js
CHANGED
|
@@ -13,10 +13,15 @@ import { createHash } from "crypto";
|
|
|
13
13
|
import { z as z3 } from "zod";
|
|
14
14
|
|
|
15
15
|
// src/version.ts
|
|
16
|
-
var VERSION = "0.5.
|
|
16
|
+
var VERSION = "0.5.9";
|
|
17
17
|
|
|
18
18
|
// src/api.ts
|
|
19
19
|
var DEFAULT_BASE_URL = "https://api.faxforagents.com";
|
|
20
|
+
function trimTrailingSlashes(url) {
|
|
21
|
+
let end = url.length;
|
|
22
|
+
while (end > 0 && url.charCodeAt(end - 1) === 47) end -= 1;
|
|
23
|
+
return url.slice(0, end);
|
|
24
|
+
}
|
|
20
25
|
var ApiRefusal = class extends Error {
|
|
21
26
|
constructor(status, code, message, details, retryAfter) {
|
|
22
27
|
super(message);
|
|
@@ -8614,7 +8619,7 @@ var ENDED = /* @__PURE__ */ new Set(["delivered", "partial", "failed", "unknown"
|
|
|
8614
8619
|
function faxOut(job, appUrl = APP_URL) {
|
|
8615
8620
|
const shaped = shapeAs("FaxJob", job);
|
|
8616
8621
|
if (ENDED.has(String(job.state)) && job.id)
|
|
8617
|
-
shaped.receipt_url = `${appUrl
|
|
8622
|
+
shaped.receipt_url = `${trimTrailingSlashes(appUrl)}/app/faxes/${String(job.id)}#receipt`;
|
|
8618
8623
|
return shaped;
|
|
8619
8624
|
}
|
|
8620
8625
|
function attemptOut(attempt) {
|
|
@@ -8764,7 +8769,7 @@ var idem = () => sendable(z3.string().max(255));
|
|
|
8764
8769
|
var replay = (key) => key ? { headers: { "Idempotency-Key": key } } : {};
|
|
8765
8770
|
function createServer(opts = {}) {
|
|
8766
8771
|
const key = (opts.apiKey ?? "").trim();
|
|
8767
|
-
const baseUrl2 = (opts.baseUrl ?? DEFAULT_BASE_URL)
|
|
8772
|
+
const baseUrl2 = trimTrailingSlashes(opts.baseUrl ?? DEFAULT_BASE_URL);
|
|
8768
8773
|
const appUrl = opts.appUrl ?? APP_URL;
|
|
8769
8774
|
const server = new McpServer(
|
|
8770
8775
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "faxforagents-mcp",
|
|
3
3
|
"mcpName": "io.github.faxforagents/faxforagents-mcp",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.9",
|
|
5
5
|
"description": "MCP server for Fax for Agents: let Claude, Cursor, Codex and other agents send and receive faxes through the Fax for Agents API, with quotes, human review, delegated policies, delivery evidence, guide resources and prompts.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"mcp",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"pack:mcpb": "npm run build:mcpb && npx @anthropic-ai/mcpb pack . faxforagents-mcp.mcpb",
|
|
47
47
|
"pack:tool-store": "node scripts/pack-tool-store.mjs",
|
|
48
48
|
"typecheck": "tsc --noEmit",
|
|
49
|
-
"test": "node test/inputs.mjs && node test/protocol.mjs && node test/tools-output.mjs && node test/parity.mjs && node test/validation.mjs && node test/argument-names.mjs && node test/output-schema.mjs && node test/output-allowlist.mjs",
|
|
49
|
+
"test": "node test/inputs.mjs && node test/protocol.mjs && node test/tools-output.mjs && node test/parity.mjs && node test/validation.mjs && node test/argument-names.mjs && node test/output-schema.mjs && node test/output-allowlist.mjs && node test/base-url.mjs",
|
|
50
50
|
"test:live": "node test/live.mjs",
|
|
51
51
|
"prepare": "npm run build",
|
|
52
52
|
"prepublishOnly": "npm run build"
|