Commit graph

91 commits

Author SHA1 Message Date
dongmucat
84914c9d94
Merge pull request #359 from iflytek/feature/skillhub-cli-v1
Some checks failed
Deploy Docs / build (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
feat(cli): add SkillHub CLI v1
2026-05-09 17:25:24 +08:00
dongmucat
ab06c75737 Merge branch 'main' into fix/namespace-management-gaps
Resolved conflicts by keeping both sides:
- web/src/api/client.ts: preserve paginated listMembers(slug, {page,size})
  and add delete(slug) from main.
- web/src/shared/hooks/use-namespace-queries.ts: keep useUpdateNamespace
  and useTransferNamespaceOwnership from this branch, plus useDeleteNamespace
  from main.
2026-05-09 15:13:44 +08:00
dongmucat
2821262fa4
Merge pull request #408 from iflytek/fix/namespace-delete-341
fix(namespace): support team namespace deletion
2026-05-09 15:04:06 +08:00
dongmucat
9b64cbedba feat(namespace): add edit/transfer UI with pagination support
Add namespace edit dialog, transfer ownership dialog, and member list pagination. Update API layer to support pagination (PagedResponse), add useUpdateNamespace and useTransferNamespaceOwnership hooks with pagination-aware optimistic updates. Integrate edit button in NamespaceHeader and transfer button on members page. Add i18n keys for all new features (en + zh).
2026-05-09 14:22:16 +08:00
dongmucat
8dd1668555 fix(namespace): support team namespace deletion 2026-05-08 10:15:17 +08:00
dongmucat
5c95ab2b38 feat(skill): add version compare page with unified diff
Introduce a dedicated `/space/$namespace/$slug/compare` page that compares
two published skill versions GitHub-style: left file list + right unified
diff. Backend exposes `GET /versions/compare` returning structured diff
(computed via java-diff-utils) with per-file hunks, binary placeholder,
and truncation flags. Frontend uses two version selectors scoped to
PUBLISHED versions, a file search box, active-file highlighting, and
whitespace-preserving unified view. E2E covers the publish + rerelease
+ approve round trip; controller/domain tests cover happy path and
same-version rejection.
2026-05-07 09:45:26 +08:00
dongmucat
351dddc912 feat(cli): add SkillHub CLI v1 with full command suite
Implement complete CLI tool for SkillHub with 12 commands, 7 backend API endpoints, and comprehensive documentation.

CLI Commands:
- help, version: Basic information
- login, logout, whoami: Authentication management
- search: Discover published skills
- install: Install skills to agent directories (14 Tier 1 agents supported)
- list, remove, doctor: Local skill management
- publish: Publish skill packages
- update: Self-update mechanism

Backend API:
- Add /api/cli/v1 endpoints for auth, search, resolve, download, delete, publish
- Implement CliAuthController and CliSkillController
- Add security policies for CLI routes
- Full test coverage (19 backend tests)

CLI Implementation:
- TypeScript with strict mode, Bun runtime
- Pure JS zip handling (fflate) for cross-platform compatibility
- 15 agent profiles (14 Tier 1 + generic fallback)
- Secure token storage (0600 permissions)
- Path safety validation for remove operations
- Comprehensive error handling (404/403/network distinction)
- 41 unit and integration tests

Documentation:
- CLI user guide (Chinese and English)
- README updates with quick start
- GitHub Actions workflow for cross-platform CI

Quality:
- lint: 0 errors
- typecheck: pass
- test: 41/41 pass
- build: 0.30 MB (target=node for npm/npx compatibility)
2026-04-29 15:37:04 +08:00
dongmucat
f41723e0dc
Merge pull request #356 from iflytek/feature/skill-subscription-notification
feat(subscription): add skill subscription notification feature
2026-04-29 15:20:40 +08:00
dongmucat
78b7e4f0c2 chore(api): regenerate OpenAPI types for subscription endpoints 2026-04-28 11:15:57 +08:00
dongmucat
f707cfee61
Merge pull request #342 from iflytek/feature/batch-member-import
feat(namespace): batch member import via CSV upload
2026-04-28 09:44:53 +08:00
dongmucat
ebc3280d65 feat(subscription): add meApi subscriptions methods 2026-04-27 17:12:23 +08:00
dongmucat
4b538bde04 feat(namespace): add batchAddMembers API client method 2026-04-22 16:10:14 +08:00
dongmucat
0da51a63ea feat(namespace): add batch member import frontend types 2026-04-22 16:09:23 +08:00
dongmucat
dc5759fad3 chore(api): regenerate OpenAPI types for batch member endpoint 2026-04-22 16:07:01 +08:00
dongmucat
230b915194 feat(dashboard): add Update button to My Skills with publish prefill
Add an "Update" button to each skill card on the My Skills dashboard
page. Clicking it navigates to the Publish page with the skill's
namespace and visibility pre-selected, reducing manual steps when
re-publishing a skill package.

- Add visibility field to SkillSummaryResponse so the list API exposes
  each skill's current visibility setting
- Add publish-prefill module to normalize and validate URL search params
- Wire TanStack Router validateSearch on the publish route
- Add E2E tests covering the prefill flow and invalid-param fallback
2026-04-22 14:59:01 +08:00
dongmucat
2c519c8efd fix(search): harden portal search query parsing 2026-04-20 16:57:47 +08:00
xiose
7c2f06d1b6 test(rerelease): add confirmWarnings coverage and sync generated schema
- Add domain tests for rerelease with precheck warnings (reject + confirm)
- Add controller test verifying confirmWarnings passthrough
- Sync SkillVersionRereleaseRequest generated type with backend DTO
2026-04-14 17:55:56 +08:00
xiose
b597a6f511 merge: resolve conflicts after merging origin/main
- Remove duplicate useSubmitForReview/useConfirmPublish in hooks and client
- Restore resolveVersionStatusLabel (version-status-badge not in this branch)
- Fix missing Card closing tag in versions tab
2026-04-14 13:44:30 +08:00
xiose
b26fe6a364 fix(rerelease): support precheck warning confirmation flow
- Backend: Add confirmWarnings parameter to rerelease DTO, domain service, and app service
- Frontend: Add warning dialog with retry logic when precheck warnings are detected
- i18n: Add rerelease warning dialog translations (en/zh)

Fixes the issue where rereleasing a published version with secret detection warnings
always fails with 400 error. Now follows the same confirm-and-retry pattern as initial publish.
2026-04-14 11:58:15 +08:00
dongmucat
38ebb13133
feat(auth): 邮箱验证码重置密码与 SMTP 配置支持 (#273)
* feat(auth): add email-based password reset with SMTP config docs

* test(e2e): stabilize password reset flow

* test(e2e): isolate password reset rate limits

* test(ci): stabilize backend and register e2e

* docs(auth): sanitize smtp setup examples
2026-04-13 20:27:00 +08:00
XiaoSeS
532d0450aa
feat(skill): add UPLOADED status for PRIVATE skill lifecycle (#290)
* feat(skill): add UPLOADED status for PRIVATE skill lifecycle

## Summary
- Add UPLOADED status for PRIVATE skills after security scan passes
- PRIVATE skill owners can test before confirming publish or submitting for review
- Rerelease now follows visibility rules (PRIVATE→UPLOADED, PUBLIC→PENDING_REVIEW)
- Auto-withdraw changes status to UPLOADED (not DRAFT) to keep versions visible

## Changes
- SkillVersionStatus: Add UPLOADED enum value
- SkillPublishService: PRIVATE skills go to UPLOADED after scan
- SecurityScanService: Visibility-based status transition after scan
- SkillGovernanceService: Withdraw→UPLOADED, delete allows UPLOADED
- SkillQueryService: Include UPLOADED in version list filters
- SkillReviewSubmitService: New service for submit-review and confirm-publish
- SkillLifecycleController: Add submit-review and confirm-publish endpoints
- Frontend: Add buttons, dialogs, and hooks for new operations

## Workflow
- PRIVATE: Publish → SCANNING → UPLOADED → confirm-publish → PUBLISHED
- PUBLIC: Publish → SCANNING → PENDING_REVIEW → PUBLISHED

* feat(review): add backward compatibility for DRAFT status

Support both DRAFT (legacy) and UPLOADED (new flow) status in:
- SkillReviewSubmitService.submitForReview
- SkillReviewSubmitService.confirmPublish
- ReviewService.submitReview (both overloads)

This ensures existing data with DRAFT status continues to work
with the new visibility-based workflow introduced in OSS-02.
2026-04-13 11:39:45 +08:00
xiose
f55c520ebe feat(skill): add UPLOADED status for PRIVATE skill lifecycle
## Summary
- Add UPLOADED status for PRIVATE skills after security scan passes
- PRIVATE skill owners can test before confirming publish or submitting for review
- Rerelease now follows visibility rules (PRIVATE→UPLOADED, PUBLIC→PENDING_REVIEW)
- Auto-withdraw changes status to UPLOADED (not DRAFT) to keep versions visible

## Changes
- SkillVersionStatus: Add UPLOADED enum value
- SkillPublishService: PRIVATE skills go to UPLOADED after scan
- SecurityScanService: Visibility-based status transition after scan
- SkillGovernanceService: Withdraw→UPLOADED, delete allows UPLOADED
- SkillQueryService: Include UPLOADED in version list filters
- SkillReviewSubmitService: New service for submit-review and confirm-publish
- SkillLifecycleController: Add submit-review and confirm-publish endpoints
- Frontend: Add buttons, dialogs, and hooks for new operations

## Workflow
- PRIVATE: Publish → SCANNING → UPLOADED → confirm-publish → PUBLISHED
- PUBLIC: Publish → SCANNING → PENDING_REVIEW → PUBLISHED
2026-04-13 09:26:01 +08:00
wowo
2def67b037
feat(publish): relax pre-publish checks into warning + confirm flow (#288)
* feat(publish): allow warning-confirmed pre-publish checks\n\nFixes #287

* fix(i18n): add missing register validation translation keys

The registration form uses i18n keys like register.usernameInvalid,
register.passwordTooShort etc. but they were never defined in the
locale files, causing E2E tests to fail because the raw key strings
were displayed instead of human-readable messages.
2026-04-12 19:15:57 +08:00
Seasoning
739e21e0fd
Feat/namespace member display username (#236)
* feat: display username and email in namespace member management

MemberResponse DTO now includes displayName and email fields.
NamespacePortalQueryAppService batch-loads UserAccount data via
findByIdIn to avoid N+1 queries. Frontend member table shows
username (with userId as fallback subtitle) and email columns
instead of raw user IDs.

* test(namespace): add displayName/email assertions and new test coverage

- Controller: add displayName and email assertions to addMember and updateMemberRole tests
- QueryAppService: add listMembers tests for batch user enrichment and null degradation
- CommandAppService: add addMember/updateMemberRole tests for displayName/email population and graceful degradation

Addresses PR #236 review feedback comments:
- Issue 2: Controller tests now assert displayName and email from mocked UserAccount
- Issue 3: Service layer tests now cover batch query and null user degradation
2026-04-08 20:02:20 +08:00
huihan3
27e17a78ff fix(web): preserve subpath prefix for api and runtime config 2026-04-03 10:59:10 +08:00
XiaoSeS
5842a02288 feat: support Unicode characters in skill slugs (#196)
* fix: increase nginx upload limit and filter Chrome DevTools logs

- Add client_max_body_size 100M to nginx config to allow large skill package uploads
- Silently handle Chrome DevTools .well-known requests to reduce log noise

Fixes #193

* feat(domain): add Unicode slug support with emoji validation

- Update SLUG_PATTERN to support Unicode letters (\p{L}), numbers (\p{N}), and symbols (\p{So})
- Add UPPERCASE_PATTERN to maintain lowercase-only validation
- Modify slugify() to preserve Unicode characters instead of replacing with hyphens
- Add 8 new test cases covering Chinese, Japanese, Korean, emoji, and mixed Unicode slugs
- Maintain backward compatibility with existing ASCII slug validation
- All 16 tests passing

Implements Phase 1 of unicode-slug-support-v1.0-prd.md

* feat(web): add URL encoding for Unicode slugs and improve monospace font support

- Encode skill slugs in all navigation URLs using encodeURIComponent
- Encode slugs in API client methods for proper HTTP request handling
- Update share button to generate properly encoded URLs
- Extend monospace font stack with system fonts for better Unicode support
- All frontend tests pass (506 tests)

Related to Unicode slug support PRD phase 2 and 3

* feat(web): regenerate API types for Unicode slug support

- Update OpenAPI schema types after backend slug validator changes
- Reflects new Unicode-aware slug pattern validation

* remove
2026-03-31 10:17:34 +08:00
dongmucat
1aae926944 fix(web): improve network error message with i18n
- Replace hardcoded 'Network error' with i18n key 'apiError.networkError'
- Add dedicated handler for status 0 in handleApiError
- Add test case for network error scenario

Closes #160
2026-03-27 18:50:38 +08:00
XiaoSeS
a78684ce44 Fix/skill delete duplicate result (#159)
* fix(skill): resolve duplicate result error when deleting skill with shared namespace+slug

V13 migration changed the unique constraint from (namespace_id, slug) to
(namespace_id, slug, owner_id), allowing multiple skills with the same
namespace+slug but different owners. The findByNamespaceSlugAndSlug query
returned Optional<Skill> which threw IncorrectResultSizeDataAccessException
when 2 rows matched.

Changed the query to return List<Skill> and added ownerId query param to
DELETE endpoints so the frontend can specify exactly which skill to delete.

* fix(review): keep failed scans reviewable and expose feedback
2026-03-25 16:15:50 +08:00
yun-zhi-ztl
3f7145a843 Merge remote-tracking branch 'origin/main' into feature/notification-system 2026-03-23 17:12:13 +08:00
dongmucat
e5a3aa6006 test(web): add colocated frontend coverage
变更摘要:
- 将前端测试共置到 web/src,保留并迁移 app 样式相关用例
- 为 pages、features、shared UI 与 hooks 补齐大范围 Vitest 覆盖
- 强化 governance、file preview、namespace header 与 API client 的关键分支测试
- 重新验证 pnpm run test 与 pnpm run typecheck,当前均已通过

关键文件:
- web/src/pages/dashboard/governance.test.ts
- web/src/features/governance/governance-inbox.test.ts
- web/src/features/skill/file-preview-dialog.test.ts
- web/src/features/namespace/namespace-header.test.ts
- web/src/api/client.test.ts
2026-03-23 16:13:34 +08:00
yun-zhi-ztl
a3d7a81d0c chore(notification): sync main and expand regression coverage 2026-03-23 15:04:47 +08:00
vsxd
fcfd9b203b fix(review): add pagination and time sorting to audit queues 2026-03-23 14:32:54 +08:00
vsxd
ddf9e6e1d2 refactor: address code review findings from 2026-03-22
Implements 6 high-priority improvements from code review:

Backend:
- Make label business limits configurable via application.yml (max-definitions, max-per-skill)

Frontend:
- Split use-skill-queries.ts into domain-specific modules (label/namespace/user/skill)
- Enable @typescript/no-explicit-any as warning and clean up 10 any types
- Unify API error handling by removing unwrap() in favor of fetchJson()

Testing:
- Add label system scenarios to smoke test script
- Add 6 new tests for label management UI (validation, rendering)

All tests passing: 301 backend, 129 frontend
2026-03-23 13:48:23 +08:00
yun-zhi-ztl
6e8b257abb feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00
Xudong Sun
21ba6ee938 fea: implement skill label system end to end (#140)
* docs(label): add skill label system design spec

Covers data model, permission model, search integration,
API design, and frontend design for the label system.

* docs(label): address spec review findings

- Add CHECK constraint on label_definition.type, deny-by-default in app layer
- Use TIMESTAMPTZ consistently for all new tables
- Add (label_id) index on skill_label for filter performance
- Add label count limits (10 per skill, 100 definitions)
- Detail async rebuild strategy (Spring @Async, batch 50, error isolation)
- Clarify search_vector is GENERATED STORED column, auto-maintained
- Expand SearchQuery with labelSlugs field, detail SQL changes
- Define all API response JSON structures
- Clarify PUT update: no slug in body, full-replace translations
- Clarify hard delete with audit_log
- Add cross-namespace permission boundary (promotion scenario)
- Pre-reserve multi-label API param for future
- Clarify ClawHub compat layer: no label support in phase 1

* docs(label): address second-round spec review findings

- Fix chapter numbering (duplicate "6." → "6." + "7.")
- Move labelSlugs to end of SearchQuery record to reduce breaking change
- Add TIMESTAMPTZ convention note for new tables
- Clarify async rebuild transaction boundary (per-skill independent tx)
- Move rebuildByLabelId to app layer to preserve module boundaries
- Clarify multi-label filter uses OR semantics with AND extension path

* docs(label): fix section numbering in frontend design chapter

* Implement skill label system end to end

* Unify label app services and DTOs

* Add admin label management page

* Add label admin backend tests

* Fix merge fallout in generated schema
2026-03-20 15:26:41 +08:00
XiaoSeS
28e9049562 feat(profile): add field policy config and GET response
* feat(profile): add field policy config and GET response

Add per-field edit policy configuration (editable, requiresReview) to
application.yml and expose it in the GET /api/v1/user/profile response
via a new fieldPolicies map, enabling the frontend to dynamically render
fields based on backend-driven policies.

* feat(profile): implement mixed submission in PATCH

Split profile update changes by per-field policy: fields without
requiresReview apply immediately, fields with requiresReview enter
the pending queue. Return PARTIALLY_APPLIED status with appliedFields
and pendingFields maps when both paths trigger in a single request.

* feat(web): rewrite profile page with dynamic fields

Render profile fields dynamically from backend fieldPolicies, with
whole-page read/edit mode toggle. Handle APPLIED, PENDING_REVIEW, and
PARTIALLY_APPLIED responses. Add i18n keys for review hints and
partial-apply toasts in both en and zh.

* merge: resolve deepwiki.yml conflict with package-lock.json fix

* api schema

* fix(profile): align moderation defaults and tests

* ci(deepwiki): run crawler on release publish
2026-03-20 14:59:21 +08:00
yun-zhi-ztl
94ecc4d0b2 feat: add super-admin hard delete skill api (#131)
* feat: add super-admin hard delete skill api

* fix: address hard delete review feedback

* fix: add missing unarchive skill locale

* docs: add skill detail hard delete design

* feat: add owner hard delete flow for skill details
2026-03-20 11:02:02 +08:00
yun-zhi-ztl
9e7c6d4563 feat: show pending skill detail in review flow 2026-03-19 20:01:47 +08:00
yun-zhi-ztl
5748018f8b Merge pull request #108 from iflytek/feature/project-fixbug319
fix: paginate governance views and add my skills filters
2026-03-19 17:37:32 +08:00
XiaoSeS
f2cf22b3e1 feat: add user profile update feature with moderation support
* feat: add user profile update feature with moderation support

Add ability for users to update their display name with optional machine/human review.

Backend:
- Add profile_change_request table (V15 migration)
- Add UserProfileService with moderation workflow
- Add PATCH /api/v1/user/profile and GET /api/v1/user/profile endpoints
- Add ProfileModerationService interface with NoOp implementation
- Add ProfileModerationProperties for machine/human review toggles
- Update AuthController /me to refresh session when displayName changes
- Add i18n messages for profile validation and responses

Frontend:
- Add /settings/profile page with edit-on-click pattern
- Add profileApi.updateProfile() to client
- Update user menu: add "Profile Settings", make "Security Settings" local-only
- Add i18n translations (en/zh) for profile settings

Testing:
- Add UserProfileControllerTest with 8 test cases
- Add UserProfileServiceTest with 6 test cases
- Add AuthControllerTest case for session refresh on displayName change

* version sql

* merge main

* feat: add profile review admin workflow

* feat(web): add pagination to skill review list

- useReviewList now passes page/size to backend and returns paginated response
- reviews.tsx maintains per-tab page state with prev/next controls
- namespace-reviews.tsx adapted to new response shape
- Added i18n keys for pagination (en/zh)
2026-03-19 17:23:05 +08:00
yun-zhi-ztl
296c713652 fix: add my skills status filters 2026-03-19 17:06:26 +08:00
yun-zhi-ztl
3ba6d22c18 fix: paginate governance queries 2026-03-19 16:51:09 +08:00
vsxd
024e66d747 feat: add search index rebuild workflow 2026-03-19 15:20:08 +08:00
vsxd
729b1c0498 docs: enrich frontend code documentation 2026-03-19 13:37:21 +08:00
XiaoSeS
626e00219e feat: add user profile update feature with moderation support (#90)
* feat: add user profile update feature with moderation support

Add ability for users to update their display name with optional machine/human review.

Backend:
- Add profile_change_request table (V15 migration)
- Add UserProfileService with moderation workflow
- Add PATCH /api/v1/user/profile and GET /api/v1/user/profile endpoints
- Add ProfileModerationService interface with NoOp implementation
- Add ProfileModerationProperties for machine/human review toggles
- Update AuthController /me to refresh session when displayName changes
- Add i18n messages for profile validation and responses

Frontend:
- Add /settings/profile page with edit-on-click pattern
- Add profileApi.updateProfile() to client
- Update user menu: add "Profile Settings", make "Security Settings" local-only
- Add i18n translations (en/zh) for profile settings

Testing:
- Add UserProfileControllerTest with 8 test cases
- Add UserProfileServiceTest with 6 test cases
- Add AuthControllerTest case for session refresh on displayName change

* version sql

* merge main
2026-03-19 10:16:40 +08:00
vsxd
93b264309f feat(skill-detail): show author display name 2026-03-19 09:32:13 +08:00
Xudong Sun
4aa3d29599 refactor: skill lifecycle projection and docs (#78)
* Refactor skill lifecycle projection and docs

* Improve owner lifecycle visibility on skill detail

* Track download counts per skill version
2026-03-18 13:39:22 +08:00
vsxd
7c85a262ff Fix S3 skill download flow and filenames 2026-03-17 16:58:24 +08:00
yun-zhi-ztl
252ba65297 fix: hide self-report action on skill detail 2026-03-17 14:05:40 +08:00
yun-zhi-ztl
83606ef930 fix: degrade gracefully for missing skill storage assets 2026-03-17 13:56:39 +08:00