dsh-agent-enhancer 0.3.5 → 0.3.7
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.en.md +32 -155
- package/README.md +32 -155
- package/lib/client/dsh/hints.d.ts.map +1 -1
- package/lib/client/dsh/plugin-hints.d.ts +1 -0
- package/lib/client/dsh/plugin-hints.d.ts.map +1 -1
- package/lib/client/dsh/settings-catalog.d.ts +2 -2
- package/lib/client/dsh/settings-catalog.d.ts.map +1 -1
- package/lib/client/dsh/settings-features.d.ts +2 -0
- package/lib/client/dsh/settings-features.d.ts.map +1 -1
- package/lib/client/dsh/settings.d.ts.map +1 -1
- package/lib/client/file-edit/address.d.ts +16 -0
- package/lib/client/file-edit/address.d.ts.map +1 -1
- package/lib/client/file-edit/open-tab.d.ts +18 -0
- package/lib/client/file-edit/open-tab.d.ts.map +1 -1
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/instructions-skills/errors.d.ts +13 -0
- package/lib/client/instructions-skills/errors.d.ts.map +1 -0
- package/lib/client/instructions-skills/guide-icon.d.ts +4 -0
- package/lib/client/instructions-skills/guide-icon.d.ts.map +1 -0
- package/lib/client/instructions-skills/install-progress-ui.d.ts +6 -0
- package/lib/client/instructions-skills/install-progress-ui.d.ts.map +1 -0
- package/lib/client/instructions-skills/kind.d.ts +9 -0
- package/lib/client/instructions-skills/kind.d.ts.map +1 -0
- package/lib/client/instructions-skills/left-nav.d.ts +30 -0
- package/lib/client/instructions-skills/left-nav.d.ts.map +1 -0
- package/lib/client/instructions-skills/markdown-preview.d.ts +10 -0
- package/lib/client/instructions-skills/markdown-preview.d.ts.map +1 -0
- package/lib/client/instructions-skills/nav-update-hints.d.ts +6 -0
- package/lib/client/instructions-skills/nav-update-hints.d.ts.map +1 -0
- package/lib/client/instructions-skills/remote.d.ts +29 -0
- package/lib/client/instructions-skills/remote.d.ts.map +1 -0
- package/lib/client/instructions-skills/slot-types.d.ts +17 -0
- package/lib/client/instructions-skills/slot-types.d.ts.map +1 -0
- package/lib/client/instructions-skills/tab.d.ts +40 -0
- package/lib/client/instructions-skills/tab.d.ts.map +1 -0
- package/lib/client/locales.d.ts +307 -1
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/manager-shell.d.ts +32 -0
- package/lib/client/manager-shell.d.ts.map +1 -0
- package/lib/client/mcp-connectors/errors.d.ts +3 -0
- package/lib/client/mcp-connectors/errors.d.ts.map +1 -0
- package/lib/client/mcp-connectors/guide-icon.d.ts +4 -0
- package/lib/client/mcp-connectors/guide-icon.d.ts.map +1 -0
- package/lib/client/mcp-connectors/kind.d.ts +4 -0
- package/lib/client/mcp-connectors/kind.d.ts.map +1 -0
- package/lib/client/mcp-connectors/left-nav.d.ts +21 -0
- package/lib/client/mcp-connectors/left-nav.d.ts.map +1 -0
- package/lib/client/mcp-connectors/remote.d.ts +26 -0
- package/lib/client/mcp-connectors/remote.d.ts.map +1 -0
- package/lib/client/mcp-connectors/slot-types.d.ts +16 -0
- package/lib/client/mcp-connectors/slot-types.d.ts.map +1 -0
- package/lib/client/mcp-connectors/tab.d.ts +11 -0
- package/lib/client/mcp-connectors/tab.d.ts.map +1 -0
- package/lib/client/remote.d.ts +13 -1
- package/lib/client/remote.d.ts.map +1 -1
- package/lib/client/rollback/user-node.d.ts +3 -1
- package/lib/client/rollback/user-node.d.ts.map +1 -1
- package/lib/client/soft-pause/action.d.ts +14 -0
- package/lib/client/soft-pause/action.d.ts.map +1 -0
- package/lib/client/soft-pause/controller.d.ts +39 -0
- package/lib/client/soft-pause/controller.d.ts.map +1 -0
- package/lib/client/soft-pause/visibility.d.ts +22 -0
- package/lib/client/soft-pause/visibility.d.ts.map +1 -0
- package/lib/client.js +4156 -1076
- package/lib/client.js.map +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/host/extra-folders/pick.d.ts +13 -0
- package/lib/host/extra-folders/pick.d.ts.map +1 -1
- package/lib/host/index.d.ts +51 -2
- package/lib/host/index.d.ts.map +1 -1
- package/lib/host/instructions-skills/content-revision.d.ts +2 -0
- package/lib/host/instructions-skills/content-revision.d.ts.map +1 -0
- package/lib/host/instructions-skills/create.d.ts +11 -0
- package/lib/host/instructions-skills/create.d.ts.map +1 -0
- package/lib/host/instructions-skills/discover.d.ts +37 -0
- package/lib/host/instructions-skills/discover.d.ts.map +1 -0
- package/lib/host/instructions-skills/fs-access.d.ts +8 -0
- package/lib/host/instructions-skills/fs-access.d.ts.map +1 -0
- package/lib/host/instructions-skills/git-source.d.ts +22 -0
- package/lib/host/instructions-skills/git-source.d.ts.map +1 -0
- package/lib/host/instructions-skills/github-archive.d.ts +16 -0
- package/lib/host/instructions-skills/github-archive.d.ts.map +1 -0
- package/lib/host/instructions-skills/install-fs.d.ts +42 -0
- package/lib/host/instructions-skills/install-fs.d.ts.map +1 -0
- package/lib/host/instructions-skills/install-ledger.d.ts +15 -0
- package/lib/host/instructions-skills/install-ledger.d.ts.map +1 -0
- package/lib/host/instructions-skills/install-progress.d.ts +23 -0
- package/lib/host/instructions-skills/install-progress.d.ts.map +1 -0
- package/lib/host/instructions-skills/install.d.ts +40 -0
- package/lib/host/instructions-skills/install.d.ts.map +1 -0
- package/lib/host/instructions-skills/io.d.ts +65 -0
- package/lib/host/instructions-skills/io.d.ts.map +1 -0
- package/lib/host/instructions-skills/paths.d.ts +25 -0
- package/lib/host/instructions-skills/paths.d.ts.map +1 -0
- package/lib/host/instructions-skills/remove-path.d.ts +20 -0
- package/lib/host/instructions-skills/remove-path.d.ts.map +1 -0
- package/lib/host/instructions-skills/scope.d.ts +4 -0
- package/lib/host/instructions-skills/scope.d.ts.map +1 -0
- package/lib/host/instructions-skills/transient-paths.d.ts +15 -0
- package/lib/host/instructions-skills/transient-paths.d.ts.map +1 -0
- package/lib/host/instructions-skills/types.d.ts +143 -0
- package/lib/host/instructions-skills/types.d.ts.map +1 -0
- package/lib/host/instructions-skills/uninstall.d.ts +44 -0
- package/lib/host/instructions-skills/uninstall.d.ts.map +1 -0
- package/lib/host/instructions-skills/update-check.d.ts +18 -0
- package/lib/host/instructions-skills/update-check.d.ts.map +1 -0
- package/lib/host/instructions-skills/zip-install.d.ts +12 -0
- package/lib/host/instructions-skills/zip-install.d.ts.map +1 -0
- package/lib/host/mcp-connectors/import-mcp-json.d.ts +11 -0
- package/lib/host/mcp-connectors/import-mcp-json.d.ts.map +1 -0
- package/lib/host/mcp-connectors/install-git.d.ts +15 -0
- package/lib/host/mcp-connectors/install-git.d.ts.map +1 -0
- package/lib/host/mcp-connectors/io.d.ts +18 -0
- package/lib/host/mcp-connectors/io.d.ts.map +1 -0
- package/lib/host/mcp-connectors/paths.d.ts +8 -0
- package/lib/host/mcp-connectors/paths.d.ts.map +1 -0
- package/lib/host/mcp-connectors/runtime.d.ts +24 -0
- package/lib/host/mcp-connectors/runtime.d.ts.map +1 -0
- package/lib/host/mcp-connectors/store.d.ts +8 -0
- package/lib/host/mcp-connectors/store.d.ts.map +1 -0
- package/lib/host/mcp-connectors/types.d.ts +113 -0
- package/lib/host/mcp-connectors/types.d.ts.map +1 -0
- package/lib/host/mcp-connectors/validate.d.ts +7 -0
- package/lib/host/mcp-connectors/validate.d.ts.map +1 -0
- package/lib/host/rpc.d.ts +856 -0
- package/lib/host/rpc.d.ts.map +1 -1
- package/lib/host/soft-pause/gate.d.ts +19 -0
- package/lib/host/soft-pause/gate.d.ts.map +1 -0
- package/lib/host/soft-pause/live.d.ts +12 -0
- package/lib/host/soft-pause/live.d.ts.map +1 -0
- package/lib/identity.d.ts +1 -1
- package/lib/index.js +4516 -454
- package/lib/index.js.map +4 -4
- package/package.json +5 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
2
|
+
import type { SkillInstallProgress, SkillInstallStage } from './install-progress.ts';
|
|
3
|
+
export type { SkillInstallProgress, SkillInstallStage };
|
|
4
|
+
export type InstructionScope = 'global' | 'shared' | 'project';
|
|
5
|
+
export interface InstructionFileEntry {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly scope: InstructionScope;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly exists: boolean;
|
|
11
|
+
readonly bytes: number | null;
|
|
12
|
+
/** True when this is the canonical project-root AGENTS.md create target. */
|
|
13
|
+
readonly createable: boolean;
|
|
14
|
+
}
|
|
15
|
+
export type SkillInstallChannelLabel = 'github' | 'zip' | 'unknown';
|
|
16
|
+
export declare function defaultSkillInstallMeta(): Pick<SkillCatalogEntry, 'installChannel' | 'updateAvailable' | 'updateSourceLabel' | 'updateCheckFailed'>;
|
|
17
|
+
export interface SkillCatalogEntry {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly description: string;
|
|
21
|
+
readonly path: string | null;
|
|
22
|
+
readonly provider: string;
|
|
23
|
+
readonly modelInvocable: boolean | null;
|
|
24
|
+
readonly userInvocable: boolean | null;
|
|
25
|
+
/** True when the skill lives under a managed install root and can be uninstalled here. */
|
|
26
|
+
readonly removable: boolean;
|
|
27
|
+
readonly installChannel: SkillInstallChannelLabel | null;
|
|
28
|
+
readonly updateAvailable: boolean;
|
|
29
|
+
readonly updateSourceLabel: string | null;
|
|
30
|
+
/** True when a GitHub update check was attempted but could not complete. */
|
|
31
|
+
readonly updateCheckFailed: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface InstructionsSkillsSnapshot {
|
|
34
|
+
readonly sessionId: SessionId;
|
|
35
|
+
readonly cwd: string;
|
|
36
|
+
readonly projectRoot: string;
|
|
37
|
+
readonly instructions: readonly InstructionFileEntry[];
|
|
38
|
+
readonly skills: readonly SkillCatalogEntry[];
|
|
39
|
+
readonly skillsSource: 'registry' | 'filesystem' | 'merged';
|
|
40
|
+
}
|
|
41
|
+
export interface UninstallSkillRequest {
|
|
42
|
+
readonly sessionId: SessionId;
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly path: string;
|
|
45
|
+
}
|
|
46
|
+
export interface UninstallSkillResult {
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly removedPath: string;
|
|
49
|
+
readonly snapshot: InstructionsSkillsSnapshot;
|
|
50
|
+
}
|
|
51
|
+
export interface ListInstructionsSkillsRequest {
|
|
52
|
+
readonly sessionId: SessionId;
|
|
53
|
+
/**
|
|
54
|
+
* When true, fetch GitHub trees to set updateAvailable (slow).
|
|
55
|
+
* Default / omit = ledger metadata only so the Skills panel can open instantly.
|
|
56
|
+
*/
|
|
57
|
+
readonly checkUpdates?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface CreateWorkspaceAgentsRequest {
|
|
60
|
+
readonly sessionId: SessionId;
|
|
61
|
+
}
|
|
62
|
+
export interface CreateWorkspaceAgentsResult {
|
|
63
|
+
readonly path: string;
|
|
64
|
+
readonly created: boolean;
|
|
65
|
+
readonly snapshot: InstructionsSkillsSnapshot;
|
|
66
|
+
}
|
|
67
|
+
export interface CreateWorkspaceSkillRequest {
|
|
68
|
+
readonly sessionId: SessionId;
|
|
69
|
+
readonly name: string;
|
|
70
|
+
}
|
|
71
|
+
export interface CreateWorkspaceSkillResult {
|
|
72
|
+
readonly path: string;
|
|
73
|
+
readonly created: boolean;
|
|
74
|
+
readonly snapshot: InstructionsSkillsSnapshot;
|
|
75
|
+
}
|
|
76
|
+
/** Install destination: Agents (`.agents/skills`) or Harness (`.dsh/skills`), user or project. */
|
|
77
|
+
export type SkillInstallTarget = 'user' | 'user-dsh' | 'project' | 'project-dsh';
|
|
78
|
+
export type SkillInstallMode = 'link' | 'copy';
|
|
79
|
+
export interface InstallSkillFromGitRequest {
|
|
80
|
+
readonly sessionId: SessionId;
|
|
81
|
+
readonly source: string;
|
|
82
|
+
readonly target: SkillInstallTarget;
|
|
83
|
+
/** When omitted / true, overwrite same-named managed installs. Pass false to refuse. */
|
|
84
|
+
readonly force?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface InstallSkillFromGitResult {
|
|
87
|
+
readonly installed: readonly {
|
|
88
|
+
readonly name: string;
|
|
89
|
+
readonly path: string;
|
|
90
|
+
readonly mode: 'link' | 'copy';
|
|
91
|
+
}[];
|
|
92
|
+
/** Skill names skipped because the destination path was locked / access-denied. */
|
|
93
|
+
readonly skippedBusy: readonly string[];
|
|
94
|
+
readonly snapshot: InstructionsSkillsSnapshot;
|
|
95
|
+
}
|
|
96
|
+
export interface InstallSkillFromZipRequest {
|
|
97
|
+
readonly sessionId: SessionId;
|
|
98
|
+
/** When omitted, the host opens a native zip file picker. */
|
|
99
|
+
readonly zipPath?: string;
|
|
100
|
+
readonly target: SkillInstallTarget;
|
|
101
|
+
/** When omitted / true, overwrite same-named managed installs. Pass false to refuse. */
|
|
102
|
+
readonly force?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface InstallSkillFromZipResult {
|
|
105
|
+
/** True when the native file picker was dismissed. */
|
|
106
|
+
readonly cancelled: boolean;
|
|
107
|
+
readonly installed: readonly {
|
|
108
|
+
readonly name: string;
|
|
109
|
+
readonly path: string;
|
|
110
|
+
readonly mode: 'link' | 'copy';
|
|
111
|
+
}[];
|
|
112
|
+
readonly zipPath: string | null;
|
|
113
|
+
readonly snapshot: InstructionsSkillsSnapshot;
|
|
114
|
+
}
|
|
115
|
+
export interface UpdateSkillFromGitRequest {
|
|
116
|
+
readonly sessionId: SessionId;
|
|
117
|
+
readonly name: string;
|
|
118
|
+
}
|
|
119
|
+
export interface UpdateSkillFromGitResult {
|
|
120
|
+
readonly updated: {
|
|
121
|
+
readonly name: string;
|
|
122
|
+
readonly path: string;
|
|
123
|
+
readonly mode: 'link' | 'copy';
|
|
124
|
+
};
|
|
125
|
+
readonly snapshot: InstructionsSkillsSnapshot;
|
|
126
|
+
}
|
|
127
|
+
/** Read SKILL.md for in-panel preview (main panel cannot open the Desktop rightbar). */
|
|
128
|
+
export interface ReadSkillDocumentRequest {
|
|
129
|
+
readonly sessionId: SessionId;
|
|
130
|
+
/** Skill folder or SKILL.md path from the catalog. */
|
|
131
|
+
readonly path: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ReadSkillDocumentResult {
|
|
134
|
+
readonly path: string;
|
|
135
|
+
readonly absolutePath: string;
|
|
136
|
+
readonly text: string;
|
|
137
|
+
readonly bytes: number;
|
|
138
|
+
}
|
|
139
|
+
export interface GetSkillInstallProgressRequest {
|
|
140
|
+
readonly sessionId: SessionId;
|
|
141
|
+
}
|
|
142
|
+
export type GetSkillInstallProgressResult = SkillInstallProgress;
|
|
143
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/host/instructions-skills/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEpF,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,CAAA;AAEvD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AAED,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAA;AAEnE,wBAAgB,uBAAuB,IAAI,IAAI,CAC7C,iBAAiB,EACjB,gBAAgB,GAAG,iBAAiB,GAAG,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AI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAClG,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAA;CAC9C;AAED,wFAAwF;AACxF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;CAC9B;AAED,MAAM,MAAM,6BAA6B,GAAG,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export { removePathRobust } from './remove-path.ts';
|
|
2
|
+
/** True when a path exists on disk, including broken junctions / symlinks. */
|
|
3
|
+
export declare function pathPresent(path: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Direct-child skill entries for `name` under one managed root
|
|
6
|
+
* (folder and/or flat `name.md`), including broken links.
|
|
7
|
+
*/
|
|
8
|
+
export declare function managedSkillEntriesForName(root: string, name: string): readonly string[];
|
|
9
|
+
/**
|
|
10
|
+
* Only allow deleting a direct child of a managed skills root
|
|
11
|
+
* (directory with SKILL.md, or a flat `name.md` file).
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveManagedSkillRemovalTarget(path: string, name: string, managedRoots: readonly string[]): string | null;
|
|
14
|
+
export declare function isRemovableManagedSkillPath(path: string | null, name: string, cwd: string, projectRoot: string, env?: NodeJS.ProcessEnv): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Remove every managed-root entry for `name` (folder and flat `.md`, including
|
|
17
|
+
* broken links). Used by uninstall and by overwrite installs.
|
|
18
|
+
*
|
|
19
|
+
* Overwrite installs must call this **after** a successful write into the
|
|
20
|
+
* install target — never before — otherwise a busy/skip failure leaves
|
|
21
|
+
* `~/.agents/skills/<name>` missing and skills-manager reports 原路径丢失.
|
|
22
|
+
*/
|
|
23
|
+
export declare function purgeManagedSkillName(options: {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly cwd: string;
|
|
26
|
+
readonly projectRoot: string;
|
|
27
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
28
|
+
/** Extra absolute paths to remove even if outside the name scan. */
|
|
29
|
+
readonly also?: readonly string[];
|
|
30
|
+
/** Skip these paths (e.g. the skill just installed into the target root). */
|
|
31
|
+
readonly exceptPaths?: readonly string[];
|
|
32
|
+
}): readonly string[];
|
|
33
|
+
export declare function uninstallManagedSkill(options: {
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly cwd: string;
|
|
37
|
+
readonly projectRoot: string;
|
|
38
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
39
|
+
readonly installLedgerRoot?: string;
|
|
40
|
+
}): {
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly removedPath: string;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/host/instructions-skills/uninstall.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAUnD,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOjD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,SAAS,MAAM,EAAE,CAYnB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,MAAM,EACZ,IAAI,E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
+
export interface GithubSkillUpdateCheck {
|
|
3
|
+
readonly updateAvailable: boolean;
|
|
4
|
+
readonly updateSourceLabel: string | null;
|
|
5
|
+
readonly updateCheckFailed: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Compare remote GitHub skill tree revision with the install ledger fingerprint.
|
|
9
|
+
* Never throws — failures yield `updateAvailable: false`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkGithubSkillUpdate(record: SkillInstallRecord, options?: {
|
|
12
|
+
readonly signal?: AbortSignal;
|
|
13
|
+
/** Reserved for archive download overrides in tests. */
|
|
14
|
+
readonly fetch?: typeof fetch;
|
|
15
|
+
}): Promise<GithubSkillUpdateCheck>;
|
|
16
|
+
/** Zip / no updateCheck / missing source never report updates. */
|
|
17
|
+
export declare function resolveUpdateFlag(record: SkillInstallRecord): Promise<boolean>;
|
|
18
|
+
//# sourceMappingURL=update-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../../../src/host/instructions-skills/update-check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAI7D,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IACzC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAA;CACpC;AAyCD;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CAC9B,GACA,OAAO,CAAC,sBAAsB,CAAC,CAqCjC;AAED,kEAAkE;AAClE,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAEpF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SkillInstallTarget } from './install-fs.ts';
|
|
2
|
+
import type { InstalledSkillRef } from './install.ts';
|
|
3
|
+
export declare function installSkillsFromZipFile(options: {
|
|
4
|
+
readonly zipPath: string;
|
|
5
|
+
readonly target: SkillInstallTarget;
|
|
6
|
+
readonly projectRoot: string;
|
|
7
|
+
readonly force: boolean;
|
|
8
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
9
|
+
readonly signal: AbortSignal;
|
|
10
|
+
readonly installLedgerRoot?: string;
|
|
11
|
+
}): Promise<readonly InstalledSkillRef[]>;
|
|
12
|
+
//# sourceMappingURL=zip-install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip-install.d.ts","sourceRoot":"","sources":["../../../src/host/instructions-skills/zip-install.ts"],"names":[],"mappings":"AAWA,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAkCrD,wBAAsB,wBAAwB,CAAC,OAAO,EAAE;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CACpC,GAAG,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAyExC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { McpTransportConfig } from './types.ts';
|
|
2
|
+
export interface ParsedMcpJsonServer {
|
|
3
|
+
readonly serverName: string;
|
|
4
|
+
readonly transport: McpTransportConfig;
|
|
5
|
+
readonly sourceLabel: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Parse Cursor / Claude Desktop style `{ "mcpServers": { name: {...} } }`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseMcpJsonText(jsonText: string): readonly ParsedMcpJsonServer[];
|
|
11
|
+
//# sourceMappingURL=import-mcp-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-mcp-json.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/import-mcp-json.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAA;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAuDD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,mBAAmB,EAAE,CAuBjF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { McpStdioConfig } from './types.ts';
|
|
2
|
+
export declare function installMcpServerFromGit(options: {
|
|
3
|
+
readonly rootDir: string;
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly source: string;
|
|
6
|
+
readonly signal: AbortSignal;
|
|
7
|
+
readonly force: boolean;
|
|
8
|
+
readonly command?: string;
|
|
9
|
+
readonly args?: readonly string[];
|
|
10
|
+
}): Promise<{
|
|
11
|
+
readonly installDir: string;
|
|
12
|
+
readonly transport: McpStdioConfig;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=install-git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-git.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/install-git.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAiFhD,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CA2EvG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { McpConnectorRuntime } from './runtime.ts';
|
|
3
|
+
import type { McpConnectorsStore } from './store.ts';
|
|
4
|
+
import type { ImportMcpJsonRequest, ImportMcpJsonResult, InstallMcpFromGitRequest, InstallMcpFromGitResult, InstallMcpFromNpxRequest, InstallMcpFromNpxResult, ListMcpConnectorToolsRequest, ListMcpConnectorToolsResult, McpConnectorsSnapshot, SetMcpConnectorEnabledRequest, SetMcpConnectorEnabledResult, UninstallMcpConnectorRequest, UninstallMcpConnectorResult, UpsertMcpConnectorRequest, UpsertMcpConnectorResult } from './types.ts';
|
|
5
|
+
export interface McpConnectorsHost {
|
|
6
|
+
readonly ctx: Context;
|
|
7
|
+
readonly store: McpConnectorsStore;
|
|
8
|
+
readonly runtime: McpConnectorRuntime;
|
|
9
|
+
}
|
|
10
|
+
export declare function listMcpConnectorsNow(host: McpConnectorsHost): Promise<McpConnectorsSnapshot>;
|
|
11
|
+
export declare function upsertMcpConnectorNow(host: McpConnectorsHost, request: UpsertMcpConnectorRequest): Promise<UpsertMcpConnectorResult>;
|
|
12
|
+
export declare function setMcpConnectorEnabledNow(host: McpConnectorsHost, request: SetMcpConnectorEnabledRequest): Promise<SetMcpConnectorEnabledResult>;
|
|
13
|
+
export declare function uninstallMcpConnectorNow(host: McpConnectorsHost, request: UninstallMcpConnectorRequest): Promise<UninstallMcpConnectorResult>;
|
|
14
|
+
export declare function installMcpFromNpxNow(host: McpConnectorsHost, request: InstallMcpFromNpxRequest): Promise<InstallMcpFromNpxResult>;
|
|
15
|
+
export declare function installMcpFromGitNow(host: McpConnectorsHost, request: InstallMcpFromGitRequest, signal: AbortSignal): Promise<InstallMcpFromGitResult>;
|
|
16
|
+
export declare function importMcpJsonNow(host: McpConnectorsHost, request: ImportMcpJsonRequest): Promise<ImportMcpJsonResult>;
|
|
17
|
+
export declare function listMcpConnectorToolsNow(host: McpConnectorsHost, request: ListMcpConnectorToolsRequest): ListMcpConnectorToolsResult;
|
|
18
|
+
//# sourceMappingURL=io.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/io.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAMlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,4BAA4B,EAC5B,2BAA2B,EAE3B,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EA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DataPackageRoot: string): string;
|
|
3
|
+
export declare function mcpConnectorsLedgerPath(root: string): string;
|
|
4
|
+
export declare function mcpServersRoot(root: string): string;
|
|
5
|
+
export declare function mcpServerInstallDir(root: string, id: string): string;
|
|
6
|
+
/** Resolve default plugin-data package root for desktop profile. */
|
|
7
|
+
export declare function defaultPluginDataPackageRoot(dshHome: string): string;
|
|
8
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/paths.ts"],"names":[],"mappings":"AAGA,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,oEAAoE;AACpE,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { McpConnectorsStore } from './store.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Mounts one official `@deepseek-ai/dsh-mcp-client` fiber per enabled connector.
|
|
5
|
+
*/
|
|
6
|
+
export declare class McpConnectorRuntime {
|
|
7
|
+
private readonly ctx;
|
|
8
|
+
private readonly store;
|
|
9
|
+
private readonly mounts;
|
|
10
|
+
private module;
|
|
11
|
+
private bridgeError;
|
|
12
|
+
private featureEnabled;
|
|
13
|
+
constructor(ctx: Context, store: McpConnectorsStore);
|
|
14
|
+
get bridgeAvailable(): boolean;
|
|
15
|
+
get lastBridgeError(): string | null;
|
|
16
|
+
setFeatureEnabled(enabled: boolean): void;
|
|
17
|
+
ensureBridge(): Promise<boolean>;
|
|
18
|
+
disposeAll(): Promise<void>;
|
|
19
|
+
private disposeOne;
|
|
20
|
+
private mountOne;
|
|
21
|
+
/** Reconcile mounted fibers with the ledger (and feature gate). */
|
|
22
|
+
sync(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAiB,MAAM,qBAAqB,CAAA;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAsCpD;;GAEG;AACH,qBAAa,mBAAmB;IAO5B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IACxD,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,cAAc,CAAO;gBAGV,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,kBAAkB;IAG5C,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAEnC;IAED,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAInC,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;IAqBhC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;YAOnB,UAAU;YAYV,QAAQ;IAmBtB,mEAAmE;IAC7D,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAoC5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type McpConnectorEntry, type McpConnectorsDocument } from './types.ts';
|
|
2
|
+
export interface McpConnectorsStore {
|
|
3
|
+
readonly rootDir: string;
|
|
4
|
+
load(): McpConnectorsDocument;
|
|
5
|
+
save(connectors: readonly McpConnectorEntry[]): McpConnectorsDocument;
|
|
6
|
+
}
|
|
7
|
+
export declare function createMcpConnectorsStore(rootDir: string): McpConnectorsStore;
|
|
8
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/store.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAG3B,MAAM,YAAY,CAAA;AAGnB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,IAAI,IAAI,qBAAqB,CAAA;IAC7B,IAAI,CAAC,UAAU,EAAE,SAAS,iBAAiB,EAAE,GAAG,qBAAqB,CAAA;CACtE;AAyFD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CA+B5E"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/** MCP connector ledger + RPC types (enhancer-managed; mounts official dsh-mcp-client). */
|
|
2
|
+
export declare const MCP_CONNECTORS_VERSION: 1;
|
|
3
|
+
export type McpTransport = 'stdio' | 'streamable-http';
|
|
4
|
+
export type McpInstallChannel = 'manual' | 'npx' | 'github' | 'mcpJson';
|
|
5
|
+
export interface McpStdioConfig {
|
|
6
|
+
readonly transport: 'stdio';
|
|
7
|
+
readonly command: string;
|
|
8
|
+
readonly args: readonly string[];
|
|
9
|
+
readonly env: Readonly<Record<string, string>>;
|
|
10
|
+
readonly cwd: string;
|
|
11
|
+
}
|
|
12
|
+
export interface McpHttpConfig {
|
|
13
|
+
readonly transport: 'streamable-http';
|
|
14
|
+
readonly url: string;
|
|
15
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
16
|
+
}
|
|
17
|
+
export type McpTransportConfig = McpStdioConfig | McpHttpConfig;
|
|
18
|
+
export interface McpConnectorEntry {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly serverName: string;
|
|
21
|
+
readonly enabled: boolean;
|
|
22
|
+
readonly channel: McpInstallChannel;
|
|
23
|
+
readonly sourceLabel: string | null;
|
|
24
|
+
readonly transport: McpTransportConfig;
|
|
25
|
+
readonly createdAt: number;
|
|
26
|
+
readonly updatedAt: number;
|
|
27
|
+
}
|
|
28
|
+
export interface McpConnectorsDocument {
|
|
29
|
+
readonly version: typeof MCP_CONNECTORS_VERSION;
|
|
30
|
+
readonly connectors: readonly McpConnectorEntry[];
|
|
31
|
+
}
|
|
32
|
+
export interface McpConnectorsSnapshot {
|
|
33
|
+
readonly connectors: readonly McpConnectorEntry[];
|
|
34
|
+
readonly bridgeAvailable: boolean;
|
|
35
|
+
readonly bridgeError: string | null;
|
|
36
|
+
}
|
|
37
|
+
export interface ListMcpConnectorsRequest {
|
|
38
|
+
readonly unused?: never;
|
|
39
|
+
}
|
|
40
|
+
export interface UpsertMcpConnectorRequest {
|
|
41
|
+
readonly id?: string;
|
|
42
|
+
readonly serverName: string;
|
|
43
|
+
readonly enabled?: boolean;
|
|
44
|
+
readonly channel?: McpInstallChannel;
|
|
45
|
+
readonly sourceLabel?: string | null;
|
|
46
|
+
readonly transport: McpTransportConfig;
|
|
47
|
+
}
|
|
48
|
+
export interface UpsertMcpConnectorResult {
|
|
49
|
+
readonly connector: McpConnectorEntry;
|
|
50
|
+
readonly snapshot: McpConnectorsSnapshot;
|
|
51
|
+
}
|
|
52
|
+
export interface SetMcpConnectorEnabledRequest {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
readonly enabled: boolean;
|
|
55
|
+
}
|
|
56
|
+
export interface SetMcpConnectorEnabledResult {
|
|
57
|
+
readonly connector: McpConnectorEntry;
|
|
58
|
+
readonly snapshot: McpConnectorsSnapshot;
|
|
59
|
+
}
|
|
60
|
+
export interface UninstallMcpConnectorRequest {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UninstallMcpConnectorResult {
|
|
64
|
+
readonly id: string;
|
|
65
|
+
readonly snapshot: McpConnectorsSnapshot;
|
|
66
|
+
}
|
|
67
|
+
export interface InstallMcpFromNpxRequest {
|
|
68
|
+
readonly serverName: string;
|
|
69
|
+
readonly packageName: string;
|
|
70
|
+
readonly extraArgs?: readonly string[];
|
|
71
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
72
|
+
readonly enabled?: boolean;
|
|
73
|
+
readonly force?: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface InstallMcpFromNpxResult {
|
|
76
|
+
readonly connector: McpConnectorEntry;
|
|
77
|
+
readonly snapshot: McpConnectorsSnapshot;
|
|
78
|
+
}
|
|
79
|
+
export interface InstallMcpFromGitRequest {
|
|
80
|
+
readonly serverName: string;
|
|
81
|
+
readonly source: string;
|
|
82
|
+
readonly command?: string;
|
|
83
|
+
readonly args?: readonly string[];
|
|
84
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
85
|
+
readonly enabled?: boolean;
|
|
86
|
+
readonly force?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface InstallMcpFromGitResult {
|
|
89
|
+
readonly connector: McpConnectorEntry;
|
|
90
|
+
readonly snapshot: McpConnectorsSnapshot;
|
|
91
|
+
}
|
|
92
|
+
export interface ImportMcpJsonRequest {
|
|
93
|
+
readonly jsonText: string;
|
|
94
|
+
readonly enabled?: boolean;
|
|
95
|
+
readonly force?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface ImportMcpJsonResult {
|
|
98
|
+
readonly imported: readonly McpConnectorEntry[];
|
|
99
|
+
readonly skipped: readonly string[];
|
|
100
|
+
readonly snapshot: McpConnectorsSnapshot;
|
|
101
|
+
}
|
|
102
|
+
export interface ListMcpConnectorToolsRequest {
|
|
103
|
+
readonly serverName: string;
|
|
104
|
+
}
|
|
105
|
+
export interface McpConnectorToolInfo {
|
|
106
|
+
readonly name: string;
|
|
107
|
+
readonly description: string;
|
|
108
|
+
}
|
|
109
|
+
export interface ListMcpConnectorToolsResult {
|
|
110
|
+
readonly serverName: string;
|
|
111
|
+
readonly tools: readonly McpConnectorToolInfo[];
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/types.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAE3F,eAAO,MAAM,sBAAsB,EAAG,CAAU,CAAA;AAEhD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,iBAAiB,CAAA;AAEtD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEvE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC9C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACnD;AAED,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,aAAa,CAAA;AAE/D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,iBAAiB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AW,uBAAuB;IACtC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAA;CACzC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAA;IAC/C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAA;CACzC;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAA;CAChD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { McpTransportConfig } from './types.ts';
|
|
2
|
+
/** Official dsh-mcp-client serverName pattern. */
|
|
3
|
+
export declare const MCP_SERVER_NAME_PATTERN: RegExp;
|
|
4
|
+
export declare function assertServerName(serverName: string): string;
|
|
5
|
+
export declare function assertTransport(transport: McpTransportConfig): McpTransportConfig;
|
|
6
|
+
export declare function newConnectorId(): string;
|
|
7
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/host/mcp-connectors/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,QAA0B,CAAA;AAE9D,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAS3D;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,kBAAkB,GAAG,kBAAkB,CA4BjF;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|