@productbrain/mcp 0.0.1-beta.12394 → 0.0.1-beta.12402

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.
@@ -41,7 +41,7 @@ import {
41
41
  seatKeysRevoked,
42
42
  setSessionOriented,
43
43
  startAgentSession
44
- } from "./chunk-VWK7TN3J.js";
44
+ } from "./chunk-3U2ECUFG.js";
45
45
 
46
46
  // src/server.ts
47
47
  import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -10109,7 +10109,8 @@ var SESSION_ACTION_SPECS = {
10109
10109
  function registerSessionTools(server) {
10110
10110
  const wrapupHandler = createWrapupHandler();
10111
10111
  const sessionHandlers = {
10112
- start: (data) => handleStart2(data),
10112
+ start: (data) => handleStart2(data, server.server.getClientVersion()?.name),
10113
+ // TASK-1211: the client's own name (clientInfo)
10113
10114
  close: () => handleClose(),
10114
10115
  status: () => handleStatus(),
10115
10116
  "wrapup-review": () => wrapupHandler(),
@@ -10147,13 +10148,14 @@ async function readAllowanceLine() {
10147
10148
  const usage = await kernelQuery("usage.getWorkspaceSummary", { periodDays: 1 }).catch(() => null);
10148
10149
  return usage?.allowanceLine;
10149
10150
  }
10150
- async function handleStart2(data) {
10151
- const result2 = await startAgentSession(data?.role, data?.team);
10151
+ async function handleStart2(data, clientName) {
10152
+ const result2 = await startAgentSession(data?.role, data?.team, clientName);
10152
10153
  const lines = [];
10153
10154
  lines.push(
10154
10155
  `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.`
10155
10156
  );
10156
- if (!result2.briefing?.firstReply) lines.push(FEEDBACK_SUBMIT_HINT);
10157
+ const methodServed = Boolean(result2.briefing?.methods?.method);
10158
+ if (!methodServed) lines.push(FEEDBACK_SUBMIT_HINT);
10157
10159
  const allowanceLine = await readAllowanceLine();
10158
10160
  if (allowanceLine) lines.push(allowanceLine);
10159
10161
  const questionNotice = result2.notices?.find((n) => n.source === QUESTION_ACK_GATE_SOURCE_ID);
@@ -10169,7 +10171,7 @@ async function handleStart2(data) {
10169
10171
  surface: "mcp",
10170
10172
  sessionStart: true
10171
10173
  }));
10172
- lines.push("", ...SPINE_LINKS_LINES, ...result2.briefing?.firstReply ? [] : [START_PREFLIGHT_NEXT]);
10174
+ if (!methodServed) lines.push("", START_PREFLIGHT_NEXT);
10173
10175
  const summary = `Session ${result2.sessionId} active. Workspace ${result2.workspaceName}. Pass sessionId="${result2.sessionId}" on every write. Orient with a task first; workflow checkpoints and organisation-structure writes still require it.`;
10174
10176
  return {
10175
10177
  content: [{ type: "text", text: lines.join("\n") }],
@@ -11943,4 +11945,4 @@ export {
11943
11945
  SERVER_VERSION,
11944
11946
  createProductBrainServer
11945
11947
  };
11946
- //# sourceMappingURL=chunk-DMDWZILY.js.map
11948
+ //# sourceMappingURL=chunk-V2WCCCRI.js.map