diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c286d..f98b896 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. +- **`--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 ### Added 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/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 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..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", @@ -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/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" 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", + }, + ]) + }) })