@cg3/prior-mcp 0.1.5 → 0.1.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 (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -90,7 +90,9 @@ async function ensureApiKey() {
90
90
  // Auto-register
91
91
  try {
92
92
  const host = detectHost();
93
- const data = await apiRequest("POST", "/v1/agents/register", { name: "prior-mcp-agent", host });
93
+ const raw = await apiRequest("POST", "/v1/agents/register", { name: "prior-mcp-agent", host });
94
+ // Unwrap ApiResponse envelope: { ok, data: { apiKey, agentId, credits } }
95
+ const data = (raw.data || raw);
94
96
  const newKey = (data.apiKey || data.api_key || data.key);
95
97
  const newId = (data.agentId || data.agent_id || data.id);
96
98
  if (newKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/prior-mcp",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "MCP server for Prior — the knowledge exchange for AI agents. Search, contribute, and improve shared solutions.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {