Skip to content

feat(opencli): add Xiaohongshu ask via upstream 1.8.4 - #1315

Merged
Astro-Han merged 5 commits into
devfrom
codex/opencli-xhs-ask
Jun 16, 2026
Merged

feat(opencli): add Xiaohongshu ask via upstream 1.8.4#1315
Astro-Han merged 5 commits into
devfrom
codex/opencli-xhs-ask

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

Bumps @jackwener/opencli from 1.8.3 to 1.8.4 so PawWork gets the upstream xiaohongshu/ask adapter from the published package.

There is no related issue; this updates PawWork's pinned OpenCLI integration after OpenCLI released v1.8.4 with the Xiaohongshu 点点 command.

Why

The original PR used a PawWork-local overlay because OpenCLI had not published the adapter yet. OpenCLI v1.8.4 is now published and its npm package includes both clis/xiaohongshu/ask.js and the manifest entry, so the local overlay has been removed in favor of the dependency bump.

Related Issue

No issue.

Human Review Status

Pending

Review Focus

Please focus on whether the final diff stays limited to the OpenCLI dependency bump and public adapter discovery coverage, and whether xiaohongshu/ask is verified through both source tests and the built embedded-server artifact.

Risk Notes

This changes PawWork's pinned OpenCLI package from 1.8.3 to 1.8.4. The previous local overlay source and overlay-only tests were removed because the adapter now comes from the upstream package.

No visible UI changed, so no screenshots are included. The desktop embedded-server packaging path is covered by the built-node OpenCLI adapter test.

How To Verify

bun install --frozen-lockfile: passed
bun test ./test/opencli/adapter-registry.test.ts ./test/tool/opencli-tools.test.ts ./test/opencli/adapter-capabilities.test.ts --timeout 30000: 22 passed
bun test ./test/server/built-node-opencli-adapters.test.ts --timeout 120000: 1 passed
git diff --check: passed

Screenshots or Recordings

Not required; no visible UI changed.

Checklist

How to use this checklist:

  • Tick a box by replacing [ ] with [x]. Do not edit, add, or remove items.
  • The bot-applied label items can only be honestly ticked AFTER the PR is opened and the labeler / priority-triage bots have run — return to the PR description and tick them then.
  • Most items are required. The few that are conditional are explicitly marked (conditional); for those, leave unticked if they truly do not apply and explain why in Risk Notes. All other items must be ticked before requesting human review.
  • Type label — this PR carries exactly one of bug, enhancement, task, documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason> (default is Pending; "not required" is restricted to bot-authored low-risk PRs).
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

Summary by CodeRabbit

  • Chores

    • Updated an OpenCLI-related dependency to the latest patch version.
  • Tests

    • Enhanced test coverage for multiple OpenCLI tool queries, including updated assertions for a nested output structure.
    • Added a live test to verify adapter discovery and to validate rendered command output and argument metadata (including default values).

@Astro-Han Astro-Han added enhancement New feature or request P3 Low priority harness Model harness, prompts, tool descriptions, and session mechanics labels Jun 14, 2026
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 746b6b0f-99d5-4510-bc4a-d43e9a1387f9

📥 Commits

Reviewing files that changed from the base of the PR and between 76a2655 and 6cf7f9d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • packages/opencode/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opencode/package.json

📝 Walkthrough

Walkthrough

Bumps @jackwener/opencli from 1.8.3 to 1.8.4 in packages/opencode/package.json. Updates the built-node adapter integration test to execute two queries and assert a nested account/xiaohongshu output shape. Adds a new live test verifying OpenCliSearchTool discovers the Xiaohongshu "ask" adapter and renders the expected argument metadata.

Changes

opencli 1.8.4 bump and Xiaohongshu test coverage

Layer / File(s) Summary
@jackwener/opencli dependency bump
packages/opencode/package.json
@jackwener/opencli bumped from 1.8.3 to 1.8.4.
Dual-query nested output assertions and Xiaohongshu live test
packages/opencode/test/server/built-node-opencli-adapters.test.ts, packages/opencode/test/tool/opencli-tools.test.ts
Embedded server test runs two separate opencli_search queries and asserts a nested output.account.* / output.xiaohongshu.* shape with title, output, and non-zero metadata.count. New live test in opencli-tools.test.ts validates OpenCliSearchTool discovers the Xiaohongshu ask adapter and renders query type, timeout, and source-limit argument metadata.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Astro-Han/pawwork#1272: Introduced the bundled opencli_search adapter registry tooling and <opencli_command ...> rendering that the Xiaohongshu adapter assertions in this PR directly depend on.

Suggested labels

app

Poem

🐇 Hop, hop, a version bumps along,
From three to four, a tiny song!
Xiaohongshu ask now joins the test,
Nested outputs put to the quest.
One bunny, two queries — all the rest! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding Xiaohongshu ask support via the upstream OpenCLI dependency version bump to 1.8.4.
Description check ✅ Passed The PR description covers all major template sections including Summary, Why, Related Issue, Human Review Status, Review Focus, Risk Notes, How To Verify, and a completed Checklist with all required items addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/opencli-xhs-ask

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added P2 Medium priority and removed P3 Low priority labels Jun 14, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested priority: P2 (includes non-doc, non-test paths outside the low-risk bucket).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new adapter override for Xiaohongshu's "ask" command (xiaohongshu-ask.ts), which interacts with the site's webpack conversation store to query "点点" and retrieve answers along with citation sources. The adapter is registered in adapter-registry.ts, and corresponding integration tests have been added to verify its discovery and functionality. I have no feedback to provide as there are no review comments and the implementation is complete.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/opencode/src/opencli/adapter-overrides/xiaohongshu-ask.ts Fixed
@github-actions github-actions Bot added the ci Continuous integration / GitHub Actions label Jun 16, 2026
@Astro-Han Astro-Han changed the title feat(opencli): add Xiaohongshu ask adapter overlay feat(opencli): add Xiaohongshu ask via upstream 1.8.4 Jun 16, 2026
@Astro-Han
Astro-Han merged commit a1e9de0 into dev Jun 16, 2026
40 of 41 checks passed
@Astro-Han
Astro-Han deleted the codex/opencli-xhs-ask branch June 16, 2026 04:19
Astro-Han added a commit that referenced this pull request Jun 16, 2026
## Summary
- Update `THIRD_PARTY_NOTICES.md` so bundled OpenCLI attribution reports version 1.8.4 after #1315.
- Route root third-party notice changes through the `platform` labeler rule, with a workflow contract test, so notice-only PRs satisfy PR triage after this lands.

## Verification
- RED: `cd packages/desktop-electron && bun test ./electron-builder-app-update.test.ts` failed with `Expected to contain: "Version: 1.8.4"`.
- GREEN: `cd packages/desktop-electron && bun test ./electron-builder-app-update.test.ts` passed, 19 tests.
- RED: `cd packages/opencode && bun test ./test/github/pr-triage-workflow.test.ts` failed because `THIRD_PARTY_NOTICES.md` had no platform route.
- GREEN: `cd packages/opencode && bun test ./test/github/pr-triage-workflow.test.ts` passed, 12 tests.
- `cd packages/desktop-electron && bun run test:ci` passed, 529 tests plus CDP smoke.
- PR CI passed, including `unit-desktop`, `pr-triage`, `dev-dep-audit`, and Windows advisory.

## Risk
Low. This corrects packaged attribution text and a PR labeler route; no product runtime behavior changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration / GitHub Actions enhancement New feature or request harness Model harness, prompts, tool descriptions, and session mechanics P2 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants