@productbrain/mcp 0.0.1-beta.5955 → 0.0.1-beta.5975
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.
|
@@ -15591,7 +15591,7 @@ import { z as z34 } from "zod/v3";
|
|
|
15591
15591
|
var QUESTION_ACTIONS = ["create", "adopt", "assign", "snooze", "decline", "answer", "force-close", "list"];
|
|
15592
15592
|
var questionSchema = z34.object({
|
|
15593
15593
|
action: z34.enum(QUESTION_ACTIONS).describe(
|
|
15594
|
-
"'create': create a new routed question from text (domains come from `pb question --help` / this tool's own refusal \u2014 never hardcode a slug). 'adopt':
|
|
15594
|
+
"'create': create a new routed question from text (domains come from `pb question --help` / this tool's own refusal \u2014 never hardcode a slug). 'adopt': adopt attaches routing to an existing tension or repairs a facet-less question \u2014 create is the birth path (e.g. a tension captured via `pb capture \"TEN: ...\"`). Without adopt, a captured tension stays invisible to routing forever. 'assign': confirm ('take it', omit toRole/toPerson) or reassign (supply toRole and/or toPerson) ownership. 'snooze': defer a routed/escalated question (max 2, then it escalates). 'decline': pass on a suggested question, or (as owner/lead) decline an owned one \u2014 reason required. 'answer': close the loop \u2014 creates the answering entry itself unless --entry is given. 'force-close': Team-Lead-only escape hatch \u2014 reason required. 'list': the ack-gate read model \u2014 what you owe (or, with mine:true, every question you asked, including closed ones)."
|
|
15595
15595
|
),
|
|
15596
15596
|
entryId: z34.string().max(200).optional().describe("Target question's id (human TEN-nnn form or a raw entry id). Required for every action except 'create'/'list'."),
|
|
15597
15597
|
text: z34.string().max(5e3).optional().describe("'create': the question text. 'answer': the answer text (mutually exclusive with answerEntryId, max 2000 chars)."),
|
|
@@ -15647,6 +15647,9 @@ async function displayName(id) {
|
|
|
15647
15647
|
return void 0;
|
|
15648
15648
|
}
|
|
15649
15649
|
}
|
|
15650
|
+
async function unresolvableRoleFallback(id) {
|
|
15651
|
+
return await displayName(id) ?? `an unresolved role (\`${id}\` \u2014 reassign it)`;
|
|
15652
|
+
}
|
|
15650
15653
|
function domainListSuffix(domainSlugs) {
|
|
15651
15654
|
if (!domainSlugs) return "";
|
|
15652
15655
|
return domainSlugs.length > 0 ? ` Domains in this workspace: ${domainSlugs.join(", ")}.` : " No domains exist in this workspace yet.";
|
|
@@ -15655,10 +15658,10 @@ async function renderCreateAdoptConfirmation(result2, isAdopt) {
|
|
|
15655
15658
|
const lead = isAdopt ? `${result2.entryId} is now a routed question,` : "Question created and";
|
|
15656
15659
|
let base;
|
|
15657
15660
|
if (result2.status === "unrouted") {
|
|
15658
|
-
const roleName = await
|
|
15661
|
+
const roleName = result2.suggestedRoleId ? await unresolvableRoleFallback(result2.suggestedRoleId) : result2.suggestedRoleId;
|
|
15659
15662
|
base = isAdopt ? `${lead} suggested to ${roleName}.` : `${lead} suggested to ${roleName}. Confirm with: pb question assign ${result2.entryId}`;
|
|
15660
15663
|
} else {
|
|
15661
|
-
const leadName = await
|
|
15664
|
+
const leadName = result2.ownerRoleId ? await unresolvableRoleFallback(result2.ownerRoleId) : result2.ownerRoleId;
|
|
15662
15665
|
base = isAdopt ? `${result2.entryId} is now a routed question. Nothing here says who owns it, so it has gone to ${leadName}.` : `Question created. Nothing here says who owns it, so it has gone to ${leadName}.`;
|
|
15663
15666
|
}
|
|
15664
15667
|
const blocksHint = " If something is blocked on this, add blocks:[<entry-id>...].";
|
|
@@ -15834,7 +15837,7 @@ function registerQuestionTools(server) {
|
|
|
15834
15837
|
"question",
|
|
15835
15838
|
{
|
|
15836
15839
|
title: "Question",
|
|
15837
|
-
description: "Routed questions \u2014 a question with no owner routes itself to the owning role, the team lead when ambiguous, and up the team-lead chain until someone owns it. Eight actions:\n\n- **create**: create a new routed question from text. Domains are discovered by using this tool \u2014 an unresolvable `domain` refusal lists the workspace's real slugs; there is no fixed list to memorize.\n- **adopt**:
|
|
15840
|
+
description: "Routed questions \u2014 a question with no owner routes itself to the owning role, the team lead when ambiguous, and up the team-lead chain until someone owns it. Eight actions:\n\n- **create**: create a new routed question from text. Domains are discovered by using this tool \u2014 an unresolvable `domain` refusal lists the workspace's real slugs; there is no fixed list to memorize.\n- **adopt**: adopt attaches routing to an existing tension or repairs a facet-less question \u2014 create is the birth path (e.g. a tension captured via `capture` with `collection: tensions`). Without adopt, a captured tension stays invisible to routing forever.\n- **assign**: confirm ('take it', no `toRole`/`toPerson`) or reassign (`toRole`/`toPerson`) ownership.\n- **snooze**: defer a routed/escalated question \u2014 max 2, then it escalates to the team lead.\n- **decline**: pass on a suggested question (never closes it), or \u2014 as the owner/team lead \u2014 decline an owned one (reason required; closes it, or escalates it, depending on dependents).\n- **answer**: close the loop. Creates the answering entry itself from `text`, or points at an existing one via `answerEntryId` \u2014 never both.\n- **force-close**: Team-Lead-only escape hatch (reason required) for a question that cannot otherwise be resolved.\n- **list**: the ack-gate read model \u2014 what you owe (`mine:false`, the default), or (`mine:true`) every question you asked, including closed ones, with its outcome.\n\n`blocks` (repeatable, on create/adopt) records what a question is holding up \u2014 pass entry ids it blocks.",
|
|
15838
15841
|
inputSchema: questionSchema,
|
|
15839
15842
|
annotations: { readOnlyHint: false, idempotentHint: false, openWorldHint: false }
|
|
15840
15843
|
},
|
|
@@ -17093,4 +17096,4 @@ export {
|
|
|
17093
17096
|
createProductBrainServer,
|
|
17094
17097
|
initFeatureFlags
|
|
17095
17098
|
};
|
|
17096
|
-
//# sourceMappingURL=chunk-
|
|
17099
|
+
//# sourceMappingURL=chunk-CX7V7DP4.js.map
|