dsh-agent-plugins-market 0.4.6 → 0.5.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/README.md +16 -10
- package/README.zh.md +16 -10
- package/client/client.js +540 -417
- package/client/client.js.map +1 -1
- package/lib/application/catalog.js +447 -0
- package/lib/application/details.js +136 -0
- package/lib/application/queries.js +1 -0
- package/lib/{discovery → catalog}/manifests.js +20 -12
- package/lib/{paths.js → catalog/paths.js} +5 -1
- package/lib/{skills-parse.js → catalog/skills-parse.js} +7 -4
- package/lib/catalog/source-catalog.js +38 -0
- package/lib/{discovery.js → catalog/suite-scanner.js} +28 -86
- package/lib/{discovery → catalog}/surfaces.js +9 -11
- package/lib/{validate.js → catalog/validate.js} +3 -3
- package/lib/context.js +11 -13
- package/lib/contracts/market.js +27 -0
- package/lib/contracts/mcp-status.js +2 -0
- package/lib/index.js +32 -49
- package/lib/{state.js → model/state.js} +2 -2
- package/lib/routes.js +21 -21
- package/lib/{commands-mounts.js → runtime/commands-mounts.js} +10 -11
- package/lib/{hooks-mounts.js → runtime/hooks-mounts.js} +1 -1
- package/lib/{mcp-config.js → runtime/mcp-config.js} +7 -4
- package/lib/{mcp-status.js → runtime/mcp-status.js} +8 -41
- package/lib/runtime/reconciler.js +46 -0
- package/lib/{skills-provider.js → runtime/skills-provider.js} +26 -23
- package/lib/runtime/tool-registry-observer.js +35 -0
- package/lib/types/application/catalog.d.ts +113 -0
- package/lib/types/application/details.d.ts +12 -0
- package/lib/types/application/queries.d.ts +33 -0
- package/lib/types/{discovery → catalog}/manifests.d.ts +1 -1
- package/lib/types/catalog/source-catalog.d.ts +3 -0
- package/lib/types/catalog/suite-scanner.d.ts +9 -0
- package/lib/types/{discovery → catalog}/surfaces.d.ts +1 -1
- package/lib/types/{validate.d.ts → catalog/validate.d.ts} +1 -1
- package/lib/types/context.d.ts +2 -2
- package/lib/types/contracts/market.d.ts +153 -0
- package/lib/types/contracts/mcp-status.d.ts +38 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/{types.d.ts → model/types.d.ts} +2 -42
- package/lib/types/routes.d.ts +2 -2
- package/lib/types/{commands-mounts.d.ts → runtime/commands-mounts.d.ts} +1 -1
- package/lib/types/{hooks-mounts.d.ts → runtime/hooks-mounts.d.ts} +1 -1
- package/lib/types/{mcp-config.d.ts → runtime/mcp-config.d.ts} +1 -1
- package/lib/types/{mcp-mounts.d.ts → runtime/mcp-mounts.d.ts} +1 -1
- package/lib/types/runtime/mcp-status.d.ts +13 -0
- package/lib/types/runtime/reconciler.d.ts +33 -0
- package/lib/types/{skills-provider.d.ts → runtime/skills-provider.d.ts} +3 -3
- package/lib/types/runtime/tool-registry-observer.d.ts +14 -0
- package/package.json +34 -19
- package/schemas/README.md +2 -5
- package/lib/manager.js +0 -581
- package/lib/types/discovery.d.ts +0 -19
- package/lib/types/manager.d.ts +0 -124
- package/lib/types/mcp-status.d.ts +0 -51
- /package/lib/{git.js → catalog/git.js} +0 -0
- /package/lib/{types.js → model/types.js} +0 -0
- /package/lib/{mcp-mounts.js → runtime/mcp-mounts.js} +0 -0
- /package/lib/types/{git.d.ts → catalog/git.d.ts} +0 -0
- /package/lib/types/{paths.d.ts → catalog/paths.d.ts} +0 -0
- /package/lib/types/{skills-parse.d.ts → catalog/skills-parse.d.ts} +0 -0
- /package/lib/types/{state.d.ts → model/state.d.ts} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Narrow application interfaces consumed by the HTTP transport adapter. */
|
|
2
|
+
import type { McpStatusPayload } from '../contracts/mcp-status.js';
|
|
3
|
+
import type { OverviewPayload, SkillContent, SourceProgress, SuiteDetail } from '../contracts/market.js';
|
|
4
|
+
import type { SourceRef } from '../model/types.js';
|
|
5
|
+
/** Read-only market operations required by HTTP routes. */
|
|
6
|
+
export interface MarketQueries {
|
|
7
|
+
readonly sources: SourceRef[];
|
|
8
|
+
overview(): Promise<OverviewPayload>;
|
|
9
|
+
mcpStatus(): Promise<McpStatusPayload>;
|
|
10
|
+
sourceProgress(): SourceProgress;
|
|
11
|
+
suiteDetail(sourceId: string, suiteId: string): Promise<SuiteDetail>;
|
|
12
|
+
skillContent(sourceId: string, suiteId: string, skillName: string): Promise<SkillContent>;
|
|
13
|
+
}
|
|
14
|
+
/** Mutating market operations required by HTTP routes. */
|
|
15
|
+
export interface MarketMutations {
|
|
16
|
+
addSource(input: {
|
|
17
|
+
url: string;
|
|
18
|
+
branch?: string;
|
|
19
|
+
local?: boolean;
|
|
20
|
+
}): Promise<SourceRef>;
|
|
21
|
+
updateSource(sourceId: string, patch: {
|
|
22
|
+
url?: string;
|
|
23
|
+
branch?: string;
|
|
24
|
+
local?: boolean;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
removeSource(sourceId: string): Promise<void>;
|
|
27
|
+
refreshSource(sourceId?: string): Promise<void>;
|
|
28
|
+
install(sourceId: string, suiteId: string): Promise<void>;
|
|
29
|
+
uninstall(sourceId: string, suiteId: string): Promise<void>;
|
|
30
|
+
setEnabled(sourceId: string, suiteId: string, enabled: boolean): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
/** Complete application surface required by the HTTP routes. */
|
|
33
|
+
export type MarketService = MarketQueries & MarketMutations;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SuiteManifest } from '../types.js';
|
|
1
|
+
import type { SuiteManifest } from '../model/types.js';
|
|
2
2
|
export type ManifestKind = 'agent-plugin-v1' | 'universal' | 'claude-code' | 'cursor' | 'kimi' | 'codex';
|
|
3
3
|
/** One manifest candidate: its file path and the dialect it selects. */
|
|
4
4
|
export interface ManifestCandidate {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SourceRef, Suite, SuiteDimension } from '../model/types.js';
|
|
2
|
+
/** Discover suites from the selected configured or project checkouts. */
|
|
3
|
+
export declare function discoverSourceList(sources: SourceRef[], dimension: SuiteDimension, dimensionRoot: string): Promise<Suite[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Suite, SuiteDimension } from '../model/types.js';
|
|
2
|
+
import { repoName } from './manifests.js';
|
|
3
|
+
import { discoverLspEntries, listMdFiles, type LspEntry } from './surfaces.js';
|
|
4
|
+
export { repoName, listMdFiles, discoverLspEntries };
|
|
5
|
+
export type { LspEntry };
|
|
6
|
+
/** Discover every suite under one source checkout. */
|
|
7
|
+
export declare function discoverSuitesInSource(checkoutDir: string, sourceId: string, dimension: SuiteDimension): Promise<Suite[]>;
|
|
8
|
+
/** Whether a suite root path lies outside the checkout. */
|
|
9
|
+
export declare function isOutside(root: string, candidate: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { McpSuiteConfig, SuiteSkill, SuiteSurfaceCounts } from '../types.js';
|
|
1
|
+
import type { McpSuiteConfig, SuiteSkill, SuiteSurfaceCounts } from '../model/types.js';
|
|
2
2
|
/** Discover SKILL.md files under the suite's skills directory, up to 3 levels deep. */
|
|
3
3
|
export declare function discoverSkills(root: string, errors: string[], declared?: unknown): Promise<SuiteSkill[]>;
|
|
4
4
|
/** Read the suite's MCP config: `mcp.json` or `.mcp.json`, else the winning manifest's inline `mcpServers`. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { McpSuiteConfig } from '
|
|
1
|
+
import type { McpSuiteConfig } from '../model/types.js';
|
|
2
2
|
export declare const PLUGIN_SCHEMA_ID = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
3
3
|
export declare const MCP_SCHEMA_ID = "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json";
|
|
4
4
|
/** Validate one JSON document against a vendored schema; errors joined for surfacing. */
|
package/lib/types/context.d.ts
CHANGED
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* dimension, skill names per plugin, and MCP server prefixes.
|
|
9
9
|
*/
|
|
10
10
|
import type { Context } from '@deepseek-ai/cordis';
|
|
11
|
-
import type {
|
|
11
|
+
import type { Catalog } from './application/catalog.js';
|
|
12
12
|
/** Mount the agent_plugins query tool. */
|
|
13
|
-
export declare function mountSuiteContext(ctx: Context, manager:
|
|
13
|
+
export declare function mountSuiteContext(ctx: Context, manager: Catalog): () => void;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/** Browser-safe market wire records and route constants shared by host and client. */
|
|
2
|
+
/** Prefix for all Agent Plugins Market HTTP routes. */
|
|
3
|
+
export declare const MARKET_API_PREFIX: "/api/agent-plugins/";
|
|
4
|
+
/** Fixed Agent Plugins Market HTTP routes. */
|
|
5
|
+
export declare const MARKET_ROUTES: {
|
|
6
|
+
readonly overview: "/api/agent-plugins/overview";
|
|
7
|
+
readonly mcpStatus: "/api/agent-plugins/mcp-status";
|
|
8
|
+
readonly progress: "/api/agent-plugins/progress";
|
|
9
|
+
readonly config: "/api/agent-plugins/config";
|
|
10
|
+
readonly suite: "/api/agent-plugins/suite";
|
|
11
|
+
readonly skill: "/api/agent-plugins/skill";
|
|
12
|
+
readonly addSource: "/api/agent-plugins/sources/add";
|
|
13
|
+
readonly updateSource: "/api/agent-plugins/sources/update";
|
|
14
|
+
readonly removeSource: "/api/agent-plugins/sources/remove";
|
|
15
|
+
readonly refreshSource: "/api/agent-plugins/sources/refresh";
|
|
16
|
+
readonly install: "/api/agent-plugins/install";
|
|
17
|
+
readonly uninstall: "/api/agent-plugins/uninstall";
|
|
18
|
+
readonly setEnabled: "/api/agent-plugins/set-enabled";
|
|
19
|
+
};
|
|
20
|
+
/** A configured source row returned to the market client. */
|
|
21
|
+
export interface SourceOverview {
|
|
22
|
+
id: string;
|
|
23
|
+
url: string;
|
|
24
|
+
branch?: string;
|
|
25
|
+
local?: boolean;
|
|
26
|
+
cloned: boolean;
|
|
27
|
+
lockCommit?: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
suiteIds: string[];
|
|
30
|
+
}
|
|
31
|
+
/** Counts of runtime surfaces displayed on a suite card. */
|
|
32
|
+
export interface SuiteSurfaceCounts {
|
|
33
|
+
skills: number;
|
|
34
|
+
mcp: number;
|
|
35
|
+
hooks: number;
|
|
36
|
+
commands: number;
|
|
37
|
+
agents: number;
|
|
38
|
+
lsp: number;
|
|
39
|
+
}
|
|
40
|
+
/** A normalized suite card returned by the overview route. */
|
|
41
|
+
export interface SuiteOverviewCard {
|
|
42
|
+
sourceId: string;
|
|
43
|
+
suiteId: string;
|
|
44
|
+
name: string;
|
|
45
|
+
version?: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
keywords: string[];
|
|
48
|
+
surfaces: SuiteSurfaceCounts;
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
installed: boolean;
|
|
51
|
+
dimension: string;
|
|
52
|
+
layout: string;
|
|
53
|
+
remoteUrl?: string;
|
|
54
|
+
errors: string[];
|
|
55
|
+
mcpErrors?: string[];
|
|
56
|
+
}
|
|
57
|
+
/** The market overview response. */
|
|
58
|
+
export interface OverviewPayload {
|
|
59
|
+
sources: SourceOverview[];
|
|
60
|
+
suites: SuiteOverviewCard[];
|
|
61
|
+
totals: {
|
|
62
|
+
all: number;
|
|
63
|
+
installed: number;
|
|
64
|
+
enabled: number;
|
|
65
|
+
};
|
|
66
|
+
roots: {
|
|
67
|
+
user: string;
|
|
68
|
+
data: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** Host-side progress of the source mutation currently in flight. */
|
|
72
|
+
export interface SourceProgress {
|
|
73
|
+
active: boolean;
|
|
74
|
+
sourceId: string;
|
|
75
|
+
step: string;
|
|
76
|
+
}
|
|
77
|
+
/** One skill's metadata inside a suite detail response. */
|
|
78
|
+
export interface SuiteSkillMeta {
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
whenToUse?: string;
|
|
82
|
+
path: string;
|
|
83
|
+
}
|
|
84
|
+
/** One command or agent preview in a suite detail response. */
|
|
85
|
+
export interface MarkdownPreview {
|
|
86
|
+
name: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
content: string;
|
|
89
|
+
}
|
|
90
|
+
/** Claude Code command preview alias retained for feature-specific readability. */
|
|
91
|
+
export type CommandPreview = MarkdownPreview;
|
|
92
|
+
/** Claude Code agent preview alias retained for feature-specific readability. */
|
|
93
|
+
export type AgentPreview = MarkdownPreview;
|
|
94
|
+
/** One LSP definition preview in a suite detail response. */
|
|
95
|
+
export interface LspPreview {
|
|
96
|
+
name: string;
|
|
97
|
+
content: string;
|
|
98
|
+
}
|
|
99
|
+
/** One flattened hook entry in a suite detail response. */
|
|
100
|
+
export interface HookPreview {
|
|
101
|
+
event: string;
|
|
102
|
+
matcher?: string;
|
|
103
|
+
command: string;
|
|
104
|
+
}
|
|
105
|
+
/** One validated MCP server detail in a suite detail response. */
|
|
106
|
+
export interface McpServerDetail {
|
|
107
|
+
key: string;
|
|
108
|
+
type: string;
|
|
109
|
+
command?: string;
|
|
110
|
+
url?: string;
|
|
111
|
+
args?: string[];
|
|
112
|
+
env?: Record<string, string>;
|
|
113
|
+
cwd?: string;
|
|
114
|
+
headers?: Record<string, string>;
|
|
115
|
+
}
|
|
116
|
+
/** Full suite detail response served by the detail modal. */
|
|
117
|
+
export interface SuiteDetail {
|
|
118
|
+
sourceId: string;
|
|
119
|
+
suiteId: string;
|
|
120
|
+
name: string;
|
|
121
|
+
version: string | null;
|
|
122
|
+
description: string | null;
|
|
123
|
+
author: string | null;
|
|
124
|
+
keywords: string[];
|
|
125
|
+
layout: string;
|
|
126
|
+
dimension: string;
|
|
127
|
+
root: string;
|
|
128
|
+
remoteUrl: string | null;
|
|
129
|
+
installed: boolean;
|
|
130
|
+
enabled: boolean;
|
|
131
|
+
skills: SuiteSkillMeta[];
|
|
132
|
+
mcpServers: McpServerDetail[];
|
|
133
|
+
hooks: {
|
|
134
|
+
count: number;
|
|
135
|
+
entries: HookPreview[];
|
|
136
|
+
};
|
|
137
|
+
commands: MarkdownPreview[];
|
|
138
|
+
agents: MarkdownPreview[];
|
|
139
|
+
lsp: LspPreview[];
|
|
140
|
+
errors: string[];
|
|
141
|
+
mcpErrors: string[];
|
|
142
|
+
}
|
|
143
|
+
/** One skill's full file text served by the skill route. */
|
|
144
|
+
export interface SkillContent {
|
|
145
|
+
name: string;
|
|
146
|
+
description: string;
|
|
147
|
+
content: string;
|
|
148
|
+
path: string;
|
|
149
|
+
}
|
|
150
|
+
/** Build a suite-detail URL without duplicating route or query encoding logic. */
|
|
151
|
+
export declare function suiteRoute(sourceId: string, suiteId: string): string;
|
|
152
|
+
/** Build a skill-content URL without duplicating route or query encoding logic. */
|
|
153
|
+
export declare function skillRoute(sourceId: string, suiteId: string, skill: string): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Browser-safe MCP status records shared by host aggregation and client rendering. */
|
|
2
|
+
/** A tool observed in the host MCP tool registry. */
|
|
3
|
+
export interface McpStatusTool {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Whether an MCP row comes from a suite or direct host observation. */
|
|
8
|
+
export type McpStatusKind = 'plugin' | 'direct';
|
|
9
|
+
/** Operational state rendered for an MCP row. */
|
|
10
|
+
export type McpStatusState = 'connected' | 'degraded' | 'failed' | 'disabled';
|
|
11
|
+
/** One MCP service row for the status surface. */
|
|
12
|
+
export interface McpStatusEntry {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
kind: McpStatusKind;
|
|
16
|
+
state: McpStatusState;
|
|
17
|
+
source?: string;
|
|
18
|
+
suiteId?: string;
|
|
19
|
+
serverKey?: string;
|
|
20
|
+
transport: string;
|
|
21
|
+
endpoint?: string;
|
|
22
|
+
config?: Record<string, unknown>;
|
|
23
|
+
tools: McpStatusTool[];
|
|
24
|
+
reason?: string;
|
|
25
|
+
}
|
|
26
|
+
/** The MCP status response returned by the host. */
|
|
27
|
+
export interface McpStatusPayload {
|
|
28
|
+
entries: McpStatusEntry[];
|
|
29
|
+
observedAt: string;
|
|
30
|
+
totals: {
|
|
31
|
+
all: number;
|
|
32
|
+
connected: number;
|
|
33
|
+
degraded: number;
|
|
34
|
+
failed: number;
|
|
35
|
+
disabled: number;
|
|
36
|
+
};
|
|
37
|
+
directObservationOnly: boolean;
|
|
38
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* manager reports a per-server mount failure.
|
|
13
13
|
*/
|
|
14
14
|
import type { Context } from '@deepseek-ai/cordis';
|
|
15
|
-
import type { SourceRef } from './types.js';
|
|
15
|
+
import type { SourceRef } from './model/types.js';
|
|
16
16
|
export declare const name = "dsh-agent-plugins-market";
|
|
17
17
|
export declare const inject: string[];
|
|
18
18
|
/** Host configuration. */
|
|
@@ -123,45 +123,5 @@ export interface SuiteState {
|
|
|
123
123
|
sources: SourceRef[];
|
|
124
124
|
installed: Record<string, InstalledEntry>;
|
|
125
125
|
}
|
|
126
|
-
/**
|
|
127
|
-
export
|
|
128
|
-
sourceId: string;
|
|
129
|
-
suiteId: string;
|
|
130
|
-
name: string;
|
|
131
|
-
version?: string;
|
|
132
|
-
description?: string;
|
|
133
|
-
keywords: string[];
|
|
134
|
-
surfaces: SuiteSurfaceCounts;
|
|
135
|
-
enabled: boolean;
|
|
136
|
-
installed: boolean;
|
|
137
|
-
dimension: SuiteDimension;
|
|
138
|
-
layout: SuiteLayoutKind;
|
|
139
|
-
errors: string[];
|
|
140
|
-
/** Live MCP mount failures for this suite (reason per failed server). */
|
|
141
|
-
mcpErrors: string[];
|
|
142
|
-
}
|
|
143
|
-
export interface SourceOverview {
|
|
144
|
-
id: string;
|
|
145
|
-
url: string;
|
|
146
|
-
branch?: string;
|
|
147
|
-
/** Local-directory source (read directly, never cloned or deleted). */
|
|
148
|
-
local?: boolean;
|
|
149
|
-
/** Whether the checkout (or local directory) is present. */
|
|
150
|
-
cloned: boolean;
|
|
151
|
-
lockCommit?: string;
|
|
152
|
-
error?: string;
|
|
153
|
-
suiteIds: string[];
|
|
154
|
-
}
|
|
155
|
-
export interface OverviewPayload {
|
|
156
|
-
sources: SourceOverview[];
|
|
157
|
-
suites: SuiteOverviewCard[];
|
|
158
|
-
totals: {
|
|
159
|
-
all: number;
|
|
160
|
-
installed: number;
|
|
161
|
-
enabled: number;
|
|
162
|
-
};
|
|
163
|
-
roots: {
|
|
164
|
-
user: string;
|
|
165
|
-
data: string;
|
|
166
|
-
};
|
|
167
|
-
}
|
|
126
|
+
/** Browser-safe market records are shared from the transport contracts. */
|
|
127
|
+
export type { OverviewPayload, SourceOverview, SuiteOverviewCard } from '../contracts/market.js';
|
package/lib/types/routes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import type {
|
|
2
|
+
import type { MarketService } from './application/queries.js';
|
|
3
3
|
export interface WebServerService {
|
|
4
4
|
register(route: {
|
|
5
5
|
kind: 'exact' | 'prefix';
|
|
@@ -8,4 +8,4 @@ export interface WebServerService {
|
|
|
8
8
|
}): () => void;
|
|
9
9
|
}
|
|
10
10
|
/** Mount every route; returns the disposer releasing them all. */
|
|
11
|
-
export declare function mountSuiteRoutes(hostCtx: unknown, manager:
|
|
11
|
+
export declare function mountSuiteRoutes(hostCtx: unknown, manager: MarketService): () => void;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* diagnostic list.
|
|
11
11
|
*/
|
|
12
12
|
import type { Context } from '@deepseek-ai/cordis';
|
|
13
|
-
import type { Suite } from '
|
|
13
|
+
import type { Suite } from '../model/types.js';
|
|
14
14
|
export interface McpMountDiagnostic {
|
|
15
15
|
suiteId: string;
|
|
16
16
|
serverKey: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { McpStatusPayload } from '../contracts/mcp-status.js';
|
|
2
|
+
import { inspectToolRegistry, type McpToolSnapshot } from './tool-registry-observer.js';
|
|
3
|
+
import type { Suite } from '../model/types.js';
|
|
4
|
+
export type { McpStatusEntry, McpStatusPayload, McpStatusKind, McpStatusState } from '../contracts/mcp-status.js';
|
|
5
|
+
export { inspectToolRegistry };
|
|
6
|
+
export type { McpToolSnapshot } from './tool-registry-observer.js';
|
|
7
|
+
interface McpDiagnostic {
|
|
8
|
+
suiteId: string;
|
|
9
|
+
serverKey: string;
|
|
10
|
+
reason: string;
|
|
11
|
+
}
|
|
12
|
+
/** Build status rows from discovered plugin MCP definitions and observed tool names. */
|
|
13
|
+
export declare function buildMcpStatus(suites: Suite[], diagnostics: McpDiagnostic[], observed: readonly McpToolSnapshot[]): McpStatusPayload;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime reconciliation for enabled suites.
|
|
3
|
+
*
|
|
4
|
+
* One catalog snapshot is fanned out to the existing MCP, command, and hook
|
|
5
|
+
* mount adapters. The adapters remain separate because their host surfaces and
|
|
6
|
+
* failure semantics differ; this module owns ordering, containment, and
|
|
7
|
+
* disposal only.
|
|
8
|
+
*/
|
|
9
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
10
|
+
import { type CommandMountDiagnostic } from './commands-mounts.js';
|
|
11
|
+
import { type HooksMountDiagnostic } from './hooks-mounts.js';
|
|
12
|
+
import { type McpMountDiagnostic } from './mcp-mounts.js';
|
|
13
|
+
import type { Suite } from '../model/types.js';
|
|
14
|
+
/** Diagnostics returned by one runtime reconciliation pass. */
|
|
15
|
+
export interface RuntimeDiagnostics {
|
|
16
|
+
mcp: McpMountDiagnostic[];
|
|
17
|
+
commands: CommandMountDiagnostic[];
|
|
18
|
+
hooks: HooksMountDiagnostic[];
|
|
19
|
+
errors: Array<{
|
|
20
|
+
surface: 'mcp' | 'commands' | 'hooks';
|
|
21
|
+
reason: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export declare class RuntimeReconciler {
|
|
25
|
+
private readonly mcp;
|
|
26
|
+
private readonly commands;
|
|
27
|
+
private readonly hooks;
|
|
28
|
+
constructor(ctx: Context, dataRoot: string);
|
|
29
|
+
/** Reconcile all runtime surfaces against one enabled-suite snapshot. */
|
|
30
|
+
reconcile(enabledSuites: readonly Suite[]): Promise<RuntimeDiagnostics>;
|
|
31
|
+
/** Dispose all live mounts and registrations. */
|
|
32
|
+
dispose(): Promise<void>;
|
|
33
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { SkillCandidate, SkillDefinition, SkillLookupOptions, SkillProvider } from '@deepseek-ai/dsh-skill';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Catalog } from '../application/catalog.js';
|
|
3
3
|
export declare const SUITE_PROJECT_SOURCE = "agent-plugin-project";
|
|
4
4
|
export declare const SUITE_USER_SOURCE = "agent-plugin-user";
|
|
5
5
|
export declare class SuiteSkillProvider implements SkillProvider {
|
|
6
6
|
private readonly manager;
|
|
7
7
|
readonly name = "agent-plugin";
|
|
8
|
-
constructor(manager:
|
|
8
|
+
constructor(manager: Catalog);
|
|
9
9
|
list(options: SkillLookupOptions): Promise<SkillCandidate[]>;
|
|
10
10
|
/** Parse `agents/*.md` of one suite into agent-definition candidates. */
|
|
11
11
|
private agentsOf;
|
|
12
|
-
get(candidate: SkillCandidate,
|
|
12
|
+
get(candidate: SkillCandidate, _options: SkillLookupOptions): Promise<SkillDefinition | undefined>;
|
|
13
13
|
private candidateFor;
|
|
14
14
|
private locate;
|
|
15
15
|
private locateProject;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Host-private adapter for observing model-facing MCP tools. */
|
|
2
|
+
/** One MCP tool observed from the DSH tool registry. */
|
|
3
|
+
export interface McpToolSnapshot {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Read MCP tool names from the dsh-tools runtime when available.
|
|
9
|
+
*
|
|
10
|
+
* The registry has no public listing API in the current host release. This
|
|
11
|
+
* adapter uses the observed `layers.merge(...).tools.entries()` data shape and
|
|
12
|
+
* returns an empty observation when a host changes it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function inspectToolRegistry(runtime: unknown): McpToolSnapshot[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agent-plugins-market",
|
|
3
3
|
"description": "The standard way to install Claude Code / Codex / Cursor / Kimi plugin marketplace suites in DeepSeek Harness (DSH) — zero conversion, zero file copying. Skills, MCP servers, hooks and slash commands are injected into your dsh sessions at runtime.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/types/index.d.ts",
|
|
@@ -23,13 +23,6 @@
|
|
|
23
23
|
"README.md",
|
|
24
24
|
"README.zh.md"
|
|
25
25
|
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
28
|
-
"build": "tsc -p tsconfig.json && pnpm run build:client",
|
|
29
|
-
"build:client": "tsdown && node scripts/normalize-client-banner.mjs",
|
|
30
|
-
"test": "vitest run",
|
|
31
|
-
"prepack": "pnpm run build"
|
|
32
|
-
},
|
|
33
26
|
"dsh": {
|
|
34
27
|
"bundle": {
|
|
35
28
|
"patch": "./cordis.patch.yml"
|
|
@@ -45,6 +38,9 @@
|
|
|
45
38
|
"platform": "web"
|
|
46
39
|
}
|
|
47
40
|
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22"
|
|
43
|
+
},
|
|
48
44
|
"license": "MIT",
|
|
49
45
|
"repository": {
|
|
50
46
|
"type": "git",
|
|
@@ -80,9 +76,9 @@
|
|
|
80
76
|
],
|
|
81
77
|
"peerDependencies": {
|
|
82
78
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
83
|
-
"@deepseek-ai/dsh-hooks-claude-code": "^0.1.0-rc.
|
|
84
|
-
"@deepseek-ai/dsh-mcp-client": "^0.1.0-rc.
|
|
85
|
-
"@deepseek-ai/dsh-skill": "^0.1.0-rc.
|
|
79
|
+
"@deepseek-ai/dsh-hooks-claude-code": "^0.1.0-rc.8",
|
|
80
|
+
"@deepseek-ai/dsh-mcp-client": "^0.1.0-rc.8",
|
|
81
|
+
"@deepseek-ai/dsh-skill": "^0.1.0-rc.8"
|
|
86
82
|
},
|
|
87
83
|
"peerDependenciesMeta": {
|
|
88
84
|
"@deepseek-ai/dsh-mcp-client": {
|
|
@@ -98,24 +94,43 @@
|
|
|
98
94
|
},
|
|
99
95
|
"devDependencies": {
|
|
100
96
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
101
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.
|
|
102
|
-
"@deepseek-ai/dsh-hooks-claude-code": "0.1.0-rc.
|
|
103
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.
|
|
104
|
-
"@deepseek-ai/dsh-mcp-client": "^0.1.0-rc.
|
|
105
|
-
"@deepseek-ai/dsh-skill": "^0.1.0-rc.
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.0-rc.8",
|
|
98
|
+
"@deepseek-ai/dsh-hooks-claude-code": "0.1.0-rc.8",
|
|
99
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
|
|
100
|
+
"@deepseek-ai/dsh-mcp-client": "^0.1.0-rc.8",
|
|
101
|
+
"@deepseek-ai/dsh-skill": "^0.1.0-rc.8",
|
|
102
|
+
"@eslint/js": "^9.39.5",
|
|
106
103
|
"@tsdown/css": "^0.22.14",
|
|
107
104
|
"@types/node": "^22.15.0",
|
|
108
105
|
"@types/react": "~18.3.1",
|
|
109
106
|
"@types/react-dom": "^19.2.4",
|
|
107
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
108
|
+
"dependency-cruiser": "^18.2.0",
|
|
109
|
+
"eslint": "^9.39.5",
|
|
110
110
|
"jsdom": "^30.0.1",
|
|
111
|
+
"prettier": "^3.9.6",
|
|
111
112
|
"react": "^18.3.1",
|
|
112
113
|
"react-dom": "~18.3.1",
|
|
113
114
|
"tsdown": "^0.22.14",
|
|
114
115
|
"typescript": "^5.8.3",
|
|
115
|
-
"
|
|
116
|
+
"typescript-eslint": "^8.67.0",
|
|
117
|
+
"vitest": "^4.1.10"
|
|
116
118
|
},
|
|
117
119
|
"publishConfig": {
|
|
118
120
|
"registry": "https://registry.npmjs.org/"
|
|
119
121
|
},
|
|
120
|
-
"homepage": "https://www.npmjs.com/package/dsh-agent-plugins-market"
|
|
121
|
-
|
|
122
|
+
"homepage": "https://www.npmjs.com/package/dsh-agent-plugins-market",
|
|
123
|
+
"scripts": {
|
|
124
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
125
|
+
"build": "tsc -p tsconfig.json && pnpm run build:client",
|
|
126
|
+
"build:client": "tsdown && node scripts/normalize-client-banner.mjs",
|
|
127
|
+
"test": "vitest run",
|
|
128
|
+
"test:contract": "vitest run tests/market-contracts.test.ts tests/routes.test.ts",
|
|
129
|
+
"test:coverage": "vitest run --coverage",
|
|
130
|
+
"lint": "eslint src tests",
|
|
131
|
+
"format": "prettier --write .",
|
|
132
|
+
"format:check": "prettier --check .",
|
|
133
|
+
"check:architecture": "depcruise --validate .dependency-cruiser.cjs src",
|
|
134
|
+
"check:refactor": "pnpm run typecheck && pnpm run lint && pnpm run format:check && pnpm run test:contract && pnpm run check:architecture"
|
|
135
|
+
}
|
|
136
|
+
}
|
package/schemas/README.md
CHANGED
|
@@ -6,9 +6,6 @@ These files are pinned copies of the official Agent Plugins 1.0.0 schemas:
|
|
|
6
6
|
- spec status: version 1.0.0, working draft
|
|
7
7
|
- license: the Agent Plugins specification repository's license
|
|
8
8
|
|
|
9
|
-
They are bundled into the published package because the specification requires
|
|
10
|
-
clients to validate plugin packages without retrieving schemas at load time
|
|
11
|
-
(§7.2.1: "Clients MUST NOT retrieve a schema while loading a plugin").
|
|
9
|
+
They are bundled into the published package because the specification requires clients to validate plugin packages without retrieving schemas at load time (§7.2.1: "Clients MUST NOT retrieve a schema while loading a plugin").
|
|
12
10
|
|
|
13
|
-
Update procedure: replace both files from the upstream repository at the pinned
|
|
14
|
-
spec version and bump the spec-version references in `src/validate.ts`.
|
|
11
|
+
Update procedure: replace both files from the upstream repository at the pinned spec version and bump the spec-version references in `src/validate.ts`.
|