@mnemom/mnemom 0.14.3 → 0.14.5

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/lib/api.js +9 -2
  2. package/package.json +1 -1
package/dist/lib/api.js CHANGED
@@ -646,7 +646,10 @@ export async function listTeamAdmins(teamId) {
646
646
  * Returns null if no match found.
647
647
  */
648
648
  export async function getAgentByName(name) {
649
- const agents = await listOrgAgents();
649
+ // API keys can't reach the org-scoped route; route them to the key-compatible
650
+ // /v1/agents endpoint (same approach as listAgents/MNE-194 F10 fix).
651
+ const cred = await resolveAuth();
652
+ const agents = cred.type === "api-key" ? await listAgents() : await listOrgAgents();
650
653
  const lower = name.toLowerCase();
651
654
  const exact = agents.find((a) => a.name?.toLowerCase() === lower);
652
655
  if (exact)
@@ -915,12 +918,16 @@ export async function resolveAgentId(agentName) {
915
918
  catch (err) {
916
919
  const msg = err instanceof Error ? err.message : String(err);
917
920
  if (msg.includes("Not authenticated")) {
918
- console.error(`\nNot authenticated. Run \`mnemom login\` first.\n`);
921
+ console.error(`\nNot authenticated. Run \`mnemom login\` or set MNEMOM_API_KEY.\n`);
919
922
  process.exit(1);
920
923
  }
921
924
  }
922
925
  console.error(`\nAgent not found: ${name}`);
923
926
  console.error("List your agents with: mnemom agents\n");
927
+ console.error(`\nThis can happen when the agent was auto-created by the gateway and has not been claimed to your account yet.`);
928
+ console.error(`To claim it, run: mnemom agents claim <agent-id> --name ${name} --key <your-provider-key>`);
929
+ console.error(`The <agent-id> (mnm-...) is the X-Mnemom-Agent value returned in the gateway response headers.`);
930
+ console.error(`See: https://docs.mnemom.ai/quickstart/gateway\n`);
924
931
  process.exit(1);
925
932
  }
926
933
  /** GET /v1/postures — list visible postures. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnemom/mnemom",
3
- "version": "0.14.3",
3
+ "version": "0.14.5",
4
4
  "description": "Transparent AI agent tracing",
5
5
  "type": "module",
6
6
  "bin": {