mrmainspring 0.1.1 → 0.1.2
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/README.md +36 -36
- package/dist/config.js +1 -1
- package/package.json +62 -61
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# Mr Mainspring
|
|
2
|
-
|
|
3
|
-
Installable MCP backend for local agent demos. It exposes memory, Grimoire
|
|
4
|
-
policy/secret storage, payment intent tools, audit trail tools, Casper anchoring
|
|
5
|
-
boundaries, and x402 settlement-provider wiring.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
1
|
+
# Mr Mainspring
|
|
2
|
+
|
|
3
|
+
Installable MCP backend for local agent demos. It exposes memory, Grimoire
|
|
4
|
+
policy/secret storage, payment intent tools, audit trail tools, Casper anchoring
|
|
5
|
+
boundaries, and x402 settlement-provider wiring.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
9
|
```bash
|
|
10
10
|
npm install -g mrmainspring
|
|
11
11
|
mainspring setup cursor
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Run the stdio MCP server:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
mainspring
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
For local development from this repository:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm run build
|
|
24
|
-
npm run mcp:stdio
|
|
25
|
-
```
|
|
26
|
-
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
mainspring
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For local development from this repository:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm run build
|
|
24
|
+
npm run mcp:stdio
|
|
25
|
+
```
|
|
26
|
+
|
|
27
27
|
## Environment
|
|
28
28
|
|
|
29
29
|
No environment variables are required for local memory, Grimoire, audit, or
|
|
30
30
|
payment preflight tools. `mainspring setup` creates the local config, data, and
|
|
31
31
|
logs directories under the user's standard app config folder. Use
|
|
32
32
|
`SIGIL_ENV_FILE` to point at a specific env file for advanced setups.
|
|
33
|
-
|
|
34
|
-
Important package boundaries:
|
|
35
|
-
|
|
33
|
+
|
|
34
|
+
Important package boundaries:
|
|
35
|
+
|
|
36
36
|
- Keep `.env`, local keys, and generated demo data outside the npm package.
|
|
37
|
-
- Real Casper submission remains gated by `CASPER_ENABLE_REAL_SUBMISSION=true`.
|
|
38
|
-
- Real x402 settlement remains gated by `X402_ENABLE_REAL_SETTLEMENT=true` and
|
|
39
|
-
a configured `X402_SIGNER_URL`.
|
|
40
|
-
- The signer private key must live outside the repository workspace.
|
|
41
|
-
|
|
42
|
-
## Library Entry
|
|
43
|
-
|
|
44
|
-
```ts
|
|
45
|
-
import { createSigilServer } from "mrmainspring";
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The CLI entry is also exported as `mrmainspring/mcp`, but importing it starts
|
|
49
|
-
the stdio server; use the package bin for normal MCP client configuration.
|
|
37
|
+
- Real Casper submission remains gated by `CASPER_ENABLE_REAL_SUBMISSION=true`.
|
|
38
|
+
- Real x402 settlement remains gated by `X402_ENABLE_REAL_SETTLEMENT=true` and
|
|
39
|
+
a configured `X402_SIGNER_URL`.
|
|
40
|
+
- The signer private key must live outside the repository workspace.
|
|
41
|
+
|
|
42
|
+
## Library Entry
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { createSigilServer } from "mrmainspring";
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The CLI entry is also exported as `mrmainspring/mcp`, but importing it starts
|
|
49
|
+
the stdio server; use the package bin for normal MCP client configuration.
|
package/dist/config.js
CHANGED
|
@@ -14,7 +14,7 @@ export function loadConfig(env = process.env) {
|
|
|
14
14
|
memoryAnchorPackageHash: optionalEnv(env.MEMORY_ANCHOR_PACKAGE_HASH),
|
|
15
15
|
submissionEnabled: parseBoolean(env.CASPER_ENABLE_REAL_SUBMISSION),
|
|
16
16
|
clientBin: optionalEnv(env.CASPER_CLIENT_BIN) ?? "casper-client",
|
|
17
|
-
clientWslDistro: optionalEnv(env.CASPER_CLIENT_WSL_DISTRO),
|
|
17
|
+
clientWslDistro: process.platform === "win32" ? optionalEnv(env.CASPER_CLIENT_WSL_DISTRO) : null,
|
|
18
18
|
anchorSubmissionMode: parseCasperAnchorSubmissionMode(env.CASPER_ANCHOR_SUBMISSION_MODE),
|
|
19
19
|
gasPriceTolerance: optionalEnv(env.CASPER_GAS_PRICE_TOLERANCE) ?? "10",
|
|
20
20
|
pricingMode: optionalEnv(env.CASPER_PRICING_MODE) ?? "classic",
|
package/package.json
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mrmainspring",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Mr Mainspring MCP backend with memory, Grimoire policies, audit, Casper anchoring, and x402 settlement boundaries.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"mainspring": "dist/index.js"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"dist/**/*.
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"demo:
|
|
37
|
-
"demo:x402-
|
|
38
|
-
"demo:x402-sidecars
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"x402:
|
|
46
|
-
"x402:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "mrmainspring",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Mr Mainspring MCP backend with memory, Grimoire policies, audit, Casper anchoring, and x402 settlement boundaries.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mainspring": "dist/index.js",
|
|
9
|
+
"mrmainspring": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/server.js",
|
|
12
|
+
"types": "./dist/server.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/server.d.ts",
|
|
16
|
+
"import": "./dist/server.js"
|
|
17
|
+
},
|
|
18
|
+
"./mcp": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/**/*.js",
|
|
29
|
+
"dist/**/*.d.ts",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"README.md",
|
|
32
|
+
"package.json"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc -p tsconfig.json",
|
|
36
|
+
"demo:stdio": "npm run build && tsx scripts/demo-stdio.ts",
|
|
37
|
+
"demo:x402-http": "tsx scripts/x402-demo-http-server.ts",
|
|
38
|
+
"demo:x402-sidecars": "tsx scripts/x402-local-sidecars.ts",
|
|
39
|
+
"demo:x402-sidecars:smoke": "tsx scripts/x402-local-sidecars.ts --smoke",
|
|
40
|
+
"dev": "tsx src/index.ts",
|
|
41
|
+
"mcp:stdio": "node dist/index.js",
|
|
42
|
+
"prepack": "npm run build",
|
|
43
|
+
"smoke:x402-payment-fetch": "tsx scripts/x402-payment-fetch-smoke.ts",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"x402:facilitator": "tsx scripts/x402-facilitator-sidecar.ts",
|
|
46
|
+
"x402:resource": "tsx scripts/x402-local-sidecars.ts",
|
|
47
|
+
"x402:signer": "tsx scripts/x402-signer-sidecar.ts"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
51
|
+
"zod": "^3.25.76"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^22.15.30",
|
|
55
|
+
"tsx": "^4.19.4",
|
|
56
|
+
"typescript": "^5.8.3",
|
|
57
|
+
"vitest": "^4.1.8"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=20.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|