@workover/mcp 0.7.0 → 0.8.0
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 +1 -1
- package/index.mjs +6 -1
- package/lib.mjs +14 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ That's it. Ask Claude Code things like *"read my Workover doc about onboarding a
|
|
|
26
26
|
- `workover_list_projects()` — list your projects
|
|
27
27
|
- `workover_create_doc(projectId, title, markdown, categories?)` — create a document with its content written in, filed under the categories you name (a category that does not exist yet is created)
|
|
28
28
|
- `workover_upload_image(docId, path, alt)` — put a local image into a document's media
|
|
29
|
-
- `workover_propose_edit(docId, markdown, note, tabId?)` — propose a revised version (rendered as suggestions; never applied or published automatically)
|
|
29
|
+
- `workover_propose_edit(docId, markdown, note, tabId?, reasoning?)` — propose a revised version (rendered as suggestions; never applied or published automatically)
|
|
30
30
|
- `workover_edit_doc(docId, markdown, note, tabId?)` — edit a document directly, no review step. Needs `workover login --write`
|
|
31
31
|
- `workover_style_guide(projectId?)` — the rules this team writes by
|
|
32
32
|
- `workover_add_style_rule(text, projectId | organizationId)` — add a rule. Needs `workover login --rules`
|
package/index.mjs
CHANGED
|
@@ -235,6 +235,11 @@ const TOOLS = [
|
|
|
235
235
|
description:
|
|
236
236
|
'Which tab the suggestion is against, for a document with tabs (workover_list_tabs). Omit for the main body.',
|
|
237
237
|
},
|
|
238
|
+
reasoning: {
|
|
239
|
+
type: 'string',
|
|
240
|
+
description:
|
|
241
|
+
'Optional: one or two sentences on what was wrong or missing in the document that this change fixes. Recorded as the reasoning shown beside the suggestion under "Why this change". Omit it rather than guess.',
|
|
242
|
+
},
|
|
238
243
|
},
|
|
239
244
|
required: ['docId', 'markdown'],
|
|
240
245
|
},
|
|
@@ -245,7 +250,7 @@ const telemetry = telemetryEnabled(process.env, { auth });
|
|
|
245
250
|
// Keep in step with package.json. It is what every telemetry event is stamped with, so a stale
|
|
246
251
|
// value here does not break anything — it quietly attributes this release's behaviour to an older
|
|
247
252
|
// one, which is worse, because the numbers still look fine.
|
|
248
|
-
const VERSION = '0.
|
|
253
|
+
const VERSION = '0.8.0';
|
|
249
254
|
|
|
250
255
|
/**
|
|
251
256
|
* What the client is told about this server before it calls anything.
|
package/lib.mjs
CHANGED
|
@@ -401,14 +401,17 @@ export function makeDispatch({ auth, api, apiPost, fetchImpl = fetch, readFile }
|
|
|
401
401
|
: ''
|
|
402
402
|
: ` NOTE: this Workover ignored the categories, so the document is not filed under ${categories.join(', ')} — set them in the document list.`;
|
|
403
403
|
if (contentCommitted(doc)) {
|
|
404
|
-
// The
|
|
404
|
+
// The verdict when the api ran the check, the guide when it could not have.
|
|
405
405
|
//
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
// happen, this
|
|
409
|
-
//
|
|
410
|
-
// again, in a place nobody would think to look
|
|
411
|
-
const style =
|
|
406
|
+
// A current api lints the body on create the way `propose` and `edit` do and returns
|
|
407
|
+
// `style` (null meaning no rules). An older one has no such field, and rather than assert
|
|
408
|
+
// a check that did not happen, this falls back to showing the rules so the agent can
|
|
409
|
+
// measure its own draft against them. Claiming "no violations" on a check that never ran
|
|
410
|
+
// would be the empty-checklist problem again, in a place nobody would think to look.
|
|
411
|
+
const style =
|
|
412
|
+
doc && 'style' in doc
|
|
413
|
+
? renderStyleFeedback(doc.style)
|
|
414
|
+
: renderStyleGuide(await fetchRules(api, projectId));
|
|
412
415
|
return text(
|
|
413
416
|
`Created "${title}" (document #${doc.id}) with the content written in — no review step, because it is a new document.${filedNote}${doc.documentUrl ? `\n${doc.documentUrl}` : ''}\n\nFurther changes to it go through workover_propose_edit, which the person accepts or rejects. Nothing is published to WordPress either way.${style}`,
|
|
414
417
|
);
|
|
@@ -486,6 +489,10 @@ export function makeDispatch({ auth, api, apiPost, fetchImpl = fetch, readFile }
|
|
|
486
489
|
note: args.note ? String(args.note) : undefined,
|
|
487
490
|
source: 'Claude Code',
|
|
488
491
|
...(tabId != null ? { tabId } : {}),
|
|
492
|
+
// "Why this change": the agent's account of what was wrong. Text only; optional.
|
|
493
|
+
...(typeof args.reasoning === 'string' && args.reasoning.trim()
|
|
494
|
+
? { rationale: { problem: args.reasoning.trim().slice(0, 2000) } }
|
|
495
|
+
: {}),
|
|
489
496
|
});
|
|
490
497
|
return text(
|
|
491
498
|
`Proposed your changes to ${res?.tab ? `the "${res.tab.title}" tab of ` : ''}document #${docId}. They'll appear as suggestions to accept or reject when the document is open in Workover${res?.documentUrl ? `:\n${res.documentUrl}` : '.'}\n\nNothing is published until the person reviews and accepts.${renderStyleFeedback(res?.style)}`,
|
package/package.json
CHANGED