wontopos-mcp 1.0.11 → 1.0.12

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 +9 -0
  2. package/index.mjs +18 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -117,6 +117,15 @@ automatic retries, redirect refusal, response caps, and key hygiene apply as-is.
117
117
 
118
118
  ## Changelog
119
119
 
120
+ - **1.0.12** - a server that could not answer anything reported itself ready. A store id
121
+ outside `[A-Za-z0-9][A-Za-z0-9._-]{0,63}` (`선우`, `田中`, an email) cannot be created
122
+ and cannot be reached, so every tool call 404s - and 1.0.11 warned about it and then
123
+ served anyway. Worse, the boot check told the agent to fix it with `create_store`,
124
+ which answers 400 on that same id. A bad API key has always exited loudly; an id that
125
+ nothing at runtime can repair is the same situation, so it now exits too. The exception
126
+ is `WONTOPOS_ALLOW_STORE_OVERRIDE=1`, where the agent names a store per call and the
127
+ configured one is only a default - there the server still has work to do, so it warns
128
+ and serves.
120
129
  - **1.0.11** - fixes a regression 1.0.10 introduced, published the same day. 1.0.10 was
121
130
  right that the folded id should be *announced* and wrong to also *send* it. The API
122
131
  records the raw id next to the folded one on purpose: that is how it tells a genuine
package/index.mjs CHANGED
@@ -577,12 +577,24 @@ console.error(
577
577
  // names the folded store, which is the part the SDK does not cover.
578
578
  //
579
579
  // This one has no SDK equivalent — the SDK knows the fold, not the creation rule.
580
+ // A key that can do nothing exits(1). An id that can do nothing used to WARN and then
581
+ // serve — so the host reported a healthy MCP server whose every call 404'd, and the
582
+ // boot check's own advice ("create_store") was impossible: creating this id answers
583
+ // 400 by the same rule. Nothing the agent does at runtime can repair it, so it belongs
584
+ // on the same side as the bad key.
585
+ //
586
+ // Unless the store is not pinned: under ALLOW_STORE_OVERRIDE the agent supplies an id
587
+ // per call and the configured one is only a default, so the server still has work.
580
588
  if (STORE_ID_UNUSABLE) {
581
589
  console.error(
582
590
  `wontopos-mcp: WONTOPOS_USER_ID ${JSON.stringify(STORE)} is not a usable store id. The API requires English ` +
583
591
  "letters, digits and . _ - (1-64 chars, starting with a letter or digit), so creating it answers 400 and " +
584
592
  "every other call 404s. Romanize it or pick a latin id."
585
593
  );
594
+ if (!ALLOW_STORE_OVERRIDE) {
595
+ console.error("wontopos-mcp: every tool call would fail and no tool could repair it. Exiting.");
596
+ process.exit(1);
597
+ }
586
598
  }
587
599
 
588
600
  // Boot check (one metered stats call, after connect so host startup never waits):
@@ -609,9 +621,12 @@ mem.stats().then(
609
621
  } else if (status === 404) {
610
622
  console.error(
611
623
  `wontopos-mcp: the key works but store "${STORE_FOLDED}" does not exist — ` +
612
- (READ_ONLY
613
- ? "fix WONTOPOS_USER_ID (read-only mode cannot create stores)."
614
- : "ask the agent to create it (create_store) or fix WONTOPOS_USER_ID.")
624
+ (STORE_ID_UNUSABLE
625
+ // create_store answers 400 on this id by the same rule, so do not send them there.
626
+ ? "and it cannot be created under this id. Set WONTOPOS_USER_ID to a latin-alphanumeric id."
627
+ : READ_ONLY
628
+ ? "fix WONTOPOS_USER_ID (read-only mode cannot create stores)."
629
+ : "ask the agent to create it (create_store) or fix WONTOPOS_USER_ID.")
615
630
  );
616
631
  } else if (status === 402) {
617
632
  console.error("wontopos-mcp: the key works but the account has no card or balance (402) — top up at https://wontopos.com/console.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wontopos-mcp",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "mcpName": "com.wontopos/mcp",
5
5
  "description": "(beta) Wontopos (WOS) long-term memory as an MCP server — one memory across Claude Code, Claude Desktop, Cursor, ChatGPT, and your own agents.",
6
6
  "keywords": [