fix: address dsh badge review feedback
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import type { Context } from 'cordis'
|
||||
import type {
|
||||
SkillCandidate,
|
||||
SkillDefinition,
|
||||
SkillProvider,
|
||||
import {
|
||||
BUNDLED_SKILL_RANK,
|
||||
type SkillCandidate,
|
||||
type SkillDefinition,
|
||||
type SkillProvider,
|
||||
} from '@deepseek-ai/dsh-skill'
|
||||
|
||||
const PROVIDER_NAME = 'dsh-badge'
|
||||
const BUNDLED_RANK = 600
|
||||
const SKILL_BODY_URL = new URL('../assets/dsh-badge.md', import.meta.url)
|
||||
const RESOURCE_BASE = {
|
||||
kind: 'directory',
|
||||
@@ -29,7 +29,7 @@ const CANDIDATE: SkillCandidate = {
|
||||
provider: PROVIDER_NAME,
|
||||
source: 'bundled',
|
||||
resourceBase: RESOURCE_BASE,
|
||||
rank: BUNDLED_RANK,
|
||||
rank: BUNDLED_SKILL_RANK,
|
||||
locator: SKILL_BODY_URL,
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import { parse as parseYaml } from 'yaml'
|
||||
import type { FileSystem, FsDirEntry, FsTarget } from '@deepseek-ai/dsh-fs'
|
||||
import { resolveDshHome } from '@deepseek-ai/dsh-paths'
|
||||
import {
|
||||
BUNDLED_SKILL_RANK,
|
||||
isSkillName,
|
||||
type SkillCandidate,
|
||||
type SkillDefinition,
|
||||
@@ -40,7 +41,6 @@ const USER_AGENTS_RANK = 500
|
||||
const DEFAULT_WATCH_STABILITY_THRESHOLD_MS = 200
|
||||
const DEFAULT_WATCH_POLL_INTERVAL_MS = 100
|
||||
const DEFAULT_WATCH_MAX_PROJECTS = 128
|
||||
const BUNDLED_RANK = 600
|
||||
|
||||
export const name = 'skill-local'
|
||||
export const inject = ['skills']
|
||||
@@ -256,7 +256,7 @@ export class LocalSkillProvider implements SkillProvider {
|
||||
)
|
||||
}
|
||||
if (this.bundledSkillDir !== undefined) {
|
||||
roots.push({ path: this.bundledSkillDir, source: 'bundled', rank: BUNDLED_RANK, trustedHost: true })
|
||||
roots.push({ path: this.bundledSkillDir, source: 'bundled', rank: BUNDLED_SKILL_RANK, trustedHost: true })
|
||||
}
|
||||
return roots
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ const MAX_COLLECT_ATTEMPTS = 2
|
||||
const RUNTIME_PROVIDER = 'runtime'
|
||||
const RUNTIME_RANK = 250
|
||||
|
||||
/** Standard precedence rank for packaged skill providers and local bundled roots. */
|
||||
export const BUNDLED_SKILL_RANK = 600
|
||||
|
||||
/**
|
||||
* Return whether a string is a valid kebab-case skill name.
|
||||
* @param name - candidate skill name to validate.
|
||||
|
||||
Reference in New Issue
Block a user