create-metamynd-agent 0.14.44 → 0.14.46

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 +8 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -105,7 +105,7 @@ function harnessConfigLoad() {
105
105
  // Say so, with the way forward, instead of letting readFileSync throw a bare ENOENT.
106
106
  let config;
107
107
  try {
108
- config = JSON.parse(readFileSync('./agent.metamynd.json', 'utf8'));
108
+ config = JSON.parse(readFileSync('./agent.metamynd.json', 'utf8').replace(/^\\uFEFF/, '')); // a UTF-8 BOM is not JSON
109
109
  } catch (e) {
110
110
  console.error(e && e.code === 'ENOENT'
111
111
  ? ['No ./agent.metamynd.json. It holds the local key for this agent and is gitignored, so a fresh clone never has it.',
@@ -228,7 +228,9 @@ const GATEWAY_PKG = '@metamynd/agentsafe-http-gateway';
228
228
  // depends on agentsafe-mcp-guard ^0.30.0.
229
229
  // 0.30.0: `agentsafe-gateway service-id` / `accept-challenge` / `serve`, SERVICE_IDENTITY_FILE and AGENTSAFE_UPSTREAM_CREDENTIAL (M4).
230
230
  // 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';
231
+ // 0.32.0: `reportOutcomes` defaults to true. The hosted templates already set it; the --harness gateway (no issuer, no
232
+ // network) now sets `reportOutcomes: false`, so it does not log NO_ISSUER on its first refusal.
233
+ const GATEWAY_VERSION = '^0.32.0';
232
234
 
233
235
  /** Appended to every scaffolded gateway server: give hold settlements still running a bounded moment on shutdown. */
234
236
  const DRAIN_ON_SHUTDOWN = `
@@ -451,7 +453,8 @@ function onCliError(e) {
451
453
  // directly instead — `rules` is ignored when `molecules` is present.
452
454
  function loadConfigFile(path) {
453
455
  let raw;
454
- try { raw = readFileSync(resolve(path), 'utf8'); }
456
+ // A UTF-8 BOM (Notepad and other Windows tools add one on save) is not JSON whitespace — strip it before parsing.
457
+ try { raw = readFileSync(resolve(path), 'utf8').replace(/^\uFEFF/, ''); }
455
458
  catch (e) { fail(`Could not read config file ${path} (${e.message})`); }
456
459
  let json;
457
460
  try { json = JSON.parse(raw); }
@@ -3057,6 +3060,8 @@ const gateway = createHttpGateway({
3057
3060
  // body that is not exactly that one — the values of every allowed field, not only amount and merchant. A request that
3058
3061
  // bound no payload is refused (PAYLOAD_BINDING_REQUIRED) instead of run unbound.
3059
3062
  requirePayloadBinding: true,
3063
+ // No issuer to report to: --harness never touches the network (the gateway reports by default since 0.32.0).
3064
+ reportOutcomes: false,
3060
3065
  // Reached ONLY after the guard allowed the request AND the body was bound to what was signed.
3061
3066
  forward: async (req) => {
3062
3067
  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.46",
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": {