@productbrain/mcp 0.0.1-beta.13095 → 0.0.1-beta.13130

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.
@@ -889,6 +889,11 @@ var PERSON_STATUS_WORDS = {
889
889
  placeholder: "Not invited",
890
890
  archived: "Archived"
891
891
  };
892
+ var roleIdOnly = (roleRef) => roleRef.replace(/[^\w-]/g, "");
893
+ var ASK_ROLE_NEXT = {
894
+ cli: (roleRef) => `Next: pb question create "<your ask>" --to-role ${roleIdOnly(roleRef)}`,
895
+ mcp: (roleRef) => `Next: \`question action=create text="<your ask>" toRole="${roleIdOnly(roleRef)}"\`.`
896
+ };
892
897
  function personStatusTag(status) {
893
898
  if (!status || status === "active" || !Object.prototype.hasOwnProperty.call(PERSON_STATUS_WORDS, status)) return null;
894
899
  return PERSON_STATUS_WORDS[status];
@@ -968,7 +973,7 @@ function authorityRecovery(refusal) {
968
973
  function askNextLine(refusal) {
969
974
  const seat = refusal?.routeTarget;
970
975
  if (typeof seat?.roleEntryId !== "string" || refusal?.wayIn !== void 0 || refusal?.boundKey === true || refusal?.heldByAgent === true) return null;
971
- return 'Next: `question action=create text="<your ask>"`.';
976
+ return typeof refusal?.decidingRoleRef === "string" ? ASK_ROLE_NEXT.mcp(refusal.decidingRoleRef) : null;
972
977
  }
973
978
  function returnedRefusal(refusal, fallback, clean = (s) => s) {
974
979
  const fix = authorityRecovery(refusal) ?? (typeof refusal.requiredAction === "string" ? refusal.requiredAction : fallback);
@@ -1751,4 +1756,4 @@ export {
1751
1756
  appUrl,
1752
1757
  apiKeysUrl
1753
1758
  };
1754
- //# sourceMappingURL=chunk-N4GNJAW7.js.map
1759
+ //# sourceMappingURL=chunk-EVK7IH5X.js.map