@theronap/agnoclast-mcp 0.9.205 → 0.9.207

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/lib/server.mjs +27 -10
  2. package/package.json +1 -1
package/lib/server.mjs CHANGED
@@ -4114,7 +4114,7 @@ function renderNudge(payload) {
4114
4114
  'add_to_brain',
4115
4115
  {
4116
4116
  title: 'Add someone to one of your brains',
4117
- description: "Add a person to one of your brains, or work out what it would take. Resolves which brain, whether you may add to it, and the manager id they are placed under. WITHOUT execute:true it only reports the plan and hands back a console link — call it that way first and show the user what you are about to do. WITH execute:true it performs the add, and then `brain` is REQUIRED: an access grant must never be aimed by a shared write pointer. Adding cannot be undone through the API. IF THE BRAIN PAYS FOR ITS MEMBERS' SEATS, adding someone raises its owner's monthly charge: the first execute is refused with the new total, you ASK THE USER whether to accept that charge, and only on a yes re-run with confirm_seat_total set to that number. Use when asked to invite/add someone to a brain.",
4117
+ description: "Add a person to one of your brains, or work out what it would take. Resolves which brain, whether you may add to it, and the manager id they are placed under. WITHOUT execute:true it only reports the plan and hands back a console link — call it that way first and show the user what you are about to do. WITH execute:true it performs the add, and then `brain` is REQUIRED: an access grant must never be aimed by a shared write pointer. The person is EMAILED an invitation link — a new person sets their own password from it, someone who already has an account joins only when they accept — and no credential is ever returned. To undo an add later, use remove_member — it shows the person what removal would do and asks first. IF THE BRAIN PAYS FOR ITS MEMBERS' SEATS, adding someone raises its owner's monthly charge: the first execute is refused with the new total, you ASK THE USER whether to accept that charge, and only on a yes re-run with confirm_seat_total set to that number. Use when asked to invite/add someone to a brain.",
4118
4118
  inputSchema: {
4119
4119
  email: z.string().describe("the person's email address — the login their Agnoclast account is (or will be) on"),
4120
4120
  name: z.string().optional().describe('their full name; falls back to the email local-part'),
@@ -4247,18 +4247,35 @@ function renderNudge(payload) {
4247
4247
  if (r.alreadyMember) {
4248
4248
  return { content: [{ type: 'text', text: `${payload.email} was already a member of ${target.name} — nothing changed.` }] }
4249
4249
  }
4250
- // Two different outcomes for the human: a brand-new account has a credential that somebody
4251
- // must physically pass on, an existing one has none.
4252
- const how = r.existingAccount
4253
- ? 'They already had an Agnoclast account, so they keep their current login and simply gain this brain.'
4254
- : `A new account was created. Temporary password: ${r.password} — they must change it on first sign-in.`
4250
+ // Every add is an emailed invitation on a server from 2026-10-03 on (CASA AL1): a new person sets
4251
+ // their own password from the link, and an existing account joins only when it accepts. No
4252
+ // credential ever comes back. `invitation` is absent only on an older server — kept so this
4253
+ // release still reads one correctly.
4254
+ const inv = r.invitation
4255
+ const sent = inv?.emailed === true
4256
+ const asked = Boolean(inv) && r.existingAccount
4257
+ const how = !inv
4258
+ ? (r.existingAccount
4259
+ ? 'They already had an Agnoclast account, so they keep their current login and simply gain this brain.'
4260
+ : `A new account was created. Temporary password: ${r.password} — they must change it on first sign-in.`)
4261
+ : !sent
4262
+ ? `The invitation was saved, but the email did not send${inv.error ? `: ${String(inv.error).trim().replace(/[.\s]*$/, '')}` : ''}. Run this again to re-send it — the new link replaces the old one.`
4263
+ : asked
4264
+ ? `They already have an Agnoclast account, so they were emailed an invitation. They are NOT in ${target.name} until they accept it (the link expires in 48 hours).`
4265
+ : `They were emailed a link to set their own password; their account works once they do (the link expires in 48 hours).${r.resent ? ' The earlier link no longer works.' : ''}`
4255
4266
  const page = r.userPage?.status
4256
4267
  ? `\nTheir page in ${target.name}: ${r.userPage.status}${r.userPage.error ? ` (${r.userPage.error})` : ''}.`
4257
4268
  : ''
4258
4269
  // What the seat sync did, in the server's words: the new monthly total, or that the seat
4259
4270
  // could NOT be charged and the brain is not paying for them yet.
4260
4271
  const seatLine = typeof r.seatNote === 'string' && r.seatNote ? `\n${r.seatNote}` : ''
4261
- return { content: [{ type: 'text', text: `Added ${payload.name} <${payload.email}> to ${target.name} as ${payload.role}, placed under you.\n${how}${page}${seatLine}\n\nThis cannot be undone through the API — removing a membership currently needs direct database access.` }] }
4272
+ const headline = asked
4273
+ ? `Invited ${payload.name} <${payload.email}> to ${target.name} as ${payload.role}, under you — they join when they accept.`
4274
+ : `Added ${payload.name} <${payload.email}> to ${target.name} as ${payload.role}, placed under you.`
4275
+ const undo = asked
4276
+ ? '\n\nNothing to undo yet: until they accept, they are not a member. Inviting them again replaces the link.'
4277
+ : '\n\nTo undo this, remove_member takes them out of this brain — it shows you what that would do and asks first.'
4278
+ return { content: [{ type: 'text', text: `${headline}\n${how}${page}${seatLine}${undo}` }] }
4262
4279
  }
4263
4280
 
4264
4281
  // ADR-0023: does this brain already have a page about them? The inviter decides — list, never pick.
@@ -4297,9 +4314,9 @@ function renderNudge(payload) {
4297
4314
  ` Role ${payload.role}`,
4298
4315
  ` Manager you`,
4299
4316
  '',
4300
- 'If they already have an Agnoclast account they keep their existing password and simply gain',
4301
- 'this brain; if not, the console shows a temporary password to pass on. Either way the button',
4302
- 'handles it — you do not need to know which in advance.',
4317
+ 'Either way they are emailed an invitation link: a new person sets their own password from it,',
4318
+ 'and someone who already has an Agnoclast account joins only when they accept. The button handles',
4319
+ 'both — you do not need to know which in advance.',
4303
4320
  '',
4304
4321
  `payload: ${JSON.stringify(payload)}`,
4305
4322
  ].join('\n')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/agnoclast-mcp",
3
- "version": "0.9.205",
3
+ "version": "0.9.207",
4
4
  "description": "Connect your AI assistant to Cortex — your org's projects, activity, gaps, and directives, scoped to you.",
5
5
  "type": "module",
6
6
  "bin": {