@hasna-internal/kai-skill-badge 0.1.1-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DeepSeek
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm run verify-translation-pairing --write packages/skill/skill-badge/README.md
5
+ README.md: 49b38023a7c110bb52bb351668905c702e251216
6
+ README.zh.md: f22afd0d957f202eb7b2b5953015f7c0a4c5b571
package/README.md ADDED
@@ -0,0 +1,22 @@
1
+ # @hasna-internal/kai-skill-badge
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ Optional bundled skill provider that contributes `dsh-badge` to `ctx.skills`. The skill supplies the official “powered by dsh” Markdown snippets and the packaged PNG for systems that cannot import a remote image reliably.
6
+
7
+ Mount the plugin to enable the provider. It has no configuration. The shipped CLI composition includes the plugin as `disabled: true`; users must explicitly enable its `skill-badge` row before the skill enters a catalog.
8
+
9
+ The provider exposes its packaged `assets/` directory as the skill resource base. `dsh-badge.png` is the 726×120 source asset, and consumers render it at 121×20.
10
+
11
+ ## Model Experience
12
+
13
+ Indirectly, through `@hasna-internal/kai-tool-skill`, which renders the catalog entry and selected skill body.
14
+
15
+ #### KV Cache effect
16
+
17
+ Disabled by default, the plugin changes no request. When enabled, its catalog entry and any loaded body change the provider KV prefix at their insertion points.
18
+
19
+ ## Known Limitations and Deferred Work
20
+
21
+ - The provider contributes one fixed skill and has no runtime customization.
22
+ - Remote Markdown uses Shields.io; use the packaged PNG when the target cannot fetch remote images reliably.
package/README.zh.md ADDED
@@ -0,0 +1,22 @@
1
+ # @hasna-internal/kai-skill-badge
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 可选的内置 skill(技能)提供方,向 `ctx.skills` 贡献 `dsh-badge`。该 skill 提供官方「powered by dsh」Markdown 片段和随包分发的 PNG,供无法可靠导入远程图片的系统使用。
6
+
7
+ 挂载该插件即可启用提供方。它没有配置。随附的 CLI(命令行界面)组合以 `disabled: true` 包含该插件;用户必须显式启用其 `skill-badge` 配置行,该 skill 才会进入目录。
8
+
9
+ 该提供方将随包分发的 `assets/` 目录作为 skill 资源基底公开。`dsh-badge.png` 是尺寸为 726×120 的源图资源,消费方以 121×20 的尺寸渲染。
10
+
11
+ ## 模型体验
12
+
13
+ 通过 `@hasna-internal/kai-tool-skill` 间接影响模型;该包会渲染目录条目和所选 skill 的正文。
14
+
15
+ #### KV Cache 影响
16
+
17
+ 该插件默认禁用,不会改变任何请求。启用后,其目录条目和任何已加载正文都会在各自插入点改变提供方的 KV 前缀。
18
+
19
+ ## 已知限制与暂缓事项
20
+
21
+ - 该提供方只贡献一个固定 skill,不提供运行时自定义。
22
+ - 远程 Markdown 使用 Shields.io;当目标环境无法可靠获取远程图片时,请使用随包分发的 PNG。
@@ -0,0 +1,31 @@
1
+ # dsh Badge
2
+
3
+ Add the official “powered by dsh” badge without recreating or restyling it.
4
+
5
+ ## Assets
6
+
7
+ - Local PNG: [`dsh-badge.png`](dsh-badge.png), 726×120 source image; render at 121×20
8
+ - Shields.io image URL: `https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white`
9
+ - Project URL: `https://github.com/deepseek-ai/deepseek-harness`
10
+
11
+ ## Markdown
12
+
13
+ Use this linked badge in Markdown:
14
+
15
+ ```markdown
16
+ [![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)](https://github.com/deepseek-ai/deepseek-harness)
17
+ ```
18
+
19
+ If attribution should not be linked, use:
20
+
21
+ ```markdown
22
+ ![](https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white)
23
+ ```
24
+
25
+ ## Usage rules
26
+
27
+ - For GitHub or GitLab Markdown, use the Shields.io URL and link it to the project URL unless the user asks for an unlinked image.
28
+ - For Feishu and other systems that import remote images unreliably, upload `dsh-badge.png` from this skill directory instead of generating another badge.
29
+ - Preserve the badge's 121×20 dimensions and aspect ratio.
30
+ - Place the badge at the end of the attributed document or section unless the user specifies another position.
31
+ - Do not substitute another color, logo, label, or project URL.
Binary file
package/lib/index.js ADDED
@@ -0,0 +1,53 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { fileURLToPath } from "node:url";
3
+ import { BUNDLED_SKILL_RANK } from "@hasna-internal/kai-skill";
4
+ //#region lib/types/index.js
5
+ /**
6
+ * Bundled `dsh-badge` skill provider.
7
+ *
8
+ * @module @hasna-internal/kai-skill-badge
9
+ */
10
+ const PROVIDER_NAME = "dsh-badge";
11
+ const SKILL_BODY_URL = new URL("../assets/dsh-badge.md", import.meta.url);
12
+ const RESOURCE_BASE = {
13
+ kind: "directory",
14
+ path: fileURLToPath(new URL("../assets/", import.meta.url))
15
+ };
16
+ const CANDIDATE = {
17
+ name: "dsh-badge",
18
+ description: "Add the official “powered by dsh” badge to documents, pull requests, merge requests, and other content produced with DeepSeek Harness. Use whenever creating a pull request or merge request. Also use when the user asks for a dsh badge, powered-by-dsh attribution, or a reusable dsh badge asset or snippet.",
19
+ invocation: {
20
+ modelInvocable: true,
21
+ userInvocable: true
22
+ },
23
+ provider: PROVIDER_NAME,
24
+ source: "bundled",
25
+ resourceBase: RESOURCE_BASE,
26
+ rank: BUNDLED_SKILL_RANK,
27
+ locator: SKILL_BODY_URL
28
+ };
29
+ const provider = {
30
+ name: PROVIDER_NAME,
31
+ list: () => Promise.resolve([CANDIDATE]),
32
+ async get(_candidate) {
33
+ return {
34
+ name: CANDIDATE.name,
35
+ description: CANDIDATE.description,
36
+ invocation: CANDIDATE.invocation,
37
+ provider: CANDIDATE.provider,
38
+ source: CANDIDATE.source,
39
+ resourceBase: RESOURCE_BASE,
40
+ content: await readFile(SKILL_BODY_URL, "utf8")
41
+ };
42
+ }
43
+ };
44
+ /** Cordis plugin name. */
45
+ const name = "skill-badge";
46
+ /** Service required by the bundled provider. */
47
+ const inject = ["skills"];
48
+ /** Register the bundled `dsh-badge` provider on `ctx.skills`. */
49
+ function apply(ctx) {
50
+ ctx.skills.registerProvider(() => provider);
51
+ }
52
+ //#endregion
53
+ export { apply, inject, name };
@@ -0,0 +1,23 @@
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned invariant companion for `@hasna-internal/kai-skill-badge`.
4
+ * @module @hasna-internal/kai-skill-badge/invariant
5
+ */
6
+ const PACKAGE_NAME = "@hasna-internal/kai-skill-badge";
7
+ /** Cordis companion plugin name. */
8
+ const name = "skill-badge-invariant";
9
+ /** Service required before the companion can reserve package ownership. */
10
+ const inject = ["invariants"];
11
+ /**
12
+ * No runtime invariant: the package owns one immutable provider registration,
13
+ * while the skill registry owns registration uniqueness and lifecycle checks.
14
+ */
15
+ const install = () => {};
16
+ /**
17
+ * Register this package's invariant companion.
18
+ * @param ctx - Cordis context carrying the invariant service.
19
+ * @returns the installed registration's disposer after setup succeeds.
20
+ */
21
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
22
+ //#endregion
23
+ export { apply, inject, name };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Bundled `dsh-badge` skill provider.
3
+ *
4
+ * @module @hasna-internal/kai-skill-badge
5
+ */
6
+ import type { Context } from '@deepseek-ai/cordis';
7
+ /** Cordis plugin name. */
8
+ export declare const name = "skill-badge";
9
+ /** Service required by the bundled provider. */
10
+ export declare const inject: string[];
11
+ /** Register the bundled `dsh-badge` provider on `ctx.skills`. */
12
+ export declare function apply(ctx: Context): void;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Package-owned invariant companion for `@hasna-internal/kai-skill-badge`.
3
+ * @module @hasna-internal/kai-skill-badge/invariant
4
+ */
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ /** Cordis companion plugin name. */
7
+ export declare const name = "skill-badge-invariant";
8
+ /** Service required before the companion can reserve package ownership. */
9
+ export declare const inject: string[];
10
+ /**
11
+ * Register this package's invariant companion.
12
+ * @param ctx - Cordis context carrying the invariant service.
13
+ * @returns the installed registration's disposer after setup succeeds.
14
+ */
15
+ export declare const apply: (ctx: Context) => Promise<() => void>;
16
+ //# sourceMappingURL=invariant.d.ts.map
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@hasna-internal/kai-skill-badge",
3
+ "description": "Bundled dsh badge skill provider for DeepSeek Harness",
4
+ "version": "0.1.1-rc.2",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/skill/skill-badge"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./invariant": {
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "lib/index.js",
29
+ "lib/invariant.js",
30
+ "assets",
31
+ "lib/types/**/*.d.ts"
32
+ ],
33
+ "license": "MIT",
34
+ "peerDependencies": {
35
+ "@hasna-internal/kai-invariants": "^0.1.1-rc.2",
36
+ "@hasna-internal/kai-skill": "^0.1.1-rc.2",
37
+ "@deepseek-ai/cordis": "^4.0.1"
38
+ },
39
+ "devDependencies": {
40
+ "@deepseek-ai/cordis": "^4.0.1",
41
+ "@hasna-internal/kai-invariants": "^0.1.1-rc.2",
42
+ "@hasna-internal/kai-skill": "^0.1.1-rc.2"
43
+ }
44
+ }