@productbrain/mcp 0.0.1-beta.19 → 0.0.1-beta.20

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.
@@ -157,7 +157,7 @@ ${formatted}` }]
157
157
  "update-entry",
158
158
  {
159
159
  title: "Update Entry",
160
- description: "Update an existing entry by its human-readable ID. Only provide the fields you want to change \u2014 data fields are merged with existing values. Creates a draft version by default. **Never use autoPublish=true unless the user explicitly asks to publish** \u2014 same rule as commit-entry. Use get-entry first to see current values. SOS-020: Cannot update tension status via MCP \u2014 process decides (use Product Brain UI after approval).",
160
+ description: "Update an existing entry by its human-readable ID. Only provide the fields you want to change \u2014 data fields are merged with existing values. Creates a draft version by default. **Never use autoPublish=true unless the user explicitly asks to publish** \u2014 same rule as commit-entry. Use get-entry first to see current values.",
161
161
  inputSchema: {
162
162
  entryId: z.string().describe("Entry ID to update, e.g. 'T-SUPPLIER', 'BR-001'"),
163
163
  name: z.string().optional().describe("New display name"),
@@ -171,52 +171,29 @@ ${formatted}` }]
171
171
  annotations: { idempotentHint: true, destructiveHint: false }
172
172
  },
173
173
  async ({ entryId, name, status, data, order, canonicalKey, autoPublish, changeNote }) => {
174
- try {
175
- requireWriteAccess();
176
- const id = await mcpMutation("chain.updateEntry", {
177
- entryId,
178
- name,
179
- status,
180
- data,
181
- order,
182
- canonicalKey,
183
- autoPublish,
184
- changeNote,
185
- changedBy: getAgentSessionId() ? `agent:${getAgentSessionId()}` : void 0
186
- });
187
- await recordSessionActivity({ entryModified: id });
188
- const wsCtx = await getWorkspaceContext();
189
- const mode = autoPublish ? "published" : "saved as draft";
190
- return {
191
- content: [{ type: "text", text: `# Entry Updated
174
+ requireWriteAccess();
175
+ const id = await mcpMutation("chain.updateEntry", {
176
+ entryId,
177
+ name,
178
+ status,
179
+ data,
180
+ order,
181
+ canonicalKey,
182
+ autoPublish,
183
+ changeNote,
184
+ changedBy: getAgentSessionId() ? `agent:${getAgentSessionId()}` : void 0
185
+ });
186
+ await recordSessionActivity({ entryModified: id });
187
+ const wsCtx = await getWorkspaceContext();
188
+ const mode = autoPublish ? "published" : "saved as draft";
189
+ return {
190
+ content: [{ type: "text", text: `# Entry Updated
192
191
 
193
192
  **${entryId}** has been ${mode}.
194
193
 
195
194
  Internal ID: ${id}
196
195
  **Workspace:** ${wsCtx.workspaceSlug} (${wsCtx.workspaceId})` }]
197
- };
198
- } catch (error) {
199
- const msg = error instanceof Error ? error.message : String(error);
200
- if (msg.includes("SOS-020")) {
201
- return {
202
- content: [{
203
- type: "text",
204
- text: `# SOS-020: Tension Status Cannot Be Changed via MCP
205
-
206
- Tension status (open, in-progress, closed) must be changed through the defined process, not via MCP.
207
-
208
- **What you can do:**
209
- - Create tensions: \`capture collection=tensions name="..." description="..."\`
210
- - List tensions: \`list-entries collection=tensions\`
211
- - Update non-status fields (raised, date, priority, description) via \`update-entry\`
212
- - After process approval, a human uses the Product Brain UI to change status
213
-
214
- Process criteria (TBD): e.g. 3+ users approved, or 7 days without valid concerns.`
215
- }]
216
- };
217
- }
218
- throw error;
219
- }
196
+ };
220
197
  }
221
198
  );
222
199
  server.registerTool(
@@ -4566,4 +4543,4 @@ export {
4566
4543
  SERVER_VERSION,
4567
4544
  createProductBrainServer
4568
4545
  };
4569
- //# sourceMappingURL=chunk-PPGB6SBT.js.map
4546
+ //# sourceMappingURL=chunk-I466BKBU.js.map