Skip to content

feat: 集成 Skill Hub 技能商店 - #20

Merged
LangLang03 merged 2 commits into
LangLang03:devfrom
andTDWF:feat/skill-hub-integration
Aug 17, 2026
Merged

feat: 集成 Skill Hub 技能商店#20
LangLang03 merged 2 commits into
LangLang03:devfrom
andTDWF:feat/skill-hub-integration

Conversation

@andTDWF

@andTDWF andTDWF commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 新增 Skill Hub 登录、会话、技能浏览、详情和发布流程
  • 扩展技能仓库、文件管理与页面导航,支持远程技能安装和管理
  • 扩展 HTTP 客户端二进制请求体能力,并补充客户端与控制器测试

Test plan

  • git diff --check
  • ./gradlew :app:testDebugUnitTest --tests 'cn.lineai.data.service.SkillHubClientTest' --tests 'cn.lineai.data.service.SkillHubSessionClientTest' --tests 'cn.lineai.mvp.ExtensionManagementControllerTest'
  • ./gradlew :app:assembleRelease
  • 校验 Release APK 签名(当前产物缺少 AndroidManifest.xmlapksigner verify 无法完成)

🤖 Generated with Claude Code

Summary by Sourcery

Integrate SkillHub-powered skill store, remote installation, and publishing flows into the app, including supporting HTTP binary bodies and safer skill package handling.

New Features:

  • Add Skill store browsing and detail screens backed by SkillHub, including tabs for overview, files, comments, versions, evaluation, and previews.
  • Introduce SkillHub login, account center, and web-based feature navigation screens to access official SkillHub functions from within the app.
  • Support installing skills directly from SkillHub into app-global or project-local locations via the extension management flow.
  • Add a SkillHub publish screen to upload local skills to SkillHub with validation of metadata and local files.

Enhancements:

  • Strengthen ZIP skill package handling with entry validation, size limits, and mandatory SKILL.md presence, cleaning up partially extracted content on error.
  • Extend the Markdown view with pinch-to-zoom text scaling, persisted reader preferences, and improved file preview UX for skill documentation.
  • Enhance HTTP client requests to support binary bodies for multipart uploads and other non-text payloads.
  • Add a Skill icon loader with caching and remote icon fetching from approved SkillHub hosts.
  • Introduce shared SkillHub client and session client abstractions with strongly typed models for listing, details, comments, versions, evaluation, and publishing flows.

Tests:

  • Add unit tests for SkillHubClient parsing, validation utilities, and detection of script content in skills.
  • Add unit tests for SkillHubSessionClient cookie handling and local skill file collection, including sensitive file rejection.
  • Add an ExtensionManagementController test to verify SkillHub installs run on worker threads without triggering host navigation or rendering.

新增 Skill Hub 登录、浏览、详情与发布流程,并扩展技能仓库和 HTTP 客户端以支持远程技能管理。

@sourcery-ai sourcery-ai 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.

Sorry @andTDWF, your pull request is larger than the review limit of 150000 diff characters

@sourcery-ai

sourcery-ai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Integrates a Skill Hub skill store into the app, including new UI screens for browsing, login, publishing, detail, and web-based center flows; adds secure SkillHub HTTP clients and session handling, extends markdown pinch-zoom, tightens ZIP unpacking limits, enables binary HTTP request bodies, and wires remote Skill installation and publishing through the existing extension/skill repository and controller layers with tests.

Sequence diagram for installing a Skill from SkillHub

sequenceDiagram
    actor User
    participant SkillStoreDetailScreenView
    participant MainCoordinator
    participant ExtensionManagementController
    participant ExtensionRepository
    participant SkillRepository
    participant SkillHubClient
    participant SimpleHttpClient

    User->>SkillStoreDetailScreenView: onInstall(location, slug, version)
    SkillStoreDetailScreenView->>MainCoordinator: onSkillInstalledFromSkillHub(location, slug, version)
    MainCoordinator->>ExtensionManagementController: installSkillFromSkillHub(location, slug, version)
    ExtensionManagementController->>ExtensionRepository: installSkillFromSkillHub(homePath, location, slug, version)
    ExtensionRepository->>SkillRepository: installSkillFromSkillHub(homePath, location, slug, version)
    SkillRepository->>SkillHubClient: download(slug, version)
    SkillHubClient->>SimpleHttpClient: download(url, CONNECT_TIMEOUT_MS, readTimeoutMs, MAX_ZIP_BYTES)
    SimpleHttpClient-->>SkillHubClient: DownloadResult.bytes
    SkillRepository->>SkillRepository: installSkill(homePath, location, archivePath, slug)
    SkillRepository-->>MainCoordinator: SkillRecord
Loading

File-Level Changes

Change Details Files
Add Skill Hub skill store UI flow with browse, detail, login, center, publish, and web wrapper screens, and hook it into existing navigation.
  • Extend ExtensionDetailScreenView listener and UI to expose an entry point to the online skill store from skills settings.
  • Register new SkillHub-related ScreenFactory implementations in MainChatView and implement SkillStore, SkillStoreDetail, SkillHubCenter, SkillHubWeb, SkillHubPublish, and SkillHubLogin screen views.
  • Wire Skill store actions to MainUiController via onSettingsItemSelected and onSkillInstalledFromSkillHub callbacks with appropriate screen IDs and prefixes.
app/src/main/java/cn/lineai/ui/component/ScreenFactories.java
app/src/main/java/cn/lineai/ui/MainChatView.java
app/src/main/java/cn/lineai/ui/component/ExtensionDetailScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillStoreScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillStoreDetailScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillHubCenterScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillHubWebScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillHubLoginScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillHubPublishScreenView.java
app/src/main/java/cn/lineai/ui/component/SkillIconLoader.java
Implement SkillHub client and session/publishing logic and integrate SkillHub-based skill installation into repositories and controllers.
  • Add SkillHubClient for listing skills, fetching details, comments, versions, evaluation, test cases, file contents, downloading ZIPs, and loading icons with strict validation and size limits.
  • Add SkillHubSessionClient to manage authenticated operations (current session, comments CRUD, star/unstar, publish, logout) using cookies and SimpleHttpClient with safety checks and multipart upload.
  • Extend SkillRepository, ExtensionRepository, ExtensionStore, ExtensionManagementController, and ExtensionController to support installSkillFromSkillHub and route callbacks from UI to repository.
  • Introduce SkillHubModels as shared model types for summaries, details, comments, versions, evaluation, test cases, files, and pages.
app/src/main/java/cn/lineai/data/service/SkillHubClient.java
app/src/main/java/cn/lineai/data/service/SkillHubSessionClient.java
app/src/main/java/cn/lineai/data/repository/SkillRepository.java
app/src/main/java/cn/lineai/data/repository/ExtensionRepository.java
data/src/main/java/cn/lineai/data/repository/ExtensionStore.java
app/src/main/java/cn/lineai/mvp/ExtensionManagementController.java
app/src/main/java/cn/lineai/mvp/MainCoordinator.java
app/src/main/java/cn/lineai/mvp/ExtensionController.java
core-model/src/main/java/cn/lineai/model/SkillHubModels.java
Harden skill ZIP handling and file-based publishing and add binary HTTP request body support.
  • Add limits and validation to SkillFileManager.unzip: max files, per-entry size, total size, entry name sanitization, mandatory SKILL.md, and cleanup on error.
  • Update SimpleHttpClient to support either String body or raw byte[] bodyBytes, setting fixed-length streaming mode based on bytes.
  • Implement SkillHubSessionClient file collection and multipart upload with constraints on sensitive files, file count, and size.
app/src/main/java/cn/lineai/data/service/SkillFileManager.java
core-security/src/main/java/cn/lineai/security/SimpleHttpClient.java
app/src/main/java/cn/lineai/data/service/SkillHubSessionClient.java
Enhance MarkdownView with pinch-to-zoom text scaling and propagate reading preferences into SkillHub markdown viewers.
  • Add ScaleGestureDetector-based pinch zoom handling to MarkdownView, tracking per-TextView base text sizes and applying a bounded text scale factor.
  • Expose APIs on MarkdownView for enabling pinch zoom, setting/getting text scale, and listening for text scale changes.
  • Hook MarkdownView text scaling into SkillStoreDetailScreenView and file preview dialogs, persisting scale in SharedPreferences.
markdown/src/main/java/cn/lineai/ui/markdown/MarkdownView.java
app/src/main/java/cn/lineai/ui/component/SkillStoreDetailScreenView.java
Add tests around SkillHub parsing, session safety, publishing, and controller integration.
  • Add SkillHubClientTest for summary parsing, icon URL validation, file path validation, comment parsing, and Detail.hasScripts behavior.
  • Add SkillHubSessionClientTest for account parsing, publish file collection, sensitive file rejection, and cookie safety.
  • Add ExtensionManagementControllerTest to verify that SkillHub installs run on worker threads and do not touch host navigation/rendering from background threads.
app/src/test/java/cn/lineai/data/service/SkillHubClientTest.java
app/src/test/java/cn/lineai/data/service/SkillHubSessionClientTest.java
app/src/test/java/cn/lineai/mvp/ExtensionManagementControllerTest.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

让 URI、GitHub 和 Skill Hub 安装共用临时文件清理与既有 Skill 安装逻辑,并将二进制文件写入收口到 SkillFileManager。
@LangLang03
LangLang03 merged commit da218c7 into LangLang03:dev Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants