XiaoSeS
a5a723d8f7
fix(cli): align publish and namespace sync semantics
...
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-09-04 16:42:58 +08:00
XiaoSeS
6ab8faa6b9
feat(cli): add source-safe skill upgrades ( #796 )
...
* feat(cli): add source-safe skill upgrades
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): harden skill upgrade lifecycle
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): make multi-target upgrades failure-safe
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): cover upgrade selection and fallback boundaries
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): use a dead pid for stale lock recovery
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): prove upgrade safety invariants
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): prove manual ownership remains untouched
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): bind ownership sentinels to each fixture
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): keep upgrade assertions registry-scoped
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): close upgrade commit races
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): keep rollback backup path narrowed
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): reject upgrade targets removed after planning
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): serialize remove with target upgrades
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): prove shared target lock cleanup
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): make stale target lock recovery ownership-safe
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): use proven cross-process target locks
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): synchronize target lock contenders
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): bound target lock worker cleanup
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): satisfy target lock worker lint
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): serialize inventory and alias target mutations
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): cover lock root safety boundaries
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): keep target lock identity stable
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): report partial upgrade failures
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): preserve committed upgrade results
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): surface install lifecycle warnings
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): prove lifecycle warning outputs
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): assert structured upgrade failures
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): keep portable install paths
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* fix(cli): unify aliased target identity
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): accept canonical relative paths
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): verify portable target identity
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
* test(cli): synchronize stale lock contenders
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
---------
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-09-02 10:50:09 +08:00
mrLi
84feb38931
feat(cli): add namespace workspace sync
...
Signed-off-by: mrLi <50289372+15258725278@users.noreply.github.com>
2026-08-18 18:24:11 +08:00
dongmucat
d4d1f65705
fix(cli): scope local remove by namespace ( #606 )
...
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 16:58:32 +08:00
dongmucat
27efaa1b61
docs(cli): document namespace and error behavior ( #606 )
...
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 16:58:32 +08:00
dongmucat
95da3cd5e8
fix(cli): normalize namespace coordinates ( #606 )
...
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 16:58:31 +08:00
dongmucat
9520cf63e0
fix(cli): add token auth to search
...
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
c6fa37bb78
Merge branch 'main' into feat/cli-install-scope
2026-05-19 09:48:49 +08:00
dongmucat
1067d0ff6e
feat(publish): add --dry-run validation endpoint and CLI option
...
Add a validate-only endpoint (POST /api/cli/v1/skills/{namespace}/publish/validate)
that runs the full pre-publish validation chain without persisting anything.
This allows developers to check their package locally before actual publishing.
The validation covers:
- SKILL.md existence and frontmatter parsing (name, description required)
- File extension whitelist and size limits
- Credential leak scanning with line-number precision
- Slug generation and name conflict detection
CLI usage: `skillhub publish <path> --dry-run`
Closes #429
2026-05-18 10:36:58 +08:00
dongmucat
f7ab8f4db7
feat(cli): add --scope option to install command
...
- Distinguish user vs project install scope via explicit --scope flag
- Interactive mode prompts for scope when --scope/--agent/--dir not provided
- Non-interactive bare install preserves existing behavior (backward compatible)
- Mutual exclusion: --dir cannot be combined with --scope or --agent
- Symmetric fallback: --scope user falls back to ~/.agents/skills,
--scope project falls back to <cwd>/.agents/skills
- Strict TTY check requires both stdin and stdout TTY plus no --json
- Scope-aware candidate generation avoids root.startsWith(cwd) misjudgement
when cwd === home or paths overlap
- Correct gemini-cli (.gemini/skills) and kiro-cli (.kiro/skills) paths
in install path tables across README and guide docs
- Note CLI fallback uses .agents/skills (with s) in skill protocol doc
2026-05-15 14:43:25 +08:00
dongmucat
a14d89d8c9
refactor(cli): improve doctor command semantics and transparency
...
变更摘要:
- doctor 命令重构:从重建改为扫描并合并语义,保留扫描范围外的条目
- 修复字段命名:itemsRestored → itemsScanned/itemsPreserved,语义更清晰
- 改进用户提示:输出区分扫描到的和保留的条目,帮助文档补充保留行为说明
- 补充代码注释:说明同 slug 不同 installDir 允许并存的设计意图
- 统一错误码:download/handleJsonResponse 的非 2xx 响应统一使用 EXIT.generic
- 新增测试覆盖:合并场景、刷新场景、冲突不删除无关条目等边界情况
关键文件:
- cli/src/services/doctor-service.ts
- cli/src/commands/doctor.ts
- cli/src/commands/help.ts
- cli/test/unit/services/doctor-service.test.ts
- cli/test/integration/doctor-command.test.ts
2026-05-09 11:30:36 +08:00
dongmucat
e249db35a3
test(cli): add comprehensive integration tests and fix update command bugs
...
- Add integration tests for doctor, install, list, publish, remove, whoami commands
- Expand fake-registry with resolve/delete state capture for real assertions
- Fix update command: use correct package name @astron-team/skillhub from constants
- Refactor runUpdateCommand to accept string[] instead of fragile string splitting
- Add dependency injection to updateCommand for testable unit tests without global mocks
- Replace package.json import with codegen (scripts/generate-pkg-info.ts) to avoid
leaking devDependencies into the build artifact
- Fix startNetworkFailureServer TOCTOU race by keeping listener alive
- Add TODO markers for known help command bugs (--json not forwarded, unknown topic crash)
- Extend update integration test timeout for real npm registry checks
2026-05-07 14:46:40 +08:00
dongmucat
fb65eeb576
fix(cli): improve parse error output
2026-04-29 15:37:05 +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