archprint 0.7.0 → 0.7.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.
- package/CHANGELOG.md +10 -0
- package/README.md +11 -8
- package/dist/mcp/remote/http.d.ts.map +1 -1
- package/dist/mcp/remote/http.js +2 -1
- package/dist/mcp/remote/http.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# archprint
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The remote MCP server now answers health checks at `/health` as well as `/healthz`. Cloud Run reserves `/healthz` and answers it before the request reaches the server, so use `/health` there.
|
|
8
|
+
|
|
9
|
+
The docs now say plainly which server to use for what: the local stdio server (`archprint mcp`) is the one for private code, because it reads your local checkout and your source never leaves your machine; the remote HTTP server scans public repositories by URL, and since every request clones and scans, a hosted instance belongs behind authentication.
|
|
10
|
+
|
|
11
|
+
- Refresh the README so it describes the current release: the sample CLI output no longer shows an old version banner, and the wording about the `.archprint/` layout is stated as when it arrived rather than as the latest release, so it stays accurate in future versions.
|
|
12
|
+
|
|
3
13
|
## 0.7.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ Nothing that could be wrong is written as enforcement without you opting in.
|
|
|
41
41
|
> reversible in one command (`archprint eject`), and deterministic, and a rule archprint marks
|
|
42
42
|
> "enforce now" is checked to pass on your code before it says so. `scan` and `recommend` are stable;
|
|
43
43
|
> the structural families stay review-only while they are hardened. Versioning is still 0.x, so the CLI
|
|
44
|
-
> surface and rule format can refine between minor versions (the
|
|
45
|
-
>
|
|
44
|
+
> surface and rule format can refine between minor versions (the compact `.archprint/` layout arrived in
|
|
45
|
+
> 0.6.0; `archprint migrate` upgrades an older setup in place), but the analysis is not experimental.
|
|
46
46
|
|
|
47
47
|
## What makes it different
|
|
48
48
|
|
|
@@ -138,7 +138,7 @@ A real scan of [inbox-zero](https://github.com/elie222/inbox-zero) (`apps/web`,
|
|
|
138
138
|
trimmed:
|
|
139
139
|
|
|
140
140
|
```
|
|
141
|
-
Archprint v0.
|
|
141
|
+
Archprint v0.7.1
|
|
142
142
|
Scanned 2,232 TypeScript files
|
|
143
143
|
Workspace aliases: 18 resolved
|
|
144
144
|
|
|
@@ -257,14 +257,17 @@ Code, Cursor, or any MCP client at it:
|
|
|
257
257
|
}
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
That default is a local stdio server
|
|
260
|
+
That default is a local stdio server, and it is the one to use for private code: it runs on your machine against
|
|
261
|
+
your local checkout, so your source never leaves it, whichever git host you use.
|
|
261
262
|
|
|
262
263
|
To scan a public repository by URL instead, run a remote server over HTTP with `archprint mcp --http`. It clones
|
|
263
264
|
the repo shallow to a temp dir, runs the same read-only analysis, returns the result, and deletes the clone (only
|
|
264
265
|
public `github.com`, `gitlab.com`, and `bitbucket.org` URLs; nothing is written or kept). The tools then take a
|
|
265
266
|
`repo` URL (and an optional `ref`). It listens on `0.0.0.0:8848/mcp` by default (set `--host 127.0.0.1` to keep it
|
|
266
|
-
to your own machine, or `--port`/`$PORT` to change the port)
|
|
267
|
-
|
|
267
|
+
to your own machine, or `--port`/`$PORT` to change the port) and answers health checks at `/health` (use this one
|
|
268
|
+
on Cloud Run, which reserves `/healthz`) and `/healthz`. Every request clones and scans, so a server anyone can
|
|
269
|
+
reach spends compute on anyone's behalf: keep it behind authentication, such as Cloud Run's IAM, unless you accept
|
|
270
|
+
that cost.
|
|
268
271
|
|
|
269
272
|
The tools are read-only (they never write to the repo); use the CLI's `generate`/`wire` to actually emit and
|
|
270
273
|
enforce rules.
|
|
@@ -331,8 +334,8 @@ graph) is in place and tested, and an adversarial correctness audit (three round
|
|
|
331
334
|
the false-positive rate on auto-generated rules to zero for the mechanical families, which is why those
|
|
332
335
|
auto-enforce while the structural-inference families are held for review. Versioning is still 0.x, so the CLI
|
|
333
336
|
surface and rule format can refine between minor versions, that is a maturing surface, not experimental
|
|
334
|
-
analysis; the
|
|
335
|
-
|
|
337
|
+
analysis; the compact `.archprint/` layout arrived in 0.6.0, and `archprint migrate` upgrades an older setup
|
|
338
|
+
in place.
|
|
336
339
|
|
|
337
340
|
Production-ready today: `scan` and `recommend` (insight), and auto-enforcement of the mechanical families,
|
|
338
341
|
with a self-consistency check at generate time, an `init` scaffolder for fresh repos, and framework coverage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/mcp/remote/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAC;AAEjG,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAGrF,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,SAAS,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/mcp/remote/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,MAAM,EAAuB,MAAM,WAAW,CAAC;AAEjG,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAGrF,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,SAAS,CAAC;CACjC;AAOD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CA2C/F"}
|
package/dist/mcp/remote/http.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createServer } from 'node:http';
|
|
|
2
2
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
3
3
|
import { createRemoteServer } from './server.js';
|
|
4
4
|
const MCP_PATH = '/mcp';
|
|
5
|
+
const HEALTH_PATHS = new Set(['/health', '/healthz']);
|
|
5
6
|
const DEFAULT_MAX_CONCURRENT = 4;
|
|
6
7
|
const DEFAULT_MAX_BODY_BYTES = 1024 * 1024;
|
|
7
8
|
export function createRemoteHttpServer(version, options = {}) {
|
|
@@ -12,7 +13,7 @@ export function createRemoteHttpServer(version, options = {}) {
|
|
|
12
13
|
async function serve(req, res) {
|
|
13
14
|
try {
|
|
14
15
|
const url = new URL(req.url ?? '/', 'http://localhost');
|
|
15
|
-
if (req.method === 'GET' && url.pathname
|
|
16
|
+
if (req.method === 'GET' && HEALTH_PATHS.has(url.pathname))
|
|
16
17
|
return drainAnd(req, res, 200, { status: 'ok' });
|
|
17
18
|
if (req.method === 'GET' && url.pathname === MCP_PATH) {
|
|
18
19
|
return drainAnd(req, res, 405, { error: 'This server is stateless; use POST to /mcp.' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/mcp/remote/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAQjD,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,UAAU,sBAAsB,CAAC,OAAe,EAAE,UAA6B,EAAE;IACrF,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,sBAAsB,CAAC;IACtE,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,sBAAsB,CAAC;IACpE,MAAM,aAAa,GAAG,OAAO,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