mdedit-cli 0.4.0 → 0.4.1
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 +2 -2
- package/dist/index.js +126 -11
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/skills/catalog.json +41 -5
- package/skills/find-mdedit-document/cli/SKILL.md +1 -1
- package/skills/find-mdedit-document/mcp/SKILL.md +2 -2
- package/skills/publish-mdedit-document/cli/SKILL.md +5 -6
- package/skills/publish-mdedit-document/mcp/SKILL.md +6 -7
- package/skills/review-mdedit-document/cli/SKILL.md +22 -0
- package/skills/review-mdedit-document/mcp/SKILL.md +27 -0
- package/skills/revise-mdedit-document/cli/SKILL.md +1 -1
- package/skills/revise-mdedit-document/mcp/SKILL.md +2 -2
- package/skills/save-mdedit-document/mcp/SKILL.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdedit-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Command-line interface for mdedit.ai.",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"prepack": "yarn --cwd ../.. check:agent-skills && yarn build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@mdedit/agent-client": "1.0.
|
|
48
|
-
"@mdedit/sdk": "0.3.
|
|
47
|
+
"@mdedit/agent-client": "1.0.5",
|
|
48
|
+
"@mdedit/sdk": "0.3.7",
|
|
49
49
|
"@napi-rs/keyring": "^1.3.0",
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
51
|
"commander": "^14.0.3",
|
package/skills/catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
-
"evidenceDate": "2026-08-
|
|
4
|
+
"evidenceDate": "2026-08-24",
|
|
5
5
|
"product": "mdedit",
|
|
6
6
|
"docsUrl": "https://mdedit.ai/docs/skills",
|
|
7
7
|
"installUrl": "https://mdedit.ai/docs/skills/install",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
{
|
|
18
18
|
"id": "openai",
|
|
19
19
|
"name": "ChatGPT and Codex plugin",
|
|
20
|
-
"status": "
|
|
21
|
-
"detail": "
|
|
20
|
+
"status": "published",
|
|
21
|
+
"detail": "Published in the ChatGPT Store on 2026-08-24. Review support and natural-response improvements are prepared for the next Store update and still require portal revalidation."
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"id": "claude-code",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"Match returned document metadata",
|
|
96
96
|
"Read the selected saved content"
|
|
97
97
|
],
|
|
98
|
-
"success": "Answers from returned saved content
|
|
98
|
+
"success": "Answers from returned saved content, clearly distinguishes summaries from exact text, and keeps internal metadata out of the user-facing response.",
|
|
99
99
|
"safety": "The workflow is read-only and stops when workspace or document matching is ambiguous."
|
|
100
100
|
},
|
|
101
101
|
{
|
|
@@ -125,9 +125,45 @@
|
|
|
125
125
|
"Apply the smallest anchored edit",
|
|
126
126
|
"Re-read or stop when conflicts occur"
|
|
127
127
|
],
|
|
128
|
-
"success": "
|
|
128
|
+
"success": "Confirms the durable change conversationally with no unresolved conflicts and keeps internal revision metadata out of the user-facing response.",
|
|
129
129
|
"safety": "The skill never overwrites ambiguity and does not retry a conflict without reconciling the user's intent."
|
|
130
130
|
},
|
|
131
|
+
{
|
|
132
|
+
"id": "review-mdedit-document",
|
|
133
|
+
"anchor": "review",
|
|
134
|
+
"title": "Review a document",
|
|
135
|
+
"shortDescription": "Review a saved document and decide pending suggestions.",
|
|
136
|
+
"description": "Review an existing Markdown Document in mdedit with anchored comments and suggestions, or accept or reject an existing suggestion. Use when the user asks to review, critique, proofread, suggest improvements, or decide pending review feedback on a saved mdedit document. Do not use when the user asks for an unrelated direct edit, publishing, or review of local or unsaved content.",
|
|
137
|
+
"examplePrompt": "Review my launch brief in mdedit and leave suggestions for anything unclear.",
|
|
138
|
+
"triggers": [
|
|
139
|
+
"review my mdedit document",
|
|
140
|
+
"critique a saved draft",
|
|
141
|
+
"leave suggestions on my document",
|
|
142
|
+
"accept that suggestion",
|
|
143
|
+
"reject that suggestion"
|
|
144
|
+
],
|
|
145
|
+
"exclusions": [
|
|
146
|
+
"direct document edits",
|
|
147
|
+
"publishing",
|
|
148
|
+
"local or unsaved content"
|
|
149
|
+
],
|
|
150
|
+
"scopes": [
|
|
151
|
+
"workspaces:read",
|
|
152
|
+
"articles:read",
|
|
153
|
+
"articles:write",
|
|
154
|
+
"reviews:read",
|
|
155
|
+
"reviews:write"
|
|
156
|
+
],
|
|
157
|
+
"operations": [
|
|
158
|
+
"Resolve and read the saved document",
|
|
159
|
+
"Inspect existing review threads",
|
|
160
|
+
"Add anchored comments or suggestions",
|
|
161
|
+
"Accept or reject a selected suggestion",
|
|
162
|
+
"Summarize feedback conversationally"
|
|
163
|
+
],
|
|
164
|
+
"success": "Adds focused review items or applies the requested suggestion decision and summarizes the result without exposing internal metadata.",
|
|
165
|
+
"safety": "Review never implies permission to make unrelated edits or publish, and ambiguous anchors or suggestion choices are never guessed."
|
|
166
|
+
},
|
|
131
167
|
{
|
|
132
168
|
"id": "publish-mdedit-document",
|
|
133
169
|
"anchor": "publish",
|
|
@@ -16,6 +16,6 @@ Resolve real saved content before describing it.
|
|
|
16
16
|
- When several documents plausibly match, present their returned titles and ask the user to choose.
|
|
17
17
|
- When none match, say so and stop.
|
|
18
18
|
4. Run `mdedit article get <articleId> --workspace <workspaceId> --include-content --format json`.
|
|
19
|
-
5. Answer from the returned saved content
|
|
19
|
+
5. Answer from the returned saved content. Distinguish exact saved text from any summary or interpretation. Keep IDs, revisions, hashes, and raw JSON internal unless the user explicitly asks for diagnostic details.
|
|
20
20
|
|
|
21
21
|
This workflow is read-only. Do not run create, edit, publish, or unpublish commands. Never infer document content, identifiers, publication state, or URLs from titles or conversation memory.
|
|
@@ -12,12 +12,12 @@ Resolve a real saved document before describing its content.
|
|
|
12
12
|
1. Resolve the workspace with `list_workspaces` unless a `workspaceId` from an earlier mdedit tool result is already established.
|
|
13
13
|
- If several workspaces could match, ask the user to choose by returned name.
|
|
14
14
|
- If no workspace matches, stop without guessing.
|
|
15
|
-
2. Call `list_articles` for the resolved workspace.
|
|
15
|
+
2. Call `list_articles` for the resolved workspace. When the user gives a title or keywords, pass them as `query`. Work from one bounded page at a time; do not retrieve every page merely to reproduce a long document list in chat.
|
|
16
16
|
3. Match the user's title or description against returned document metadata.
|
|
17
17
|
- If there is one clear match, continue.
|
|
18
18
|
- If several documents plausibly match, present only their returned titles and ask the user to choose.
|
|
19
19
|
- If there is no match, say so and stop.
|
|
20
20
|
4. Call `read_article` with the returned `workspaceId` and `articleId`.
|
|
21
|
-
5. Answer from the returned saved `content
|
|
21
|
+
5. For open, show, or preview requests, call `render_article` with `focus: preview`. Answer from the returned saved `content` when a textual answer is also needed. Distinguish exact saved content from any summary or interpretation. Keep `contentRevision`, `contentHash`, `workspaceId`, and `articleId` internal unless the user explicitly asks for diagnostic details.
|
|
22
22
|
|
|
23
23
|
This workflow is read-only. Do not call create, edit, publish, or unpublish tools. Never infer document content, identifiers, revisions, publication status, or URLs from titles or conversation memory.
|
|
@@ -10,11 +10,10 @@ compatibility: Requires mdedit-cli 0.4.0 or newer and an authenticated mdedit pr
|
|
|
10
10
|
Public visibility is a separate, explicit action. Never treat saving or editing as permission to publish.
|
|
11
11
|
|
|
12
12
|
1. Resolve the workspace and document from returned CLI results. Ask the user to choose when a match is ambiguous.
|
|
13
|
-
2.
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
17
|
-
6.
|
|
18
|
-
7. Before disabling a link, identify the returned current link and ask for explicit confirmation. After confirmation, run `mdedit article unpublish <articleId> --workspace <workspaceId> --yes --format json`.
|
|
13
|
+
2. For a status-only request, run `mdedit article publish-status <articleId> --workspace <workspaceId> --format json`, report the returned state and exact URL fields, then stop.
|
|
14
|
+
3. Before publishing or updating a public link, warn that anyone with the link can view the document and ask for explicit confirmation.
|
|
15
|
+
4. After confirmation, run `mdedit article publish <articleId> --workspace <workspaceId> --format json`. The command atomically defaults a new link to Live while preserving an existing link's mode, so do not add a status preflight. Add `--snapshot`, `--live`, `--slug`, or SEO metadata only when the user requested or approved it.
|
|
16
|
+
5. Treat publication as successful only when the command returns a public URL and publication identity. Return the exact command-provided URL.
|
|
17
|
+
6. Before disabling a link, run `publish-status` to identify the current link and ask for explicit confirmation. After confirmation, run `mdedit article unpublish <articleId> --workspace <workspaceId> --yes --format json`.
|
|
19
18
|
|
|
20
19
|
Never construct an `mded.it` URL, expose an editor URL as a public link, or claim publication from a requested slug. On denied permission, failure, or missing result fields, report the bounded error and leave visibility unchanged.
|
|
@@ -9,12 +9,11 @@ compatibility: Requires the mdedit MCP server with publishing tools and explicit
|
|
|
9
9
|
|
|
10
10
|
Public visibility is a separate, explicit action. Never treat saving or editing as permission to publish.
|
|
11
11
|
|
|
12
|
-
1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Ask the user to choose when a returned match is ambiguous.
|
|
13
|
-
2.
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
17
|
-
6.
|
|
18
|
-
7. Before disabling a public link, identify the current returned link and ask for explicit confirmation. After confirmation, call `unpublish_article` with `confirmUnpublish: true`.
|
|
12
|
+
1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Use `list_articles.query` when the user provides a title or keywords, and work from one bounded page at a time instead of retrieving every page. Ask the user to choose when a returned match is ambiguous.
|
|
13
|
+
2. For a status-only request, call `get_publish_status`, then call `render_article` with `focus: publish`. Report only the returned state and exact URL fields, then stop without mutating.
|
|
14
|
+
3. Before publishing or updating a public link, warn that anyone with the link can view the document and ask for explicit confirmation. Do not infer confirmation from an earlier save or edit request.
|
|
15
|
+
4. After confirmation, call `publish_article` with `confirmPublic: true`. The tool atomically defaults a new link to Live while preserving an existing link's mode, so do not add a status preflight. Include a custom slug or SEO metadata only when the user supplied or approved it.
|
|
16
|
+
5. Treat publication as successful only when the tool returns `publishId`, `shortUrl`, `fullUrl`, and `publishedAt`. Call `render_article` with `focus: publish`. Return the exact tool-provided public URL; prefer `shortUrl` for sharing.
|
|
17
|
+
6. Before disabling a public link, call `get_publish_status` to identify the current link and ask for explicit confirmation. After confirmation, call `unpublish_article` with `confirmUnpublish: true`, then refresh the publish component with `render_article`.
|
|
19
18
|
|
|
20
19
|
Never construct an `mded.it` URL, expose an editor URL as a public link, or claim publication from a requested slug. On denied permission, failure, or missing result fields, report the bounded error and leave visibility unchanged.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: review-mdedit-document
|
|
4
|
+
description: Review an existing Markdown Document in mdedit with anchored comments and suggestions, or accept or reject an existing suggestion. Use when the user asks to review, critique, proofread, suggest improvements, or decide pending review feedback on a saved mdedit document. Do not use when the user asks for an unrelated direct edit, publishing, or review of local or unsaved content.
|
|
5
|
+
compatibility: Requires mdedit-cli 0.4.0 or newer with an authenticated profile or scoped API key.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Review a document in mdedit
|
|
9
|
+
|
|
10
|
+
Read the saved document, then leave focused feedback without changing the writer's Markdown.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace and document with `mdedit workspace list --format json` and `mdedit article list --workspace <returned-workspace-id> --format json`. Ask the user to choose by returned name if several results plausibly match.
|
|
13
|
+
2. Read the current document with `mdedit article get <returned-article-id> --workspace <returned-workspace-id> --format json`.
|
|
14
|
+
3. Inspect existing feedback with `mdedit review list <returned-article-id> --workspace <returned-workspace-id> --status open --format json` so you do not duplicate it.
|
|
15
|
+
4. Add focused review items:
|
|
16
|
+
- Use `mdedit review add` with `--quote` and `--body` for comments.
|
|
17
|
+
- Use `mdedit review suggest` with `--quote` and `--replace` for concrete replacements.
|
|
18
|
+
5. Summarize the number and themes of the comments or suggestions. Do not display workspace IDs, article IDs, thread IDs, command IDs, hashes, revisions, or raw JSON unless the user explicitly asks for diagnostics.
|
|
19
|
+
|
|
20
|
+
When the user asks to accept or reject review feedback, locate the exact open suggestion with `mdedit review list`, ask one focused question if more than one suggestion could match, then use `mdedit review accept` or `mdedit review reject` with the returned thread ID. Do not simulate acceptance with a separate article edit. Confirm the decision only after the command succeeds.
|
|
21
|
+
|
|
22
|
+
Review requests never authorize unrelated article edits, publishing, or unpublishing. Adding review feedback leaves Markdown unchanged; accepting a specifically selected suggestion applies only that proposed replacement. Review commands work on ordinary documents. If a quote or suggestion choice is ambiguous or no longer matches, read the document again and ask one focused question instead of guessing.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Generated from packages/agent-skills. Do not edit this copy directly. -->
|
|
2
|
+
---
|
|
3
|
+
name: review-mdedit-document
|
|
4
|
+
description: Review an existing Markdown Document in mdedit with anchored comments and suggestions, or accept or reject an existing suggestion. Use when the user asks to review, critique, proofread, suggest improvements, or decide pending review feedback on a saved mdedit document. Do not use when the user asks for an unrelated direct edit, publishing, or review of local or unsaved content.
|
|
5
|
+
compatibility: Requires the mdedit MCP server with article read and review tools.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Review a document in mdedit
|
|
9
|
+
|
|
10
|
+
Read the saved document, then leave focused feedback without changing the writer's Markdown.
|
|
11
|
+
|
|
12
|
+
1. Resolve the workspace and document with `list_workspaces` and `list_articles`. Use `query` when the user provides a title or keywords, and work from one bounded page at a time instead of retrieving every page. If several returned names plausibly match, ask the user to choose by name. Never ask the user for an internal ID unless troubleshooting requires it.
|
|
13
|
+
2. Call `read_article` for the selected document. Use its current saved content as the only source for the review.
|
|
14
|
+
3. Call `list_review_threads` so you do not duplicate existing feedback.
|
|
15
|
+
4. Add only useful, non-duplicative review items:
|
|
16
|
+
- Use `add_comment` for a question, concern, or explanation.
|
|
17
|
+
- Use `add_suggestion` for a concrete replacement that the writer can accept or reject.
|
|
18
|
+
- Anchor each item to a unique quote with nearby context when needed.
|
|
19
|
+
5. Call `render_article` with `focus: review` so the user can inspect and triage feedback. Summarize the review conversationally: state how many comments or suggestions were added and the main themes. Do not display `workspaceId`, `articleId`, `threadId`, `commandId`, hashes, revisions, or JSON unless the user explicitly asks for diagnostic details.
|
|
20
|
+
|
|
21
|
+
When the user asks to accept or reject review feedback:
|
|
22
|
+
|
|
23
|
+
1. Use the `suggestionId` and `targetId` already returned by `add_suggestion`, or call `list_review_threads` with `status: open` and match the user's description against the returned suggestions. Ask one focused question if more than one suggestion could match.
|
|
24
|
+
2. Call `accept_suggestion` to atomically apply the replacement and mark it accepted, or `reject_suggestion` to close it without changing the document. Never simulate acceptance with `edit_article` plus `resolve_thread`.
|
|
25
|
+
3. Confirm the decision conversationally only when the tool returns `applied: true`.
|
|
26
|
+
|
|
27
|
+
Review requests never imply permission to call `edit_article`, publish, or unpublish. Review tools work on ordinary documents; do not ask the user to enable collaboration. Treat a review mutation as successful only when the tool returns `applied: true`. If an anchor is ambiguous or changed, read the document again and ask one focused question instead of guessing.
|
|
@@ -14,6 +14,6 @@ Read the current durable content, then apply the smallest unambiguous anchored c
|
|
|
14
14
|
3. For one unique replacement, run `mdedit article edit <articleId> --workspace <workspaceId> --replace <exactText> --with <replacement> --format json`.
|
|
15
15
|
4. For insertions, deletions, contextual anchors, or several edits, write the smallest operation array and run `mdedit article edit <articleId> --workspace <workspaceId> --ops-file <path> --format json`.
|
|
16
16
|
5. Avoid whole-document replacement unless the user explicitly requests a full rewrite.
|
|
17
|
-
6. Treat the edit as successful only when the JSON result has no unresolved conflict. Re-read the saved document
|
|
17
|
+
6. Treat the edit as successful only when the JSON result has no unresolved conflict. Re-read the saved document when the result is ambiguous, then summarize the durable change without displaying IDs, revisions, hashes, or raw JSON unless the user asks for diagnostics.
|
|
18
18
|
|
|
19
19
|
If the command reports a conflict, stop, run `article get` again, and explain what changed concurrently. Do not retry against new content until the user's intent has been reconciled. Never invent anchors or claim success from requested text alone.
|
|
@@ -9,7 +9,7 @@ compatibility: Requires the mdedit MCP server with read_article and edit_article
|
|
|
9
9
|
|
|
10
10
|
Read the current durable content, then apply the smallest unambiguous anchored change.
|
|
11
11
|
|
|
12
|
-
1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Ask the user to choose when a returned workspace or document match is ambiguous.
|
|
12
|
+
1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Use `list_articles.query` when the user provides a title or keywords, and work from one bounded page at a time instead of retrieving every page. Ask the user to choose when a returned workspace or document match is ambiguous.
|
|
13
13
|
2. Confirm the requested change is specific enough to apply. Ask a focused question when the target text, section, or replacement is unclear.
|
|
14
14
|
3. Build one or more `edit_article` operations:
|
|
15
15
|
- Prefer a unique `quote` anchor with nearby `context`.
|
|
@@ -18,6 +18,6 @@ Read the current durable content, then apply the smallest unambiguous anchored c
|
|
|
18
18
|
- Avoid whole-document replacement unless the user requests a full rewrite.
|
|
19
19
|
4. Pass the current `contentHash` from `read_article` as `ifContentHash`.
|
|
20
20
|
5. Treat the edit as successful only when the result has no conflicts and returns new durable `content`, `contentRevision`, and `contentHash`.
|
|
21
|
-
6.
|
|
21
|
+
6. Call `render_article` with `focus: preview`, then summarize what changed in one or two conversational sentences. Do not display revisions, hashes, IDs, or JSON unless the user explicitly asks for diagnostic details.
|
|
22
22
|
|
|
23
23
|
If the tool reports a hash mismatch or any conflict, stop, read the document again, and explain what changed concurrently. Do not retry against a new version without reconciling the user's intent. Never overwrite ambiguity, invent anchors, or claim success from requested text alone.
|
|
@@ -15,7 +15,7 @@ Create one durable private document from content the user supplied or asked you
|
|
|
15
15
|
- Otherwise call `list_workspaces`.
|
|
16
16
|
- If exactly one workspace is returned, use it. If several are returned, ask the user which returned workspace name to use. If none are returned, stop.
|
|
17
17
|
3. Call `create_article` once with the returned `workspaceId`, title, complete Markdown content, and `collaborative: false` unless the user explicitly asks for live collaboration.
|
|
18
|
-
4. Treat the save as successful only when the tool returns `
|
|
19
|
-
5. Report the saved title and exact returned
|
|
18
|
+
4. Treat the save as successful only when the tool returns the saved title, `editorUrl`, `contentHash`, and internal `contentRevision` metadata; keep routing, hash, and revision values out of the conversational response.
|
|
19
|
+
5. Call `render_article` with `focus: preview` so UI-capable hosts show the saved document. Report the saved title in one short sentence and use the exact returned resource link. State that the document remains private.
|
|
20
20
|
|
|
21
21
|
Never invent or reconstruct a workspace ID, document ID, revision, hash, or editor URL. Never call a publishing tool as part of this workflow. If creation fails or reports retained partial state, report that bounded failure and do not claim the document was saved.
|