From 43bb31a06c3c769bc12056c4829e12f4550b6892 Mon Sep 17 00:00:00 2001 From: leemour Date: Sat, 21 Nov 2026 05:38:44 +0100 Subject: [PATCH 1/4] feat(identity): Desktop signs in with --site and --login; one question for publish - --wcat-describe lists the app-password sign-in with its --site and --login flags and the password on stdin (cli-base 0.126.1, #683). - cli-core 0.718.0: a yes to posts publish/unpublish covers posts.update (cli-core #3193), so the double-ask caveat leaves docs/permissions.md. - session and api help name the application password and the /wp-json index. - The local family-audit difference for the account remove/rename reason goes: cli-base 0.126.1 carries it as a shared difference (#686). Co-Authored-By: Claude Opus 5.5 --- changes/feat-desktop-sign-in.md | 11 +++++++++++ contracts/wirecat.json | 17 ++++++++++++++++- docs/commands.md | 4 ++-- docs/permissions.md | 3 +-- lint/audit-differences.json | 10 +--------- package.json | 4 ++-- pnpm-lock.yaml | 22 +++++++++++----------- src/config.ts | 1 + src/identity.ts | 10 ++++++++++ src/wcat.test.ts | 21 +++++++++++++++++++++ 10 files changed, 76 insertions(+), 27 deletions(-) create mode 100644 changes/feat-desktop-sign-in.md diff --git a/changes/feat-desktop-sign-in.md b/changes/feat-desktop-sign-in.md new file mode 100644 index 0000000..099ff41 --- /dev/null +++ b/changes/feat-desktop-sign-in.md @@ -0,0 +1,11 @@ +### Added + +- **WireCat Desktop signs in to WordPress in its own window, also for a tool added from its describe.** + `--wcat-describe` now lists the application password sign-in with its `--site` and `--login` flags, so Desktop asks + for the site, the user name and the password, and sends the password on stdin. + +### Fixed + +- **`posts publish` and `posts unpublish` ask one question**, not `posts.update` a second time. +- **`session --help` and `api --help` name WordPress's own sign-in and spec**: the application password, and its + index at `/wp-json`. diff --git a/contracts/wirecat.json b/contracts/wirecat.json index a398b97..3b419f8 100644 --- a/contracts/wirecat.json +++ b/contracts/wirecat.json @@ -2385,7 +2385,22 @@ ], "signIn": { "gives": "Lets your agent read your WordPress posts and pages, write drafts, and publish when you allow it.", - "asks": "Your site's address, your user name and an application password: in WordPress, Users → Profile → Application Passwords. WordPress 5.7 or later, over https." + "asks": "Your site's address, your user name and an application password: in WordPress, Users → Profile → Application Passwords. WordPress 5.7 or later, over https.", + "methods": [ + { + "id": "app-password", + "label": "WordPress application password", + "words": [ + "{profile}", + "session", + "start", + "--json" + ], + "stdin": true, + "site": "--site", + "login": "--login" + } + ] }, "skill": { "status": [ diff --git a/docs/commands.md b/docs/commands.md index 30498f1..c46371f 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -53,7 +53,7 @@ wordpress commands info [path] ## `wordpress session` -keep this profile's WordPress token in the OS keyring +keep this profile's WordPress application password in the OS keyring ### `wordpress session start` @@ -111,7 +111,7 @@ wordpress session list ## `wordpress api` -the raw WordPress API, one command per operation of its OpenAPI document +the raw WordPress API, one command per operation of its index at /wp-json ### `wordpress api list` diff --git a/docs/permissions.md b/docs/permissions.md index 9b199a1..ea0bee5 100644 --- a/docs/permissions.md +++ b/docs/permissions.md @@ -56,8 +56,7 @@ run it yourself in a terminal. A write to a page goes through the pages routes, so it also checks their keys: `pages.publish` when it publishes or schedules the page, or updates a page that is published or scheduled; `pages.delete` when it deletes the page, to the trash or for good; and `pages.delete.force` with `--allow-delete`. Each asks by default. After a yes to the `posts` -key, the same action on the page is not asked again. `posts publish` and `posts unpublish` still ask `posts.update` -a second time, for a post and a page, until the next cli-core release. +key, the same action on the page is not asked again. ## The api group diff --git a/lint/audit-differences.json b/lint/audit-differences.json index 81a82cf..fe51488 100644 --- a/lint/audit-differences.json +++ b/lint/audit-differences.json @@ -1,9 +1 @@ -[ - { - "group": "wordpress", - "rule": "same-error-reason", - "target": "reason account-remove.unknown-profile=account-rename.unknown-profile", - "reason": "one failure under two names, from cli-core 0.716.0, that every CLI of the family prints (FIND-2855)", - "review_after": "2026-12-05" - } -] +[] diff --git a/package.json b/package.json index 6f944e6..f7cd9a2 100644 --- a/package.json +++ b/package.json @@ -61,8 +61,8 @@ "source:check": "node --experimental-strip-types scripts/source-check.ts" }, "dependencies": { - "@wirecat/cli-base": "0.125.3", - "@wirecat/cli-core": "0.716.0", + "@wirecat/cli-base": "0.126.1", + "@wirecat/cli-core": "0.718.0", "commander": "15.0.0", "valibot": "1.5.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76254fa..ad652b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,11 +13,11 @@ importers: .: dependencies: '@wirecat/cli-base': - specifier: 0.125.3 - version: 0.125.3(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + specifier: 0.126.1 + version: 0.126.1(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core': - specifier: 0.716.0 - version: 0.716.0(@wirecat/cli-base@0.125.3(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7) + specifier: 0.718.0 + version: 0.718.0(@wirecat/cli-base@0.126.1(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7) commander: specifier: 15.0.0 version: 15.0.0 @@ -1185,8 +1185,8 @@ packages: '@wasm-audio-decoders/opus-ml@0.0.3': resolution: {integrity: sha512-SEeTmk0eb3q5etJA/NHCRWW6BivTx9tqvNTmG0kg2ynuATEQRUZnwQE6Ibvl1BBvqIGHqI57+qyJMWmJBwb5XQ==} - '@wirecat/cli-base@0.125.3': - resolution: {integrity: sha512-9nl18agKsPzN6dW+b52HyPkPOPB8pmQWThNO3KD2irL3j4YfHdBk+LesLWAcJrppzmE6gSmo1pprL+qeN+GfSw==} + '@wirecat/cli-base@0.126.1': + resolution: {integrity: sha512-pZyRiK4Z9O3QZuOgwGZt+ISsaA2UU+u4AarnHjmIWG9aeAJ3ot2Hz7Dbctj2msjb7JgvR2+S7+OS+ZNGKcolQA==} engines: {node: '>=22'} hasBin: true peerDependencies: @@ -1213,8 +1213,8 @@ packages: '@wirecat/cli-core-sqlite@1.1.0': resolution: {integrity: sha512-GpGlh/dAIX/nblBYCdT6DfWSLFxav9mxxeELQAfEuw+QZdT9unKxbi5xa02s/s4JS1P7n0PQx2sCABj4FlMRNw==} - '@wirecat/cli-core@0.716.0': - resolution: {integrity: sha512-ph/oVDm0HdlZm6pw+zBidHyBPyd0dxAL4LqhItcjG48W8E2H++4kGI/wqr4JqE2S/dW9reYO+mQW8CtEyqv3Bw==} + '@wirecat/cli-core@0.718.0': + resolution: {integrity: sha512-2h5pSWF6BmYyUkxOyc6cPw6ai2p8n3I7dXsrSzcfyHxqHfkcssZ8EcuqJl6wWfCBMtyWSi+U23gg/g4asoOs+w==} engines: {node: ^22.16.0 || >=24} hasBin: true peerDependencies: @@ -3340,7 +3340,7 @@ snapshots: dependencies: '@wasm-audio-decoders/common': 9.0.7 - '@wirecat/cli-base@0.125.3(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': + '@wirecat/cli-base@0.126.1(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5)': dependencies: '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) cli-table3: 0.6.5 @@ -3361,7 +3361,7 @@ snapshots: '@wirecat/cli-core-sqlite@1.1.0': {} - '@wirecat/cli-core@0.716.0(@wirecat/cli-base@0.125.3(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7)': + '@wirecat/cli-core@0.718.0(@wirecat/cli-base@0.126.1(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5))(commander@15.0.0)(typescript@7.0.2)(zod@4.6.7)': dependencies: '@anthropic-ai/sdk': 1.3.0(zod@4.6.7) '@bomb.sh/tab': 0.0.22(commander@15.0.0) @@ -3371,7 +3371,7 @@ snapshots: '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) '@wasm-audio-decoders/flac': 0.2.11 '@wasm-audio-decoders/ogg-vorbis': 0.1.20 - '@wirecat/cli-base': 0.125.3(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) + '@wirecat/cli-base': 0.126.1(commander@15.0.0)(esbuild@0.28.2)(typescript@7.0.2)(vitest@5.0.5) '@wirecat/cli-core-onnx': 1.2.0 '@wirecat/cli-core-sqlite': 1.1.0 '@xmldom/xmldom': 0.9.12 diff --git a/src/config.ts b/src/config.ts index a50704f..8968280 100644 --- a/src/config.ts +++ b/src/config.ts @@ -36,6 +36,7 @@ export const API = { }), }, service: "WordPress", + spec: "its index at /wp-json", } const api = serviceApiPermissions(API) diff --git a/src/identity.ts b/src/identity.ts index 36e98db..7b53343 100644 --- a/src/identity.ts +++ b/src/identity.ts @@ -30,6 +30,16 @@ export const DESKTOP = { asks: "Your site's address, your user name and an application password: in WordPress, Users → Profile → " + "Application Passwords. WordPress 5.7 or later, over https.", + methods: [ + { + id: "app-password", + label: "WordPress application password", + words: ["{profile}", "session", "start", "--json"], + stdin: true, + site: "--site", + login: "--login", + }, + ], }, } satisfies ManifestIdentity diff --git a/src/wcat.test.ts b/src/wcat.test.ts index 371d11d..f154cb5 100644 --- a/src/wcat.test.ts +++ b/src/wcat.test.ts @@ -17,4 +17,25 @@ describe("WCAT", () => { expect(v.safeParse(manifestSchema, manifest).issues).toBeUndefined() expect(manifest.desktop.tagline).toBe(WCAT.tagline) }) + + // WireCat Desktop's catalog entry signs in with these words and flags (wirecat-desktop #459); a tool added from its + // describe gets the same window sign-in only when the manifest says so. + it("offers Desktop the sign-in with the site, the user name and the password on stdin", () => { + const manifest = buildManifest({ + identity: WCAT, + commands: describeProgram(createProgram()), + pkg: { name: "@wirecat/wordpress-cli", bin: { "wcat-wordpress": "dist/bin/wordpress.js" } }, + skills: true, + }) + expect(manifest.desktop.signIn?.methods).toEqual([ + { + id: "app-password", + label: "WordPress application password", + words: ["{profile}", "session", "start", "--json"], + stdin: true, + site: "--site", + login: "--login", + }, + ]) + }) }) From 076dcef22c4bf86ab1a7ebc92b5d7b01c111c91b Mon Sep 17 00:00:00 2001 From: leemour Date: Sat, 21 Nov 2026 05:40:51 +0100 Subject: [PATCH 2/4] chore(release): date 0.3.0 and collect changes/ into it Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 14 ++++++++++++++ changes/feat-desktop-sign-in.md | 11 ----------- package.json | 2 +- src/version.ts | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) delete mode 100644 changes/feat-desktop-sign-in.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c286d..0cc3d51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ Notable changes to `@wirecat/wordpress-cli`. One section per version, newest first. +## 0.3.0 — 21.11.2026 + +### Added + +- **WireCat Desktop signs in to WordPress in its own window, also for a tool added from its describe.** + `--wcat-describe` now lists the application password sign-in with its `--site` and `--login` flags, so Desktop asks + for the site, the user name and the password, and sends the password on stdin. + +### Fixed + +- **`posts publish` and `posts unpublish` ask one question**, not `posts.update` a second time. +- **`session --help` and `api --help` name WordPress's own sign-in and spec**: the application password, and its + index at `/wp-json`. + ## 0.2.0 — 21.11.2026 ### Added diff --git a/changes/feat-desktop-sign-in.md b/changes/feat-desktop-sign-in.md deleted file mode 100644 index 099ff41..0000000 --- a/changes/feat-desktop-sign-in.md +++ /dev/null @@ -1,11 +0,0 @@ -### Added - -- **WireCat Desktop signs in to WordPress in its own window, also for a tool added from its describe.** - `--wcat-describe` now lists the application password sign-in with its `--site` and `--login` flags, so Desktop asks - for the site, the user name and the password, and sends the password on stdin. - -### Fixed - -- **`posts publish` and `posts unpublish` ask one question**, not `posts.update` a second time. -- **`session --help` and `api --help` name WordPress's own sign-in and spec**: the application password, and its - index at `/wp-json`. diff --git a/package.json b/package.json index f7cd9a2..e31ffd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@wirecat/wordpress-cli", - "version": "0.2.0", + "version": "0.3.0", "description": "WordPress posts and pages: sync, search and write drafts from your agent", "license": "Apache-2.0", "author": "Viacheslav Ptsarev", diff --git a/src/version.ts b/src/version.ts index 78dbb32..d91ac72 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = "0.2.0" +export const VERSION = "0.3.0" From f016b344e09fd16c901f0b4315ce73df749fd76f Mon Sep 17 00:00:00 2001 From: leemour Date: Sat, 21 Nov 2026 05:41:02 +0100 Subject: [PATCH 3/4] chore(release): record the live check of 0.3.0 Co-Authored-By: Claude Opus 5.5 --- docs/dev/live-checks.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/dev/live-checks.txt b/docs/dev/live-checks.txt index 8429671..d45359a 100644 --- a/docs/dev/live-checks.txt +++ b/docs/dev/live-checks.txt @@ -5,3 +5,4 @@ 0.1.2 b25ff9d21928bf217c74ccd75f37174eb427ee4b 2026-11-21 scripts/live.sh v2:e4564e7d90c5a1ca41d2c157edf28ad61603970d622e423d6b70a1a67b9a2e73 0.1.2 60cde46dde8ddaa5c5d446d2054c12f34145e4e4 2026-11-21 scripts/live.sh v2:f167775a6dccda03576b9ac30fa10529f36b23b6842405c3eb1fa4979c789e79 0.2.0 4cf6ffa58bd61cd90446614ba43d85ad2e92a45d 2026-11-21 scripts/live.sh v2:30ebf419a2f8e4419a89449dcca80f5c2cd2d9cdf197db155a1bd206f26de10f +0.3.0 076dcef22c4bf86ab1a7ebc92b5d7b01c111c91b 2026-11-21 scripts/live.sh v2:2da9440c675421351c7467fa4a4fef3e79b421c5eb8cddd8a1dfe827fd8f7a37 From dabd56a42f635c8f311cdc44806bdabc4196c67d Mon Sep 17 00:00:00 2001 From: leemour Date: Sat, 21 Nov 2026 05:42:16 +0100 Subject: [PATCH 4/4] docs(changelog): name only the help lines that changed Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cc3d51..f98b896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,8 @@ Notable changes to `@wirecat/wordpress-cli`. One section per version, newest fir ### Fixed - **`posts publish` and `posts unpublish` ask one question**, not `posts.update` a second time. -- **`session --help` and `api --help` name WordPress's own sign-in and spec**: the application password, and its - index at `/wp-json`. +- **`--help` names WordPress's own sign-in and spec**: the `session` group says application password, and `api` says + its index at `/wp-json`. ## 0.2.0 — 21.11.2026