create-metamynd-agent 0.7.4 → 0.7.6

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.
Files changed (3) hide show
  1. package/README.md +12 -3
  2. package/index.mjs +22 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -150,9 +150,9 @@ What actually stops that bypass is that `bookFlight()` doesn't exist in the agen
150
150
  It exists only in `gateway/server.mjs` — a separate process, started separately, holding any real
151
151
  tool credentials the agent process never sees — which independently re-verifies every request
152
152
  against the agent's own published policy bundle before running it, **binds that request to the
153
- actual body being executed** (`@metamynd/agentsafe-http-gateway` ≥ 0.2.0), and requires the
153
+ actual body being executed** (`@metamynd/agentsafe-http-gateway` ≥ 0.3.0), and requires the
154
154
  agent's `authorizationId` to atomically claim single-use execution against the real stateful gate
155
- (`requireAuthorization`, `@metamynd/agentsafe-mcp-guard` ≥ 0.2.0) — closing a confused-deputy gap
155
+ (`requireAuthorization`, `@metamynd/agentsafe-mcp-guard` ≥ 0.3.0) — closing a confused-deputy gap
156
156
  and a replay/cumulative-spend gap, both found during independent testing. Same shape as the mutual
157
157
  counterparty check in [`@metamynd/agentsafe-mcp-guard`](https://www.npmjs.com/package/@metamynd/agentsafe-mcp-guard),
158
158
  built with [`@metamynd/agentsafe-http-gateway`](https://www.npmjs.com/package/@metamynd/agentsafe-http-gateway).
@@ -168,12 +168,21 @@ Named precisely, not left implicit:
168
168
  - **Direct call.** `bookFlight()` doesn't exist in the agent's process.
169
169
  - **Confused deputy (payload).** Signing a cheap request while executing an expensive one (a
170
170
  different amount/currency/merchant in the body than what was signed) is refused before the tool
171
- runs — payload binding.
171
+ runs — payload binding (`@metamynd/agentsafe-http-gateway` ≥ 0.3.0). The default binder fails
172
+ the request CLOSED, not just when it finds a mismatched flat field, but also when it can't find
173
+ the governed fields at all — nested JSON, an array, a renamed or differently-cased key. That
174
+ gap was found and closed the same way: a signed $250/skyward-air request had previously been
175
+ able to execute $5000/evil-corp via `{ booking: { amount, merchant } }`, because the flat
176
+ matcher found nothing to compare and treated "nothing found" as "nothing to check."
172
177
  - **Replay.** A captured, resent request fails to atomically claim single-use execution the second
173
178
  time — `requireAuthorization`.
174
179
  - **Cumulative spend.** The claimed authorization only exists because the real stateful gate
175
180
  already checked it against the mandate's TOTAL budget when minted, not just this one request's
176
181
  amount — so many small legal-looking calls can't add up past the cap this way.
182
+ - **Amount unknown.** A signed-transaction tool (raw bytes) or a nested x402 payload carries its
183
+ amount somewhere a naive spend cap never looks — `amount-unknown` (`@metamynd/agentsafe-guard`
184
+ ≥ 0.6.0, `@metamynd/agentsafe-mcp-guard` ≥ 0.3.0) blocks by default when the gate can't
185
+ determine the value, instead of letting it slip past the cap untested.
177
186
 
178
187
  The claim above also checks `agentDid`/`amount`/`currency`/`merchant` together against the
179
188
  request being executed (`@metamynd/agentsafe-mcp-guard` ≥ 0.2.1) — a same-amount, same-currency
package/index.mjs CHANGED
@@ -23,16 +23,24 @@ const GUARD_PKG = '@metamynd/agentsafe-guard';
23
23
  // Must track the guard's MINOR line, not just its major. On a 0.x package `^0.4.0` means
24
24
  // >=0.4.0 <0.5.0, so leaving this at ^0.4.0 would scaffold an agent whose `npm test` runs
25
25
  // `agentsafe-guard verify` against a guard that has no such command.
26
- const GUARD_VERSION = '^0.5.0';
26
+ // 0.6.0 adds the amount-unknown atom (deny-by-default when a value-moving action's amount
27
+ // can't be determined) — this was already missed once (this constant sat at ^0.5.0 through the
28
+ // whole 0.6.0 release), silently scaffolding every new project without that protection.
29
+ const GUARD_VERSION = '^0.6.0';
27
30
  // The default hosted scaffold's SECOND process — the tool gateway (see scaffoldProject).
28
31
  const MCP_GUARD_PKG = '@metamynd/agentsafe-mcp-guard';
29
32
  // 0.2.0 adds requireAuthorization (closes replay + cumulative spend) — this scaffold sets that
30
33
  // option, so a range that could resolve below 0.2.0 would silently scaffold a no-op.
31
- const MCP_GUARD_VERSION = '^0.2.0';
34
+ // 0.3.0 adds the same amount-unknown atom as the guard, above — same reasoning, same miss.
35
+ const MCP_GUARD_VERSION = '^0.3.0';
32
36
  const GATEWAY_PKG = '@metamynd/agentsafe-http-gateway';
33
37
  // 0.2.0 fixes a confused-deputy gap (payload not bound to the signed request) — the CLI must
34
38
  // never scaffold a range that could resolve below it.
35
- const GATEWAY_VERSION = '^0.2.0';
39
+ // 0.3.0 fixes the follow-on gap: the DEFAULT binder only sees flat, top-level, exactly-named
40
+ // fields, and silently skipped binding (not blocked) for anything else — nested JSON, an array,
41
+ // a renamed or differently-cased key. Verified live: a signed $250/skyward-air request executed
42
+ // $5000/evil-corp via `{ booking: { amount, merchant } }`. 0.3.0 fails that CLOSED instead.
43
+ const GATEWAY_VERSION = '^0.3.0';
36
44
  const DEFAULT_API = 'https://metamynd.ai/api/v1';
37
45
  const DEFAULT_GATEWAY_PORT = 4401; // distinct from --harness's dashboard (4400)
38
46
 
@@ -908,8 +916,13 @@ own code, or a network attacker) might attempt:
908
916
  - **Direct call.** \`bookFlight()\` doesn't exist in the agent's process. There's nothing to call.
909
917
  - **Confused deputy (payload).** The gateway re-verifies the signed request against this agent's
910
918
  own policy AND binds it to the actual request body (payload binding,
911
- \`@metamynd/agentsafe-http-gateway\` ≥ 0.2.0) — signing a cheap request while executing an
912
- expensive one is refused before the tool ever runs.
919
+ \`@metamynd/agentsafe-http-gateway\` ≥ 0.3.0) — signing a cheap request while executing an
920
+ expensive one is refused before the tool ever runs. The default binder fails CLOSED not just
921
+ on a mismatched flat field but whenever it can't find the governed fields at all — nested
922
+ JSON, an array, a renamed or differently-cased key. A signed \$250 request had previously been
923
+ able to execute \$5000 via \`{ booking: { amount, merchant } }\`, because the flat matcher found
924
+ nothing to compare and treated "nothing found" as "nothing to check" — fixed the same way this
925
+ list gets fixed: found, closed, named here.
913
926
  - **Replay.** \`requireAuthorization: true\` (set in \`server.mjs\`) requires the agent's
914
927
  \`authorizationId\` — from a REAL \`guard.authorize()\` call, which \`index.mjs\` already makes for
915
928
  any value-bearing action by default — to atomically claim single-use execution against the
@@ -918,6 +931,10 @@ own code, or a network attacker) might attempt:
918
931
  already checked it against the mandate's TOTAL budget when it was minted — not just this one
919
932
  request's amount. Many small legal-looking calls can't add up past the mandate cap this way,
920
933
  because each needed its own real authorization first.
934
+ - **Amount unknown.** A signed-transaction tool or a nested payload can carry its amount
935
+ somewhere a naive spend cap never looks — \`amount-unknown\`
936
+ (\`@metamynd/agentsafe-mcp-guard\` ≥ 0.3.0) blocks by default when the gate can't determine the
937
+ value, instead of letting it slip past the cap untested.
921
938
 
922
939
  The claim above also checks the claimed authorization's own \`agentDid\`/\`amount\`/\`currency\`/
923
940
  \`merchant\` against the request actually being executed (\`@metamynd/agentsafe-mcp-guard\` ≥ 0.2.1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-metamynd-agent",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "description": "Scaffold a MetaMynd/AgentSafe-governed AI agent in one command — logs in, provisions the agent (identity + mandate + SOP + Standards) in a single call, writes agent.metamynd.json plus a runnable agent + separate tool-gateway process that closes direct-call, confused-deputy, replay, and cumulative-spend bypasses. --harness scaffolds a free, local, zero-network governance harness instead.",
5
5
  "type": "module",
6
6
  "bin": {