dsh-agent-plugins-market 0.8.0 → 0.8.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/README.md +2 -2
- package/README.zh.md +2 -2
- package/client/client.js +1594 -1732
- package/client/client.js.map +1 -1
- package/lib/application/agent-roles.js +53 -0
- package/lib/application/catalog-context.js +2 -2
- package/lib/application/catalog.js +4 -8
- package/lib/{runtime → application}/deadline.js +1 -1
- package/lib/application/details.js +3 -3
- package/lib/application/json-file.js +43 -0
- package/lib/{runtime → application/lsp}/lsp-direct-config.js +9 -7
- package/lib/application/lsp/lsp-server-state.js +17 -0
- package/lib/{runtime → application/lsp}/lsp-status.js +22 -7
- package/lib/{runtime → application/lsp}/profile-seam.js +1 -1
- package/lib/application/lsp-service.js +5 -5
- package/lib/{runtime → application/mcp}/mcp-backend.js +6 -21
- package/lib/{runtime → application/mcp}/mcp-config.js +4 -4
- package/lib/{runtime → application/mcp}/mcp-direct-config.js +8 -49
- package/lib/{runtime → application/mcp}/mcp-overrides.js +3 -5
- package/lib/{runtime → application/mcp}/mcp-status.js +13 -7
- package/lib/application/mcp-service.js +11 -35
- package/lib/application/panel-resources.js +48 -11
- package/lib/{runtime → application/panels}/user-hooks.js +2 -2
- package/lib/{runtime → application/panels}/user-store.js +2 -2
- package/lib/application/ports.js +1 -0
- package/lib/application/project-agent-roles.js +1 -1
- package/lib/{runtime → application}/server-config.js +7 -17
- package/lib/application/snapshot-cache.js +1 -1
- package/lib/application/source-store.js +3 -4
- package/lib/{runtime → application/state}/state-store.js +5 -7
- package/lib/{runtime → application/state}/storage-migration.js +4 -4
- package/lib/catalog/source-catalog.js +0 -4
- package/lib/contracts/lsp.js +1 -0
- package/lib/contracts/market.js +0 -1
- package/lib/contracts/mcp.js +1 -0
- package/lib/index.js +64 -34
- package/lib/routes.js +2 -9
- package/lib/runtime/{agent-role-router.js → agents/agent-role-router.js} +7 -53
- package/lib/runtime/{subagent-catalog.js → agents/subagent-catalog.js} +24 -16
- package/lib/runtime/core/context.js +31 -0
- package/lib/runtime/{reconciler.js → core/reconciler.js} +5 -5
- package/lib/runtime/host/failure-detail.js +58 -0
- package/lib/runtime/{feedback-tool.js → host/feedback-tool.js} +1 -1
- package/lib/runtime/host/host-locale.js +83 -0
- package/lib/runtime/{settings-namespace.js → host/settings-namespace.js} +44 -66
- package/lib/runtime/host/shell-path.js +196 -0
- package/lib/runtime/{tool-registry-observer.js → host/tool-registry-observer.js} +2 -1
- package/lib/runtime/{lsp-mounts.js → lsp/lsp-mounts.js} +69 -20
- package/lib/runtime/{mcp-client → mcp/bridge}/bridge.js +52 -22
- package/lib/runtime/{mcp-client → mcp/bridge}/connection.js +2 -2
- package/lib/runtime/{mcp-client → mcp/bridge}/oauth.js +1 -1
- package/lib/runtime/{mcp-client → mcp/bridge}/tools.js +2 -2
- package/lib/runtime/{mcp-auth-record.js → mcp/mcp-auth-record.js} +1 -1
- package/lib/runtime/{mcp-mounts.js → mcp/mcp-mounts.js} +14 -7
- package/lib/runtime/{user-commands.js → panels/user-commands.js} +3 -3
- package/lib/runtime/{user-panels.js → panels/user-panels.js} +2 -2
- package/lib/runtime/{commands-mounts.js → surfaces/commands-mounts.js} +7 -7
- package/lib/runtime/{hooks-mounts.js → surfaces/hooks-mounts.js} +2 -2
- package/lib/runtime/{project-runtime.js → surfaces/project-runtime.js} +5 -5
- package/lib/runtime/{skills-provider.js → surfaces/skills-provider.js} +4 -4
- package/lib/types/application/agent-roles.d.ts +30 -0
- package/lib/types/application/catalog.d.ts +4 -7
- package/lib/types/application/details.d.ts +1 -1
- package/lib/types/application/json-file.d.ts +12 -0
- package/lib/types/{runtime → application/lsp}/lsp-direct-config.d.ts +1 -1
- package/lib/types/{runtime → application/lsp}/lsp-status.d.ts +3 -3
- package/lib/types/{runtime → application/mcp}/mcp-backend.d.ts +24 -22
- package/lib/types/{runtime/mcp-client/config.d.ts → application/mcp/mcp-bridge-config.d.ts} +11 -1
- package/lib/types/{runtime → application/mcp}/mcp-config.d.ts +6 -7
- package/lib/types/application/mcp/mcp-direct-config.d.ts +17 -0
- package/lib/types/{runtime → application/mcp}/mcp-overrides.d.ts +1 -1
- package/lib/types/{runtime → application/mcp}/mcp-status.d.ts +7 -7
- package/lib/types/application/mcp-service.d.ts +4 -11
- package/lib/types/application/panel-resources.d.ts +9 -2
- package/lib/types/{runtime → application/panels}/user-hooks.d.ts +1 -1
- package/lib/types/{runtime → application/panels}/user-store.d.ts +1 -1
- package/lib/types/application/ports.d.ts +17 -3
- package/lib/types/application/project-agent-roles.d.ts +1 -1
- package/lib/types/application/queries.d.ts +3 -6
- package/lib/types/{runtime → application}/regions.d.ts +1 -1
- package/lib/types/{runtime → application/state}/state-store.d.ts +2 -2
- package/lib/types/catalog/source-catalog.d.ts +0 -2
- package/lib/types/contracts/lsp-status.d.ts +6 -0
- package/lib/types/contracts/lsp.d.ts +16 -0
- package/lib/types/contracts/market.d.ts +1 -4
- package/lib/types/contracts/mcp-status.d.ts +21 -2
- package/lib/types/contracts/mcp.d.ts +20 -0
- package/lib/types/index.d.ts +87 -1
- package/lib/types/model/types.d.ts +0 -14
- package/lib/types/runtime/{agent-role-router.d.ts → agents/agent-role-router.d.ts} +3 -28
- package/lib/types/runtime/{subagent-catalog.d.ts → agents/subagent-catalog.d.ts} +6 -6
- package/lib/types/runtime/core/context.d.ts +14 -0
- package/lib/types/runtime/{reconcile-scheduler.d.ts → core/reconcile-scheduler.d.ts} +2 -2
- package/lib/types/runtime/{reconciler.d.ts → core/reconciler.d.ts} +8 -8
- package/lib/types/runtime/host/failure-detail.d.ts +6 -0
- package/lib/types/runtime/host/host-locale.d.ts +66 -0
- package/lib/types/runtime/{model-catalog.d.ts → host/model-catalog.d.ts} +1 -1
- package/lib/types/runtime/{settings-namespace.d.ts → host/settings-namespace.d.ts} +42 -32
- package/lib/types/runtime/host/shell-path.d.ts +70 -0
- package/lib/types/runtime/{lsp-mounts.d.ts → lsp/lsp-mounts.d.ts} +17 -11
- package/lib/types/runtime/{mcp-client → mcp/bridge}/bridge.d.ts +1 -1
- package/lib/types/runtime/{mcp-client → mcp/bridge}/connection.d.ts +3 -11
- package/lib/types/runtime/{mcp-client → mcp/bridge}/host-contract.d.ts +1 -1
- package/lib/types/runtime/{mcp-client → mcp/bridge}/oauth.d.ts +1 -1
- package/lib/types/runtime/{mcp-client → mcp/bridge}/transport.d.ts +1 -1
- package/lib/types/runtime/{mcp-auth-record.d.ts → mcp/mcp-auth-record.d.ts} +1 -1
- package/lib/types/runtime/{mcp-credentials.d.ts → mcp/mcp-credentials.d.ts} +1 -1
- package/lib/types/runtime/{mcp-mounts.d.ts → mcp/mcp-mounts.d.ts} +5 -11
- package/lib/types/runtime/{user-commands.d.ts → panels/user-commands.d.ts} +1 -1
- package/lib/types/runtime/{user-panels.d.ts → panels/user-panels.d.ts} +1 -1
- package/lib/types/runtime/{commands-mounts.d.ts → surfaces/commands-mounts.d.ts} +2 -2
- package/lib/types/runtime/{hooks-mounts.d.ts → surfaces/hooks-mounts.d.ts} +1 -1
- package/lib/types/runtime/{project-runtime.d.ts → surfaces/project-runtime.d.ts} +3 -3
- package/lib/types/runtime/{skills-provider.d.ts → surfaces/skills-provider.d.ts} +1 -1
- package/package.json +39 -33
- package/lib/runtime/host-locale.js +0 -89
- package/lib/runtime/legacy-root-migration.js +0 -12
- package/lib/runtime/lsp-server-state.js +0 -19
- package/lib/runtime/mcp-client/json-schema-subset.js +0 -181
- package/lib/types/runtime/host-locale.d.ts +0 -31
- package/lib/types/runtime/legacy-root-migration.d.ts +0 -2
- package/lib/types/runtime/mcp-client/json-schema-subset.d.ts +0 -58
- package/lib/types/runtime/mcp-direct-config.d.ts +0 -39
- /package/lib/{runtime/mcp-client/config.js → application/mcp/mcp-bridge-config.js} +0 -0
- /package/lib/{runtime → application/mcp}/mcp-redaction.js +0 -0
- /package/lib/{runtime → application}/regions.js +0 -0
- /package/lib/runtime/{agent-role-names.js → agents/agent-role-names.js} +0 -0
- /package/lib/runtime/{mount-lifecycle.js → core/mount-lifecycle.js} +0 -0
- /package/lib/runtime/{reconcile-scheduler.js → core/reconcile-scheduler.js} +0 -0
- /package/lib/runtime/{source-auto-update.js → core/source-auto-update.js} +0 -0
- /package/lib/runtime/{timer-seat.js → core/timer-seat.js} +0 -0
- /package/lib/runtime/{model-catalog.js → host/model-catalog.js} +0 -0
- /package/lib/runtime/{plugin-message-source.js → host/plugin-message-source.js} +0 -0
- /package/lib/runtime/{mcp-client → mcp/bridge}/host-contract.js +0 -0
- /package/lib/runtime/{mcp-client → mcp/bridge}/host-seams.js +0 -0
- /package/lib/runtime/{mcp-client → mcp/bridge}/plugin-identity.js +0 -0
- /package/lib/runtime/{mcp-client → mcp/bridge}/projection.js +0 -0
- /package/lib/runtime/{mcp-client → mcp/bridge}/transport.js +0 -0
- /package/lib/runtime/{mcp-credentials.js → mcp/mcp-credentials.js} +0 -0
- /package/lib/runtime/{dynamic-context.js → surfaces/dynamic-context.js} +0 -0
- /package/lib/types/{runtime → application}/deadline.d.ts +0 -0
- /package/lib/types/{runtime → application/lsp}/lsp-server-state.d.ts +0 -0
- /package/lib/types/{runtime → application/lsp}/profile-seam.d.ts +0 -0
- /package/lib/types/{runtime → application/mcp}/mcp-redaction.d.ts +0 -0
- /package/lib/types/{runtime → application}/server-config.d.ts +0 -0
- /package/lib/types/{runtime → application/state}/storage-migration.d.ts +0 -0
- /package/lib/types/runtime/{agent-role-names.d.ts → agents/agent-role-names.d.ts} +0 -0
- /package/lib/types/runtime/{mount-lifecycle.d.ts → core/mount-lifecycle.d.ts} +0 -0
- /package/lib/types/runtime/{source-auto-update.d.ts → core/source-auto-update.d.ts} +0 -0
- /package/lib/types/runtime/{timer-seat.d.ts → core/timer-seat.d.ts} +0 -0
- /package/lib/types/runtime/{feedback-tool.d.ts → host/feedback-tool.d.ts} +0 -0
- /package/lib/types/runtime/{plugin-message-source.d.ts → host/plugin-message-source.d.ts} +0 -0
- /package/lib/types/runtime/{tool-registry-observer.d.ts → host/tool-registry-observer.d.ts} +0 -0
- /package/lib/types/runtime/{mcp-client → mcp/bridge}/host-seams.d.ts +0 -0
- /package/lib/types/runtime/{mcp-client → mcp/bridge}/plugin-identity.d.ts +0 -0
- /package/lib/types/runtime/{mcp-client → mcp/bridge}/projection.d.ts +0 -0
- /package/lib/types/runtime/{mcp-client → mcp/bridge}/tools.d.ts +0 -0
- /package/lib/types/runtime/{dynamic-context.d.ts → surfaces/dynamic-context.d.ts} +0 -0
|
@@ -8,37 +8,39 @@
|
|
|
8
8
|
* namespace (see `contracts/settings.ts`) registered by the plugin's node half:
|
|
9
9
|
* the registration is what makes the host 插件配置 tab serve our card, the
|
|
10
10
|
* client card binds it for state, and the node half watches it to remount
|
|
11
|
-
* servers when the switch flips.
|
|
12
|
-
* one-time migration from the earlier data-root `settings.json` choice.
|
|
11
|
+
* servers when the switch flips.
|
|
13
12
|
*
|
|
14
|
-
* @module
|
|
13
|
+
* @module application/mcp-backend
|
|
15
14
|
*/
|
|
16
15
|
import z from '@deepseek-ai/schemastery';
|
|
17
|
-
|
|
18
|
-
export type McpBackend
|
|
16
|
+
import type { McpBackend } from '../../contracts/mcp.js';
|
|
17
|
+
export type { McpBackend };
|
|
19
18
|
/**
|
|
20
19
|
* Schema of the market settings namespace: the switches this plugin's config
|
|
21
20
|
* card serves, with the defaults declared to the host. The values themselves
|
|
22
21
|
* belong to {@link MARKET_SETTINGS_DEFAULTS}; this schema states them, it does
|
|
23
22
|
* not own them.
|
|
24
23
|
*/
|
|
25
|
-
export declare const
|
|
26
|
-
mcpEnhanced: z<boolean, boolean>;
|
|
27
|
-
scanProjectLayouts: z<boolean, boolean>;
|
|
28
|
-
downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china">;
|
|
29
|
-
feedbackEnabled: z<boolean, boolean>;
|
|
30
|
-
autoUpdateSources: z<boolean, boolean>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
export declare const MarketSettingsFields: {
|
|
25
|
+
readonly mcpEnhanced: z<boolean, boolean, "defined">;
|
|
26
|
+
readonly scanProjectLayouts: z<boolean, boolean, "defined">;
|
|
27
|
+
readonly downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "defined">;
|
|
28
|
+
readonly feedbackEnabled: z<boolean, boolean, "defined">;
|
|
29
|
+
readonly autoUpdateSources: z<boolean, boolean, "defined">;
|
|
30
|
+
};
|
|
31
|
+
export declare const MarketSettingsSchema: z<Schemastery.ObjectS<NoInfer<{
|
|
32
|
+
readonly mcpEnhanced: z<boolean, boolean, "defined">;
|
|
33
|
+
readonly scanProjectLayouts: z<boolean, boolean, "defined">;
|
|
34
|
+
readonly downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "defined">;
|
|
35
|
+
readonly feedbackEnabled: z<boolean, boolean, "defined">;
|
|
36
|
+
readonly autoUpdateSources: z<boolean, boolean, "defined">;
|
|
37
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
38
|
+
readonly mcpEnhanced: z<boolean, boolean, "defined">;
|
|
39
|
+
readonly scanProjectLayouts: z<boolean, boolean, "defined">;
|
|
40
|
+
readonly downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "defined">;
|
|
41
|
+
readonly feedbackEnabled: z<boolean, boolean, "defined">;
|
|
42
|
+
readonly autoUpdateSources: z<boolean, boolean, "defined">;
|
|
43
|
+
}>>, "plain">;
|
|
42
44
|
/** What the host client probe reports: resolvability plus its version. */
|
|
43
45
|
export interface HostMcpClientProbe {
|
|
44
46
|
available: boolean;
|
|
@@ -8,7 +8,17 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module runtime/mcp-client/config
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
/** Automatic-reconnect tuning the transport configs carry. */
|
|
12
|
+
export interface ReconnectConfig {
|
|
13
|
+
/** Reconnect automatically after a lost connection (default true). */
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
/** First reconnect delay in milliseconds; doubles per consecutive failed attempt (default 500). */
|
|
16
|
+
initialDelayMs?: number;
|
|
17
|
+
/** Backoff ceiling in milliseconds; also the uptime after which the attempt budget resets (default 30000). */
|
|
18
|
+
maxDelayMs?: number;
|
|
19
|
+
/** Consecutive failed attempts per outage before giving up for good (default 10). */
|
|
20
|
+
maxAttempts?: number;
|
|
21
|
+
}
|
|
12
22
|
import type { McpServerPolicy } from '../../model/types.js';
|
|
13
23
|
/** Default timeout for individual MCP tool calls (ms). */
|
|
14
24
|
export declare const DEFAULT_TOOL_CALL_TIMEOUT_MS = 60000;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Config } from './mcp-
|
|
1
|
+
import type { Config } from './mcp-bridge-config.js';
|
|
2
2
|
import { type McpServerOverride, type McpSuiteOverrides } from './mcp-overrides.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { McpStatusCode } from '../../contracts/mcp-status.js';
|
|
4
|
+
import type { HarnessMcpPolicy, McpServer, McpServerPolicy, McpServerSse, McpServerStdio, McpServerStreamableHttp, Suite } from '../../model/types.js';
|
|
4
5
|
export interface McpMountRequest {
|
|
5
6
|
suiteId: string;
|
|
6
7
|
serverKey: string;
|
|
@@ -43,15 +44,13 @@ export interface ResolvedMcpPolicy {
|
|
|
43
44
|
/** Startup timeout. */
|
|
44
45
|
startupTimeout: McpTimeoutResolution;
|
|
45
46
|
}
|
|
46
|
-
export type McpMountFailureCode = 'unsupported-transport' | 'missing-credential' | 'credential-error' | 'unmount-failed' | 'mount-failed'
|
|
47
|
-
/** The derived serverName's namespace is already mounted by another MCP client — informational, not a failure. */
|
|
48
|
-
| 'foreign-mount'
|
|
49
|
-
/** Another source's identical suite/server pair mounted first — this copy is redundant, informational. */
|
|
50
|
-
| 'duplicate-mount';
|
|
47
|
+
export type McpMountFailureCode = Extract<McpStatusCode, 'unsupported-transport' | 'missing-credential' | 'credential-error' | 'unmount-failed' | 'mount-failed' | 'foreign-mount' | 'duplicate-mount'>;
|
|
51
48
|
export interface McpMountFailure {
|
|
52
49
|
serverKey: string;
|
|
53
50
|
reason: string;
|
|
54
51
|
code?: McpMountFailureCode;
|
|
52
|
+
/** The messages under the failure's `cause` chain, outermost first. */
|
|
53
|
+
causes?: string[];
|
|
55
54
|
credentialRefs?: string[];
|
|
56
55
|
}
|
|
57
56
|
/** Optional DSH credential resolver used while building an in-memory mount. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type McpSuiteConfig, type Suite } from '../../model/types.js';
|
|
2
|
+
export declare const USER_MCP_SOURCE = "@user-mcp";
|
|
3
|
+
export declare const USER_MCP_SUITE = "user-mcp";
|
|
4
|
+
/**
|
|
5
|
+
* Load the user's own MCP declaration file.
|
|
6
|
+
*
|
|
7
|
+
* The suite always carries an `mcp` document — an absent or malformed
|
|
8
|
+
* `mcp.json` leaves an empty one — so callers read `.mcp.servers` directly
|
|
9
|
+
* instead of re-checking the optional field.
|
|
10
|
+
*/
|
|
11
|
+
export declare function loadUserMcpSuite(agentsRoot: string): Promise<Suite & {
|
|
12
|
+
mcp: McpSuiteConfig;
|
|
13
|
+
}>;
|
|
14
|
+
/** Add one service atomically; reject collisions and malformed config before writing. */
|
|
15
|
+
export declare function addUserMcpServer(agentsRoot: string, name: string, server: unknown): Promise<void>;
|
|
16
|
+
/** The user's hand-written MCP declaration file: `<agentsRoot>/mcp.json`. */
|
|
17
|
+
export declare function userMcpPath(agentsRoot: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { McpServerSse, McpServerStreamableHttp, McpServerStdio } from '
|
|
1
|
+
import type { McpServerSse, McpServerStreamableHttp, McpServerStdio } from '../../model/types.js';
|
|
2
2
|
/** HTTP-shaped server sources (url + headers carriers) overrides can edit. */
|
|
3
3
|
type McpServerHttp = McpServerStreamableHttp | McpServerSse;
|
|
4
4
|
/** The largest timeout a bridge config and the host timer can hold. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { McpSuiteOverrides } from './mcp-overrides.js';
|
|
2
|
-
import type { McpStatusPayload } from '
|
|
3
|
-
import {
|
|
4
|
-
import type { Suite } from '
|
|
5
|
-
export type { McpStatusEntry, McpStatusPayload, McpStatusKind, McpStatusState } from '
|
|
6
|
-
export {
|
|
7
|
-
export type { McpToolSnapshot } from './tool-registry-observer.js';
|
|
2
|
+
import type { McpStatusCode, McpStatusPayload } from '../../contracts/mcp-status.js';
|
|
3
|
+
import type { McpToolSnapshot } from '../ports.js';
|
|
4
|
+
import type { Suite } from '../../model/types.js';
|
|
5
|
+
export type { McpStatusEntry, McpStatusPayload, McpStatusKind, McpStatusState } from '../../contracts/mcp-status.js';
|
|
6
|
+
export type { McpToolSnapshot };
|
|
8
7
|
export interface McpDiagnostic {
|
|
9
8
|
suiteId: string;
|
|
10
9
|
serverKey: string;
|
|
11
10
|
reason: string;
|
|
12
|
-
code?:
|
|
11
|
+
code?: McpStatusCode;
|
|
12
|
+
causes?: string[];
|
|
13
13
|
credentialRefs?: string[];
|
|
14
14
|
}
|
|
15
15
|
/** Build status rows from discovered plugin MCP definitions and observed tool names. */
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { McpStatusPayload } from '
|
|
1
|
+
import type { McpStatusPayload } from './mcp/mcp-status.js';
|
|
2
2
|
import type { ServerConfigPayload } from '../contracts/market.js';
|
|
3
3
|
import type { Suite } from '../model/types.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import type
|
|
7
|
-
import { type McpServerOverride, type McpSuiteOverrides } from '../runtime/mcp-overrides.js';
|
|
4
|
+
import type { McpBackend } from '../contracts/mcp.js';
|
|
5
|
+
import type { McpMountDiagnostic } from '../contracts/mcp.js';
|
|
6
|
+
import { type McpServerOverride, type McpSuiteOverrides } from './mcp/mcp-overrides.js';
|
|
8
7
|
import type { CatalogContext } from './catalog-context.js';
|
|
9
8
|
import type { CatalogPorts, McpBackendInfo } from './ports.js';
|
|
10
9
|
import type { SourceStore } from './source-store.js';
|
|
@@ -19,12 +18,6 @@ export declare class McpService {
|
|
|
19
18
|
status(): Promise<McpStatusPayload>;
|
|
20
19
|
/** Persist a user-owned MCP service and reconcile its bridge mount. */
|
|
21
20
|
addServer(name: string, server: unknown): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
* Import several pasted services in one write. Each entry is checked on its
|
|
24
|
-
* own and reports back with its own outcome, so a paste of many services
|
|
25
|
-
* never fails as a block.
|
|
26
|
-
*/
|
|
27
|
-
importServers(servers: unknown, overwrite: boolean): Promise<McpImportResult>;
|
|
28
21
|
/** Read effective service configuration without exposing credential literals. */
|
|
29
22
|
serverConfig(kind: 'mcp' | 'lsp', id: string): Promise<ServerConfigPayload>;
|
|
30
23
|
/**
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { UserPanelEntryWire, UserPanelKind } from '../contracts/market.js';
|
|
2
|
-
|
|
2
|
+
/** The user-panel store surface the panel resources drive (structural). */
|
|
3
|
+
interface UserPanelEntries {
|
|
4
|
+
list(strict?: boolean): Promise<UserPanelEntryWire[]>;
|
|
5
|
+
create(name: string, text: string): Promise<UserPanelEntryWire>;
|
|
6
|
+
update(name: string, text: string): Promise<void>;
|
|
7
|
+
remove(name: string): Promise<void>;
|
|
8
|
+
}
|
|
3
9
|
import type { Catalog } from './catalog.js';
|
|
4
10
|
/** The routes consume this structural surface, also implemented by user-only stores in tests. */
|
|
5
11
|
export interface PanelResourceStore {
|
|
@@ -18,4 +24,5 @@ export interface PanelResourceStore {
|
|
|
18
24
|
export declare function pluginResourceId(sourceId: string, suiteId: string, kind: UserPanelKind, name: string): string;
|
|
19
25
|
/** Whether a panel entry id addresses a file inside an installed suite. */
|
|
20
26
|
export declare function isPluginResourceId(id: string): boolean;
|
|
21
|
-
export declare function createPanelResources(catalog: Catalog, users: Record<UserPanelKind,
|
|
27
|
+
export declare function createPanelResources(catalog: Catalog, users: Record<UserPanelKind, UserPanelEntries>): Record<UserPanelKind, PanelResourceStore>;
|
|
28
|
+
export {};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* to that directory. Skills also accept the cross-tool directory spelling
|
|
12
12
|
* (`<name>/SKILL.md`) that other Agent tools and the harness's own reader of
|
|
13
13
|
* `~/.agents/skills` author, and read it from the top level only.
|
|
14
|
-
* @module
|
|
14
|
+
* @module application/user-store
|
|
15
15
|
*/
|
|
16
16
|
/** Where user panel entries persist: `<agentsRoot>/<kind>/`. */
|
|
17
17
|
export declare function userEntryDir(agentsRoot: string, kind: 'skills' | 'commands' | 'agents'): string;
|
|
@@ -12,9 +12,21 @@
|
|
|
12
12
|
import type { LspServerSpec, SourceKind } from '../model/types.js';
|
|
13
13
|
export type { McpBackendInfo } from '../contracts/market.js';
|
|
14
14
|
import type { DownloadRegionSetting } from '../contracts/settings.js';
|
|
15
|
-
import type { McpBackend } from '../
|
|
16
|
-
import type {
|
|
17
|
-
|
|
15
|
+
import type { McpBackend } from '../contracts/mcp.js';
|
|
16
|
+
import type { LspMountDiagnostic } from '../contracts/lsp.js';
|
|
17
|
+
/** One MCP tool observed from the host tool registry (structural). */
|
|
18
|
+
export interface McpToolSnapshot {
|
|
19
|
+
name: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
/** The input schema the server advertised, when the host exposes it. */
|
|
22
|
+
parameters?: unknown;
|
|
23
|
+
}
|
|
24
|
+
/** The LSP mount-registry surface the aggregator consumes (structural, for tests). */
|
|
25
|
+
export interface LspMountStatusSource {
|
|
26
|
+
diagnosticsSnapshot(): Map<string, LspMountDiagnostic>;
|
|
27
|
+
hasLiveMounts(): boolean;
|
|
28
|
+
disabledServers?(): Set<string>;
|
|
29
|
+
}
|
|
18
30
|
/** A new source: its location, optional branch, and acquisition kind. */
|
|
19
31
|
export interface SourceInput {
|
|
20
32
|
url: string;
|
|
@@ -60,6 +72,8 @@ export interface CatalogPorts {
|
|
|
60
72
|
setMcpBackend(backend: McpBackend): Promise<void>;
|
|
61
73
|
/** The persisted download-region setting. */
|
|
62
74
|
downloadRegion(): Promise<DownloadRegionSetting>;
|
|
75
|
+
/** The host locale preference ('zh' default when unset). */
|
|
76
|
+
localePreference(): string;
|
|
63
77
|
}
|
|
64
78
|
/** The seams a composition root may wire; the rest fall back to the defaults. */
|
|
65
79
|
export type CatalogPortsOverride = Partial<CatalogPorts>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type AgentRoleEntry } from '
|
|
1
|
+
import { type AgentRoleEntry } from './agent-roles.js';
|
|
2
2
|
import type { Catalog } from './catalog.js';
|
|
3
3
|
export declare function projectAgentRoles(catalog: Catalog, parent: unknown): Promise<AgentRoleEntry[]>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/** Narrow application interfaces consumed by the HTTP transport adapter. */
|
|
2
|
-
import type { McpStatusPayload } from '
|
|
2
|
+
import type { McpStatusPayload } from './mcp/mcp-status.js';
|
|
3
3
|
import type { LspLegacySeamMigration, LspStatusPayload } from '../contracts/lsp-status.js';
|
|
4
4
|
import type { OverviewPayload, SkillContent, SourceProgress, SuiteDetail } from '../contracts/market.js';
|
|
5
5
|
import type { SourceRef, SuiteSurfaceKey } from '../model/types.js';
|
|
6
|
-
import type { McpServerOverride, McpSuiteOverrides } from '
|
|
7
|
-
import type { McpBackend } from '../
|
|
8
|
-
import type { McpImportResult } from '../runtime/mcp-direct-config.js';
|
|
6
|
+
import type { McpServerOverride, McpSuiteOverrides } from './mcp/mcp-overrides.js';
|
|
7
|
+
import type { McpBackend } from '../contracts/mcp.js';
|
|
9
8
|
import type { ServerConfigPayload } from '../contracts/market.js';
|
|
10
9
|
import type { LspServerTable, McpBackendInfo, SourceInput, SourcePatch } from './ports.js';
|
|
11
10
|
/** Read-only market operations required by HTTP routes. */
|
|
@@ -25,8 +24,6 @@ export interface MarketQueries {
|
|
|
25
24
|
export interface MarketMutations {
|
|
26
25
|
saveServerConfig(kind: 'mcp' | 'lsp', id: string, config: unknown, policy?: unknown): Promise<void>;
|
|
27
26
|
addMcpServer(name: string, server: unknown): Promise<void>;
|
|
28
|
-
/** Import several pasted services in one write; each entry reports its own outcome. */
|
|
29
|
-
importMcpServers(servers: unknown, overwrite: boolean): Promise<McpImportResult>;
|
|
30
27
|
addLspServer(name: string, config: unknown): Promise<void>;
|
|
31
28
|
addSource(input: SourceInput): Promise<SourceRef>;
|
|
32
29
|
updateSource(sourceId: string, patch: SourcePatch): Promise<void>;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* can flip at any time; sources already cloned keep their proxied origin and
|
|
12
12
|
* follow it on refresh.
|
|
13
13
|
*
|
|
14
|
-
* @module
|
|
14
|
+
* @module application/regions
|
|
15
15
|
*/
|
|
16
16
|
import type { DownloadRegionSetting } from '../contracts/settings.js';
|
|
17
17
|
/** The route downloads actually take. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type SuiteState } from '
|
|
1
|
+
import { type SuiteState } from '../../model/types.js';
|
|
2
2
|
export declare const EMPTY_STATE: SuiteState;
|
|
3
3
|
/** Parse persisted state; unreadable or wrong-version files yield a contained empty state. */
|
|
4
4
|
export declare function loadState(statePath: string): Promise<SuiteState>;
|
|
5
|
-
/** Persist state atomically through the
|
|
5
|
+
/** Persist state atomically through the shared JSON document writer. */
|
|
6
6
|
export declare function saveState(statePath: string, state: SuiteState): Promise<void>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { DiscoveredSuite, SourceRef, 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<DiscoveredSuite[]>;
|
|
4
2
|
/**
|
|
5
3
|
* Discover suites plus per-source scan diagnostics for one dimension.
|
|
6
4
|
* @param scanProjectLayouts - whether the project's own native Agent directories
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
export type LspStatusKind = 'plugin' | 'direct';
|
|
4
4
|
/** Operational state rendered for an LSP server row. */
|
|
5
5
|
export type LspStatusState = 'mounted' | 'starting' | 'host-missing' | 'failed' | 'conflict' | 'disabled';
|
|
6
|
+
/** Why a row reports a reason; also the key the panel localizes it by. */
|
|
7
|
+
export type LspStatusCode = 'mount-failed' | 'unmount-failed' | 'seam-conflict' | 'host-missing';
|
|
6
8
|
/**
|
|
7
9
|
* One declared language-server row for the status surface.
|
|
8
10
|
*
|
|
@@ -34,6 +36,10 @@ export interface LspStatusEntry {
|
|
|
34
36
|
state: LspStatusState;
|
|
35
37
|
/** Latest diagnostic reason, when the state is not `mounted`/`disabled`. */
|
|
36
38
|
reason?: string;
|
|
39
|
+
/** Why this row carries a reason; also the key the panel localizes it by. */
|
|
40
|
+
code?: LspStatusCode;
|
|
41
|
+
/** The messages under the failure's `cause` chain, outermost first. */
|
|
42
|
+
causes?: string[];
|
|
37
43
|
/** Whether a failed mount will be retried automatically. */
|
|
38
44
|
retryable?: boolean;
|
|
39
45
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP wire vocabulary shared by the application services and the runtime
|
|
3
|
+
* mounts: the mount-diagnostic shape the status payload carries. Contracts
|
|
4
|
+
* import nothing; these are data only.
|
|
5
|
+
* @module contracts/lsp
|
|
6
|
+
*/
|
|
7
|
+
import type { LspStatusCode } from './lsp-status.js';
|
|
8
|
+
/** One LSP mount failure as the registry records it for the status surface. */
|
|
9
|
+
export interface LspMountDiagnostic {
|
|
10
|
+
suiteId: string;
|
|
11
|
+
serverKey: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
code?: LspStatusCode;
|
|
14
|
+
/** The messages under the failure's `cause` chain, outermost first. */
|
|
15
|
+
causes?: string[];
|
|
16
|
+
}
|
|
@@ -6,7 +6,6 @@ export declare const MARKET_ROUTES: {
|
|
|
6
6
|
readonly overview: "/api/agent-plugins/overview";
|
|
7
7
|
readonly mcpStatus: "/api/agent-plugins/mcp-status";
|
|
8
8
|
readonly addMcpServer: "/api/agent-plugins/mcp-servers/add";
|
|
9
|
-
readonly importMcpServers: "/api/agent-plugins/mcp-servers/import";
|
|
10
9
|
readonly lspStatus: "/api/agent-plugins/lsp-status";
|
|
11
10
|
readonly lspServers: "/api/agent-plugins/lsp-servers";
|
|
12
11
|
readonly addLspServer: "/api/agent-plugins/lsp-servers/add";
|
|
@@ -259,8 +258,6 @@ export interface MarkdownPreview {
|
|
|
259
258
|
description?: string;
|
|
260
259
|
content: string;
|
|
261
260
|
}
|
|
262
|
-
/** Claude Code command preview alias retained for feature-specific readability. */
|
|
263
|
-
export type CommandPreview = MarkdownPreview;
|
|
264
261
|
/** Claude Code agent preview alias retained for feature-specific readability. */
|
|
265
262
|
export type AgentPreview = MarkdownPreview;
|
|
266
263
|
/** One LSP definition preview in a suite detail response. */
|
|
@@ -351,7 +348,7 @@ export interface UserPanelEntryWire {
|
|
|
351
348
|
name: string;
|
|
352
349
|
description: string;
|
|
353
350
|
disabled: boolean;
|
|
354
|
-
/** User
|
|
351
|
+
/** User entries are editable; suite-owned plugin entries answer only to the enable switch. */
|
|
355
352
|
origin: 'user' | 'plugin';
|
|
356
353
|
id?: string;
|
|
357
354
|
rawText: string;
|
|
@@ -10,6 +10,18 @@ export interface McpStatusTool {
|
|
|
10
10
|
export type McpStatusKind = 'plugin' | 'direct';
|
|
11
11
|
/** Operational state rendered for an MCP row. `foreign` = mounted by another MCP client (informational). */
|
|
12
12
|
export type McpStatusState = 'connected' | 'degraded' | 'failed' | 'needs-credentials' | 'orphaned' | 'disabled' | 'foreign';
|
|
13
|
+
/**
|
|
14
|
+
* Why a row carries a reason. The mount failures explain a failed connection;
|
|
15
|
+
* the remaining entries are the states that have something to say without
|
|
16
|
+
* being broken, and each one has its own wording in the panel.
|
|
17
|
+
*/
|
|
18
|
+
export type McpStatusCode = 'unsupported-transport' | 'missing-credential' | 'credential-error' | 'unmount-failed' | 'mount-failed' | 'foreign-mount' | 'duplicate-mount'
|
|
19
|
+
/** Tools are still registered although the surface that declared them is gone. */
|
|
20
|
+
| 'orphaned-tools'
|
|
21
|
+
/** Switched off through this plugin's own override record. */
|
|
22
|
+
| 'disabled-override'
|
|
23
|
+
/** A stored override changed the configuration the suite declares. */
|
|
24
|
+
| 'modified-override';
|
|
13
25
|
/** One MCP service row for the status surface. */
|
|
14
26
|
export interface McpStatusEntry {
|
|
15
27
|
id: string;
|
|
@@ -27,9 +39,16 @@ export interface McpStatusEntry {
|
|
|
27
39
|
endpoint?: string;
|
|
28
40
|
config?: Record<string, unknown>;
|
|
29
41
|
tools: McpStatusTool[];
|
|
42
|
+
/** The one-line diagnostic this row reports, in the words of the layer that failed. */
|
|
30
43
|
reason?: string;
|
|
31
|
-
/**
|
|
32
|
-
code?:
|
|
44
|
+
/** Why this row carries a reason; also the key the panel localizes it by. */
|
|
45
|
+
code?: McpStatusCode;
|
|
46
|
+
/**
|
|
47
|
+
* The messages under the failure's `cause` chain, outermost first. A wrapper
|
|
48
|
+
* sentence such as `initial connection … failed` names no cause by itself, so
|
|
49
|
+
* the detail that points at the real problem travels beside it.
|
|
50
|
+
*/
|
|
51
|
+
causes?: string[];
|
|
33
52
|
/** Environment-variable credential references required by this server. */
|
|
34
53
|
credentialRefs?: string[];
|
|
35
54
|
/** Whether this server advertised zero tools at observation time. Zero-tool
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP wire vocabulary shared by the host surface, the application services and
|
|
3
|
+
* the runtime mounts: the backend selector and the diagnostic shape the status
|
|
4
|
+
* payload carries. Contracts import nothing; these are data only. The mount
|
|
5
|
+
* registries narrow `code` to their own failure-code unions at the source.
|
|
6
|
+
* @module contracts/mcp
|
|
7
|
+
*/
|
|
8
|
+
import type { McpStatusCode } from './mcp-status.js';
|
|
9
|
+
/** The MCP mount backend the market uses for suite servers. */
|
|
10
|
+
export type McpBackend = 'builtin' | 'host';
|
|
11
|
+
/** One MCP mount failure as the registries record it for the status surface. */
|
|
12
|
+
export interface McpMountDiagnostic {
|
|
13
|
+
suiteId: string;
|
|
14
|
+
serverKey: string;
|
|
15
|
+
reason: string;
|
|
16
|
+
code?: McpStatusCode;
|
|
17
|
+
/** The messages under the failure's `cause` chain, outermost first. */
|
|
18
|
+
causes?: string[];
|
|
19
|
+
credentialRefs?: string[];
|
|
20
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -13,11 +13,14 @@
|
|
|
13
13
|
* self-contained: suites' MCP servers mount through the market's own bridge
|
|
14
14
|
* plugin on the host `tools` registry.
|
|
15
15
|
*/
|
|
16
|
-
import type
|
|
16
|
+
import { type Context, type Volatile } from '@deepseek-ai/cordis';
|
|
17
|
+
import z from '@deepseek-ai/schemastery';
|
|
18
|
+
import type { DownloadRegionSetting } from './contracts/settings.js';
|
|
17
19
|
import type { SourceRef } from './model/types.js';
|
|
18
20
|
export declare const name = "dsh-agent-plugins-market";
|
|
19
21
|
export declare const inject: string[];
|
|
20
22
|
/** Host configuration. */
|
|
23
|
+
/** Host configuration; the five market settings arrive as volatile references the host updates in place. */
|
|
21
24
|
export interface Config {
|
|
22
25
|
/** User-dimension suite root; defaults to `~/.dsh/agent-plugins` (`$DSH_HOME/agent-plugins`). */
|
|
23
26
|
userRoot?: string;
|
|
@@ -40,5 +43,88 @@ export interface Config {
|
|
|
40
43
|
fallbackTarball?: boolean;
|
|
41
44
|
allowHttpArchives?: boolean;
|
|
42
45
|
};
|
|
46
|
+
/** MCP mount backend switch; updated live through the host settings service. */
|
|
47
|
+
mcpEnhanced: Volatile<boolean | undefined>;
|
|
48
|
+
/** Project-layout discovery switch; updated live through the host settings service. */
|
|
49
|
+
scanProjectLayouts: Volatile<boolean | undefined>;
|
|
50
|
+
/** Download region choice; updated live through the host settings service. */
|
|
51
|
+
downloadRegion: Volatile<DownloadRegionSetting | undefined>;
|
|
52
|
+
/** Experience-feedback tool switch; updated live through the host settings service. */
|
|
53
|
+
feedbackEnabled: Volatile<boolean | undefined>;
|
|
54
|
+
/** Background source-update switch; updated live through the host settings service. */
|
|
55
|
+
autoUpdateSources: Volatile<boolean | undefined>;
|
|
43
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Schemastery projection the host loader reads: the five volatile fields become
|
|
59
|
+
* the `dsh-agent-plugins-market` settings namespace (the Plugins panel's
|
|
60
|
+
* configuration page reads it), while the startup fields stay plain.
|
|
61
|
+
*/
|
|
62
|
+
/** The schema's input face: every field optional, exactly what a profile patch may carry. */
|
|
63
|
+
export interface ConfigInput {
|
|
64
|
+
userRoot?: string | null;
|
|
65
|
+
dataRoot?: string | null;
|
|
66
|
+
sources?: unknown;
|
|
67
|
+
git?: {
|
|
68
|
+
proxy?: string | null;
|
|
69
|
+
insteadOf?: Record<string, unknown>;
|
|
70
|
+
timeoutMs?: number | null;
|
|
71
|
+
cloneRetry?: boolean | null;
|
|
72
|
+
fallbackTarball?: boolean | null;
|
|
73
|
+
allowHttpArchives?: boolean | null;
|
|
74
|
+
};
|
|
75
|
+
mcpEnhanced?: boolean | null;
|
|
76
|
+
scanProjectLayouts?: boolean | null;
|
|
77
|
+
downloadRegion?: 'auto' | 'global' | 'china' | null;
|
|
78
|
+
feedbackEnabled?: boolean | null;
|
|
79
|
+
autoUpdateSources?: boolean | null;
|
|
80
|
+
}
|
|
81
|
+
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
82
|
+
userRoot: z<string | undefined, string | undefined, "plain">;
|
|
83
|
+
dataRoot: z<string | undefined, string | undefined, "plain">;
|
|
84
|
+
sources: z<any, any, "plain">;
|
|
85
|
+
git: z<Schemastery.ObjectS<NoInfer<{
|
|
86
|
+
proxy: z<string, string, "plain">;
|
|
87
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
88
|
+
timeoutMs: z<number, number, "plain">;
|
|
89
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
90
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
91
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
92
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
93
|
+
proxy: z<string, string, "plain">;
|
|
94
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
95
|
+
timeoutMs: z<number, number, "plain">;
|
|
96
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
97
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
98
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
99
|
+
}>>, "plain">;
|
|
100
|
+
mcpEnhanced: z<boolean, boolean, "volatile-defined">;
|
|
101
|
+
scanProjectLayouts: z<boolean, boolean, "volatile-defined">;
|
|
102
|
+
downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "volatile-defined">;
|
|
103
|
+
feedbackEnabled: z<boolean, boolean, "volatile-defined">;
|
|
104
|
+
autoUpdateSources: z<boolean, boolean, "volatile-defined">;
|
|
105
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
106
|
+
userRoot: z<string | undefined, string | undefined, "plain">;
|
|
107
|
+
dataRoot: z<string | undefined, string | undefined, "plain">;
|
|
108
|
+
sources: z<any, any, "plain">;
|
|
109
|
+
git: z<Schemastery.ObjectS<NoInfer<{
|
|
110
|
+
proxy: z<string, string, "plain">;
|
|
111
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
112
|
+
timeoutMs: z<number, number, "plain">;
|
|
113
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
114
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
115
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
116
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
117
|
+
proxy: z<string, string, "plain">;
|
|
118
|
+
insteadOf: z<import("@deepseek-ai/cosmokit").Dict<string, any>, import("@deepseek-ai/cosmokit").Dict<string, any>, "plain">;
|
|
119
|
+
timeoutMs: z<number, number, "plain">;
|
|
120
|
+
cloneRetry: z<boolean, boolean, "plain">;
|
|
121
|
+
fallbackTarball: z<boolean, boolean, "plain">;
|
|
122
|
+
allowHttpArchives: z<boolean, boolean, "plain">;
|
|
123
|
+
}>>, "plain">;
|
|
124
|
+
mcpEnhanced: z<boolean, boolean, "volatile-defined">;
|
|
125
|
+
scanProjectLayouts: z<boolean, boolean, "volatile-defined">;
|
|
126
|
+
downloadRegion: z<"auto" | "global" | "china", "auto" | "global" | "china", "volatile-defined">;
|
|
127
|
+
feedbackEnabled: z<boolean, boolean, "volatile-defined">;
|
|
128
|
+
autoUpdateSources: z<boolean, boolean, "volatile-defined">;
|
|
129
|
+
}>>, "plain">;
|
|
44
130
|
export declare function apply(ctx: Context, config?: Config): Promise<void>;
|
|
@@ -112,20 +112,6 @@ export interface SuiteSurfaceCounts {
|
|
|
112
112
|
agents: number;
|
|
113
113
|
lsp: number;
|
|
114
114
|
}
|
|
115
|
-
/**
|
|
116
|
-
* Client-specific manifest data under the `com.deepseek.harness` extension
|
|
117
|
-
* namespace (Agent Plugins §8.1), carried by `plugin.json` `extensions`.
|
|
118
|
-
*/
|
|
119
|
-
export interface HarnessExtension {
|
|
120
|
-
/** Namespace contract version this suite was written against. */
|
|
121
|
-
schemaVersion: string;
|
|
122
|
-
/**
|
|
123
|
-
* Client policy for portable `mcp.json` servers, keyed by the server's own
|
|
124
|
-
* name in `mcp.json`; entries without a matching server are reported and
|
|
125
|
-
* ignored.
|
|
126
|
-
*/
|
|
127
|
-
mcpServers?: Record<string, HarnessMcpPolicy>;
|
|
128
|
-
}
|
|
129
115
|
/**
|
|
130
116
|
* dsh-owned per-server policy for a portable MCP server: OAuth 2.1
|
|
131
117
|
* authorization for servers that answer `401` with a challenge, tool
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import { type SubagentCatalogEntry } from './subagent-catalog.js';
|
|
3
|
+
import { parseAgentRole, type AgentRoleEntry, type AgentRolePolicy } from '../../application/agent-roles.js';
|
|
4
|
+
export { parseAgentRole };
|
|
5
|
+
export type { AgentRoleEntry, AgentRolePolicy };
|
|
3
6
|
export declare const AGENT_ROLE_TOOL_NAME = "subagent_role";
|
|
4
|
-
/** Panel identity is preserved so identically named cards from different suites remain addressable. */
|
|
5
|
-
export interface AgentRoleEntry {
|
|
6
|
-
name: string;
|
|
7
|
-
path: string;
|
|
8
|
-
description: string;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
title?: string;
|
|
11
|
-
rawText?: string;
|
|
12
|
-
/** Suite checkout root the card's `${PLUGIN_ROOT}` variables resolve to; absent for project-native files. */
|
|
13
|
-
suiteRoot?: string;
|
|
14
|
-
/** The suite's `${PLUGIN_DATA}` directory; absent for project-native files. */
|
|
15
|
-
suiteData?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The executable part of one card. `tools` / `disallowedTools` stay in the file
|
|
19
|
-
* and are preserved by the editors, but they are not applied.
|
|
20
|
-
*/
|
|
21
|
-
export interface AgentRolePolicy {
|
|
22
|
-
content: string;
|
|
23
|
-
model?: string;
|
|
24
|
-
provider?: string;
|
|
25
|
-
reasoningEffort?: string;
|
|
26
|
-
title?: string;
|
|
27
|
-
description?: string;
|
|
28
|
-
disabled: boolean;
|
|
29
|
-
}
|
|
30
7
|
/** Child LLM options this plugin sends; never carries inherited parent values. */
|
|
31
8
|
export interface AgentRoleOptions {
|
|
32
9
|
provider?: string;
|
|
@@ -108,8 +85,6 @@ export interface AgentRoleJobs {
|
|
|
108
85
|
run(): AgentRoleJob;
|
|
109
86
|
}): string;
|
|
110
87
|
}
|
|
111
|
-
/** Strict YAML parsing prevents malformed routing metadata from silently inheriting wider privileges. */
|
|
112
|
-
export declare function parseAgentRole(text: string): AgentRolePolicy;
|
|
113
88
|
/**
|
|
114
89
|
* Resolve the child LLM options for one role call.
|
|
115
90
|
*
|