Merged
Conversation
added 8 commits
April 19, 2026 19:22
- Add `events` entry to the table of contents - Add `### events` section covering both `events tail` (webhook receiver) and `events mqtt-tail` (MQTT stream) with usage examples - Extend the Environment variables table with all four MQTT vars
Wrong commands fixed: - `devices explain` was described as taking <deviceId> <command> (wrong); corrected to one-shot device summary with --no-live flag - `### watch` used non-existent `switchbot watch` syntax; corrected to `switchbot devices watch` under proper heading - `### batch` described `plan run/validate` with wrong command names; replaced with correct `### plan` section Missing command sections added: doctor, quota, history, catalog, schema, capabilities, devices meta (devices watch moved from wrong top-level position to its own section) Additional fixes: - README tagline updated to mention MCP/AI integration - TOC updated to match actual command names - Project layout updated: correct file labels, added expand.ts, device-meta.ts, capabilities.ts; removed non-existent batch.ts entry - Test count updated: 592 → 692 - npm description improved to communicate AI/MCP value - agent-guide.md: added events mqtt-tail to observability section
Replace manual SWITCHBOT_MQTT_HOST/USERNAME/PASSWORD env vars with zero-config mTLS client certificates obtained from the SwitchBot credential endpoint (POST /v1.1/iot/credential). Users need only SWITCHBOT_TOKEN + SWITCHBOT_SECRET — no additional MQTT setup required. - credential.ts: add fetchMqttCredential(); remove getMqttConfig() - client.ts: switch from username/password to mTLS TLS client certs - events-subscription.ts: initialize(token, secret) instead of mqttConfig - doctor/capabilities: report MQTT status based on REST credentials - Remove SWITCHBOT_MQTT_* from README env table, index.ts help text
The SwitchBot credential API returns full PEM strings in the tls.caBase64, certBase64, and keyBase64 fields despite the misleading field names. Decoding them as base64 produces garbage bytes that fail TLS handshake.
…down 1. Add tryLoadConfig() that returns null instead of process.exit(1), so mcp serve can genuinely degrade gracefully when credentials are absent. The try/catch around loadConfig() never caught anything because loadConfig calls process.exit, not throw. 2. Use tryLoadConfig() in events mqtt-tail so the UsageError path actually executes instead of the process exiting before the catch block runs. 3. Add a disconnecting flag to SwitchBotMqttClient so that intentional disconnect() calls suppress the close->attemptReconnect() chain. Without this, --max N, Ctrl-C and MCP shutdown all race against a reconnect loop. Also remove the unused stableTimer dead code.
- account_overview.mqtt description now says "auto-provisioned via REST credentials" instead of the outdated "MQTT env vars" wording - Move "Connected to..." banner in mqtt-tail to after client.connect() resolves, so the message only appears when the connection is confirmed
- Add devices batch section and TOC entry (was completely undocumented) - Add config list-profiles to config section - Add catalog refresh to catalog section - Fix doctor description: 'MQTT config' → clarify auto-provisioned from REST credentials - Restore mcp TOC entry that was accidentally dropped in previous edit
chenliuyun
pushed a commit
that referenced
this pull request
Apr 20, 2026
) Add fileMissing flag to VerifyReport. When audit.log does not exist (fresh install), return fileMissing=true, exit with 0, and set status to 'warn' in JSON output. Existing behavior preserved for malformed/unversioned content (still exits 1). Tests: 6 new tests added to verify the behavior: fresh account, empty file, malformed entries, and JSON output variants. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chenliuyun
pushed a commit
that referenced
this pull request
Apr 20, 2026
Document every fix landed in this branch beyond the history-aggregate feature: bugs #1, #4, #5, #6, #8, #9, #10, #11, #12, #13, #14, #15, #16, #17, #18 from the OpenClaw v2.4.0 smoke-test report. Call out the deferred items (#2, #7) explicitly so readers don't assume they were overlooked. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
chenliuyun
pushed a commit
that referenced
this pull request
Apr 20, 2026
) Add fileMissing flag to VerifyReport. When audit.log does not exist (fresh install), return fileMissing=true, exit with 0, and set status to 'warn' in JSON output. Existing behavior preserved for malformed/unversioned content (still exits 1). Tests: 6 new tests added to verify the behavior: fresh account, empty file, malformed entries, and JSON output variants.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
♻️ Current situation
Describe the current situation. Explain current problems, if there are any. Be as descriptive as possible (e.g., including examples or code snippets).
💡 Proposed solution
Describe the proposed solution and changes. How does it affect the project? How does it affect the internal structure (e.g., refactorings)?
⚙️ Release Notes
Provide a summary of the changes or features from a user's point of view. If there are breaking changes, provide migration guides using code examples of the affected features.
➕ Additional Information
If applicable, provide additional context in this section.
Testing
Which tests were added? Which existing tests were adapted/changed? Which situations are covered, and what edge cases are missing?
Reviewer Nudging
Where should the reviewer start? what is a good entry point?