@jianxx/dsh-cc-plugin-loader 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.
Files changed (49) hide show
  1. package/LICENSE +201 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +45 -0
  4. package/README.zh.md +45 -0
  5. package/lib/agents.d.ts +109 -0
  6. package/lib/agents.d.ts.map +1 -0
  7. package/lib/agents.js +147 -0
  8. package/lib/agents.js.map +1 -0
  9. package/lib/commands.d.ts +56 -0
  10. package/lib/commands.d.ts.map +1 -0
  11. package/lib/commands.js +66 -0
  12. package/lib/commands.js.map +1 -0
  13. package/lib/hooks.d.ts +44 -0
  14. package/lib/hooks.d.ts.map +1 -0
  15. package/lib/hooks.js +89 -0
  16. package/lib/hooks.js.map +1 -0
  17. package/lib/index.d.ts +73 -0
  18. package/lib/index.d.ts.map +1 -0
  19. package/lib/index.js +92 -0
  20. package/lib/index.js.map +1 -0
  21. package/lib/manifest.d.ts +23 -0
  22. package/lib/manifest.d.ts.map +1 -0
  23. package/lib/manifest.js +117 -0
  24. package/lib/manifest.js.map +1 -0
  25. package/lib/mcp.d.ts +41 -0
  26. package/lib/mcp.d.ts.map +1 -0
  27. package/lib/mcp.js +64 -0
  28. package/lib/mcp.js.map +1 -0
  29. package/lib/seams.d.ts +59 -0
  30. package/lib/seams.d.ts.map +1 -0
  31. package/lib/seams.js +56 -0
  32. package/lib/seams.js.map +1 -0
  33. package/lib/settings.d.ts +41 -0
  34. package/lib/settings.d.ts.map +1 -0
  35. package/lib/settings.js +44 -0
  36. package/lib/settings.js.map +1 -0
  37. package/lib/skill-semantics.d.ts +92 -0
  38. package/lib/skill-semantics.d.ts.map +1 -0
  39. package/lib/skill-semantics.js +98 -0
  40. package/lib/skill-semantics.js.map +1 -0
  41. package/lib/skills.d.ts +49 -0
  42. package/lib/skills.d.ts.map +1 -0
  43. package/lib/skills.js +117 -0
  44. package/lib/skills.js.map +1 -0
  45. package/lib/types.d.ts +89 -0
  46. package/lib/types.d.ts.map +1 -0
  47. package/lib/types.js +12 -0
  48. package/lib/types.js.map +1 -0
  49. package/package.json +57 -0
package/lib/skills.js ADDED
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Mount a Claude Code plugin's skills.
3
+ *
4
+ * Discovers `SKILL.md` skills in the plugin's standard `skills/` directory and
5
+ * any inline manifest `skills` paths, parses each with the skill-claude-code
6
+ * frontmatter translator, registers it on the skill registry as a runtime
7
+ * skill, and wires the consumer-side activation semantics (allowed-tools,
8
+ * `context: fork`, `paths`, MCP-source shell). Every registration is a Cordis
9
+ * effect so unmounting the plugin recalls it.
10
+ *
11
+ * @module
12
+ */
13
+ import { readFile } from 'node:fs/promises';
14
+ import { join, resolve } from 'node:path';
15
+ import { ccInvocation, discoverCcSkills, parseCcFrontmatter, parseCcFrontmatterDocument, } from '@jianxx/dsh-cc-skill-loader';
16
+ import { isSkillName } from '@deepseek-ai/dsh-skill';
17
+ import { ComponentTally } from "./seams.js";
18
+ import { PROVIDER, registerSkillPathActivator, activationFor } from "./skill-semantics.js";
19
+ /** Skills live under this directory in a plugin root, when present. */
20
+ export const STANDARD_SKILLS_DIR = 'skills';
21
+ /**
22
+ * Discover and register a plugin's skills, wiring activation semantics.
23
+ * @param options - plugin root, manifest, and the skill/subagent seams.
24
+ * @returns mounted disposers and per-component counts.
25
+ */
26
+ export async function mountSkills(options) {
27
+ const tally = new ComponentTally('skills');
28
+ const disposers = [];
29
+ if (options.skills === undefined) {
30
+ tally.addSkipped('skill registry seam "skills" is not mounted');
31
+ return { disposers, tally };
32
+ }
33
+ const roots = skillRoots(options.pluginRoot, options.manifest);
34
+ if (roots.length === 0) {
35
+ tally.addSkipped('plugin ships no skills directory or manifest skills paths');
36
+ return { disposers, tally };
37
+ }
38
+ const files = await discoverCcSkills({ dshHome: resolve(options.pluginRoot), additionalDirs: roots });
39
+ if (files.length === 0) {
40
+ tally.addSkipped('plugin ships no skills');
41
+ return { disposers, tally };
42
+ }
43
+ for (const file of files) {
44
+ const loaded = await loadSkillFile(file);
45
+ if (loaded === undefined) {
46
+ tally.addFailed(`could not parse skill "${file.name}"`);
47
+ continue;
48
+ }
49
+ if (!isSkillName(file.name)) {
50
+ tally.addFailed(`skill "${file.name}" has an invalid registry name`);
51
+ continue;
52
+ }
53
+ const { parsed, body } = loaded;
54
+ const metadata = toMetadata(file, parsed);
55
+ const definition = {
56
+ name: file.name,
57
+ description: parsed.description,
58
+ ...parsed.whenToUse !== undefined ? { whenToUse: parsed.whenToUse } : {},
59
+ invocation: ccInvocation(parsed),
60
+ source: 'project-dsh',
61
+ provider: PROVIDER,
62
+ resourceBase: { kind: 'directory', path: file.directory },
63
+ path: file.path,
64
+ content: body,
65
+ metadata: metadata,
66
+ };
67
+ disposers.push(options.skills.register(definition));
68
+ disposers.push(registerSkillPathActivator(options.ctx, definition, options.pluginRoot));
69
+ activationFor(metadata, options.subagentsPresent);
70
+ tally.addLoaded();
71
+ }
72
+ return { disposers, tally };
73
+ }
74
+ /** Standard plus manifest skills roots, resolved against the plugin root. */
75
+ function skillRoots(pluginRoot, manifest) {
76
+ const roots = [];
77
+ roots.push(join(pluginRoot, STANDARD_SKILLS_DIR));
78
+ for (const path of manifest.skills) {
79
+ roots.push(resolve(pluginRoot, path));
80
+ }
81
+ return roots;
82
+ }
83
+ /** Read and parse one skill file's frontmatter and body. */
84
+ async function loadSkillFile(file) {
85
+ let raw;
86
+ try {
87
+ raw = await readFile(file.path, 'utf8');
88
+ }
89
+ catch {
90
+ return undefined;
91
+ }
92
+ const document = parseCcFrontmatterDocument(raw);
93
+ const parsed = parseCcFrontmatter(raw);
94
+ if (document === undefined || parsed === undefined)
95
+ return undefined;
96
+ return { parsed, body: document.body };
97
+ }
98
+ /** Build CC metadata for a parsed plugin skill, mirroring the provider's view. */
99
+ function toMetadata(file, parsed) {
100
+ return {
101
+ allowedTools: parsed.allowedTools,
102
+ arguments: parsed.arguments,
103
+ deprecated: file.deprecated,
104
+ source: 'additional',
105
+ unknown: parsed.unknown,
106
+ ...parsed.argumentHint !== undefined ? { argumentHint: parsed.argumentHint } : {},
107
+ ...parsed.version !== undefined ? { version: parsed.version } : {},
108
+ ...parsed.model !== undefined ? { model: parsed.model } : {},
109
+ ...parsed.executionContext !== undefined ? { executionContext: parsed.executionContext } : {},
110
+ ...parsed.agent !== undefined ? { agent: parsed.agent } : {},
111
+ ...parsed.effort !== undefined ? { effort: parsed.effort } : {},
112
+ ...parsed.shell !== undefined ? { shell: parsed.shell } : {},
113
+ ...parsed.hooks !== undefined ? { hooks: parsed.hooks } : {},
114
+ ...parsed.paths !== undefined ? { paths: parsed.paths } : {},
115
+ };
116
+ }
117
+ //# sourceMappingURL=skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,GAG3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,WAAW,EAAwB,MAAM,wBAAwB,CAAA;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAE1F,uEAAuE;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAA;AA0B3C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAA2B;IAC3D,MAAM,KAAK,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAA;IAC1C,MAAM,SAAS,GAAmB,EAAE,CAAA;IACpC,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC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,EAAE,CAAC,CAAC,CAAC,EAAE;QAC7F,GAAG,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;QAC5D,GAAG,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE;QAC/D,GAAG,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;QAC5D,GAAG,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;QAC5D,GAAG,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE;KAC7D,CAAA;AACH,CAAC"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Load semantics for a Claude Code plugin manifest in the harness.
3
+ *
4
+ * Defines the typed subset of `plugin.json` this loader translates, plus the
5
+ * structural report a mount returns so a host UI can present per-component
6
+ * outcome. Shapes mirror Claude Code's `PluginManifestSchema` for the
7
+ * component fields the loader consumes.
8
+ *
9
+ * @module
10
+ */
11
+ /** One manifest-declared slash command, inline or pointing at a markdown file. */
12
+ export interface CcCommand {
13
+ /** Command name (lowercase kebab), key in the manifest's `commands` record. */
14
+ readonly name: string;
15
+ /** Human-readable command description. */
16
+ readonly description?: string;
17
+ /** Path to a command markdown file, relative to the plugin root. */
18
+ readonly source?: string;
19
+ /** Inline markdown body that serves as the command content. */
20
+ readonly content?: string;
21
+ /** Argument placeholder hint, surfaced to the user. */
22
+ readonly argumentHint?: string;
23
+ /** Default model for the command's execution. */
24
+ readonly model?: string;
25
+ /** Tools allowed while the command runs. */
26
+ readonly allowedTools?: readonly string[];
27
+ }
28
+ /** A Claude Code sub-agent, loaded from `agents/` or an inline path. */
29
+ export interface CcAgentRef {
30
+ /** Path to the agent file(s), relative to the plugin root. */
31
+ readonly paths: readonly string[];
32
+ }
33
+ /** A Claude Code skill entry, loaded from `skills/` or an inline path. */
34
+ export interface CcSkillRef {
35
+ /** Skill directories or files, relative to the plugin root. */
36
+ readonly paths: readonly string[];
37
+ }
38
+ /** A Claude Code MCP server configuration, keyed by server name. */
39
+ export interface CcMcpServer {
40
+ readonly [key: string]: unknown;
41
+ }
42
+ /** The typed subset of a Claude Code `plugin.json` manifest. */
43
+ export interface CcPluginManifest {
44
+ /** Unique kebab-case plugin identifier (must not contain spaces). */
45
+ readonly name: string;
46
+ /** Semantic version, optional. */
47
+ readonly version?: string;
48
+ /** Brief user-facing description, optional. */
49
+ readonly description?: string;
50
+ /** Creator metadata, surfaced verbatim, optional. */
51
+ readonly author?: unknown;
52
+ /** Slash commands from the manifest `commands` field. */
53
+ readonly commands: readonly CcCommand[];
54
+ /** Agent file paths from the manifest `agents` field. */
55
+ readonly agents: readonly string[];
56
+ /** Skill paths from the manifest `skills` field. */
57
+ readonly skills: readonly string[];
58
+ /** Whether the plugin ships a `hooks/` directory or inline `hooks`. */
59
+ readonly hooks?: unknown;
60
+ /** MCP server definitions (inline record, or keys from an `.mcp.json`). */
61
+ readonly mcpServers: Readonly<Record<string, CcMcpServer>>;
62
+ /** Path to an `.mcp.json` file when the manifest referenced one. */
63
+ readonly mcpServersPath?: string;
64
+ /** Settings to merge on enable, allowlisted before writing. */
65
+ readonly settings: Readonly<Record<string, unknown>>;
66
+ }
67
+ /** The six component kinds a plugin can contribute. */
68
+ export type ComponentKind = 'commands' | 'agents' | 'skills' | 'hooks' | 'mcpServers' | 'settings';
69
+ /** Per-component load outcome counts and reasons for a mount. */
70
+ export interface ComponentResult {
71
+ /** The component kind this result describes. */
72
+ readonly kind: ComponentKind;
73
+ /** Components successfully mounted. */
74
+ readonly loaded: number;
75
+ /** Components skipped because their host seam was absent or disallowed. */
76
+ readonly skipped: number;
77
+ /** Components that failed to mount. */
78
+ readonly failed: number;
79
+ /** Human-readable reasons, one per skipped or failed component. */
80
+ readonly reasons: readonly string[];
81
+ }
82
+ /** Structural result of mounting one CC plugin. */
83
+ export interface PluginLoadReport {
84
+ /** The mounted plugin's manifest name. */
85
+ readonly name: string;
86
+ /** Per-component outcome. */
87
+ readonly components: readonly ComponentResult[];
88
+ }
89
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,kFAAkF;AAClF,MAAM,WAAW,SAAS;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,uDAAuD;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,4CAA4C;IAC5C,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1C;AAED,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC;AAED,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC;AAED,oEAAoE;A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C3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CACpC;AAED,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAA;CAChD"}
package/lib/types.js ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Load semantics for a Claude Code plugin manifest in the harness.
3
+ *
4
+ * Defines the typed subset of `plugin.json` this loader translates, plus the
5
+ * structural report a mount returns so a host UI can present per-component
6
+ * outcome. Shapes mirror Claude Code's `PluginManifestSchema` for the
7
+ * component fields the loader consumes.
8
+ *
9
+ * @module
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@jianxx/dsh-cc-plugin-loader",
3
+ "description": "Load Claude Code plugin.json manifests as in-memory dsh plugin mounts",
4
+ "version": "0.1.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/jianxx/dsh-cc-plugins.git",
8
+ "directory": "packages/compat/cc-plugin-loader"
9
+ },
10
+ "type": "module",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./lib/index.d.ts",
14
+ "default": "./lib/index.js"
15
+ },
16
+ "./manifest": {
17
+ "types": "./lib/manifest.d.ts",
18
+ "default": "./lib/manifest.js"
19
+ },
20
+ "./seams": {
21
+ "types": "./lib/seams.d.ts",
22
+ "default": "./lib/seams.js"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
26
+ "files": [
27
+ "lib"
28
+ ],
29
+ "license": "Apache-2.0",
30
+ "peerDependencies": {
31
+ "@deepseek-ai/dsh-commands": ">=0.1.1-rc.2",
32
+ "@deepseek-ai/dsh-settings": ">=0.1.1-rc.2",
33
+ "@deepseek-ai/dsh-skill": ">=0.1.1-rc.2",
34
+ "@deepseek-ai/dsh-subagent": ">=0.1.1-rc.2",
35
+ "@deepseek-ai/cordis": ">=0.1.1-rc.2",
36
+ "@jianxx/dsh-cc-claude-code-agents": "^0.1.0",
37
+ "@jianxx/dsh-cc-hook-protocol": "^0.1.0",
38
+ "@jianxx/dsh-cc-mcp-client": "^0.1.0",
39
+ "@jianxx/dsh-cc-skill-loader": "^0.1.0",
40
+ "@jianxx/dsh-cc-tools": "^0.1.0"
41
+ },
42
+ "devDependencies": {
43
+ "@deepseek-ai/dsh-commands": "link:../../../../deepseek-harness/packages/interaction/commands",
44
+ "@deepseek-ai/dsh-settings": "link:../../../../deepseek-harness/packages/settings/settings",
45
+ "@deepseek-ai/dsh-skill": "link:../../../../deepseek-harness/packages/skill/skill",
46
+ "@deepseek-ai/dsh-subagent": "link:../../../../deepseek-harness/packages/subagent/subagent",
47
+ "@deepseek-ai/cordis": "link:../../../../deepseek-harness/vendor/cordis",
48
+ "@jianxx/dsh-cc-claude-code-agents": "^0.1.0",
49
+ "@jianxx/dsh-cc-mcp-client": "^0.1.0",
50
+ "@jianxx/dsh-cc-skill-loader": "^0.1.0",
51
+ "@jianxx/dsh-cc-tools": "^0.1.0",
52
+ "@jianxx/dsh-cc-hook-protocol": "^0.1.0"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public"
56
+ }
57
+ }