mdedit-cli 0.3.2 → 0.3.4

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/openclaw.json CHANGED
@@ -70,36 +70,38 @@
70
70
  },
71
71
  {
72
72
  "name": "article_create",
73
- "description": "Create a new article, optionally with initial markdown content from file or inline string",
73
+ "description": "Create a new article, optionally with initial markdown content and a Live public link.",
74
74
  "command": "mdedit article create --title <title> --format json",
75
75
  "flags": {
76
76
  "--title <title>": "Article title (required)",
77
77
  "--folder <id>": "Place in a folder",
78
78
  "--file <path>": "Read initial content from file (use - for stdin)",
79
79
  "--content <text>": "Inline content string",
80
- "--publish": "Publish the created article to a public mded.it link",
80
+ "--publish": "Publish the created article to a Live public mded.it link without confirmation",
81
+ "--snapshot": "Publish a frozen Snapshot instead of a Live link (requires --publish)",
82
+ "--live": "Explicitly publish a Live link (requires --publish)",
81
83
  "--slug <slug>": "Custom public-link slug (requires --publish)",
82
- "--yes": "Skip public-publishing confirmation",
83
84
  "--workspace <id>": "Workspace ID"
84
85
  },
85
- "example": "mdedit article create --title 'My Post' --file post.md --publish --yes --format json"
86
+ "example": "mdedit article create --title 'My Post' --file post.md --publish --format json"
86
87
  },
87
88
  {
88
89
  "name": "article_publish",
89
- "description": "Publish or update an article at a public mded.it link. Requires publishing:write.",
90
- "command": "mdedit article publish <articleId> --yes --format json",
90
+ "description": "Publish or update an article at a stable public mded.it link. New links default Live; existing links preserve their stored mode. Requires publishing:write.",
91
+ "command": "mdedit article publish <articleId> --format json",
91
92
  "flags": {
92
93
  "--slug <slug>": "Custom public-link slug",
93
94
  "--seo-title <title>": "SEO/social title for the public page",
94
95
  "--seo-description <description>": "SEO/social description for the public page",
95
- "--yes": "Confirm that anyone with the link may view the document",
96
+ "--snapshot": "Create or switch to a frozen Snapshot",
97
+ "--live": "Create or switch to a Live link that follows durable edits",
96
98
  "--workspace <id>": "Workspace ID"
97
99
  },
98
- "example": "mdedit article publish abc123 --slug public-draft --yes --format json"
100
+ "example": "mdedit article publish abc123 --slug public-draft --format json"
99
101
  },
100
102
  {
101
103
  "name": "article_publish_status",
102
- "description": "Get an article's public-link status, URL, metadata, and view count. Requires publishing:read.",
104
+ "description": "Get an article's stable public URL, mode, source revision/version, synchronization status/error, metadata, and view count. Requires publishing:read.",
103
105
  "command": "mdedit article publish-status <articleId> --format json",
104
106
  "flags": {
105
107
  "--workspace <id>": "Workspace ID"
@@ -372,6 +374,18 @@
372
374
  "mdedit folder list --format json",
373
375
  "mdedit article create --title 'New Post' --folder <folderId> --file content.md --format json"
374
376
  ],
377
+ "create_live_public_link": [
378
+ "mdedit article create --file document.md --publish --format json",
379
+ "Read publication.shortUrl, publication.mode, publication.sourceVersionId, and publication.syncStatus"
380
+ ],
381
+ "publish_frozen_snapshot": [
382
+ "mdedit article publish <articleId> --snapshot --format json",
383
+ "Run article publish again to update the frozen content"
384
+ ],
385
+ "upgrade_legacy_snapshot": [
386
+ "mdedit article publish-status <articleId> --format json",
387
+ "mdedit article publish <articleId> --live --format json"
388
+ ],
375
389
  "bulk_export": [
376
390
  "mdedit article list --format json > articles.json"
377
391
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdedit-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Command-line interface for mdedit.ai.",
@@ -17,6 +17,11 @@
17
17
  "terminal"
18
18
  ],
19
19
  "license": "Apache-2.0",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/mangoappstudio/mdedit.git",
23
+ "directory": "packages/mdedit-cli"
24
+ },
20
25
  "engines": {
21
26
  "node": ">=20"
22
27
  },
@@ -39,20 +44,19 @@
39
44
  "prepack": "yarn build"
40
45
  },
41
46
  "dependencies": {
42
- "@mdedit/agent-client": "1.0.1",
43
- "@mdedit/sdk": "0.3.2",
47
+ "@mdedit/agent-client": "1.0.3",
48
+ "@mdedit/sdk": "0.3.4",
44
49
  "@napi-rs/keyring": "^1.3.0",
45
50
  "chalk": "^5.6.2",
46
51
  "commander": "^14.0.3",
47
52
  "inquirer": "^8.2.7",
48
- "uuid": "^10.0.0"
53
+ "uuid": "^14.0.1"
49
54
  },
50
55
  "devDependencies": {
51
56
  "@hocuspocus/server": "^4.2.0",
52
57
  "@mdedit/node-auth": "0.1.0",
53
58
  "@types/inquirer": "^8.2.12",
54
59
  "@types/node": "^20.10.5",
55
- "@types/uuid": "^10.0.0",
56
60
  "tsup": "^8.0.2",
57
61
  "tsx": "^4.7.0",
58
62
  "typescript": "^5.3.3",
package/skill.md CHANGED
@@ -94,7 +94,8 @@ mdedit article create --title "My Article"
94
94
  mdedit article create --title "My Article" --folder <folderId> --file article.md
95
95
  mdedit article create --title "My Article" --content "# Hello world"
96
96
  echo "# Hello" | mdedit article create --title "My Article" --file -
97
- mdedit article create --file article.md --publish --yes
97
+ mdedit article create --file article.md --publish # new Live public link
98
+ mdedit article create --file article.md --publish --snapshot
98
99
 
99
100
  # Update
100
101
  mdedit article update <articleId> --title "New Title"
@@ -112,9 +113,11 @@ mdedit article edit <articleId> --ops-file ops.json --format json
112
113
  mdedit article watch <articleId>
113
114
  mdedit article watch <articleId> --agent claude-code --poll-interval 5000
114
115
 
115
- # Publish a deliberate public snapshot (requires publishing:write)
116
- mdedit article publish <articleId> --yes
117
- mdedit article publish <articleId> --slug my-document --yes
116
+ # Publish a public link (requires publishing:write)
117
+ mdedit article publish <articleId> # new links default Live
118
+ mdedit article publish <articleId> --snapshot # frozen artifact
119
+ mdedit article publish <articleId> --live # switch existing link to Live
120
+ mdedit article publish <articleId> --slug my-document
118
121
  mdedit article publish-status <articleId> --format json
119
122
  mdedit article unpublish <articleId> --yes
120
123
 
@@ -240,6 +243,27 @@ CONTENT=$(mdedit article get <articleId> --content-only)
240
243
  echo "$MODIFIED_CONTENT" | mdedit article update <articleId> --file -
241
244
  ```
242
245
 
246
+ ### Workflow: publish and monitor a public link
247
+
248
+ CLI publication is non-interactive. A new link defaults to **Live**, so later durable
249
+ edits update the same URL automatically. Use `--snapshot` for a frozen artifact.
250
+ Existing links keep their stored mode when neither mode flag is passed; use `--live`
251
+ or `--snapshot` to switch deliberately without changing the URL.
252
+
253
+ ```bash
254
+ mdedit article create --file document.md --publish --format json
255
+ mdedit article publish-status <articleId> --format json
256
+ ```
257
+
258
+ Read `shortUrl`, `mode`, the `source*` revision/version fields, and `syncStatus` from
259
+ JSON output. If `syncStatus` is `failed`, the URL still serves the last good content;
260
+ report `lastSuccessfulSyncAt` and `syncError` rather than claiming it is current.
261
+ Links created before Live mode are legacy Snapshots until explicitly switched:
262
+
263
+ ```bash
264
+ mdedit article publish <articleId> --live --format json
265
+ ```
266
+
243
267
  ### Workflow: create a new article in a folder
244
268
 
245
269
  ```bash