@mnemom/mnemom 0.14.3 → 0.14.4

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 +5 -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,7 +918,7 @@ 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnemom/mnemom",
3
- "version": "0.14.3",
3
+ "version": "0.14.4",
4
4
  "description": "Transparent AI agent tracing",
5
5
  "type": "module",
6
6
  "bin": {