@productbrain/mcp 0.0.1-beta.12417 → 0.0.1-beta.12434

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.
@@ -42,7 +42,7 @@ import {
42
42
  setSessionOriented,
43
43
  startAgentSession,
44
44
  withAcceptPrompt
45
- } from "./chunk-PXHPUMH4.js";
45
+ } from "./chunk-3INI2PMG.js";
46
46
 
47
47
  // src/server.ts
48
48
  import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -10066,6 +10066,14 @@ var SESSION_MOVED = {
10066
10066
  "commit-constellation": "commit-constellation was removed. Next: session action=wrapup-review, then entries action=accept entryId=... for each draft."
10067
10067
  };
10068
10068
  var TEAM_PARAM_DESCRIPTION = "For 'start': the team the role is held in, by its 'TEAM-<n>' id \u2014 only needed with role, when you hold that role in more than one team; a refusal that names the way in prints it.";
10069
+ var previewParams = {
10070
+ preview: z28.string().optional().describe("Start: serve this workspace draft, like direction@4; facts after a semicolon.")
10071
+ };
10072
+ function previewFields(preview) {
10073
+ if (!preview) return {};
10074
+ const at = preview.indexOf(";"), method = (at < 0 ? preview : preview.slice(0, at)).trim(), situation = at < 0 ? "" : preview.slice(at + 1).trim();
10075
+ return { ...method ? { previewMethod: method } : {}, ...situation ? { previewSituation: situation } : {} };
10076
+ }
10069
10077
  var sessionSchema = z28.object({
10070
10078
  action: actionEnum(SESSION_ACTIONS, SESSION_MOVED).describe(
10071
10079
  "'start': begin a tracked session. 'close': end the session and record activity. 'status': check current session state. 'wrapup-review': list this session's drafts before closing. 'resume': load session state from an existing work package entry."
@@ -10075,8 +10083,9 @@ var sessionSchema = z28.object({
10075
10083
  role: z28.string().max(200).optional().describe(
10076
10084
  "For 'start': role to act as this session, by the '<PREFIX>-<n>' id a start reply prints beside the role name \u2014 only needed if you hold more than one; the error lists your roles if omitted."
10077
10085
  ),
10078
- team: z28.string().max(200).optional().describe(TEAM_PARAM_DESCRIPTION)
10086
+ team: z28.string().max(200).optional().describe(TEAM_PARAM_DESCRIPTION),
10079
10087
  // TASK-801
10088
+ ...previewParams
10080
10089
  });
10081
10090
  var sessionStartVariant = z28.object({
10082
10091
  action: z28.literal("start"),
@@ -10085,8 +10094,9 @@ var sessionStartVariant = z28.object({
10085
10094
  role: z28.string().max(200).optional().describe(
10086
10095
  "Role to act as this session, by the '<PREFIX>-<n>' id a start reply prints beside the role name \u2014 only needed if you hold more than one; the error lists your roles if omitted."
10087
10096
  ),
10088
- team: z28.string().max(200).optional().describe(TEAM_PARAM_DESCRIPTION)
10097
+ team: z28.string().max(200).optional().describe(TEAM_PARAM_DESCRIPTION),
10089
10098
  // TASK-801
10099
+ ...previewParams
10090
10100
  });
10091
10101
  var sessionCloseVariant = z28.object({ action: z28.literal("close") });
10092
10102
  var sessionStatusVariant = z28.object({ action: z28.literal("status") });
@@ -10101,7 +10111,10 @@ var sessionActionUnion = z28.discriminatedUnion("action", [
10101
10111
  ]);
10102
10112
  var SESSION_ACTION_SPECS = {
10103
10113
  // DEC-1715 (WP-753 O1a), TASK-801
10104
- start: { params: ["role", "team"], description: "role is optional \u2014 only needed if you hold more than one role; team only with role, when you hold it in several teams." },
10114
+ start: {
10115
+ params: ["role", "team", "preview"],
10116
+ description: "role is optional \u2014 only needed if you hold more than one role; team only with role, when you hold it in several teams."
10117
+ },
10105
10118
  close: { params: [], description: "End the current session; no params." },
10106
10119
  status: { params: [], description: "Check current session state; no params." },
10107
10120
  "wrapup-review": { params: [], description: "List this session's drafts; no params." },
@@ -10150,7 +10163,7 @@ async function readAllowanceLine() {
10150
10163
  return usage?.allowanceLine;
10151
10164
  }
10152
10165
  async function handleStart2(data, clientName) {
10153
- const result2 = await startAgentSession(data?.role, data?.team, clientName);
10166
+ const result2 = await startAgentSession(data?.role, data?.team, clientName, previewFields(data?.preview));
10154
10167
  const lines = [];
10155
10168
  lines.push(
10156
10169
  `Session ${result2.sessionId} active. Pass sessionId="${result2.sessionId}" on every write: the connection does not remember your session between calls. Initiated by ${result2.initiatedBy}. Workspace ${result2.workspaceName}. Scope: ${result2.toolsScope}. Orient with a task before substantive work: it is advice for captures, relations, accepts, ticks and questions; workflow checkpoints and organisation-structure writes still require it.`
@@ -11946,4 +11959,4 @@ export {
11946
11959
  SERVER_VERSION,
11947
11960
  createProductBrainServer
11948
11961
  };
11949
- //# sourceMappingURL=chunk-QWSKAXJH.js.map
11962
+ //# sourceMappingURL=chunk-USLIBT63.js.map