@productbrain/mcp 0.0.1-beta.11323 → 0.0.1-beta.11331

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.
@@ -3493,6 +3493,9 @@ function formatSeatSentence(action, reply, clean) {
3493
3493
  const who = `${clean(reply.person ?? "")}${tag ? ` (${tag})` : ""}`;
3494
3494
  const roleLabel2 = `${clean(reply.roleName ?? "")} (${reply.role ?? ""})`;
3495
3495
  const teamLabel = clean(reply.teamName ?? "");
3496
+ if (action === "seat" && reply.onYourAuthority) {
3497
+ return `${who} holds ${clean(reply.roleName ?? "")} of ${teamLabel} on your authority. Unseat them to revoke it.`;
3498
+ }
3496
3499
  if (action === "seat") {
3497
3500
  const id = reply.personId ? ` [${reply.personId}]` : "";
3498
3501
  return `${reply.created ? "Seated" : "Confirmed"} ${who}${id} as ${roleLabel2} in ${teamLabel}.`;
@@ -11275,6 +11278,9 @@ var roleSchema = z33.object({
11275
11278
  teamId: z33.string().max(200).optional().describe(
11276
11279
  "'seat' / 'unseat': the team, by chain id or entry id. Only needed for Team Lead, which lives in every team; any other role is seated in its home team. 'release_move': the team it moves to."
11277
11280
  ),
11281
+ onMyAuthority: z33.boolean().optional().describe(
11282
+ "'seat', Team Lead only: as the team's Team Lead, seat a second Team Lead who holds the seat on your authority until you unseat them."
11283
+ ),
11278
11284
  childId: z33.string().max(200).optional().describe("'release_move' / 'accept_move' / 'refuse_move': the role or team that moves, by chain id or entry id."),
11279
11285
  why: z33.string().max(1e3).optional().describe("'refuse_move': why the move is refused; it becomes a tension for the old team's Team Lead.")
11280
11286
  });
@@ -11290,7 +11296,8 @@ var seatVariant = z33.object({
11290
11296
  roleId: z33.string().max(200),
11291
11297
  person: z33.string().max(200).optional(),
11292
11298
  newPersonName: z33.string().max(120).optional(),
11293
- teamId: z33.string().max(200).optional()
11299
+ teamId: z33.string().max(200).optional(),
11300
+ onMyAuthority: z33.boolean().optional()
11294
11301
  });
11295
11302
  var unseatVariant = z33.object({
11296
11303
  action: z33.literal("unseat"),
@@ -11311,7 +11318,10 @@ var roleActionUnion = z33.discriminatedUnion("action", [
11311
11318
  ]);
11312
11319
  var ROLE_ACTION_SPECS = {
11313
11320
  accountable: { params: ["roleId", "canonicalKey", "limit", "cursor"], description: "roleId is required; canonicalKey/limit/cursor are optional." },
11314
- seat: { params: ["roleId", "person", "newPersonName", "teamId"], description: "roleId is required, plus exactly one of person or newPersonName; teamId only for Team Lead." },
11321
+ seat: {
11322
+ params: ["roleId", "person", "newPersonName", "teamId", "onMyAuthority"],
11323
+ description: "roleId is required, plus exactly one of person or newPersonName; teamId and onMyAuthority only for Team Lead."
11324
+ },
11315
11325
  unseat: { params: ["roleId", "person", "teamId"], description: "roleId and person are required; teamId only for Team Lead." },
11316
11326
  release_move: { params: ["childId", "teamId"], description: "childId and teamId (the team it moves to) are required." },
11317
11327
  accept_move: { params: ["childId"], description: "childId is required." },
@@ -11372,7 +11382,8 @@ async function runSeatAction(action, fn, params) {
11372
11382
  targetPersonRef: params.person,
11373
11383
  newPersonName: params.newPersonName,
11374
11384
  teamRef: params.teamId,
11375
- sessionId
11385
+ sessionId,
11386
+ ...params.onMyAuthority ? { onMyAuthority: true } : {}
11376
11387
  });
11377
11388
  const result2 = raw.refusal ? { ...raw, refusal: { ...raw.refusal, requiredAction: authorityRecovery(raw.refusal) } } : raw;
11378
11389
  const message = formatSeatSentence(action, result2, sanitizeSingleLineField);
@@ -11391,8 +11402,8 @@ async function runSeatAction(action, fn, params) {
11391
11402
  return roleErrorResult(err, action, params);
11392
11403
  }
11393
11404
  }
11394
- function handleRoleSeat(roleId, person, newPersonName, teamId) {
11395
- return runSeatAction("seat", "organisation.seatInRole", { roleId, person, newPersonName, teamId });
11405
+ function handleRoleSeat(roleId, person, newPersonName, teamId, onMyAuthority) {
11406
+ return runSeatAction("seat", "organisation.seatInRole", { roleId, person, newPersonName, teamId, onMyAuthority });
11396
11407
  }
11397
11408
  function handleRoleUnseat(roleId, person, teamId) {
11398
11409
  return runSeatAction("unseat", "organisation.unseatFromRole", { roleId, person, teamId });
@@ -11436,7 +11447,7 @@ function roleErrorResult(err, action, params = {}) {
11436
11447
  function registerRoleTools(server) {
11437
11448
  const roleHandlers = {
11438
11449
  accountable: (data) => handleRoleAccountable(data.roleId, data.canonicalKey, data.limit, data.cursor),
11439
- seat: (data) => handleRoleSeat(data.roleId, data.person, data.newPersonName, data.teamId),
11450
+ seat: (data) => handleRoleSeat(data.roleId, data.person, data.newPersonName, data.teamId, data.onMyAuthority),
11440
11451
  unseat: (data) => handleRoleUnseat(data.roleId, data.person, data.teamId),
11441
11452
  release_move: (data) => handleMove("release_move", data),
11442
11453
  accept_move: (data) => handleMove("accept_move", data),
@@ -11446,7 +11457,7 @@ function registerRoleTools(server) {
11446
11457
  "role",
11447
11458
  {
11448
11459
  title: "Role",
11449
- description: "Workspace roles \u2014 who is accountable for what, who holds it, and where it sits. Six actions:\n\n- **accountable**: what this role owns (`explicit` \u2014 the canonical ownership row for objective/key_result/tension, data.ownerRoleId for domain), reports on (`reporting`, data.reporterRoleId \u2014 key results only, a separate fact from ownership), and \u2014 always `not-computed` today, never faked as empty \u2014 inherits via Team-Lead vacancy coverage. Also lists `holders`.\n- **seat**: put a person in this role, by person id or email, or by `newPersonName` for someone with no login yet (a placeholder person, created once per exact name). The role's home team is used; name `teamId` only for Team Lead. A held role refuses a second holder and names the holder; the person keeps their other roles in the team. Needs the team's Team Lead.\n- **unseat**: take this role from a person; their other roles in the team stay. The last active Team Lead of a team is refused. Invite a person, or take them out of a team, with the `people` tool.\n- **release_move** / **accept_move** / **refuse_move**: move a role or team (`childId`) to a team whose Team Lead is another seat. Acting as Team Lead of its current team, release it toward `teamId`; acting as Team Lead of that team, accept it, or refuse it with `why` (it stays, and a tension goes to its current team's Team Lead).",
11460
+ description: "Workspace roles \u2014 who is accountable for what, who holds it, and where it sits. Six actions:\n\n- **accountable**: what this role owns (`explicit` \u2014 the canonical ownership row for objective/key_result/tension, data.ownerRoleId for domain), reports on (`reporting`, data.reporterRoleId \u2014 key results only, a separate fact from ownership), and \u2014 always `not-computed` today, never faked as empty \u2014 inherits via Team-Lead vacancy coverage. Also lists `holders`.\n- **seat**: put a person in this role, by person id or email, or by `newPersonName` for someone with no login yet (a placeholder person, created once per exact name). The role's home team is used; name `teamId` only for Team Lead. A held role refuses a second holder and names the holder; the person keeps their other roles in the team. Needs the team's Team Lead. With `onMyAuthority`, the team's Team Lead seats a second Team Lead on their own authority; unseating them revokes it.\n- **unseat**: take this role from a person; their other roles in the team stay. The last active Team Lead of a team is refused. Invite a person, or take them out of a team, with the `people` tool.\n- **release_move** / **accept_move** / **refuse_move**: move a role or team (`childId`) to a team whose Team Lead is another seat. Acting as Team Lead of its current team, release it toward `teamId`; acting as Team Lead of that team, accept it, or refuse it with `why` (it stays, and a tension goes to its current team's Team Lead).",
11450
11461
  inputSchema: roleSchema,
11451
11462
  // The hints describe the whole tool, so they say the most it can do: unseat removes a role and can
11452
11463
  // delete a membership row (destructive), and a repeated seat still writes history and audit rows
@@ -12061,4 +12072,4 @@ export {
12061
12072
  SERVER_VERSION,
12062
12073
  createProductBrainServer
12063
12074
  };
12064
- //# sourceMappingURL=chunk-OHJGWECT.js.map
12075
+ //# sourceMappingURL=chunk-AX676Y6G.js.map