@productbrain/mcp 0.0.1-beta.15681 → 0.0.1-beta.15693
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.
- package/dist/{chunk-ER2HTDIM.js → chunk-AFTQ7UO6.js} +18 -3
- package/dist/chunk-AFTQ7UO6.js.map +1 -0
- package/dist/{chunk-V2D7YALY.js → chunk-FQT4BHTR.js} +2 -2
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{setup-6NPXTEH3.js → setup-EAUM27VM.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-ER2HTDIM.js.map +0 -1
- /package/dist/{chunk-V2D7YALY.js.map → chunk-FQT4BHTR.js.map} +0 -0
- /package/dist/{setup-6NPXTEH3.js.map → setup-EAUM27VM.js.map} +0 -0
|
@@ -335,9 +335,14 @@ function formatGrantsGivenLine(grants) {
|
|
|
335
335
|
function wayInSentence(seat, surface) {
|
|
336
336
|
const role = sanitizeRuleListField(seat.roleRef);
|
|
337
337
|
const team = sanitizeRuleListField(seat.teamRef);
|
|
338
|
-
const [close, start] = surface
|
|
338
|
+
const [close, start] = [sessionCloseCommand(surface), sessionStartCommand(seat, surface)];
|
|
339
339
|
return `You hold ${briefingLine(seat.roleName)} (${role}) in ${briefingLine(seat.teamName)} (${team}); close this session (${close}) and start one as it: ${start}, then retry.`;
|
|
340
340
|
}
|
|
341
|
+
var sessionCloseCommand = (surface) => surface === "cli" ? "pb session close" : 'session action=close sessionId="<id>"';
|
|
342
|
+
function sessionStartCommand(seat, surface) {
|
|
343
|
+
const [role, team] = [sanitizeRuleListField(seat.roleRef), sanitizeRuleListField(seat.teamRef)];
|
|
344
|
+
return surface === "cli" ? `pb session start --role ${role} --team ${team}` : `session action=start role=${role} team=${team}`;
|
|
345
|
+
}
|
|
341
346
|
var GOVERNANCE_HERE_LINES = [
|
|
342
347
|
"How governance works here:",
|
|
343
348
|
[
|
|
@@ -1186,7 +1191,17 @@ function authorityRecovery(refusal) {
|
|
|
1186
1191
|
if (seat && typeof seat.roleRef === "string" && typeof seat.roleName === "string" && typeof seat.teamRef === "string" && typeof seat.teamName === "string") {
|
|
1187
1192
|
return wayInSentence(seat, "mcp");
|
|
1188
1193
|
}
|
|
1189
|
-
|
|
1194
|
+
const said = typeof refusal?.requiredAction === "string" ? refusal.requiredAction : void 0;
|
|
1195
|
+
const next = refusalNextLine(refusal);
|
|
1196
|
+
return said && next ? `${said}
|
|
1197
|
+
${next}` : said ?? next ?? void 0;
|
|
1198
|
+
}
|
|
1199
|
+
function refusalNextLine(refusal) {
|
|
1200
|
+
const seat = refusal?.startAs;
|
|
1201
|
+
const start = typeof seat?.roleRef === "string" && typeof seat.teamRef === "string" ? `${refusal?.closeFirst === true ? `\`${sessionCloseCommand("mcp")}\`, then ` : ""}\`${sessionStartCommand({ roleRef: seat.roleRef, teamRef: seat.teamRef }, "mcp")}\`` : null;
|
|
1202
|
+
const read = typeof refusal?.readNext === "string" ? `\`context action=get entryId="${refusal.readNext}"${start ? ' sessionId="<new id>"' : ""}\`` : null;
|
|
1203
|
+
const steps = [start, read].filter(Boolean);
|
|
1204
|
+
return steps.length > 0 ? `Next: ${steps.join(", then ")}.` : null;
|
|
1190
1205
|
}
|
|
1191
1206
|
function askNextLine(refusal) {
|
|
1192
1207
|
const seat = refusal?.routeTarget;
|
|
@@ -2026,4 +2041,4 @@ export {
|
|
|
2026
2041
|
appUrl,
|
|
2027
2042
|
apiKeysUrl
|
|
2028
2043
|
};
|
|
2029
|
-
//# sourceMappingURL=chunk-
|
|
2044
|
+
//# sourceMappingURL=chunk-AFTQ7UO6.js.map
|