wolfpack-mcp 1.0.115 → 1.0.116

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/README.md CHANGED
@@ -285,6 +285,8 @@ Get a wiki page by ID or slug.
285
285
 
286
286
  - `page_id` (required): UUID or slug (e.g., "getting-started")
287
287
 
288
+ Returns a `version` alongside the content. Quote it back as `expected_version` when you save.
289
+
288
290
  #### `create_wiki_page`
289
291
 
290
292
  Create a new wiki page.
@@ -298,8 +300,18 @@ Create a new wiki page.
298
300
  Update an existing wiki page.
299
301
 
300
302
  - `page_id` (required): The page UUID
303
+ - `expected_version` (required): The `version` `get_wiki_page` returned
301
304
  - `title`, `content` (optional)
302
305
 
306
+ **Read, then write.** `content` replaces the whole document, and wiki pages are edited by
307
+ people at the same time as an agent, so a save made from a copy read earlier would throw away
308
+ everything written since — which is what happened before #2681. `expected_version` is therefore
309
+ required, and a save quoting a version somebody has moved past is refused with 409: read the
310
+ page again, re-apply the change to what it says now, and save with the new version. Never
311
+ re-send the copy you were holding.
312
+
313
+ `create_wiki_page` is the exception — a page being created has no prior version.
314
+
303
315
  ### Journal Entries
304
316
 
305
317
  #### `list_journal_entries`
package/dist/index.js CHANGED
@@ -508,6 +508,12 @@ const UpdateWikiPageSchema = z.object({
508
508
  page_id: z.string().describe('The page slug'),
509
509
  title: z.string().optional().describe('Updated title'),
510
510
  content: z.string().optional().describe('Updated content (markdown)'),
511
+ // Optional here, required by the server: a missing version is refused by the backend with
512
+ // a message saying how to get one, which is more use than a parser error (#2681).
513
+ expected_version: z
514
+ .string()
515
+ .optional()
516
+ .describe('The `version` get_wiki_page returned for this page'),
511
517
  });
512
518
  // Journal Entry schemas
513
519
  const ListJournalEntriesSchema = z.object({
@@ -1482,6 +1488,7 @@ class WolfpackMCPServer {
1482
1488
  const page = await this.client.updateWikiPage(parsed.page_id, {
1483
1489
  title: parsed.title,
1484
1490
  content: parsed.content,
1491
+ expectedVersion: parsed.expected_version,
1485
1492
  });
1486
1493
  return {
1487
1494
  content: [
@@ -1036,6 +1036,8 @@ const SHARED_TOOLS = [
1036
1036
  name: 'get_wiki_page',
1037
1037
  permission: 'mcp:wiki:read',
1038
1038
  description: 'Get a specific wiki/documentation page by slug (URL path). Returns full content in markdown. ' +
1039
+ 'VERSION: the response carries a `version`. Pass it to update_wiki_page as expected_version when you save, ' +
1040
+ 'and read the page again — taking a fresh version — if the save is refused because somebody changed it. ' +
1039
1041
  'IMAGES: Image references in the content (e.g. `![alt](/api/files/...)`) can be viewed using the download_image tool.',
1040
1042
  inputSchema: {
1041
1043
  type: 'object',
@@ -1076,7 +1078,13 @@ const SHARED_TOOLS = [
1076
1078
  {
1077
1079
  name: 'update_wiki_page',
1078
1080
  permission: 'mcp:wiki:update',
1079
- description: 'Update an existing wiki page. Requires mcp:wiki:update permission. ' + CONTENT_LINKING_HELP,
1081
+ description: 'Update an existing wiki page. Requires mcp:wiki:update permission. ' +
1082
+ 'READ BEFORE YOU WRITE: call get_wiki_page first and pass the `version` it returned as expected_version. ' +
1083
+ 'Wiki pages are edited by people at the same time as you, and `content` replaces the whole document, ' +
1084
+ 'so a save made from a copy you read earlier would throw away everything written since. ' +
1085
+ 'If the save is refused because the page changed, do NOT send the same content again: ' +
1086
+ 'call get_wiki_page, re-apply your change to what the page says now, and save with the new version. ' +
1087
+ CONTENT_LINKING_HELP,
1080
1088
  // No tag_ids and no project_slug: `PATCH /api/mcp/wiki-pages/{pageId}` has
1081
1089
  // neither. The body model is `additionalProperties: false`, so a call
1082
1090
  // carrying tags was refused outright rather than ignored, and the page
@@ -1092,8 +1100,13 @@ const SHARED_TOOLS = [
1092
1100
  type: 'string',
1093
1101
  description: 'Updated content (markdown)',
1094
1102
  },
1103
+ expected_version: {
1104
+ type: 'string',
1105
+ description: 'The `version` get_wiki_page returned for this page. Required: the save is refused if ' +
1106
+ 'somebody has changed the page since, so that their edit is not thrown away.',
1107
+ },
1095
1108
  },
1096
- required: ['page_id'],
1109
+ required: ['page_id', 'expected_version'],
1097
1110
  },
1098
1111
  },
1099
1112
  // Journal Entry tools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolfpack-mcp",
3
- "version": "1.0.115",
3
+ "version": "1.0.116",
4
4
  "description": "MCP server for Clachan (formerly Wolfpack), AI-enhanced software delivery tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",