mdedit-cli 0.4.5 → 0.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdedit-cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
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.9",
48
- "@mdedit/sdk": "0.4.1",
47
+ "@mdedit/agent-client": "1.0.11",
48
+ "@mdedit/sdk": "0.4.3",
49
49
  "@napi-rs/keyring": "^1.3.0",
50
50
  "chalk": "^5.6.2",
51
51
  "commander": "^14.0.3",
@@ -18,7 +18,8 @@
18
18
  "id": "openai",
19
19
  "name": "ChatGPT and Codex plugin",
20
20
  "status": "published",
21
- "detail": "Available in the ChatGPT Store as Markdown by mdedit.ai."
21
+ "detail": "Available in the ChatGPT Store as Markdown by mdedit.ai.",
22
+ "url": "https://chatgpt.com/plugins/plugin_asdk_app_6a172ed01fd4819188c0cbd26e01ced6"
22
23
  },
23
24
  {
24
25
  "id": "claude-code",
@@ -12,8 +12,8 @@ Public visibility is a separate, explicit action. Never treat saving or editing
12
12
  1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Omit the workspace selector when there is one workspace; otherwise pass the chosen `workspaceName`. Pass the chosen `articleTitle` to later tools instead of asking for internal identifiers. 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
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
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.
15
+ 4. After confirmation, generate one globally unique UUID `commandId` and call `publish_article` with that command ID and `confirmPublic: true`. Reuse the exact command ID if the call must be retried. 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
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`.
17
+ 6. Before disabling a public link, call `get_publish_status` to identify the current link and ask for explicit confirmation. After confirmation, generate one globally unique UUID `commandId`, call `unpublish_article` with that command ID and `confirmUnpublish: true`, and reuse the same command ID for any retry. Then refresh the publish component with `render_article`.
18
18
 
19
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.
@@ -16,12 +16,13 @@ Read the saved document, then leave focused feedback without changing the writer
16
16
  - Use `add_comment` for a question, concern, or explanation.
17
17
  - Use `add_suggestion` for a concrete replacement that the writer can accept or reject.
18
18
  - Anchor each item to a unique quote with nearby context when needed.
19
+ - Generate one globally unique UUID `commandId` per mutation and reuse that exact value if the same mutation is retried.
19
20
  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
 
21
22
  When the user asks to accept or reject review feedback:
22
23
 
23
24
  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
+ 2. Generate one globally unique UUID `commandId`, then call `accept_suggestion` to atomically apply the replacement and mark it accepted, or `reject_suggestion` to close it without changing the document. Reuse the exact command ID if the same decision is retried. Never simulate acceptance with `edit_article` plus `resolve_thread`.
25
26
  3. Confirm the decision conversationally only when the tool returns `applied: true`.
26
27
 
27
28
  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.
@@ -11,7 +11,7 @@ Read the current durable content, then apply the smallest unambiguous anchored c
11
11
 
12
12
  1. Resolve the workspace and document using `list_workspaces`, `list_articles`, and `read_article`. Omit the workspace selector when there is one workspace; otherwise pass the chosen `workspaceName`. Pass the chosen `articleTitle` to later tools instead of asking for internal identifiers. 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
- 3. Build one or more `edit_article` operations:
14
+ 3. Generate one globally unique UUID `commandId` for the revision, then build one or more `edit_article` operations. Reuse the exact command ID if the call must be retried:
15
15
  - Prefer a unique `quote` anchor with nearby `context`.
16
16
  - Use `afterHeading`, `beforeHeading`, or `inSection` for section changes.
17
17
  - Use a numeric range only when it came from current tool-returned content.
@@ -13,8 +13,8 @@ Create one durable private document from content the user supplied or asked you
13
13
  2. Resolve the destination workspace:
14
14
  - Call `list_workspaces` unless the conversation has already established one by name.
15
15
  - If exactly one workspace is returned, omit the workspace selector in later calls. If several are returned, ask the user which returned workspace name to use and pass it as `workspaceName`. If none are returned, stop.
16
- 3. Call `create_article` once with the natural workspace selector above, title, complete Markdown content, and `collaborative: false` unless the user explicitly asks for live collaboration.
16
+ 3. Generate one globally unique UUID `commandId` for this save, then call `create_article` with that same command ID, the natural workspace selector above, title, complete Markdown content, and `collaborative: false` unless the user explicitly asks for live collaboration. Reuse the exact command ID if the call must be retried.
17
17
  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.
18
- 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.
18
+ 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 editor URL when a link is useful. State that the document remains private.
19
19
 
20
20
  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.