@mainwp/control 1.1.0-beta.1 → 2.0.0

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.
Files changed (172) hide show
  1. package/CHANGELOG.md +177 -0
  2. package/README.md +162 -518
  3. package/dist/chat/chat-engine.d.ts +24 -54
  4. package/dist/chat/chat-engine.d.ts.map +1 -1
  5. package/dist/chat/chat-engine.js +367 -166
  6. package/dist/chat/chat-engine.js.map +1 -1
  7. package/dist/chat/context-window.d.ts +57 -0
  8. package/dist/chat/context-window.d.ts.map +1 -0
  9. package/dist/chat/context-window.js +94 -0
  10. package/dist/chat/context-window.js.map +1 -0
  11. package/dist/chat/providers/anthropic.d.ts +0 -4
  12. package/dist/chat/providers/anthropic.d.ts.map +1 -1
  13. package/dist/chat/providers/anthropic.js +67 -45
  14. package/dist/chat/providers/anthropic.js.map +1 -1
  15. package/dist/chat/providers/gemini.d.ts +2 -2
  16. package/dist/chat/providers/gemini.d.ts.map +1 -1
  17. package/dist/chat/providers/gemini.js +67 -43
  18. package/dist/chat/providers/gemini.js.map +1 -1
  19. package/dist/chat/providers/openai-compatible.d.ts +1 -1
  20. package/dist/chat/providers/openai-compatible.d.ts.map +1 -1
  21. package/dist/chat/providers/openai-compatible.js +91 -29
  22. package/dist/chat/providers/openai-compatible.js.map +1 -1
  23. package/dist/chat/providers/provider-fetch.d.ts +11 -0
  24. package/dist/chat/providers/provider-fetch.d.ts.map +1 -1
  25. package/dist/chat/providers/provider-fetch.js +86 -4
  26. package/dist/chat/providers/provider-fetch.js.map +1 -1
  27. package/dist/chat/providers/provider.d.ts +74 -1
  28. package/dist/chat/providers/provider.d.ts.map +1 -1
  29. package/dist/chat/providers/provider.js +112 -2
  30. package/dist/chat/providers/provider.js.map +1 -1
  31. package/dist/chat/providers/sse-reader.d.ts +3 -0
  32. package/dist/chat/providers/sse-reader.d.ts.map +1 -1
  33. package/dist/chat/providers/sse-reader.js +75 -15
  34. package/dist/chat/providers/sse-reader.js.map +1 -1
  35. package/dist/chat/system-prompt.d.ts +0 -2
  36. package/dist/chat/system-prompt.d.ts.map +1 -1
  37. package/dist/chat/system-prompt.js +10 -6
  38. package/dist/chat/system-prompt.js.map +1 -1
  39. package/dist/chat/tool-envelope.d.ts +3 -0
  40. package/dist/chat/tool-envelope.d.ts.map +1 -1
  41. package/dist/chat/tool-envelope.js +156 -10
  42. package/dist/chat/tool-envelope.js.map +1 -1
  43. package/dist/commands/abilities/info.d.ts.map +1 -1
  44. package/dist/commands/abilities/info.js +6 -3
  45. package/dist/commands/abilities/info.js.map +1 -1
  46. package/dist/commands/abilities/list.js +2 -2
  47. package/dist/commands/abilities/list.js.map +1 -1
  48. package/dist/commands/abilities/run.d.ts.map +1 -1
  49. package/dist/commands/abilities/run.js +147 -48
  50. package/dist/commands/abilities/run.js.map +1 -1
  51. package/dist/commands/chat.d.ts +12 -0
  52. package/dist/commands/chat.d.ts.map +1 -1
  53. package/dist/commands/chat.js +67 -42
  54. package/dist/commands/chat.js.map +1 -1
  55. package/dist/commands/config/show.d.ts.map +1 -1
  56. package/dist/commands/config/show.js +59 -47
  57. package/dist/commands/config/show.js.map +1 -1
  58. package/dist/commands/doctor.d.ts +0 -8
  59. package/dist/commands/doctor.d.ts.map +1 -1
  60. package/dist/commands/doctor.js +22 -36
  61. package/dist/commands/doctor.js.map +1 -1
  62. package/dist/commands/jobs/watch.d.ts +4 -0
  63. package/dist/commands/jobs/watch.d.ts.map +1 -1
  64. package/dist/commands/jobs/watch.js +66 -27
  65. package/dist/commands/jobs/watch.js.map +1 -1
  66. package/dist/commands/login.d.ts.map +1 -1
  67. package/dist/commands/login.js +59 -10
  68. package/dist/commands/login.js.map +1 -1
  69. package/dist/commands/profile/delete.d.ts.map +1 -1
  70. package/dist/commands/profile/delete.js +19 -3
  71. package/dist/commands/profile/delete.js.map +1 -1
  72. package/dist/commands/profile/list.d.ts.map +1 -1
  73. package/dist/commands/profile/list.js +6 -2
  74. package/dist/commands/profile/list.js.map +1 -1
  75. package/dist/commands/profile/use.d.ts.map +1 -1
  76. package/dist/commands/profile/use.js +4 -1
  77. package/dist/commands/profile/use.js.map +1 -1
  78. package/dist/config/fs-utils.d.ts.map +1 -1
  79. package/dist/config/fs-utils.js +19 -6
  80. package/dist/config/fs-utils.js.map +1 -1
  81. package/dist/config/keychain.d.ts +78 -6
  82. package/dist/config/keychain.d.ts.map +1 -1
  83. package/dist/config/keychain.js +194 -27
  84. package/dist/config/keychain.js.map +1 -1
  85. package/dist/config/profile-store.d.ts +11 -3
  86. package/dist/config/profile-store.d.ts.map +1 -1
  87. package/dist/config/profile-store.js +53 -19
  88. package/dist/config/profile-store.js.map +1 -1
  89. package/dist/core/abilities-executor.d.ts +42 -6
  90. package/dist/core/abilities-executor.d.ts.map +1 -1
  91. package/dist/core/abilities-executor.js +264 -67
  92. package/dist/core/abilities-executor.js.map +1 -1
  93. package/dist/core/batch-manager.d.ts +10 -5
  94. package/dist/core/batch-manager.d.ts.map +1 -1
  95. package/dist/core/batch-manager.js +78 -22
  96. package/dist/core/batch-manager.js.map +1 -1
  97. package/dist/core/execute-ability-with-policy.d.ts +8 -0
  98. package/dist/core/execute-ability-with-policy.d.ts.map +1 -0
  99. package/dist/core/execute-ability-with-policy.js +19 -0
  100. package/dist/core/execute-ability-with-policy.js.map +1 -0
  101. package/dist/core/http-client.d.ts +5 -1
  102. package/dist/core/http-client.d.ts.map +1 -1
  103. package/dist/core/http-client.js +118 -46
  104. package/dist/core/http-client.js.map +1 -1
  105. package/dist/core/job-id.d.ts +2 -0
  106. package/dist/core/job-id.d.ts.map +1 -0
  107. package/dist/core/job-id.js +22 -0
  108. package/dist/core/job-id.js.map +1 -0
  109. package/dist/core/preview-plan.d.ts +5 -0
  110. package/dist/core/preview-plan.d.ts.map +1 -0
  111. package/dist/core/preview-plan.js +247 -0
  112. package/dist/core/preview-plan.js.map +1 -0
  113. package/dist/core/safety-controller.d.ts +29 -10
  114. package/dist/core/safety-controller.d.ts.map +1 -1
  115. package/dist/core/safety-controller.js +154 -41
  116. package/dist/core/safety-controller.js.map +1 -1
  117. package/dist/lib/base-command.d.ts +20 -0
  118. package/dist/lib/base-command.d.ts.map +1 -1
  119. package/dist/lib/base-command.js +92 -35
  120. package/dist/lib/base-command.js.map +1 -1
  121. package/dist/output/formatter.d.ts +37 -1
  122. package/dist/output/formatter.d.ts.map +1 -1
  123. package/dist/output/formatter.js +111 -16
  124. package/dist/output/formatter.js.map +1 -1
  125. package/dist/output/json-envelope.d.ts.map +1 -1
  126. package/dist/output/json-envelope.js +8 -5
  127. package/dist/output/json-envelope.js.map +1 -1
  128. package/dist/utils/audit-logger.d.ts +26 -8
  129. package/dist/utils/audit-logger.d.ts.map +1 -1
  130. package/dist/utils/audit-logger.js +93 -20
  131. package/dist/utils/audit-logger.js.map +1 -1
  132. package/dist/utils/error-sanitizer.d.ts +6 -0
  133. package/dist/utils/error-sanitizer.d.ts.map +1 -0
  134. package/dist/utils/error-sanitizer.js +120 -0
  135. package/dist/utils/error-sanitizer.js.map +1 -0
  136. package/dist/utils/errors.d.ts +12 -0
  137. package/dist/utils/errors.d.ts.map +1 -1
  138. package/dist/utils/errors.js +14 -0
  139. package/dist/utils/errors.js.map +1 -1
  140. package/dist/utils/format.d.ts +68 -0
  141. package/dist/utils/format.d.ts.map +1 -1
  142. package/dist/utils/format.js +668 -0
  143. package/dist/utils/format.js.map +1 -1
  144. package/dist/utils/prompt.d.ts.map +1 -1
  145. package/dist/utils/prompt.js +28 -23
  146. package/dist/utils/prompt.js.map +1 -1
  147. package/dist/utils/redaction.d.ts +21 -0
  148. package/dist/utils/redaction.d.ts.map +1 -0
  149. package/dist/utils/redaction.js +85 -0
  150. package/dist/utils/redaction.js.map +1 -0
  151. package/dist/utils/retry.d.ts +0 -4
  152. package/dist/utils/retry.d.ts.map +1 -1
  153. package/dist/utils/retry.js +0 -9
  154. package/dist/utils/retry.js.map +1 -1
  155. package/dist/utils/terminal-sanitizer.d.ts +21 -0
  156. package/dist/utils/terminal-sanitizer.d.ts.map +1 -1
  157. package/dist/utils/terminal-sanitizer.js +80 -14
  158. package/dist/utils/terminal-sanitizer.js.map +1 -1
  159. package/dist/validation/input-sanitizer.d.ts +0 -4
  160. package/dist/validation/input-sanitizer.d.ts.map +1 -1
  161. package/dist/validation/input-sanitizer.js +15 -64
  162. package/dist/validation/input-sanitizer.js.map +1 -1
  163. package/dist/validation/sanitize-schema.d.ts +31 -0
  164. package/dist/validation/sanitize-schema.d.ts.map +1 -0
  165. package/dist/validation/sanitize-schema.js +158 -0
  166. package/dist/validation/sanitize-schema.js.map +1 -0
  167. package/dist/validation/schema-validator.d.ts +10 -0
  168. package/dist/validation/schema-validator.d.ts.map +1 -1
  169. package/dist/validation/schema-validator.js +50 -5
  170. package/dist/validation/schema-validator.js.map +1 -1
  171. package/oclif.manifest.json +96 -74
  172. package/package.json +25 -8
package/CHANGELOG.md ADDED
@@ -0,0 +1,177 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [2.0.0] - 2026-11-25
11
+
12
+ ### Changed
13
+
14
+ - **Breaking:** requires MainWP Dashboard 6.4.2 or later. GET ability requests send their input as one JSON value in `input_json`, so nulls and nested values keep their types, and DELETE requests send input in a JSON body instead of the URL. Earlier Dashboards read neither format
15
+ - Confirmation resolves to a usable boolean `confirm` when no pinned fields exist, or a single required usable boolean `confirm_*` pinned to true by `const: true` or `enum: [true]`. Other `confirm_*` fields are ordinary input. `user_confirmed` is no longer sent
16
+ - The Safe Updates abilities that write to a run (`run-safe-update-v1`, `continue-safe-update-run-v1`, `cancel-safe-update-run-v1`, `retest-safe-update-site-v1` and `resolve-safe-update-site-v1`) are now always classified as destructive, so each needs `--dry-run` and then `--confirm`, whatever the Dashboard's annotations say. `rollback-safe-update-v1` was already covered by `rollback-*`. The Safe Updates reads are unchanged. See [Safety](docs/safety.md#safe-updates)
17
+
18
+ ### Fixed
19
+
20
+ - `login` no longer exits at the application password prompt with "Detected unsettled top-level await" after asking for the Dashboard URL or username. The password prompt now resumes standard input that the earlier prompt left paused
21
+ - Dry runs against Dashboard 6.4 and later show a readable plan instead of "Preview returned data in an unrecognized format". Update and Safe Updates previews list each site with its item changes, held-back items, backup result and checks, and single-entity previews name the site, tag or client. The Dashboard's errors, refusals and warnings lead the summary, and the full response is still shown below it
22
+ - Commands no longer print "Discovery skipped an invalid ability entry" for the unversioned `core/*` abilities that WordPress 6.9 registers. Malformed entries still produce the warning
23
+
24
+ ### Security
25
+
26
+ - Both `abilities run` and chat refuse destructive abilities with ambiguous confirmation fields or no preview the CLI can run, including pinned `confirm_*` fields even when `dry_run` is declared. Only required usable boolean `confirm_*` fields pinned to true are stripped from caller and model input; other `confirm_*` fields pass through as ordinary input
27
+ - Previews mask values that the ability's schema marks `writeOnly`, in both the echoed input and the Dashboard's response
28
+ - undici is updated to 7.30.2, and the lockfile resolves brace-expansion 5.0.12 and fast-uri 3.1.9, clearing the high-severity advisories in the production dependency tree. The remaining moderate `minimatch` advisory comes through `@oclif/core` 4 and needs a major `@oclif/core` upgrade
29
+
30
+ ## [1.1.1] - 2026-07-27
31
+
32
+ ### Changed
33
+
34
+ - **Breaking:** `MAINWP_APP_PASSWORD` is now identity-bound the same way keychain credentials are: every authenticated command, `login` included, requires `MAINWP_DASHBOARD_URL` to be set and to match the profile's canonical Dashboard identity before the password is sent. Without it the command refuses to send the credential, with a hint naming the fix. This closes a redirect where an edited or committed `profiles.json` could silently point the environment password at a different host (CI, where the env var is the documented credential path, is exactly where `profiles.json` is easiest to tamper with). Interactive login with a prompted password and display-only commands (`doctor`, `config show`) are unaffected
35
+
36
+ ### Security
37
+
38
+ - The interactive password prompt no longer echoes the typed password. `promptForPassword` opened a terminal-mode readline interface it never read from, and that interface made the terminal print each typed character in cleartext alongside the masking asterisks. Verified on a real pty: the prompt now shows only asterisks
39
+ - A hostile ability `inputSchema` can no longer bypass validation by declaring `$async`: the schema sanitizer strips the keyword, and the validator fails closed on any non-boolean result, so ajv cannot compile a Promise-returning validator whose truthy result read as "valid" and whose later rejection crashed the process
40
+ - Dashboard URLs carrying credentials in the query string or fragment (`?access_token=...`, `#api_key=...`, including percent-encoded key variants) are rejected when a profile is created; profiles already on disk with such URLs have the sensitive parameter values masked on every display path, including error messages. `profile list` and `profile use` mask embedded URL credentials in both the JSON envelope and the human table, and debug context is masked centrally before truncation so no debug value can carry a credentialed URL to stderr
41
+ - Terminal escape sequences are stripped in the output layer rather than per call site: `formatHeading`, `formatSuccess`, `formatInfo`, and `formatKeyValue` collapse to sanitized rows, doctor's verbose details and `jobs watch` result labels are sanitized, and `abilities info` renders Dashboard-supplied descriptions and annotation instructions inside a visibly quoted block through a sanitizer that strips escapes but keeps real newlines. Remote metadata cannot pose as CLI output or forge status lines anywhere the CLI prints
42
+ - Pathological inputs can no longer stall the CLI in regex or scanning work: the escape-sequence patterns use negated classes that fail linearly, error messages are length-capped before the credential scan, the tool-envelope brace scan is bounded by both length and a step budget, and streamed chat content and tool calls are bounded at every layer (provider stream buffer, engine collection, tool-call envelope), so a hostile or malfunctioning provider stream cannot grow memory or dispatch work without limit
43
+ - The production dependency tree resolves brace-expansion at the patched 5.0.8 (GHSA-mh99-v99m-4gvg) via a minimatch override. npm overrides do not reach consumer installs, so `npm install` may still report the advisory for the copies under ejs's jake and filelist chain; those parse only local build globs
44
+
45
+ ## [1.1.0] - 2026-07-22
46
+
47
+ ### Fixed
48
+
49
+ - Concurrent `ChatEngine.sendMessage` calls now queue and run in call order instead of interleaving shared history and preview state; the interactive REPL already serialized calls, so this protects programmatic callers
50
+ - Chat responses that wrap a JSON tool call in prose (text before or after the object, braces inside string values) now parse correctly: the greedy first-`{`-to-last-`}` fallback was replaced with a brace-depth scanner that respects string literals and escapes; fenced-block parsing and pure-JSON responses are unchanged
51
+ - Destructive execution now fails closed: if the automatic `dry_run` preview errors or returns an unsuccessful result, the command exits 4 without sending a confirm request. The successful preview is shown before the confirmation prompt (and included in the `--json` envelope); `--force` skips only the prompt, never the preview
52
+ - Chat tool calling now works against the real OpenAI, Anthropic, and Gemini APIs: ability names are aliased to provider-safe tool names (all three reject `/`), assistant tool-call blocks are preserved across turns so continuations pair correctly with their results, and the destructive-approval flow keeps the original tool-call id
53
+ - Malformed chat tool calls are rejected instead of executing with empty input: unparseable argument JSON, non-object input, multiple tool calls in one response, responses containing both an answer and a tool call, and responses truncated by `length` or `content_filter` all return a protocol error to the model
54
+ - Chat now validates tool input against the ability's JSON schema before execution, matching the CLI path; validation failures go back to the model as tool errors
55
+ - Replaced retired LLM model defaults: Anthropic `claude-sonnet-4-20250514` (retired June 2026) with `claude-sonnet-4-6`, Gemini `gemini-1.5-flash` (shut down 2025) with `gemini-3.5-flash`
56
+ - Preview summaries no longer claim "No items would be affected" when the dry-run response is in an unrecognized format; the raw response is shown with a warning instead
57
+ - `--max-context-messages` rejects negative values; `0` remains the only way to disable truncation
58
+ - Chat context truncation no longer orphans tool results mid tool-calling loop or at the destructive-action approval step, which could cause provider API errors on the next message
59
+ - Caller-cancelled requests now report "Request cancelled" instead of "Request timed out"
60
+ - Gemini 3 thought signatures on function calls are preserved through parsing, chat history, and streaming, and echoed back on the continuation request; previously they were discarded, which Gemini 3 models (including the default `gemini-3.5-flash`) reject with HTTP 400
61
+ - Context truncation no longer treats the synthetic approval echo after a destructive action as a turn boundary, which with a small `--max-context-messages` could erase the executed action and its result from history right after approval
62
+ - HTTP method selection now resolves destructiveness the same way the safety classifier does, so a destructive-named ability is never sent as a read-only GET even if the server mislabels it; non-boolean annotation values (e.g. `readonly: "true"` as a string) are likewise ignored. When the destructive classification comes from the name override rather than the annotations, the request uses POST instead of trusting the annotations' `idempotent` flag for DELETE
63
+ - Keychain credential-removal failures now warn in non-interactive (CI) runs instead of only when attached to a terminal
64
+ - Warning shown when the active profile no longer exists and the CLI falls back to another profile
65
+ - Chat error responses name the failing ability (`[mainwp/update-site-v1] Error: ...`) so a failed preview or tool call is attributable; engine-level errors stay bare
66
+ - `login --url` with embedded credentials fails at intake with the friendly configuration error (exit 2) instead of an opaque network error from the connection test
67
+ - Malformed Dashboard ability schemas (PHP artifacts such as `properties: []` or `"inputSchema": []`) are repaired centrally for both `abilities run` and chat tool execution; schemas that remain invalid exit 4 (Dashboard error), not 5
68
+ - The Dashboard's queued-job envelope (`job_id`) is recognized, so `abilities run --wait` polls to completion instead of returning immediately
69
+ - One-shot chat failures exit non-zero through the documented JSON error envelope instead of printing a raw response object and exiting 0; an empty provider stream is an error, not a blank successful answer
70
+ - Malformed `--input` JSON reports the parse position instead of echoing the raw payload, and JSON input that is not an object (array, string, number) is rejected locally instead of being sent to the Dashboard
71
+ - Parse-time flag errors under `--json` emit a single JSON error envelope on stdout (exit code 1 unchanged)
72
+ - `jobs watch` prints the `cancelled` batch status, mapped to `BATCH_CANCELLED`
73
+ - Batch polling rejects unknown statuses, job-ID mismatches, invalid numeric fields, oversized arrays, and terminal-state regressions instead of trusting them
74
+ - A keychain read error during login aborts before overwriting, instead of being treated as "nothing stored" and later rolling back a credential that still existed; keychain delete distinguishes not-found from failure, and profile delete reports not-found as the goal state
75
+ - Cyclic or over-deep error details no longer crash `--json` output: both sanitizers bound depth and truncate cycles while legitimately shared references survive
76
+ - Atomic config writes sync file contents to disk before the rename, so a crash at the wrong moment cannot leave a truncated file behind
77
+ - Failures to repair config and audit file permissions now warn instead of being silently ignored
78
+
79
+ ### Changed
80
+
81
+ - **Breaking:** keychain credentials are now stored bound to the profile's canonical Dashboard identity, and unbound credentials stored by earlier versions are refused for authenticated requests. Each existing profile needs a one-time `mainwpcontrol login` to re-bind its credential; the error message says so. Repointing a profile at a different host by editing `profiles.json` now gets an authentication error instead of the stored password
82
+ - A transport failure after a destructive confirm was dispatched exits 3 (`OUTCOME_UNKNOWN`) with audit entries for both the dispatch and the unknown outcome, instead of a generic network error that implied nothing ran; chat reports the same stable code and keeps the session alive
83
+ - 2xx Dashboard responses must be parseable JSON with a JSON content type; empty or HTML responses are `INVALID_RESPONSE` errors, never treated as success
84
+ - Ability discovery validates entries, caps pagination, warns and keeps the first entry on duplicate names, and no longer generates ambiguous short aliases
85
+ - `--json` now emits exactly one JSON document when a batch job times out, fails, or completes partially: an error envelope with the job status in `error.details` (previously a success envelope was printed before the error envelope)
86
+ - `jobs watch` and `abilities run --wait` exit 4 when the job ends `failed` or `partial`; `jobs watch` exits 130/143 with an error envelope when interrupted by SIGINT/SIGTERM (previously all of these exited 0 with a success envelope)
87
+ - Flag and argument parse errors (for example passing `--dry-run` with `--confirm`) exit 1 (user input error) instead of 2
88
+ - Minimum Node.js version is 20.18.1 (required by the bundled undici)
89
+ - `npm test` no longer requires a reachable MainWP Dashboard; live integration tests run only via `npm run test:live` with `MAINWP_LIVE_TEST=1`
90
+ - Unified sensitive-key redaction into one shared utility covering compound keys (`apiToken`, `appPassword`) across error output, debug logging, and input sanitization
91
+ - Broader destructive-ability name patterns (`reset-`, `restore-`, `rollback-`, `wipe-`, `purge-`, `uninstall-`) in the defense-in-depth safety classification
92
+ - Exit code 130 on Ctrl-C at prompts documented as the intentional SIGINT convention
93
+
94
+ ### Security
95
+
96
+ - Dashboard URLs with embedded credentials (`https://user:pass@host`) are rejected at login with a hint to use `--username` and the password prompt; profiles stored before this fix have the userinfo masked as `***:***@` in `login`, `config show`, and `doctor` output (human, JSON, and echoed error messages)
97
+ - The audit log directory and file permissions now self-heal to `0700`/`0600` on every write, and the log is opened atomically in append mode, removing a check-then-act window that could truncate the log
98
+ - `config show` sanitizes every untrusted value in human-readable output to a single safe line: environment-derived provider names and paths (`MAINWP_LLM_PROVIDER`, `XDG_CONFIG_HOME`) and profile-derived fields (profile name, dashboard URL, username), closing line-injection via a crafted `profiles.json` or hostile environment
99
+ - `doctor` and `config show` human-readable output now strips terminal escape sequences from error- and config-derived text, matching the sanitization the `--json` path already applied
100
+ - HTTP responses are size-checked after buffering even when the server sends a parseable `Content-Length`, so an inaccurate header can no longer bypass the response size limit
101
+ - All remaining single-row terminal output (login summary, profile fallback and keychain warnings, ability names, table cells, list items, preview labels) collapses untrusted values to a single line instead of only stripping non-CR/LF control characters
102
+ - Input keys containing `[` or `]` are now rejected; they could canonicalize server-side (PHP query parsing) to alias a control flag like `confirm` past the executor's flag-stripping guard
103
+ - Mutual exclusion of `dry_run` and `confirm` is now also asserted at the executor boundary, not only at the flag layer
104
+ - Updated `undici` to 7.28.0, resolving TLS certificate validation bypass and response queue poisoning advisories
105
+ - Updated `fast-uri` (transitive, via `ajv`) to 3.1.4, resolving a high-severity host-confusion advisory (GHSA-v2hh-gcrm-f6hx)
106
+ - Updated `@oclif/core`, `@oclif/plugin-help`, `@oclif/plugin-autocomplete`, and transitive dependencies; `npm audit --omit=dev` reports zero production vulnerabilities, dev-chain advisories are tracked separately
107
+ - Abilities with missing or malformed safety annotations are classified destructive (fail closed) instead of defaulting to read-only; every real Dashboard ability declares all three annotation keys
108
+ - Case-variant ability names (`Mainwp/Delete-Site-V1`) are refused at discovery, so a case variant can never evade destructive-name classification or alias a cache key
109
+ - `pattern` and `patternProperties` from Dashboard schemas are stripped from every node of the tree and never compiled, so a hostile Dashboard cannot stall the CLI with a catastrophic regex; the whole tree, including arrays and literal data values, counts against a 32-level depth budget
110
+ - Tool results are key-redacted before entering provider-bound chat history (local display stays raw); provider requests refuse redirects; hosted providers refuse `http://` base URLs; the local provider allows HTTP only to loopback and private-range hosts
111
+ - Profile `skipSSLVerification` must be strictly boolean; the string `"false"` no longer disables TLS verification
112
+ - SSE streams are bounded (line and buffer caps, idle and absolute timeouts), and provider error bodies are read bounded and key-redacted before they can reach an error message
113
+ - Dashboard response bodies stream against a byte cap and the request timeout covers the body read, so an unbounded or stalled body cannot hang the process
114
+ - Config files write via random-suffix `O_EXCL` temporary files; the audit log opens with `O_NOFOLLOW`; audit-log input is bounded at 8 KiB and free text at 2 KiB with visible truncation markers
115
+ - URLs with username-only credentials now redact, and userinfo masking is greedy through the last `@` so passwords containing `@` mask fully; malformed URLs are no longer echoed in profile-store error messages
116
+ - Sensitive query-string parameters (`access_token=...`) are redacted in error output, and keychain store errors pass through the same sanitizer as the rest of the keychain surface
117
+ - Redaction and terminal sanitization build results on null-prototype objects, so a crafted `__proto__` key cannot pollute prototypes; terminal output also strips Unicode bidirectional and isolate controls to prevent right-to-left display spoofing
118
+
119
+ ## [1.1.0-beta.1] - 2026-03-26
120
+
121
+ ### Added
122
+
123
+ - Required params shown in abilities list examples
124
+
125
+ ### Fixed
126
+
127
+ - Debug redaction, ctrl-c exit code, CI audit
128
+ - Test fixtures: `site_id` → `site_id_or_domain` to match real API
129
+ - Windows tester feedback
130
+
131
+ ### Changed
132
+
133
+ - Git Bash promoted as primary Windows recommendation
134
+
135
+ ## [1.0.1] - 2026-03-24
136
+
137
+ ### Added
138
+
139
+ - Windows/PowerShell guidance and skip links to docs
140
+
141
+ ## [1.0.0] - 2026-03-24
142
+
143
+ ### Added
144
+
145
+ - CLI binary (`mainwpcontrol`) with oclif command framework
146
+ - Commands: `login`, `profile list|use|delete`, `abilities list|info|run`, `jobs watch`, `doctor`, `chat`, `config show`
147
+ - Batch operations with polling and timeout
148
+ - Shell completion for bash and zsh
149
+ - Streaming chat with sliding window context management
150
+ - Audit logging for destructive actions
151
+ - Centralized secret masking utility
152
+ - Actionable recovery hints on error messages
153
+ - `--json` output flag and `defaultJsonOutput` setting
154
+ - Golden tests and E2E integration tests
155
+ - Profile validation in ProfileStore
156
+
157
+ ### Fixed
158
+
159
+ - Keytar ESM/CJS interop
160
+ - Security vulnerabilities from audit (OWASP mapped)
161
+ - Exit code handling consistency
162
+
163
+ ### Changed
164
+
165
+ - Binary renamed from `mainwpctl` to `mainwpcontrol`
166
+
167
+ ### Removed
168
+
169
+ - Unimplemented `cancelJob` and `listJobs` from BatchManager
170
+
171
+ [Unreleased]: https://github.com/mainwp/mainwp-control/compare/v2.0.0...HEAD
172
+ [2.0.0]: https://github.com/mainwp/mainwp-control/compare/v1.1.1...v2.0.0
173
+ [1.1.1]: https://github.com/mainwp/mainwp-control/compare/v1.1.0...v1.1.1
174
+ [1.1.0]: https://github.com/mainwp/mainwp-control/compare/v1.1.0-beta.1...v1.1.0
175
+ [1.1.0-beta.1]: https://github.com/mainwp/mainwp-control/compare/v1.0.1...v1.1.0-beta.1
176
+ [1.0.1]: https://github.com/mainwp/mainwp-control/compare/v1.0.0...v1.0.1
177
+ [1.0.0]: https://github.com/mainwp/mainwp-control/releases/tag/v1.0.0