@dsh-libing/mcp-manager 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - 新增 MCP 管理中心:当前 profile 的受管 stdio/HTTP 配置、官方启停与独立连接测试。
6
+ - 统一工具目录、会话作用域观察与持久调用开关,覆盖 native 和 PTC 子调用。
7
+ - 对齐官方页面、按钮、图标与弹窗,提供中英文使用说明;搜索提示字体及颜色参考官方添加插件输入框。
8
+
9
+ - 工作区与会话选择沿用技能中心的双列表单,窄屏改为单列;profile 单独说明,会话标签统一为“会话”。
10
+ - 修正官方工具来源识别,核对已加载提供方、预设作用域、服务和实际工具定义。
package/README.md CHANGED
@@ -1,3 +1,39 @@
1
- # Temporary Holding Version
1
+ # @dsh-libing/mcp-manager
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 适配 DSH `0.2.0-rc.2` 的 TypeScript MCP 管理中心。侧栏「MCP 管理中心」提供两个页签:统一工具目录与 MCP 服务配置。
4
+
5
+ ## 安装与开发
6
+
7
+ ```sh
8
+ pnpm run pack
9
+ dsh plugin --profile web add --save-exact ./artifacts/dsh-libing-mcp-manager-0.1.0.tgz
10
+ dsh web
11
+ ```
12
+
13
+ 本地调试运行 `pnpm dev:market --port 18786`,在 LiBing 市场安装 MCP 管理中心。该环境隔离日常 DSH 数据。首版尚未发布 npm;发布后可安装 `@dsh-libing/mcp-manager@0.1.0`。
14
+
15
+ ## 工具目录
16
+
17
+ 选择工作区和会话,按名称、功能与来源筛选实际注册的工具。默认两行说明;详情包含参数、返回 Schema。预设暂不可用时仅展示全局工具,会话可见性保持未知。已核实归属的 DSH 内置工具归入「内置工具」,显示实际提供插件包名,例如 `ask_user_question` 对应 `@deepseek-ai/dsh-tool-ask-user`。归属按 rc.2 已核实的工具契约关联当前已加载条目,可配置工具名读取官方 Loader 的生效配置,同时核对全局/会话预设作用域、服务实例和实际定义;其他作用域的同名工具不继承标签,停用提供插件后不保留旧归属。无法确认提供方的工具标为「来源待确认」,不扫描未加载包来虚构工具。MCP 名称按实际服务命名空间关联;同名来源不明确时保留未知。
18
+
19
+ 「允许调用」规则按完整工具名持久化,影响当前 profile 的全部会话,包括后创建和预设隔离的工具服务;会话选择仅用于观察。关闭会阻止后续普通及 PTC 子调用,不撤销在途操作,不保证从模型目录隐藏。重新允许只解除本中心限制,不解除官方权限、预设限制或其他插件的拒绝。`run_code` 等内部入口保留,编排中的业务工具分别检查。
20
+
21
+ 活动会话读取真实服务与作用域;冷会话读取持久化 preset 投影并短暂租用其当前定义,不创建 Agent。页面明确区分会话可见、不可见与未知;查看当前预设不能证明旧会话保留的历史定义。
22
+
23
+ ## MCP 服务
24
+
25
+ 支持 stdio 与 Streamable HTTP。新增默认停用,保存后先「测试连接」,再明确启用;stdio 会启动本地命令,HTTP 会连接指定地址。参数每行一项,直接传递给可执行文件,不经过 shell。
26
+
27
+ 本中心创建的服务可编辑、删除;先停用再修改,服务标识保持不变。其他 profile 或会话预设配置保留来源:官方可管理目标允许启停,其余只读。已有密钥不回显,编辑时默认保留,可显式替换、删除或使用环境变量名称引用。HTTP URL 不包含认证、查询参数或片段,认证放请求头;复杂外部表达式不由本插件求值;不支持的表达式或不明确的配置覆盖保持只读。
28
+
29
+ 配置启用、加载阶段、注册工具数和最近独立测试分别显示。rc.2 没有完整公开的连接状态查询,加载完成、零工具或测试成功均不等于已有连接的实时状态。测试仅初始化并查询工具列表,不调用业务工具;失败只返回脱敏结果,检查配置和本地 DSH 日志。
30
+
31
+ 启停使用官方 pluginManager;配置新增/编辑保留 profile patch 的非受管内容,包括注释和外部 `!!js`。写入检查 revision、采用官方文件锁和原子替换,保留权限为 `0600` 的最近备份。保存与实际应用结果分开显示,必要时提示重启。手工或不遵循文件锁的外部程序仍可能存在写入竞争;冲突时刷新重试。
32
+
33
+ ## 使用与生命周期
34
+
35
+ 在普通 query 中描述希望使用的能力,模型根据工具说明选择调用。到工具目录确认所选会话提供该能力,并满足官方授权。管理中心不会注册让模型修改配置的工具。页面「使用说明」包含这套流程。
36
+
37
+ 卸载用 `dsh plugin --profile web remove @dsh-libing/mcp-manager`。卸载释放页面、请求、观察、测试连接和本中心调用限制;保留已配置的 MCP 服务及 `libing-tool-policy.json`,重新安装恢复规则。管理中心不运行时,这些规则不会继续拦截执行。
38
+
39
+ Host 需要官方 Web profile 的 connection、tools、sessionQuery、pluginManager、profileContext、loader。Host/Client 使用真实类型与 shell React,统一包图标、页面宽度、留白、按钮和 Portal 表单。`pnpm typecheck && pnpm check` 验证行为、打包和隔离安装;真实 Web 另行检查,Windows 尚未实测。
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: libing-mcp-manager
3
+ name: '@dsh-libing/mcp-manager'
package/icon.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#101114" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3v5m8-5v5M6 8h12v3a6 6 0 0 1-6 6v4M9 21h6"/></svg>
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { Mutation, ServerItem, State } from '../shared.ts';
4
+ export declare function Editor({ server, state, t, blocked, busy, error, close, save }: {
5
+ server: ServerItem | null;
6
+ state: State;
7
+ t: TranslateNS<'libingMcpManager'>;
8
+ blocked: boolean;
9
+ busy: boolean;
10
+ error: string | undefined;
11
+ close: () => void;
12
+ save: (mutation: Mutation) => Promise<boolean>;
13
+ }): ReactNode;
@@ -0,0 +1,4 @@
1
+ /** Reuse the package silhouette in the shell's theme-aware navigation color. */
2
+ import { type ReactNode } from 'react';
3
+ import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
4
+ export declare function McpIcon({ size }: Pick<PropsRuntime<'sidebar.panellist'>, 'size'>): ReactNode;
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { UseSessions } from '@deepseek-ai/dsh-client-ui-session/client';
4
+ import type { McpApi } from './api.ts';
5
+ export interface McpPageProps extends PropsLocale<'libingMcpManager'> {
6
+ api: McpApi;
7
+ useSessions: UseSessions;
8
+ }
9
+ export declare function McpPage({ api, useSessions, t }: McpPageProps): ReactNode;
10
+ export interface McpPanelProps extends PropsLocale<'libingMcpManager'> {
11
+ api: McpApi;
12
+ preferredSessionId?: string | undefined;
13
+ sessionLabels: Readonly<Record<string, string>>;
14
+ }
15
+ export declare function McpPanel({ api, t, preferredSessionId, sessionLabels }: McpPanelProps): ReactNode;
@@ -0,0 +1,6 @@
1
+ import type { Mutation, Outcome, Selection, State } from '../shared.ts';
2
+ export interface McpApi {
3
+ state(selection: Selection, signal: AbortSignal): Promise<State>;
4
+ mutate(operation: Mutation, signal: AbortSignal): Promise<Outcome>;
5
+ }
6
+ export declare const mcpApi: McpApi;
@@ -0,0 +1,10 @@
1
+ /** Owned shell contributions; the browser consumes the shell's React instance. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import type { LocaleKey } from './locales.ts';
4
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
5
+ interface LocaleNamespaceMap {
6
+ libingMcpManager: LocaleKey;
7
+ }
8
+ }
9
+ export declare const inject: string[];
10
+ export declare function apply(ctx: Context): void;
@@ -0,0 +1,116 @@
1
+ /** Product labels keep configuration, observation and policy distinct. */
2
+ export declare const zh: {
3
+ nav: string;
4
+ title: string;
5
+ subtitle: string;
6
+ refresh: string;
7
+ add: string;
8
+ help: string;
9
+ tools: string;
10
+ servers: string;
11
+ workspace: string;
12
+ session: string;
13
+ noSession: string;
14
+ untitled: string;
15
+ newSession: string;
16
+ profile: string;
17
+ ruleScope: string;
18
+ live: string;
19
+ preset: string;
20
+ global: string;
21
+ presetUnavailable: string;
22
+ search: string;
23
+ all: string;
24
+ mcp: string;
25
+ plugin: string;
26
+ core: string;
27
+ unknown: string;
28
+ allow: string;
29
+ allowLabel: string;
30
+ visible: string;
31
+ invisible: string;
32
+ visibilityUnknown: string;
33
+ denied: string;
34
+ protected: string;
35
+ details: string;
36
+ provider: string;
37
+ parameters: string;
38
+ output: string;
39
+ required: string;
40
+ optional: string;
41
+ empty: string;
42
+ noServers: string;
43
+ enable: string;
44
+ enableLabel: string;
45
+ edit: string;
46
+ remove: string;
47
+ test: string;
48
+ readonly: string;
49
+ disableFirst: string;
50
+ managed: string;
51
+ external: string;
52
+ presetSource: string;
53
+ pending: string;
54
+ loading: string;
55
+ active: string;
56
+ failed: string;
57
+ unloading: string;
58
+ phaseUnknown: string;
59
+ on: string;
60
+ off: string;
61
+ registered: string;
62
+ countUnknown: string;
63
+ connectionUnknown: string;
64
+ untested: string;
65
+ testSuccess: string;
66
+ testFailure: string;
67
+ testedAt: string;
68
+ testCount: string;
69
+ confirm: string;
70
+ cancel: string;
71
+ close: string;
72
+ confirmEnable: string;
73
+ confirmTest: string;
74
+ confirmDelete: string;
75
+ enableHelp: string;
76
+ testHelp: string;
77
+ deleteHelp: string;
78
+ name: string;
79
+ nameHelp: string;
80
+ transport: string;
81
+ url: string;
82
+ command: string;
83
+ args: string;
84
+ cwd: string;
85
+ advanced: string;
86
+ timeout: string;
87
+ reconnect: string;
88
+ credentials: string;
89
+ key: string;
90
+ action: string;
91
+ value: string;
92
+ keep: string;
93
+ replace: string;
94
+ env: string;
95
+ deleteSecret: string;
96
+ addSecret: string;
97
+ secretHelp: string;
98
+ save: string;
99
+ saveDisabled: string;
100
+ newHelp: string;
101
+ invalid: string;
102
+ applied: string;
103
+ restart: string;
104
+ overridden: string;
105
+ applyFailed: string;
106
+ tested: string;
107
+ requestFailed: string;
108
+ reading: string;
109
+ notices: string;
110
+ helpFlow: string;
111
+ helpPolicy: string;
112
+ helpSource: string;
113
+ helpUse: string;
114
+ };
115
+ export type LocaleKey = keyof typeof zh;
116
+ export declare const en: Record<LocaleKey, string>;
@@ -0,0 +1,90 @@
1
+ import type { McpApi } from './api.ts';
2
+ import type { Mutation, Selection } from '../shared.ts';
3
+ export declare function useManager(api: McpApi, preferredSessionId?: string): {
4
+ state: {
5
+ profile: string;
6
+ patchRevision: string;
7
+ policyRevision: string;
8
+ workspaceId: string;
9
+ workspaces: {
10
+ id: string;
11
+ title: string;
12
+ path: string;
13
+ }[];
14
+ sessions: {
15
+ id: string;
16
+ title: string;
17
+ cwd: string;
18
+ }[];
19
+ selectedSessionId: string | null;
20
+ scopeKind: "preset" | "live" | "global";
21
+ presetId: string | null;
22
+ tools: {
23
+ name: string;
24
+ description: string;
25
+ parameters: Record<string, unknown>;
26
+ output: unknown;
27
+ source: "unknown" | "mcp" | "plugin" | "core";
28
+ owner: string | null;
29
+ visible: boolean | null;
30
+ allowed: boolean;
31
+ protected: boolean;
32
+ }[];
33
+ servers: {
34
+ id: string;
35
+ serverName: string;
36
+ scope: string;
37
+ origin: "managed" | "profile" | "preset";
38
+ transport: string;
39
+ enabled: boolean;
40
+ phase: string | null;
41
+ toolCount: number | null;
42
+ editable: boolean;
43
+ toggleable: boolean;
44
+ config: {
45
+ serverName: string;
46
+ transport: "stdio" | "streamable-http";
47
+ command: string;
48
+ args: string[];
49
+ cwd: string;
50
+ url: string;
51
+ secrets: ({
52
+ key: string;
53
+ action: "keep";
54
+ } | {
55
+ key: string;
56
+ action: "remove";
57
+ } | {
58
+ key: string;
59
+ action: "value";
60
+ value: string;
61
+ } | {
62
+ key: string;
63
+ action: "env";
64
+ value: string;
65
+ })[];
66
+ toolCallTimeoutMs: number;
67
+ reconnect: boolean;
68
+ } | null;
69
+ credentialKeys: string[];
70
+ tested: {
71
+ ok: boolean;
72
+ at: string;
73
+ durationMs: number;
74
+ toolCount?: number | undefined;
75
+ } | null;
76
+ }[];
77
+ notices: string[];
78
+ } | undefined;
79
+ error: string | undefined;
80
+ outcome: {
81
+ application: "tested" | "applied" | "restart-required" | "overridden" | "failed";
82
+ notice?: string | undefined;
83
+ } | undefined;
84
+ busy: boolean;
85
+ loading: boolean;
86
+ blocked: boolean;
87
+ choose: (next: Selection) => void;
88
+ load: () => Promise<void>;
89
+ mutate: (operation: Mutation) => Promise<boolean>;
90
+ };
@@ -0,0 +1,314 @@
1
+ /** Authenticated protocol. Paths and raw config are never browser identities. */
2
+ import { z } from 'zod';
3
+ export declare const API = "/api/libing-mcp-manager";
4
+ export declare const MCP = "@deepseek-ai/dsh-mcp-client";
5
+ export declare const selectionSchema: z.ZodObject<{
6
+ workspaceId: z.ZodOptional<z.ZodString>;
7
+ sessionId: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strict>;
9
+ export type Selection = z.infer<typeof selectionSchema>;
10
+ export declare const secretSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
+ key: z.ZodString;
12
+ action: z.ZodLiteral<"keep">;
13
+ }, z.core.$strict>, z.ZodObject<{
14
+ key: z.ZodString;
15
+ action: z.ZodLiteral<"remove">;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ key: z.ZodString;
18
+ action: z.ZodLiteral<"value">;
19
+ value: z.ZodString;
20
+ }, z.core.$strict>, z.ZodObject<{
21
+ key: z.ZodString;
22
+ action: z.ZodLiteral<"env">;
23
+ value: z.ZodString;
24
+ }, z.core.$strict>], "action">;
25
+ export declare const configSchema: z.ZodObject<{
26
+ serverName: z.ZodString;
27
+ transport: z.ZodEnum<{
28
+ stdio: "stdio";
29
+ "streamable-http": "streamable-http";
30
+ }>;
31
+ command: z.ZodDefault<z.ZodString>;
32
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
33
+ cwd: z.ZodDefault<z.ZodString>;
34
+ url: z.ZodDefault<z.ZodString>;
35
+ secrets: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
36
+ key: z.ZodString;
37
+ action: z.ZodLiteral<"keep">;
38
+ }, z.core.$strict>, z.ZodObject<{
39
+ key: z.ZodString;
40
+ action: z.ZodLiteral<"remove">;
41
+ }, z.core.$strict>, z.ZodObject<{
42
+ key: z.ZodString;
43
+ action: z.ZodLiteral<"value">;
44
+ value: z.ZodString;
45
+ }, z.core.$strict>, z.ZodObject<{
46
+ key: z.ZodString;
47
+ action: z.ZodLiteral<"env">;
48
+ value: z.ZodString;
49
+ }, z.core.$strict>], "action">>>;
50
+ toolCallTimeoutMs: z.ZodDefault<z.ZodNumber>;
51
+ reconnect: z.ZodDefault<z.ZodBoolean>;
52
+ }, z.core.$strict>;
53
+ export type ServerConfig = z.infer<typeof configSchema>;
54
+ export declare const mutationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
55
+ kind: z.ZodLiteral<"create">;
56
+ revision: z.ZodString;
57
+ config: z.ZodObject<{
58
+ serverName: z.ZodString;
59
+ transport: z.ZodEnum<{
60
+ stdio: "stdio";
61
+ "streamable-http": "streamable-http";
62
+ }>;
63
+ command: z.ZodDefault<z.ZodString>;
64
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
65
+ cwd: z.ZodDefault<z.ZodString>;
66
+ url: z.ZodDefault<z.ZodString>;
67
+ secrets: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
68
+ key: z.ZodString;
69
+ action: z.ZodLiteral<"keep">;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ key: z.ZodString;
72
+ action: z.ZodLiteral<"remove">;
73
+ }, z.core.$strict>, z.ZodObject<{
74
+ key: z.ZodString;
75
+ action: z.ZodLiteral<"value">;
76
+ value: z.ZodString;
77
+ }, z.core.$strict>, z.ZodObject<{
78
+ key: z.ZodString;
79
+ action: z.ZodLiteral<"env">;
80
+ value: z.ZodString;
81
+ }, z.core.$strict>], "action">>>;
82
+ toolCallTimeoutMs: z.ZodDefault<z.ZodNumber>;
83
+ reconnect: z.ZodDefault<z.ZodBoolean>;
84
+ }, z.core.$strict>;
85
+ }, z.core.$strict>, z.ZodObject<{
86
+ kind: z.ZodLiteral<"update">;
87
+ id: z.ZodString;
88
+ revision: z.ZodString;
89
+ config: z.ZodObject<{
90
+ serverName: z.ZodString;
91
+ transport: z.ZodEnum<{
92
+ stdio: "stdio";
93
+ "streamable-http": "streamable-http";
94
+ }>;
95
+ command: z.ZodDefault<z.ZodString>;
96
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
97
+ cwd: z.ZodDefault<z.ZodString>;
98
+ url: z.ZodDefault<z.ZodString>;
99
+ secrets: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
100
+ key: z.ZodString;
101
+ action: z.ZodLiteral<"keep">;
102
+ }, z.core.$strict>, z.ZodObject<{
103
+ key: z.ZodString;
104
+ action: z.ZodLiteral<"remove">;
105
+ }, z.core.$strict>, z.ZodObject<{
106
+ key: z.ZodString;
107
+ action: z.ZodLiteral<"value">;
108
+ value: z.ZodString;
109
+ }, z.core.$strict>, z.ZodObject<{
110
+ key: z.ZodString;
111
+ action: z.ZodLiteral<"env">;
112
+ value: z.ZodString;
113
+ }, z.core.$strict>], "action">>>;
114
+ toolCallTimeoutMs: z.ZodDefault<z.ZodNumber>;
115
+ reconnect: z.ZodDefault<z.ZodBoolean>;
116
+ }, z.core.$strict>;
117
+ }, z.core.$strict>, z.ZodObject<{
118
+ kind: z.ZodLiteral<"delete">;
119
+ id: z.ZodString;
120
+ revision: z.ZodString;
121
+ confirm: z.ZodLiteral<true>;
122
+ }, z.core.$strict>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"enable">;
124
+ id: z.ZodString;
125
+ revision: z.ZodString;
126
+ enabled: z.ZodBoolean;
127
+ }, z.core.$strict>, z.ZodObject<{
128
+ kind: z.ZodLiteral<"policy">;
129
+ name: z.ZodString;
130
+ revision: z.ZodString;
131
+ enabled: z.ZodBoolean;
132
+ selection: z.ZodObject<{
133
+ workspaceId: z.ZodOptional<z.ZodString>;
134
+ sessionId: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strict>;
136
+ }, z.core.$strict>, z.ZodObject<{
137
+ kind: z.ZodLiteral<"probe">;
138
+ id: z.ZodString;
139
+ revision: z.ZodString;
140
+ confirm: z.ZodLiteral<true>;
141
+ }, z.core.$strict>], "kind">;
142
+ export type Mutation = z.infer<typeof mutationSchema>;
143
+ export declare const toolSchema: z.ZodObject<{
144
+ name: z.ZodString;
145
+ description: z.ZodString;
146
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
147
+ output: z.ZodNullable<z.ZodUnknown>;
148
+ source: z.ZodEnum<{
149
+ unknown: "unknown";
150
+ mcp: "mcp";
151
+ plugin: "plugin";
152
+ core: "core";
153
+ }>;
154
+ owner: z.ZodNullable<z.ZodString>;
155
+ visible: z.ZodNullable<z.ZodBoolean>;
156
+ allowed: z.ZodBoolean;
157
+ protected: z.ZodBoolean;
158
+ }, z.core.$strip>;
159
+ export declare const serverSchema: z.ZodObject<{
160
+ id: z.ZodString;
161
+ serverName: z.ZodString;
162
+ scope: z.ZodString;
163
+ origin: z.ZodEnum<{
164
+ managed: "managed";
165
+ profile: "profile";
166
+ preset: "preset";
167
+ }>;
168
+ transport: z.ZodString;
169
+ enabled: z.ZodBoolean;
170
+ phase: z.ZodNullable<z.ZodString>;
171
+ toolCount: z.ZodNullable<z.ZodNumber>;
172
+ editable: z.ZodBoolean;
173
+ toggleable: z.ZodBoolean;
174
+ config: z.ZodNullable<z.ZodObject<{
175
+ serverName: z.ZodString;
176
+ transport: z.ZodEnum<{
177
+ stdio: "stdio";
178
+ "streamable-http": "streamable-http";
179
+ }>;
180
+ command: z.ZodDefault<z.ZodString>;
181
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
182
+ cwd: z.ZodDefault<z.ZodString>;
183
+ url: z.ZodDefault<z.ZodString>;
184
+ secrets: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
185
+ key: z.ZodString;
186
+ action: z.ZodLiteral<"keep">;
187
+ }, z.core.$strict>, z.ZodObject<{
188
+ key: z.ZodString;
189
+ action: z.ZodLiteral<"remove">;
190
+ }, z.core.$strict>, z.ZodObject<{
191
+ key: z.ZodString;
192
+ action: z.ZodLiteral<"value">;
193
+ value: z.ZodString;
194
+ }, z.core.$strict>, z.ZodObject<{
195
+ key: z.ZodString;
196
+ action: z.ZodLiteral<"env">;
197
+ value: z.ZodString;
198
+ }, z.core.$strict>], "action">>>;
199
+ toolCallTimeoutMs: z.ZodDefault<z.ZodNumber>;
200
+ reconnect: z.ZodDefault<z.ZodBoolean>;
201
+ }, z.core.$strict>>;
202
+ credentialKeys: z.ZodArray<z.ZodString>;
203
+ tested: z.ZodNullable<z.ZodObject<{
204
+ ok: z.ZodBoolean;
205
+ at: z.ZodString;
206
+ durationMs: z.ZodNumber;
207
+ toolCount: z.ZodOptional<z.ZodNumber>;
208
+ }, z.core.$strip>>;
209
+ }, z.core.$strip>;
210
+ export declare const stateSchema: z.ZodObject<{
211
+ profile: z.ZodString;
212
+ patchRevision: z.ZodString;
213
+ policyRevision: z.ZodString;
214
+ workspaceId: z.ZodString;
215
+ workspaces: z.ZodArray<z.ZodObject<{
216
+ id: z.ZodString;
217
+ title: z.ZodString;
218
+ path: z.ZodString;
219
+ }, z.core.$strip>>;
220
+ sessions: z.ZodArray<z.ZodObject<{
221
+ id: z.ZodString;
222
+ title: z.ZodString;
223
+ cwd: z.ZodString;
224
+ }, z.core.$strip>>;
225
+ selectedSessionId: z.ZodNullable<z.ZodString>;
226
+ scopeKind: z.ZodEnum<{
227
+ preset: "preset";
228
+ live: "live";
229
+ global: "global";
230
+ }>;
231
+ presetId: z.ZodNullable<z.ZodString>;
232
+ tools: z.ZodArray<z.ZodObject<{
233
+ name: z.ZodString;
234
+ description: z.ZodString;
235
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
236
+ output: z.ZodNullable<z.ZodUnknown>;
237
+ source: z.ZodEnum<{
238
+ unknown: "unknown";
239
+ mcp: "mcp";
240
+ plugin: "plugin";
241
+ core: "core";
242
+ }>;
243
+ owner: z.ZodNullable<z.ZodString>;
244
+ visible: z.ZodNullable<z.ZodBoolean>;
245
+ allowed: z.ZodBoolean;
246
+ protected: z.ZodBoolean;
247
+ }, z.core.$strip>>;
248
+ servers: z.ZodArray<z.ZodObject<{
249
+ id: z.ZodString;
250
+ serverName: z.ZodString;
251
+ scope: z.ZodString;
252
+ origin: z.ZodEnum<{
253
+ managed: "managed";
254
+ profile: "profile";
255
+ preset: "preset";
256
+ }>;
257
+ transport: z.ZodString;
258
+ enabled: z.ZodBoolean;
259
+ phase: z.ZodNullable<z.ZodString>;
260
+ toolCount: z.ZodNullable<z.ZodNumber>;
261
+ editable: z.ZodBoolean;
262
+ toggleable: z.ZodBoolean;
263
+ config: z.ZodNullable<z.ZodObject<{
264
+ serverName: z.ZodString;
265
+ transport: z.ZodEnum<{
266
+ stdio: "stdio";
267
+ "streamable-http": "streamable-http";
268
+ }>;
269
+ command: z.ZodDefault<z.ZodString>;
270
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
271
+ cwd: z.ZodDefault<z.ZodString>;
272
+ url: z.ZodDefault<z.ZodString>;
273
+ secrets: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
274
+ key: z.ZodString;
275
+ action: z.ZodLiteral<"keep">;
276
+ }, z.core.$strict>, z.ZodObject<{
277
+ key: z.ZodString;
278
+ action: z.ZodLiteral<"remove">;
279
+ }, z.core.$strict>, z.ZodObject<{
280
+ key: z.ZodString;
281
+ action: z.ZodLiteral<"value">;
282
+ value: z.ZodString;
283
+ }, z.core.$strict>, z.ZodObject<{
284
+ key: z.ZodString;
285
+ action: z.ZodLiteral<"env">;
286
+ value: z.ZodString;
287
+ }, z.core.$strict>], "action">>>;
288
+ toolCallTimeoutMs: z.ZodDefault<z.ZodNumber>;
289
+ reconnect: z.ZodDefault<z.ZodBoolean>;
290
+ }, z.core.$strict>>;
291
+ credentialKeys: z.ZodArray<z.ZodString>;
292
+ tested: z.ZodNullable<z.ZodObject<{
293
+ ok: z.ZodBoolean;
294
+ at: z.ZodString;
295
+ durationMs: z.ZodNumber;
296
+ toolCount: z.ZodOptional<z.ZodNumber>;
297
+ }, z.core.$strip>>;
298
+ }, z.core.$strip>>;
299
+ notices: z.ZodArray<z.ZodString>;
300
+ }, z.core.$strip>;
301
+ export type State = z.infer<typeof stateSchema>;
302
+ export type ToolItem = z.infer<typeof toolSchema>;
303
+ export type ServerItem = z.infer<typeof serverSchema>;
304
+ export declare const outcomeSchema: z.ZodObject<{
305
+ application: z.ZodEnum<{
306
+ tested: "tested";
307
+ applied: "applied";
308
+ "restart-required": "restart-required";
309
+ overridden: "overridden";
310
+ failed: "failed";
311
+ }>;
312
+ notice: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strip>;
314
+ export type Outcome = z.infer<typeof outcomeSchema>;