create-metamynd-agent 0.14.44 → 0.14.47

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 (2) hide show
  1. package/index.mjs +11 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -97,7 +97,9 @@ const GUARD_PKG = '@metamynd/agentsafe-guard';
97
97
  // resume() works again once the gateway is upgraded, and a voided approval is reported AUTHORIZATION_VOIDED (pre-beta rerun 6 FW6-1).
98
98
  // 0.35.0: a payment in another currency than a currency-scoped cap is refused CURRENCY_NOT_ALLOWED, not SOP_SPEND_CAP (M2).
99
99
  // 0.36.0: ships TypeScript declarations (agentsafe-guard.d.mts), so a TypeScript agent gets types with no @types package (L5).
100
- const GUARD_VERSION = '^0.36.0';
100
+ // 0.37.0: a tool that hands its call to a gateway that then refuses it (the hold stays unclaimed) has its hold released, not
101
+ // captured, so a refused payment is no longer booked as spend (pre-beta rerun 2026-10-12, D-5).
102
+ const GUARD_VERSION = '^0.37.0';
101
103
  /** The harness entry point's config load, shared by both harness templates: a fresh clone has no
102
104
  * agent.metamynd.json (it is gitignored), so say what to do instead of a bare ENOENT (BR-004). */
103
105
  function harnessConfigLoad() {
@@ -105,7 +107,7 @@ function harnessConfigLoad() {
105
107
  // Say so, with the way forward, instead of letting readFileSync throw a bare ENOENT.
106
108
  let config;
107
109
  try {
108
- config = JSON.parse(readFileSync('./agent.metamynd.json', 'utf8'));
110
+ config = JSON.parse(readFileSync('./agent.metamynd.json', 'utf8').replace(/^\\uFEFF/, '')); // a UTF-8 BOM is not JSON
109
111
  } catch (e) {
110
112
  console.error(e && e.code === 'ENOENT'
111
113
  ? ['No ./agent.metamynd.json. It holds the local key for this agent and is gitignored, so a fresh clone never has it.',
@@ -228,7 +230,9 @@ const GATEWAY_PKG = '@metamynd/agentsafe-http-gateway';
228
230
  // depends on agentsafe-mcp-guard ^0.30.0.
229
231
  // 0.30.0: `agentsafe-gateway service-id` / `accept-challenge` / `serve`, SERVICE_IDENTITY_FILE and AGENTSAFE_UPSTREAM_CREDENTIAL (M4).
230
232
  // 0.31.0: ships TypeScript declarations (gateway, route-match, service-identity); depends on agentsafe-mcp-guard ^0.31.0.
231
- const GATEWAY_VERSION = '^0.31.0';
233
+ // 0.32.0: `reportOutcomes` defaults to true. The hosted templates already set it; the --harness gateway (no issuer, no
234
+ // network) now sets `reportOutcomes: false`, so it does not log NO_ISSUER on its first refusal.
235
+ const GATEWAY_VERSION = '^0.32.0';
232
236
 
233
237
  /** Appended to every scaffolded gateway server: give hold settlements still running a bounded moment on shutdown. */
234
238
  const DRAIN_ON_SHUTDOWN = `
@@ -451,7 +455,8 @@ function onCliError(e) {
451
455
  // directly instead — `rules` is ignored when `molecules` is present.
452
456
  function loadConfigFile(path) {
453
457
  let raw;
454
- try { raw = readFileSync(resolve(path), 'utf8'); }
458
+ // A UTF-8 BOM (Notepad and other Windows tools add one on save) is not JSON whitespace — strip it before parsing.
459
+ try { raw = readFileSync(resolve(path), 'utf8').replace(/^\uFEFF/, ''); }
455
460
  catch (e) { fail(`Could not read config file ${path} (${e.message})`); }
456
461
  let json;
457
462
  try { json = JSON.parse(raw); }
@@ -3057,6 +3062,8 @@ const gateway = createHttpGateway({
3057
3062
  // body that is not exactly that one — the values of every allowed field, not only amount and merchant. A request that
3058
3063
  // bound no payload is refused (PAYLOAD_BINDING_REQUIRED) instead of run unbound.
3059
3064
  requirePayloadBinding: true,
3065
+ // No issuer to report to: --harness never touches the network (the gateway reports by default since 0.32.0).
3066
+ reportOutcomes: false,
3060
3067
  // Reached ONLY after the guard allowed the request AND the body was bound to what was signed.
3061
3068
  forward: async (req) => {
3062
3069
  const route = matchRoute(ROUTES, req.method, req.path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-metamynd-agent",
3
- "version": "0.14.44",
3
+ "version": "0.14.47",
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": {