Commit graph

758 commits

Author SHA1 Message Date
chenbaowang
2fffc2b377 fix(cli): remove unsupported rating sort, add stars sort, clean up versions command
- Remove --rating option and rating sort (API doesn't support it)
- Add --stars shorthand for star-based sorting
- Fix interactive-search.ts to use stars sort instead of rating
- Add ratingAvg field to SkillDetail and display in explore output
- Delete deprecated versions.ts command (functionality merged into inspect)
2026-04-22 16:01:12 +08:00
chenbaowang
3349182072 fix(cli): fix show-env-instructions output format
- Replace dim() function calls with chalk.dim() to return strings
- Use array join approach for clean output formatting
- Fix undefined output in environment variable instructions
2026-04-22 14:11:31 +08:00
chenbaowang
a1fb6d261e feat(cli): simplify config command and enhance inspect/install
- Simplify config command: remove <key> parameter, hardcode registry
- config set <value> now directly sets registry URL
- config get shows resolved value with source information
- Add --source option to config get for env/file/resolved
- Add version normalization (strip 'v' prefix) in install
- Skip version selection when --skill-version or --tag specified
- Enhance inspect with --details option for version history
- Reorganize help: Configuration at top, Discover & Info merged
- Move SkillVersionItem types to schema/routes.ts
- Fix error handling to return after setting exit code
- Remove versions command registration (file retained for compatibility)
2026-04-22 13:45:16 +08:00
chenbaowang
acea441625 feat(cli): enhance inspect/install commands and reorganize help
- Add --details option to inspect for version history and tags
- Normalize version input (strip 'v' prefix) in install command
- Skip version selection when --skill-version or --tag is specified
- Reorganize help: merge Discover & Info sections
- Move SkillVersionItem/VersionsResponse types to schema/routes.ts
- Remove versions command registration from CLI (file retained for now)
- Fix error handling to return after setting exit code
- Update tests to reflect command changes
2026-04-21 19:40:02 +08:00
chenbaowang
d4ea485662 fix(cli): fix registry config priority for login and all commands
- Remove hardcoded default from Commander --registry option that
  overrode config file settings in ALL commands
- Login command now uses loadConfigFromProgram() like other commands
  instead of hardcoded http://localhost:8080
- Improved login error messages with registry URL context
2026-04-21 17:32:06 +08:00
chenbaowang
d96ef86fac fix(cli): replace process.exit(1) with process.exitCode = 1
process.exit() forcefully kills the process, preventing libuv from
cleanly closing HTTP connections (undici). On Windows this triggers
an assertion failure: UV_HANDLE_CLOSING.

Using process.exitCode = 1 lets Node.js exit gracefully after the
event loop drains, eliminating the assertion error while still
returning exit code 1.
2026-04-21 10:54:50 +08:00
chenbaowang
8815c1596c fix(cli): human-readable API error messages
ApiError previously displayed raw JSON like:
  API error 403: {"code":403,"msg":"Access denied..."}

Now extracts the msg field from the API response body and displays:
  Access denied to skill: find-skills
  Run `skillhub login` to authenticate.

Changes:
- Add extractHumanMessage() to pull msg/message/error from response
- ApiError.message now shows human text instead of raw JSON
- 401/403 responses append login hint
- whoami: remove redundant 'Not authenticated:' prefix
2026-04-21 10:21:32 +08:00
chenbaowang
f5caed955e chore: remove local scripts from git tracking
Remove scripts/notify-feishu.sh and scripts/release-cli.sh from git tracking
as they are local utility files. Added to .gitignore to prevent future
accidental commits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 10:11:32 +08:00
chenbaowang
b332d0ba97 Merge remote-tracking branch 'upstream/main' into feat/skillhub-cli-v2 2026-04-21 09:51:21 +08:00
chenbaowang
6a6df19f4b chore(cli): bump version to 1.1.3 for --registry parameter fix 2026-04-21 00:12:01 +08:00
chenbaowang
2543cd52e7 fix(cli): make --registry parameter work for all commands
Fixed the issue where the --registry command-line parameter was defined
but not actually used by any commands.

Changes:
- Added loadConfigFromProgram() helper in config.ts to read registry from program.opts()
- Updated all 21 command files to use loadConfigFromProgram() instead of loadConfig()
- Ensured correct priority: CLI args > env vars > config file > defaults

Priority order:
1. --registry <url> (command-line flag) - highest priority
2. SKILLHUB_REGISTRY (environment variable)
3. ~/.skillhub/config.json (config file)
4. http://localhost:8080 (default value)

This allows users to temporarily override the registry without modifying
environment variables or config files, providing better flexibility for:
- Testing against different registries
- Multi-project/multi-environment setups
- CI/CD automation scripts

Updated commands:
- install, download, update, check, sync, uninstall
- explore, search
- publish, delete, archive, versions
- inspect, resolve, rating, rate, star, report, reviews
- whoami, me, namespaces, notifications
- transfer, hide, unhide

Fixes issue where `npx motovis-skillhub install <skill> --registry <url>`
would ignore the --registry parameter and use env vars or defaults instead.
2026-04-21 00:07:15 +08:00
chenbaowang
d6b9f026b4 revert(web): restore vite.config.ts to use port 3000
Revert the vite.config.ts changes from e93adaa that changed the dev
server port from 3000 to 8181 and added local dev features (env loading,
serve-skill-md plugin, proxy headers). These were local development
configs that broke CI by changing the port away from 3000 which the
Makefile health check expects.
2026-04-20 21:17:55 +08:00
chenbaowang
ee18161d56 feat(cli): improve list and check commands with better filtering
list.ts:
- Remove locked universal section, all agents are now equal
- Users manually select which agents to list from
- No default selections, cleaner UX

check.ts:
- Add agent filtering via --agent flag or interactive selection
- Add status filtering via --status flag or interactive selection
- Default to showing only OK + Missing (not Orphaned)
- Interactive prompts for scope, agents, and statuses
- Show agent names and scope prefix in output
- Smart defaults reduce noise from orphaned skills
2026-04-20 20:24:44 +08:00
chenbaowang
3cf4d64cf5 chore(cli): bump version to 1.1.2 2026-04-20 19:53:35 +08:00
chenbaowang
04bc62fed4 feat(cli): add scope-aware universal grouping and improve output formatting
- list.ts: use isUniversalForScope for dynamic grouping based on scope
- list.ts: group output by skill name to avoid duplicate path listings
- uninstall.ts: use isUniversalForScope for dynamic grouping
- uninstall.ts: add printUninstallResults for consistent formatted output
- .npmignore: exclude development files from npm package
- package.json: bump version to 1.1.1
2026-04-20 19:49:17 +08:00
chenbaowang
e5da7397fa refactor(cli): sort all list outputs and agent names alphabetically
- update.ts: sort skill selection list alphabetically
- check.ts: sort results by status then name, sort agent names in locations
- install.ts: sort agent names in buildAgentSummary, sort --list output
- sync.ts: sort discovered skills by name before display

Ensures consistent alphabetical ordering across all CLI commands for
better user experience and predictability.
2026-04-20 19:49:16 +08:00
chenbaowang
b6301cb9a9 chore(cli): bump version to 1.1.0 2026-04-20 19:49:16 +08:00
chenbaowang
86b8de1fbc feat(cli): merge install results by path for cleaner output
Group agents that share the same install path into a single line.
When more than 5 agents share a path, show first 5 names + count.
Sort agent names alphabetically within each group.
Extract buildInstallResultLines utility function to DRY up
duplicate output logic in installFromRegistry and installFromGit.
2026-04-20 19:49:15 +08:00
chenbaowang
aaf80dbfd8 fix(cli): sort agent lists alphabetically and fix spinner residue
- Sort universal and non-universal agent lists by name in selectAgentsInteractive
- Exclude agents with showInUniversalList===false from locked section
- Replace spinner.stop() with spinner.succeed() before interactive prompts
  to prevent 'Fetching' text from appearing as the step title
- Also fix spinner.stop -> spinner.succeed for 'Installation complete'
2026-04-20 19:49:15 +08:00
chenbaowang
3353953675 fix(cli): determine scope before agent selection for correct universal grouping
- Move scope selection before agent selection in both installFromRegistry
  and installFromGit flows
- Use isUniversalForScope in selectAgentsInteractive so that the Universal
  locked section correctly reflects the actual scope:
  - Project: agents with skillsDir='.agents/skills' (Cline, Codex, Cursor, etc.)
  - Global: agents with globalSkillsDir='.agents/skills' (Cline, Warp only)
- Clean up unused getUniversalAgents/getNonUniversalAgents imports
2026-04-20 19:49:15 +08:00
chenbaowang
32395ee5c2 refactor(cli): use dynamic isUniversalForScope instead of static isUniversalAgent
- Add isUniversalForScope(agent, isGlobal) and getAgentTargetDir(agent, isGlobal) to agent-detector.ts
- An agent is 'universal' when its target install dir equals the canonical .agents/skills directory
- This fixes incorrect symlink skipping for agents like Codex/Cursor whose globalSkillsDir
  differs from .agents/skills (e.g. .codex/skills, .cursor/skills)
- Update installer.ts to use dynamic check via optional AgentInfo parameter
- Update install.ts to use getAgentTargetDir and pass agent info to installSkill
- Update uninstall.ts to use isUniversalForScope for correct path resolution
- Clean up unused isUniversalAgent import in list.ts
2026-04-20 19:48:58 +08:00
dongmucat
acc8899abb
Merge pull request #328 from iflytek/fix/gitlab-oauth-release-env
fix(env): add gitlab oauth release example config
2026-04-20 14:04:25 +08:00
dongmucat
1d0d6be816 fix(env): add gitlab oauth release example config 2026-04-20 13:54:41 +08:00
chenbaowang
ea4e206ad6 chore(cli): update .npmignore and add release scripts
- Remove "还未发布" from .npmignore, add src/ to excludes
- Add scripts/notify-feishu.sh for Feishu bot release notifications
- Add scripts/release-cli.sh for one-click CLI release workflow
2026-04-20 10:42:12 +08:00
chenbaowang
39db503700 fix(cli): improve install spinner messages and fix interactive search conflict
- Stop spinner before runInteractiveSearch to prevent terminal UI conflict
  (same issue as version selection p.select)
- Make spinner messages more specific: include skill name, version, path
  instead of generic "Fetching"/"Downloading"/"Extracting"
2026-04-20 09:37:59 +08:00
wrj97
7be6a36960
feat(auth): add GitLab OAuth2 provider support (#264)
* feat(auth): add GitLab OAuth2 provider support

Add GitLab as an additional OAuth2 authentication provider alongside
GitHub. This includes:

- GitLab OAuth2 client configuration with customizable base URL
- GitLabClaimsExtractor for handling GitLab-specific user claims
- Multi-provider login UI with provider-specific icons
- Updated localization to use OAuth-agnostic terminology
- JSON type annotation for IdentityBinding entity

* fix(auth): restore oauth redirect and gitlab email checks

* test(auth): align oauth login handler expectation

---------

Co-authored-by: wowo-zZ <zhenggui5228@126.com>
2026-04-17 19:56:32 +08:00
chenbaowang
90809c47ab fix(cli): stop spinner before version selection to prevent UI conflict
The ora spinner was still running during p.select() interactive prompt,
causing the spinner to continuously overwrite the terminal and block
the version selection UI. The user would see "Fetching..." stuck until
pressing Enter.

Stop spinner before p.select() and restart after selection completes.
2026-04-17 18:49:23 +08:00
XiaoSeS
080be28eef
fix(search): align portal visibility for private skills (#323)
* feat(ci): add AI-powered release notes generation

- Add GitHub Models integration for automated release notes
- Support bilingual (EN) release notes with highlights extraction
- Fallback to conventional commit grouping when LLM unavailable
- Trigger on tag push or manual workflow dispatch
- Zero configuration: uses GitHub Models (gpt-4o-mini) by default

* chore: pin action versions and update gitignore

- Pin checkout and setup-deno to commit hashes matching project convention
- Add .playwright-mcp/ and .mcp.json to gitignore

* fix(search): keep private skills out of portal discovery

- remove super admin expanded visibility from portal search
- exclude all private skills from portal search results
- keep namespace-only skills visible only to namespace members
- reserve private skill access for my-skills and future admin surfaces

* test(search): update test to reflect portal visibility policy

- rename test from platformWideAccessShouldBypass... to platformWideAccessShouldNotBypass...
- verify that platformWideAccess flag does not grant extra visibility in portal search
- verify PRIVATE skills are excluded from search SQL
- aligns test with new requirement: portal search uses standard visibility rules

* test(search): update app service test for portal visibility policy

- rename test from search_shouldGrantPlatformWideAccessToSuperAdmin to search_shouldNotGrantPlatformWideAccessToSuperAdminInPortal
- verify super admin does not get platformWideAccess in portal search
- aligns with requirement: portal uses standard visibility, admin features reserved for dedicated interface
2026-04-17 17:46:05 +08:00
wowo
c03790a11e
Fix runtime Postgres password drift (#321)
- start postgres before bringing up application services
- sync the database role password from .env.release
- verify TCP auth with the synced password before startup
2026-04-17 17:45:34 +08:00
XiaoSeS
5bf8750658
feat(ci): add AI-powered release notes generation (#322)
* feat(ci): add AI-powered release notes generation

- Add GitHub Models integration for automated release notes
- Support bilingual (EN) release notes with highlights extraction
- Fallback to conventional commit grouping when LLM unavailable
- Trigger on tag push or manual workflow dispatch
- Zero configuration: uses GitHub Models (gpt-4o-mini) by default

* chore: pin action versions and update gitignore

- Pin checkout and setup-deno to commit hashes matching project convention
- Add .playwright-mcp/ and .mcp.json to gitignore
2026-04-17 15:19:48 +08:00
eldenring_saver
e93adaaaaa feat(web): replace clawhub with skillhub CLI in frontend
- Replace all `npx clawhub` references with `npx motovis-skillhub` / `skillhub`
- Update namespace separator from `--` to `/` in install commands
- Change env var CLAWHUB_REGISTRY to SKILLHUB_REGISTRY
- Add vite dev server plugin to serve /registry/skill.md
- Update i18n strings (zh/en): ClawHub CLI → SkillHub CLI
- Update skill.md/skill.md.template with new CLI commands
- Update quick-start.tsx syntax highlighting and env config
- Update e2e test assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 15:49:06 +00:00
chenbaowang
5cf44c5a98 feat(cli): custom grouped help page with aliases and examples 2026-04-16 23:26:41 +08:00
chenbaowang
ed21388c30 chore: bump version to 1.0.6 2026-04-16 15:47:51 +08:00
chenbaowang
601644b8a7 fix(cli): fix addToLock namespace doubling, update fallback path, and download stream completion
- install: use actualSlug instead of raw slug in addToLock to prevent
  namespace doubling (vision2group/vision2group/slug)
- update: remove hardcoded 'node dist/cli.mjs' fallback, rely on
  process.argv[1] which is always reliable
- download: use finished() to ensure stream write completes before
  proceeding
2026-04-16 14:46:55 +08:00
chenbaowang
616319fe35 fix(cli): replace execSync unzip with unzipper for cross-platform support
- Add @types/unzipper for TypeScript support
- Fix location header type assertion (string | string[] -> string)
- Bump version to 1.0.5
2026-04-16 11:18:20 +08:00
chenbaowang
c970a76410 chore: bump version to 1.0.3 2026-04-16 10:51:29 +08:00
chenbaowang
626490e554 feat(cli): support SKILLHUB_REGISTRY env var for registry URL
Priority: SKILLHUB_REGISTRY env var > ~/.skillhub/config.json > default
2026-04-16 10:49:40 +08:00
chenbaowang
c9644e8032 chore: bump version to 1.0.2 2026-04-16 10:31:30 +08:00
chenbaowang
af6ebf3058 fix(cli): handle 302 redirect in download and fix --skill-version option parsing
- undici does not auto-follow HTTP redirects, manually follow 302/307/308
  to MinIO presigned URL before piping response body
- Commander.js parses --skill-version as skillVersion (camelCase), not
  skill-version (kebab-case), fix option access in install and download
  commands
2026-04-16 10:16:33 +08:00
chenbaowang
8c87cc5fe4 fix: add shebang to cli.ts for npm bin to work properly 2026-04-15 17:56:42 +08:00
chenbaowang
de7be0fc7d fix: add .npmignore to exclude tests and tmp from published package 2026-04-15 17:15:36 +08:00
chenbaowang
98b04259d8 fix: change package name to @motovis/skillhub for npm org scope 2026-04-15 17:12:32 +08:00
dongmucat
89bc58d29e
Merge pull request #311 from iflytek/fix/public-skill-detail-anon
fix(web): allow anonymous access to public skill detail
2026-04-15 16:58:45 +08:00
XiaoSeS
4619e546bf
fix(search): show default discovery list on empty query (#312) 2026-04-15 16:58:21 +08:00
dongmucat
3c4c33ad95 fix(web): allow anonymous access to public skill detail 2026-04-15 16:16:08 +08:00
dongmucat
2cfd4a730b
Merge pull request #302 from iflytek/fix/rerelease-precheck-warnings
fix(rerelease): support precheck warning confirmation flow
2026-04-14 20:28:00 +08:00
dongmucat
5d87a0ccd3
Merge pull request #304 from iflytek/feat/oss-02-super-admin-visibility
feat(access): add SUPER_ADMIN platform role support
2026-04-14 20:27:39 +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
dongmucat
1246cca930
Merge pull request #279 from iflytek/fix/issue-276-review-own-namespace
fix(review): allow namespace admins to review own submissions
2026-04-14 17:22:08 +08:00
xiose
edcc248244 fix(portal): keep skill detail on viewer permissions 2026-04-14 16:42:22 +08:00