This commit is contained in:
twodogegg 2026-10-15 10:01:18 +08:00 • committed by GitHub
commit f5e3d42118
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 21 additions and 5 deletions

View file

@ -6,6 +6,8 @@ All notable CLI behavior changes are documented in this file.
### Added
- Add the `zcode` agent profile, displayed as ZCode, with automatic detection of project-level
and user-level `.zcode/skills` directories.
- Add the `dsh` agent profile, displayed as DeepSeek Harness, with automatic detection of
project-level and user-level `.dsh/skills` directories.
- Add OAuth Device Flow to `skillhub login` when no API token is supplied, including best-effort

View file

@ -237,6 +237,7 @@ Most Agents have both project-level and user-level skills directories. Use `--sc
| `opencode` | `<project>/.opencode/skills/` | `~/.opencode/skills/` |
| `kilo` | `<project>/.kilo/skills/` | `~/.kilo/skills/` |
| `pi` (Pi) | `<project>/.pi/skills/` | `~/.pi/agent/skills/` |
| `zcode` | `<project>/.zcode/skills/` | `~/.zcode/skills/` |
| _fallback_ | `<project>/.agents/skills/` | `~/.agents/skills/` |
For a custom path or an unsupported Agent directory, use `--dir` to specify the installation path. In interactive user scope, the `generic` target is offered alongside detected Agent targets. AStudio appears in that selector when `~/.acode/skills/` exists. When `--scope user|project` finds no matching agent directory, the CLI falls back to the `_fallback_` row above.

View file

@ -16,19 +16,20 @@ import { traeCnProfile } from './profiles/trae-cn'
import { opencodeProfile } from './profiles/opencode'
import { kiloProfile } from './profiles/kilo'
import { piProfile } from './profiles/pi'
import { zcodeProfile } from './profiles/zcode'
export {
aStudioProfile, claudeCodeProfile, codexProfile, cursorProfile, dshProfile, githubCopilotProfile,
geminiCliProfile, openhandsProfile, windsurfProfile, openclawProfile,
kiroCliProfile, rooProfile, traeProfile, traeCnProfile,
opencodeProfile, kiloProfile, piProfile
opencodeProfile, kiloProfile, piProfile, zcodeProfile
}
export const allProfiles: AgentProfile[] = [
aStudioProfile, claudeCodeProfile, codexProfile, cursorProfile, dshProfile, githubCopilotProfile,
geminiCliProfile, openhandsProfile, windsurfProfile, openclawProfile,
kiroCliProfile, rooProfile, traeProfile, traeCnProfile,
opencodeProfile, kiloProfile, piProfile
opencodeProfile, kiloProfile, piProfile, zcodeProfile
]
export const profileMap = new Map(allProfiles.map(p => [p.id, p]))

View file

@ -0,0 +1,2 @@
import { makeProfile } from './make-profile'
export const zcodeProfile = makeProfile('zcode', 'ZCode', '.zcode/skills', '.zcode/skills')

View file

@ -5,8 +5,8 @@ import { describe, expect, test } from 'bun:test'
import { allProfiles, profileMap } from '../../../src/agents/detector'
describe('agent profiles', () => {
test('has 17 tier 1 profiles', () => {
expect(allProfiles).toHaveLength(17)
test('has 18 tier 1 profiles', () => {
expect(allProfiles).toHaveLength(18)
})
test('all profiles have unique ids', () => {
@ -15,7 +15,7 @@ describe('agent profiles', () => {
})
test('profileMap contains all profiles', () => {
expect(profileMap.size).toBe(17)
expect(profileMap.size).toBe(18)
expect(profileMap.has('astudio')).toBe(true)
expect(profileMap.has('claude-code')).toBe(true)
expect(profileMap.has('codex')).toBe(true)
@ -23,6 +23,7 @@ describe('agent profiles', () => {
expect(profileMap.has('dsh')).toBe(true)
expect(profileMap.has('kilo')).toBe(true)
expect(profileMap.has('pi')).toBe(true)
expect(profileMap.has('zcode')).toBe(true)
})
test('claude-code profile returns correct roots', () => {
@ -42,6 +43,13 @@ describe('agent profiles', () => {
expect(profile.projectRoots('/repo')).toEqual(['/repo/.cursor/skills'])
})
test('zcode profile returns correct roots', () => {
const profile = profileMap.get('zcode')!
expect(profile.displayName).toBe('ZCode')
expect(profile.projectRoots('/repo')).toEqual(['/repo/.zcode/skills'])
expect(profile.userRoots('/home/user')).toEqual(['/home/user/.zcode/skills'])
})
test('DeepSeek Harness exposes and detects its project and user skills directories', async () => {
const base = await mkdtemp(join(tmpdir(), 'skillhub-dsh-profile-'))
const cwd = join(base, 'repo')

View file

@ -212,6 +212,7 @@ Most Agents have both project-level and user-level skills directories. Use `--sc
| `opencode` | `<project>/.opencode/skills/` | `~/.opencode/skills/` |
| `kilo` | `<project>/.kilo/skills/` | `~/.kilo/skills/` |
| `pi` (Pi) | `<project>/.pi/skills/` | `~/.pi/agent/skills/` |
| `zcode` | `<project>/.zcode/skills/` | `~/.zcode/skills/` |
| _fallback_ | `<project>/.agents/skills/` | `~/.agents/skills/` |
For a custom path or an unsupported Agent directory, use `--dir` to specify the installation path. In interactive user scope, the `generic` target is offered alongside detected Agent targets. AStudio appears in that selector when `~/.acode/skills/` exists. When `--scope user|project` finds no matching agent directory, the CLI falls back to the `_fallback_` row above.

View file

@ -208,6 +208,7 @@ CLI 按以下逻辑确定安装位置:
| `opencode` | `<project>/.opencode/skills/` | `~/.opencode/skills/` |
| `kilo` | `<project>/.kilo/skills/` | `~/.kilo/skills/` |
| `pi`(Pi) | `<project>/.pi/skills/` | `~/.pi/agent/skills/` |
| `zcode` | `<project>/.zcode/skills/` | `~/.zcode/skills/` |
| _fallback_ | `<project>/.agents/skills/` | `~/.agents/skills/` |
对于自定义路径或不在列表中的 Agent 目录,使用 `--dir` 显式指定安装路径。交互式 user scope 下会与已探测 Agent 目标一同提供 `generic` 目标;当 `~/.acode/skills/` 存在时,选择器会显示 AStudio。当 `--scope user|project` 找不到匹配的 agent 目录时,CLI 会回退到上表的 `_fallback_` 行。