dsh-agent-skills 0.1.0
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 +21 -0
- package/README.md +129 -0
- package/cordis.patch.yml +13 -0
- package/lib/client.js +15235 -0
- package/lib/client.js.map +7 -0
- package/lib/discovery.d.ts +9 -0
- package/lib/discovery.js +48 -0
- package/lib/discovery.js.map +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/preset.d.ts +9 -0
- package/lib/preset.js +7 -0
- package/lib/preset.js.map +1 -0
- package/lib/provider.d.ts +53 -0
- package/lib/provider.js +295 -0
- package/lib/provider.js.map +1 -0
- package/lib/registry.d.ts +85 -0
- package/lib/registry.js +122 -0
- package/lib/registry.js.map +1 -0
- package/lib/runtime.d.ts +27 -0
- package/lib/runtime.js +162 -0
- package/lib/runtime.js.map +1 -0
- package/lib/scan.d.ts +29 -0
- package/lib/scan.js +156 -0
- package/lib/scan.js.map +1 -0
- package/lib/schemas.d.ts +112 -0
- package/lib/schemas.js +82 -0
- package/lib/schemas.js.map +1 -0
- package/lib/store.d.ts +26 -0
- package/lib/store.js +88 -0
- package/lib/store.js.map +1 -0
- package/lib/typert.d.ts +195 -0
- package/lib/typert.js +153 -0
- package/lib/typert.js.map +1 -0
- package/lib/types/client/AgentSkillsSection.d.ts +9 -0
- package/lib/types/client/index.d.ts +14 -0
- package/lib/types/client/locales.d.ts +86 -0
- package/lib/types/client/styles.d.ts +4 -0
- package/lib/types/client/typert-remote.d.ts +152 -0
- package/lib/types/client/types.d.ts +13 -0
- package/lib/types/schemas.d.ts +112 -0
- package/lib/views.d.ts +27 -0
- package/lib/views.js +218 -0
- package/lib/views.js.map +1 -0
- package/package.json +130 -0
- package/scripts/install-preset.mjs +49 -0
- package/scripts/uninstall-preset.mjs +22 -0
package/lib/schemas.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire schemas shared by the host typert face and the client remote.
|
|
3
|
+
* Zod v4 instances — the typert gateway re-checks JSON-safety after schema
|
|
4
|
+
* parsing, so optional fields must never be `undefined` on the wire.
|
|
5
|
+
*
|
|
6
|
+
* @module dsh-agent-skills/schemas
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
/** A scan directory shown on the Agent Skills page. */
|
|
10
|
+
export const dirViewSchema = z.object({
|
|
11
|
+
/** Absolute directory path. */
|
|
12
|
+
path: z.string(),
|
|
13
|
+
/** custom = user-added or auto-discovered; builtin = default DSH root. */
|
|
14
|
+
kind: z.enum(["custom", "builtin"]),
|
|
15
|
+
/** Whether the directory exists on disk right now. */
|
|
16
|
+
exists: z.boolean(),
|
|
17
|
+
/** Whether scanning this directory is enabled. */
|
|
18
|
+
enabled: z.boolean(),
|
|
19
|
+
/** Number of valid skills discovered in this directory. */
|
|
20
|
+
skillCount: z.number().int().min(0),
|
|
21
|
+
/** UI tag: "用户配置" or "内置路径" — resolved client-side from kind. */
|
|
22
|
+
tag: z.enum(["user", "builtin"]),
|
|
23
|
+
/** True for auto-discovered agent directories (custom kind only). */
|
|
24
|
+
auto: z.boolean().optional(),
|
|
25
|
+
/** Every valid skill discovered in this directory (undeduplicated). */
|
|
26
|
+
skills: z.array(z.object({
|
|
27
|
+
name: z.string(),
|
|
28
|
+
description: z.string()
|
|
29
|
+
}))
|
|
30
|
+
});
|
|
31
|
+
/** One skill shown on the Agent Skills page. */
|
|
32
|
+
export const skillViewSchema = z.object({
|
|
33
|
+
/** Kebab-case skill name. */
|
|
34
|
+
name: z.string(),
|
|
35
|
+
/** One-line description from frontmatter. */
|
|
36
|
+
description: z.string(),
|
|
37
|
+
/** Optional trigger guidance from frontmatter. */
|
|
38
|
+
whenToUse: z.string().optional(),
|
|
39
|
+
/** Raw provider source id (custom / user-agents / user-dsh / bundled / ...). */
|
|
40
|
+
source: z.string(),
|
|
41
|
+
/** UI category: 自定义 / 全局 / 内置. */
|
|
42
|
+
kind: z.enum(["custom", "global", "builtin"]),
|
|
43
|
+
/** Directory the skill lives in (resource base), when known. */
|
|
44
|
+
directory: z.string().optional(),
|
|
45
|
+
/** Effective enabled state (source toggle AND skill toggle). */
|
|
46
|
+
enabled: z.boolean(),
|
|
47
|
+
/** True when the skill is user-toggleable (has a file-backed source). */
|
|
48
|
+
toggleable: z.boolean()
|
|
49
|
+
});
|
|
50
|
+
/** The full page view. */
|
|
51
|
+
export const agentSkillsViewSchema = z.object({
|
|
52
|
+
dirs: z.array(dirViewSchema),
|
|
53
|
+
skills: z.array(skillViewSchema),
|
|
54
|
+
counts: z.object({
|
|
55
|
+
total: z.number().int().min(0),
|
|
56
|
+
custom: z.number().int().min(0),
|
|
57
|
+
global: z.number().int().min(0),
|
|
58
|
+
builtin: z.number().int().min(0)
|
|
59
|
+
}),
|
|
60
|
+
/** Sources summary: existing / missing directories. */
|
|
61
|
+
validDirs: z.number().int().min(0),
|
|
62
|
+
missingDirs: z.number().int().min(0)
|
|
63
|
+
});
|
|
64
|
+
/** Input for toggling one skill. */
|
|
65
|
+
export const toggleSkillInputSchema = z.object({
|
|
66
|
+
name: z.string(),
|
|
67
|
+
enabled: z.boolean()
|
|
68
|
+
});
|
|
69
|
+
/** Input for toggling one scan directory. */
|
|
70
|
+
export const toggleDirInputSchema = z.object({
|
|
71
|
+
path: z.string(),
|
|
72
|
+
enabled: z.boolean()
|
|
73
|
+
});
|
|
74
|
+
/** Input for adding a custom scan directory. */
|
|
75
|
+
export const addDirInputSchema = z.object({
|
|
76
|
+
path: z.string().min(1)
|
|
77
|
+
});
|
|
78
|
+
/** Input for removing a custom scan directory. */
|
|
79
|
+
export const removeDirInputSchema = z.object({
|
|
80
|
+
path: z.string().min(1)
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"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,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAGH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAGH,gDAAgD;AAChD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC;AAGH,kDAAkD;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC"}
|
package/lib/store.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** One configured scan directory (user-added or auto-discovered). */
|
|
2
|
+
export interface StateDir {
|
|
3
|
+
path: string;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
/** True when auto-discovered from another AI coding agent's home. */
|
|
6
|
+
auto?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface AgentSkillsState {
|
|
9
|
+
version: 1;
|
|
10
|
+
/** Custom + auto-discovered scan directories (the "用户配置" sources). */
|
|
11
|
+
dirs: StateDir[];
|
|
12
|
+
/** Skill names the user switched off. */
|
|
13
|
+
disabledSkills: string[];
|
|
14
|
+
/** Builtin root paths the user switched off ("内置路径" sources). */
|
|
15
|
+
disabledDirs: string[];
|
|
16
|
+
}
|
|
17
|
+
/** Absolute path of the state file for a resolved dsh home. */
|
|
18
|
+
export declare function stateFilePath(dshHome?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Read the state file; a missing or malformed file yields the empty state.
|
|
21
|
+
* The host half is the only writer and publishes atomically, so a torn read
|
|
22
|
+
* can only ever observe the previous complete document.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readState(dshHome?: string): Promise<AgentSkillsState>;
|
|
25
|
+
/** Atomic publish: write a temp sibling, fsync, then rename over the target. */
|
|
26
|
+
export declare function writeState(state: AgentSkillsState, dshHome?: string): Promise<void>;
|
package/lib/store.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable state of the Agent Skills page: custom scan directories, per-directory
|
|
3
|
+
* and per-skill switches. Owned by the host half; persisted atomically under
|
|
4
|
+
* `$DSH_HOME/agent-skills/state.json` so toggles survive restarts without
|
|
5
|
+
* touching the profile patch layer.
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-agent-skills/store
|
|
8
|
+
*/
|
|
9
|
+
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
10
|
+
import { dirname, join, resolve } from "node:path";
|
|
11
|
+
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
12
|
+
const STATE_VERSION = 1;
|
|
13
|
+
const EMPTY = {
|
|
14
|
+
version: STATE_VERSION,
|
|
15
|
+
dirs: [],
|
|
16
|
+
disabledSkills: [],
|
|
17
|
+
disabledDirs: []
|
|
18
|
+
};
|
|
19
|
+
/** Absolute path of the state file for a resolved dsh home. */
|
|
20
|
+
export function stateFilePath(dshHome = resolveDshHome()) {
|
|
21
|
+
return join(dshHome, "agent-skills", "state.json");
|
|
22
|
+
}
|
|
23
|
+
function isRecord(value) {
|
|
24
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
25
|
+
}
|
|
26
|
+
function parseState(raw) {
|
|
27
|
+
let parsed;
|
|
28
|
+
try {
|
|
29
|
+
parsed = JSON.parse(raw);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
if (!isRecord(parsed) || parsed.version !== STATE_VERSION)
|
|
35
|
+
return undefined;
|
|
36
|
+
const dirs = [];
|
|
37
|
+
if (Array.isArray(parsed.dirs)) {
|
|
38
|
+
for (const entry of parsed.dirs) {
|
|
39
|
+
if (!isRecord(entry) || typeof entry.path !== "string" || entry.path === "")
|
|
40
|
+
continue;
|
|
41
|
+
dirs.push({
|
|
42
|
+
path: resolve(entry.path),
|
|
43
|
+
enabled: entry.enabled !== false,
|
|
44
|
+
...(entry.auto === true ? { auto: true } : {})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const disabledSkills = [];
|
|
49
|
+
if (Array.isArray(parsed.disabledSkills)) {
|
|
50
|
+
for (const name of parsed.disabledSkills) {
|
|
51
|
+
if (typeof name === "string" && name !== "")
|
|
52
|
+
disabledSkills.push(name);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const disabledDirs = [];
|
|
56
|
+
if (Array.isArray(parsed.disabledDirs)) {
|
|
57
|
+
for (const path of parsed.disabledDirs) {
|
|
58
|
+
if (typeof path === "string" && path !== "")
|
|
59
|
+
disabledDirs.push(resolve(path));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return { version: STATE_VERSION, dirs, disabledSkills, disabledDirs };
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Read the state file; a missing or malformed file yields the empty state.
|
|
66
|
+
* The host half is the only writer and publishes atomically, so a torn read
|
|
67
|
+
* can only ever observe the previous complete document.
|
|
68
|
+
*/
|
|
69
|
+
export async function readState(dshHome) {
|
|
70
|
+
const file = stateFilePath(dshHome);
|
|
71
|
+
try {
|
|
72
|
+
const raw = await readFile(file, "utf8");
|
|
73
|
+
return parseState(raw) ?? structuredClone(EMPTY);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return structuredClone(EMPTY);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** Atomic publish: write a temp sibling, fsync, then rename over the target. */
|
|
80
|
+
export async function writeState(state, dshHome) {
|
|
81
|
+
const file = stateFilePath(dshHome);
|
|
82
|
+
await mkdir(dirname(file), { recursive: true });
|
|
83
|
+
const tmp = join(dirname(file), `.state.${process.pid}.${Date.now().toString(36)}.tmp`);
|
|
84
|
+
const serialized = JSON.stringify(state, null, 2);
|
|
85
|
+
await writeFile(tmp, serialized, "utf8");
|
|
86
|
+
await rename(tmp, file);
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=store.js.map
|
package/lib/store.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAoB7D,MAAM,aAAa,GAAG,CAAU,CAAC;AACjC,MAAM,KAAK,GAAqB;IAC9B,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,EAAE;IACR,cAAc,EAAE,EAAE;IAClB,YAAY,EAAE,EAAE;CACjB,CAAC;AAEF,+DAA+D;AAC/D,MAAM,UAAU,aAAa,CAAC,OAAO,GAAG,cAAc,EAAE;IACtD,OAAO,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CA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
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host TYPERT manifest for the `agentSkills` namespace, discovered
|
|
3
|
+
* automatically by @deepseek-ai/dsh-typert-loader through the `./typert`
|
|
4
|
+
* export. Hand-written in the same shape the typert generator emits; the
|
|
5
|
+
* client mirror lives in src/client/typert-remote.ts.
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-agent-skills/typert
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
/** Strict host contribution: `agentSkills/*` endpoints dispatched to ctx.agentSkills. */
|
|
11
|
+
export declare const TYPERT: {
|
|
12
|
+
readonly package: "dsh-agent-skills";
|
|
13
|
+
readonly face: "host";
|
|
14
|
+
readonly schemas: readonly [];
|
|
15
|
+
readonly model: {
|
|
16
|
+
readonly services: readonly [{
|
|
17
|
+
readonly tags: readonly [];
|
|
18
|
+
readonly key: "agentSkills";
|
|
19
|
+
readonly exportName: "agentSkills";
|
|
20
|
+
readonly members: readonly [{
|
|
21
|
+
readonly name: "list";
|
|
22
|
+
readonly kind: "method";
|
|
23
|
+
readonly signature: "(): Promise<AgentSkillsView>";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "toggleSkill";
|
|
26
|
+
readonly kind: "method";
|
|
27
|
+
readonly signature: "(input: ToggleSkillInput): Promise<AgentSkillsView>";
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "toggleDir";
|
|
30
|
+
readonly kind: "method";
|
|
31
|
+
readonly signature: "(input: ToggleDirInput): Promise<AgentSkillsView>";
|
|
32
|
+
}, {
|
|
33
|
+
readonly name: "addDir";
|
|
34
|
+
readonly kind: "method";
|
|
35
|
+
readonly signature: "(input: AddDirInput): Promise<AgentSkillsView>";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "removeDir";
|
|
38
|
+
readonly kind: "method";
|
|
39
|
+
readonly signature: "(input: RemoveDirInput): Promise<AgentSkillsView>";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "rescan";
|
|
42
|
+
readonly kind: "method";
|
|
43
|
+
readonly signature: "(): Promise<AgentSkillsView>";
|
|
44
|
+
}];
|
|
45
|
+
readonly types: readonly [{
|
|
46
|
+
readonly name: "DirView";
|
|
47
|
+
readonly declaration: "export interface DirView { path: string; kind: 'custom' | 'builtin'; exists: boolean; enabled: boolean; skillCount: number; tag: 'user' | 'builtin'; }";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "SkillView";
|
|
50
|
+
readonly declaration: "export interface SkillView { name: string; description: string; whenToUse?: string; source: string; kind: 'custom' | 'global' | 'builtin'; directory?: string; enabled: boolean; toggleable: boolean; }";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "SkillCounts";
|
|
53
|
+
readonly declaration: "export interface SkillCounts { total: number; custom: number; global: number; builtin: number; }";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "AgentSkillsView";
|
|
56
|
+
readonly declaration: "export interface AgentSkillsView { dirs: DirView[]; skills: SkillView[]; counts: SkillCounts; validDirs: number; missingDirs: number; }";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "ToggleSkillInput";
|
|
59
|
+
readonly declaration: "export interface ToggleSkillInput { name: string; enabled: boolean; }";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "ToggleDirInput";
|
|
62
|
+
readonly declaration: "export interface ToggleDirInput { path: string; enabled: boolean; }";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "AddDirInput";
|
|
65
|
+
readonly declaration: "export interface AddDirInput { path: string; }";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "RemoveDirInput";
|
|
68
|
+
readonly declaration: "export interface RemoveDirInput { path: string; }";
|
|
69
|
+
}];
|
|
70
|
+
}];
|
|
71
|
+
readonly events: readonly [];
|
|
72
|
+
readonly objects: readonly [];
|
|
73
|
+
};
|
|
74
|
+
readonly invocations: readonly [{
|
|
75
|
+
readonly id: "dsh-agent-skills#agentSkills/list";
|
|
76
|
+
readonly service: "agentSkills";
|
|
77
|
+
readonly namespace: "agentSkills";
|
|
78
|
+
readonly method: "list";
|
|
79
|
+
readonly invocation: {
|
|
80
|
+
readonly kind: "direct";
|
|
81
|
+
};
|
|
82
|
+
readonly parameters: readonly [];
|
|
83
|
+
readonly result: {
|
|
84
|
+
mode: string;
|
|
85
|
+
typeSymbol: string;
|
|
86
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
readonly id: "dsh-agent-skills#agentSkills/toggleSkill";
|
|
90
|
+
readonly service: "agentSkills";
|
|
91
|
+
readonly namespace: "agentSkills";
|
|
92
|
+
readonly method: "toggleSkill";
|
|
93
|
+
readonly invocation: {
|
|
94
|
+
readonly kind: "direct";
|
|
95
|
+
};
|
|
96
|
+
readonly parameters: readonly [{
|
|
97
|
+
readonly name: "input";
|
|
98
|
+
readonly wire: "input";
|
|
99
|
+
readonly source: "json";
|
|
100
|
+
readonly codec: {
|
|
101
|
+
mode: string;
|
|
102
|
+
typeSymbol: string;
|
|
103
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
104
|
+
};
|
|
105
|
+
}];
|
|
106
|
+
readonly result: {
|
|
107
|
+
mode: string;
|
|
108
|
+
typeSymbol: string;
|
|
109
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
readonly id: "dsh-agent-skills#agentSkills/toggleDir";
|
|
113
|
+
readonly service: "agentSkills";
|
|
114
|
+
readonly namespace: "agentSkills";
|
|
115
|
+
readonly method: "toggleDir";
|
|
116
|
+
readonly invocation: {
|
|
117
|
+
readonly kind: "direct";
|
|
118
|
+
};
|
|
119
|
+
readonly parameters: readonly [{
|
|
120
|
+
readonly name: "input";
|
|
121
|
+
readonly wire: "input";
|
|
122
|
+
readonly source: "json";
|
|
123
|
+
readonly codec: {
|
|
124
|
+
mode: string;
|
|
125
|
+
typeSymbol: string;
|
|
126
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
127
|
+
};
|
|
128
|
+
}];
|
|
129
|
+
readonly result: {
|
|
130
|
+
mode: string;
|
|
131
|
+
typeSymbol: string;
|
|
132
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
133
|
+
};
|
|
134
|
+
}, {
|
|
135
|
+
readonly id: "dsh-agent-skills#agentSkills/addDir";
|
|
136
|
+
readonly service: "agentSkills";
|
|
137
|
+
readonly namespace: "agentSkills";
|
|
138
|
+
readonly method: "addDir";
|
|
139
|
+
readonly invocation: {
|
|
140
|
+
readonly kind: "direct";
|
|
141
|
+
};
|
|
142
|
+
readonly parameters: readonly [{
|
|
143
|
+
readonly name: "input";
|
|
144
|
+
readonly wire: "input";
|
|
145
|
+
readonly source: "json";
|
|
146
|
+
readonly codec: {
|
|
147
|
+
mode: string;
|
|
148
|
+
typeSymbol: string;
|
|
149
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
150
|
+
};
|
|
151
|
+
}];
|
|
152
|
+
readonly result: {
|
|
153
|
+
mode: string;
|
|
154
|
+
typeSymbol: string;
|
|
155
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
readonly id: "dsh-agent-skills#agentSkills/removeDir";
|
|
159
|
+
readonly service: "agentSkills";
|
|
160
|
+
readonly namespace: "agentSkills";
|
|
161
|
+
readonly method: "removeDir";
|
|
162
|
+
readonly invocation: {
|
|
163
|
+
readonly kind: "direct";
|
|
164
|
+
};
|
|
165
|
+
readonly parameters: readonly [{
|
|
166
|
+
readonly name: "input";
|
|
167
|
+
readonly wire: "input";
|
|
168
|
+
readonly source: "json";
|
|
169
|
+
readonly codec: {
|
|
170
|
+
mode: string;
|
|
171
|
+
typeSymbol: string;
|
|
172
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
173
|
+
};
|
|
174
|
+
}];
|
|
175
|
+
readonly result: {
|
|
176
|
+
mode: string;
|
|
177
|
+
typeSymbol: string;
|
|
178
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
179
|
+
};
|
|
180
|
+
}, {
|
|
181
|
+
readonly id: "dsh-agent-skills#agentSkills/rescan";
|
|
182
|
+
readonly service: "agentSkills";
|
|
183
|
+
readonly namespace: "agentSkills";
|
|
184
|
+
readonly method: "rescan";
|
|
185
|
+
readonly invocation: {
|
|
186
|
+
readonly kind: "direct";
|
|
187
|
+
};
|
|
188
|
+
readonly parameters: readonly [];
|
|
189
|
+
readonly result: {
|
|
190
|
+
mode: string;
|
|
191
|
+
typeSymbol: string;
|
|
192
|
+
schema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
193
|
+
};
|
|
194
|
+
}];
|
|
195
|
+
};
|
package/lib/typert.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { addDirInputSchema, agentSkillsViewSchema, removeDirInputSchema, toggleDirInputSchema, toggleSkillInputSchema } from "./schemas.js";
|
|
2
|
+
const PKG = "dsh-agent-skills";
|
|
3
|
+
const direct = { kind: "direct" };
|
|
4
|
+
function jsonCodec(typeSymbol, schema) {
|
|
5
|
+
return { mode: "strict", typeSymbol: `${PKG}/types#${typeSymbol}`, schema };
|
|
6
|
+
}
|
|
7
|
+
function result(typeSymbol, schema) {
|
|
8
|
+
return { mode: "strict", typeSymbol: `${PKG}/types#${typeSymbol}`, schema };
|
|
9
|
+
}
|
|
10
|
+
/** Strict host contribution: `agentSkills/*` endpoints dispatched to ctx.agentSkills. */
|
|
11
|
+
export const TYPERT = {
|
|
12
|
+
package: PKG,
|
|
13
|
+
face: "host",
|
|
14
|
+
schemas: [],
|
|
15
|
+
model: {
|
|
16
|
+
services: [
|
|
17
|
+
{
|
|
18
|
+
tags: [],
|
|
19
|
+
key: "agentSkills",
|
|
20
|
+
exportName: "agentSkills",
|
|
21
|
+
members: [
|
|
22
|
+
{ name: "list", kind: "method", signature: "(): Promise<AgentSkillsView>" },
|
|
23
|
+
{ name: "toggleSkill", kind: "method", signature: "(input: ToggleSkillInput): Promise<AgentSkillsView>" },
|
|
24
|
+
{ name: "toggleDir", kind: "method", signature: "(input: ToggleDirInput): Promise<AgentSkillsView>" },
|
|
25
|
+
{ name: "addDir", kind: "method", signature: "(input: AddDirInput): Promise<AgentSkillsView>" },
|
|
26
|
+
{ name: "removeDir", kind: "method", signature: "(input: RemoveDirInput): Promise<AgentSkillsView>" },
|
|
27
|
+
{ name: "rescan", kind: "method", signature: "(): Promise<AgentSkillsView>" }
|
|
28
|
+
],
|
|
29
|
+
types: [
|
|
30
|
+
{
|
|
31
|
+
name: "DirView",
|
|
32
|
+
declaration: "export interface DirView { path: string; kind: 'custom' | 'builtin'; exists: boolean; enabled: boolean; skillCount: number; tag: 'user' | 'builtin'; }"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "SkillView",
|
|
36
|
+
declaration: "export interface SkillView { name: string; description: string; whenToUse?: string; source: string; kind: 'custom' | 'global' | 'builtin'; directory?: string; enabled: boolean; toggleable: boolean; }"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "SkillCounts",
|
|
40
|
+
declaration: "export interface SkillCounts { total: number; custom: number; global: number; builtin: number; }"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "AgentSkillsView",
|
|
44
|
+
declaration: "export interface AgentSkillsView { dirs: DirView[]; skills: SkillView[]; counts: SkillCounts; validDirs: number; missingDirs: number; }"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "ToggleSkillInput",
|
|
48
|
+
declaration: "export interface ToggleSkillInput { name: string; enabled: boolean; }"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "ToggleDirInput",
|
|
52
|
+
declaration: "export interface ToggleDirInput { path: string; enabled: boolean; }"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "AddDirInput",
|
|
56
|
+
declaration: "export interface AddDirInput { path: string; }"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "RemoveDirInput",
|
|
60
|
+
declaration: "export interface RemoveDirInput { path: string; }"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
events: [],
|
|
66
|
+
objects: []
|
|
67
|
+
},
|
|
68
|
+
invocations: [
|
|
69
|
+
{
|
|
70
|
+
id: `${PKG}#agentSkills/list`,
|
|
71
|
+
service: "agentSkills",
|
|
72
|
+
namespace: "agentSkills",
|
|
73
|
+
method: "list",
|
|
74
|
+
invocation: direct,
|
|
75
|
+
parameters: [],
|
|
76
|
+
result: result("AgentSkillsView", agentSkillsViewSchema)
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: `${PKG}#agentSkills/toggleSkill`,
|
|
80
|
+
service: "agentSkills",
|
|
81
|
+
namespace: "agentSkills",
|
|
82
|
+
method: "toggleSkill",
|
|
83
|
+
invocation: direct,
|
|
84
|
+
parameters: [
|
|
85
|
+
{
|
|
86
|
+
name: "input",
|
|
87
|
+
wire: "input",
|
|
88
|
+
source: "json",
|
|
89
|
+
codec: jsonCodec("ToggleSkillInput", toggleSkillInputSchema)
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
result: result("AgentSkillsView", agentSkillsViewSchema)
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: `${PKG}#agentSkills/toggleDir`,
|
|
96
|
+
service: "agentSkills",
|
|
97
|
+
namespace: "agentSkills",
|
|
98
|
+
method: "toggleDir",
|
|
99
|
+
invocation: direct,
|
|
100
|
+
parameters: [
|
|
101
|
+
{
|
|
102
|
+
name: "input",
|
|
103
|
+
wire: "input",
|
|
104
|
+
source: "json",
|
|
105
|
+
codec: jsonCodec("ToggleDirInput", toggleDirInputSchema)
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
result: result("AgentSkillsView", agentSkillsViewSchema)
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: `${PKG}#agentSkills/addDir`,
|
|
112
|
+
service: "agentSkills",
|
|
113
|
+
namespace: "agentSkills",
|
|
114
|
+
method: "addDir",
|
|
115
|
+
invocation: direct,
|
|
116
|
+
parameters: [
|
|
117
|
+
{
|
|
118
|
+
name: "input",
|
|
119
|
+
wire: "input",
|
|
120
|
+
source: "json",
|
|
121
|
+
codec: jsonCodec("AddDirInput", addDirInputSchema)
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
result: result("AgentSkillsView", agentSkillsViewSchema)
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: `${PKG}#agentSkills/removeDir`,
|
|
128
|
+
service: "agentSkills",
|
|
129
|
+
namespace: "agentSkills",
|
|
130
|
+
method: "removeDir",
|
|
131
|
+
invocation: direct,
|
|
132
|
+
parameters: [
|
|
133
|
+
{
|
|
134
|
+
name: "input",
|
|
135
|
+
wire: "input",
|
|
136
|
+
source: "json",
|
|
137
|
+
codec: jsonCodec("RemoveDirInput", removeDirInputSchema)
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
result: result("AgentSkillsView", agentSkillsViewSchema)
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: `${PKG}#agentSkills/rescan`,
|
|
144
|
+
service: "agentSkills",
|
|
145
|
+
namespace: "agentSkills",
|
|
146
|
+
method: "rescan",
|
|
147
|
+
invocation: direct,
|
|
148
|
+
parameters: [],
|
|
149
|
+
result: result("AgentSkillsView", agentSkillsViewSchema)
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=typert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typert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B,EAAE,qBAAqB,CAAC;SACzD;QACD;YACE,EAAE,EAAE,GAAG,GAAG,qBAAqB;YAC/B,OAAO,EAAE,aAAa;YACtB,SAAS,EAAE,aAAa;YACxB,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,MAAM,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;SACzD;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AgentSkillsApi } from "./typert-remote.js";
|
|
2
|
+
import type { TranslateNS } from "@deepseek-ai/dsh-client-ui-slots";
|
|
3
|
+
type T = TranslateNS<"agent-skills">;
|
|
4
|
+
/** The settings page body. */
|
|
5
|
+
export declare function AgentSkillsSection({ api, t }: {
|
|
6
|
+
api: AgentSkillsApi;
|
|
7
|
+
t: T;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client plugin body: injects the page styles, registers the `agent-skills`
|
|
3
|
+
* locale dictionaries, mounts the `agentSkills` remote namespace, then
|
|
4
|
+
* registers the Agent Skills page into the `settings.section` slot (设置 →
|
|
5
|
+
* Agent Skills).
|
|
6
|
+
*
|
|
7
|
+
* @module dsh-agent-skills/client
|
|
8
|
+
*/
|
|
9
|
+
import type { ClientContext } from "@deepseek-ai/dsh-client-runtime/client";
|
|
10
|
+
import "./types.js";
|
|
11
|
+
/** Services required before this plugin mounts. */
|
|
12
|
+
export declare const inject: string[];
|
|
13
|
+
/** Mount the browser half. */
|
|
14
|
+
export declare function apply(ctx: ClientContext): Promise<void>;
|