@rezti/dsh-rez-suite 0.1.3 → 0.1.5

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 CHANGED
@@ -8,4 +8,4 @@ dsh plugin --profile web add @rezti/dsh-rez-suite
8
8
 
9
9
  组成见仓库根 README。子包不要单独 `dsh plugin add`。
10
10
 
11
- 个人微信(QClaw/ClawBot)在 Rez 面板「微信」页扫码,然后直接在微信里说话。
11
+ 配置在 **设置 → 插件 → 插件配置** 展开 **ReZ-TI**(同页还有独立的 ReZ-TI 标签)。个人微信在卡片的「微信」页扫码,然后直接在微信里说话。
package/README.zh.md CHANGED
@@ -6,8 +6,8 @@
6
6
  dsh plugin --profile web add @rezti/dsh-rez-suite
7
7
  ```
8
8
 
9
- 密钥用环境变量或 dsh-credentials:`REZ_ODOO_TOKEN`、`REZ_NEXTCLOUD_PASSWORD`、`REZ_WECHAT_WEBHOOK`、`REZ_HA_TOKEN`。
9
+ 密钥用环境变量或 dsh-credentials:`REZ_ODOO_TOKEN`、`REZ_NEXTCLOUD_PASSWORD`、`REZ_WECHAT_WEBHOOK`、`REZ_HA_TOKEN`。未配置时不拉起对应 MCP。
10
10
 
11
- 个人微信(QClaw/ClawBot)在 Rez 面板「微信」页扫码,然后直接在微信里说话。
11
+ 配置在 **设置 → 插件 → 插件配置** 展开 **ReZ-TI**(同页还有独立的 ReZ-TI 标签)。个人微信在卡片的「微信」页扫码,然后直接在微信里说话。
12
12
 
13
13
  子包不要再单独 `dsh plugin add`,否则会重复注册 MCP。
package/cordis.patch.yml CHANGED
@@ -2,7 +2,9 @@
2
2
  # Subpackages are libraries resolved from this bundle's dependencies;
3
3
  # they must not also be added as DSH bundles or MCP rows will duplicate.
4
4
  #
5
- # Order: identity audit intent domain prompts official MCP clients → panel.
5
+ # MCP rows are started by the domain plugins after rezSso resolves secrets.
6
+ # Do not list @deepseek-ai/dsh-mcp-client here: empty process.env would spawn
7
+ # nextcloud-mcp-server in a reconnect loop.
6
8
  - insert:
7
9
  - id: rez-sso
8
10
  name: '@rezti/dsh-rez-sso'
@@ -12,60 +14,11 @@
12
14
  name: '@rezti/dsh-rez-intent'
13
15
  - id: rez-odoo
14
16
  name: '@rezti/dsh-rez-odoo'
15
- - id: rez-mcp-odoo
16
- name: '@deepseek-ai/dsh-mcp-client'
17
- config:
18
- serverName: odoo
19
- transport: streamable-http
20
- url: https://www.rez-ti.com/mcp
21
- headers:
22
- Authorization: !!js '`Bearer ${process.env.REZ_ODOO_TOKEN ?? ""}`'
23
- failOnStartupError: false
24
17
  - id: rez-nextcloud
25
18
  name: '@rezti/dsh-rez-nextcloud'
26
- - id: rez-mcp-nextcloud
27
- name: '@deepseek-ai/dsh-mcp-client'
28
- config:
29
- serverName: nextcloud
30
- transport: stdio
31
- command: uvx
32
- args:
33
- - nextcloud-mcp-server
34
- - run
35
- - --transport
36
- - stdio
37
- env:
38
- # App-password Basic Auth. Without this, newer nextcloud-mcp-server
39
- # auto-detects login_flow and rejects NEXTCLOUD_USERNAME.
40
- MCP_DEPLOYMENT_MODE: single_user_basic
41
- NEXTCLOUD_HOST: https://cloud.rez-ti.com
42
- NEXTCLOUD_USERNAME: rez-ti-2
43
- NEXTCLOUD_PASSWORD: !!js process.env.REZ_NEXTCLOUD_PASSWORD ?? ''
44
- failOnStartupError: false
45
19
  - id: rez-wechat
46
20
  name: '@rezti/dsh-rez-wechat'
47
- - id: rez-mcp-wechat
48
- name: '@deepseek-ai/dsh-mcp-client'
49
- config:
50
- serverName: wechat
51
- transport: stdio
52
- command: npx
53
- args:
54
- - -y
55
- - wecom-mcp
56
- env:
57
- WECOM_WEBHOOK_URL: !!js process.env.REZ_WECHAT_WEBHOOK ?? ''
58
- failOnStartupError: false
59
21
  - id: rez-ha-bridge
60
22
  name: '@rezti/dsh-rez-ha-bridge'
61
- - id: rez-mcp-homeassistant
62
- name: '@deepseek-ai/dsh-mcp-client'
63
- config:
64
- serverName: homeassistant
65
- transport: streamable-http
66
- url: http://homeassistant.local:8123/api/mcp
67
- headers:
68
- Authorization: !!js '`Bearer ${process.env.REZ_HA_TOKEN ?? ""}`'
69
- failOnStartupError: false
70
23
  - id: rez-suite
71
24
  name: '@rezti/dsh-rez-suite'
package/lib/client.d.ts CHANGED
@@ -7254,6 +7254,8 @@ declare module '@deepseek-ai/cordis' {
7254
7254
  declare const zh: {
7255
7255
  readonly 'entry.label': "Rez";
7256
7256
  readonly 'entry.tooltip': "Rez Suite 配置与审计面板";
7257
+ readonly 'settings.title': "ReZ-TI";
7258
+ readonly 'settings.description': "公司 MCP(Odoo / Nextcloud / 企微 / HA)与个人微信扫码通道。";
7257
7259
  readonly 'panel.title': "Rez Suite";
7258
7260
  readonly 'tab.config': "配置";
7259
7261
  readonly 'tab.weixin': "微信";
@@ -7340,164 +7342,29 @@ declare const zh: {
7340
7342
  };
7341
7343
  type RezKey = keyof typeof zh;
7342
7344
  //#endregion
7343
- //#region src/client/panel/controller.d.ts
7344
- /**
7345
- * Rez panel controller: single owner of open/closed state (browser session).
7346
- */
7347
- interface PanelControllerSnapshot {
7348
- panelOpen: boolean;
7349
- }
7350
- declare class PanelController {
7351
- private panelOpen;
7352
- private listeners;
7353
- getSnapshot(): PanelControllerSnapshot;
7354
- subscribe(fn: () => void): () => void;
7355
- open(): void;
7356
- close(): void;
7357
- toggle(): void;
7358
- private notify;
7359
- }
7360
- //#endregion
7361
- //#region src/protocol.d.ts
7362
- /**
7363
- * Wire contract between the host half (routes.ts / mcp-host.ts) and the
7364
- * browser half (client/api.ts). Pure types only — imported by both halves,
7365
- * bundled into each, no runtime identity to share.
7366
- */
7367
- /** MCP server id: arbitrary stable key, e.g. "odoo", "homeassistant". */
7368
- type RezServerId = string;
7369
- /** Agent role, the preset-loader key. */
7370
- type RezRoleId = 'engineer' | 'sales' | 'operations' | 'all';
7371
- /** Transport kinds the in-plugin MCP host can connect. */
7372
- type RezMcpTransport = 'stdio' | 'streamable-http';
7373
- /** One MCP server launch descriptor (standard MCP-style config). */
7374
- interface RezMcpServerSpec {
7375
- /** Master switch for this server. */
7376
- enabled: boolean;
7377
- /** stdio or streamable-http. */
7378
- transport: RezMcpTransport;
7379
- /** stdio executable (npx, uvx, node, absolute binary, ...). */
7380
- command?: string;
7381
- /** stdio args passed without shell interpolation. */
7382
- args?: string[];
7383
- /** stdio env merged over the scrubbed parent env. */
7384
- env?: Record<string, string>;
7385
- /** stdio working directory. */
7386
- cwd?: string;
7387
- /** streamable-http endpoint URL. */
7388
- url?: string;
7389
- /** streamable-http request headers (Authorization, ...). */
7390
- headers?: Record<string, string>;
7391
- /** Per-tool-call timeout in milliseconds. */
7392
- toolCallTimeoutMs?: number;
7393
- }
7394
- /** One server entry projected for the browser (secret values masked). */
7395
- type RezPublicServer = RezMcpServerSpec;
7396
- /** Config projection safe for the browser (env/header values replaced by masks). */
7397
- interface RezPublicConfig {
7398
- enabled: boolean;
7399
- role: RezRoleId;
7400
- servers: Record<string, RezPublicServer>;
7401
- billing: {
7402
- inputCostPer1k: number;
7403
- outputCostPer1k: number;
7404
- monthlyBudget: number;
7405
- };
7406
- }
7407
- /** One connectivity test outcome for one MCP server. */
7408
- interface RezTestResult {
7409
- server: RezServerId;
7410
- ok: boolean;
7411
- /** Connected, discovered tools, then closed. */
7412
- toolCount?: number;
7413
- /** Server-reported name/version when available. */
7414
- serverInfo?: string;
7415
- latencyMs?: number;
7416
- error?: string;
7417
- }
7418
- /** Live status of one MCP server slot. */
7419
- interface RezServerStatus {
7420
- server: RezServerId;
7421
- enabled: boolean;
7422
- state: 'disconnected' | 'connecting' | 'connected' | 'failed';
7423
- toolCount: number;
7424
- registeredTools: number;
7425
- lastError?: string;
7426
- startedAt?: number;
7427
- }
7428
- /** Complete /api/dsh-rez-suite/status response. */
7429
- interface RezStatusResponse {
7430
- role: RezRoleId;
7431
- servers: RezServerStatus[];
7432
- totalRegisteredTools: number;
7433
- }
7434
- /** QClaw-style WeChat channel status (scan QR, then talk in WeChat). */
7435
- type RezWeixinPhase = 'idle' | 'login' | 'need_verify' | 'listening' | 'error';
7436
- interface RezWeixinStatus {
7437
- loggedIn: boolean;
7438
- listening: boolean;
7439
- phase: RezWeixinPhase;
7440
- qrContent?: string;
7441
- qrDataUrl?: string;
7442
- hint: string;
7443
- }
7444
- /** One audit ledger row. */
7445
- interface RezAuditRecord {
7446
- id: number;
7447
- ts: number;
7448
- server: string;
7449
- tool: string;
7450
- role: string;
7451
- inputTokens: number;
7452
- outputTokens: number;
7453
- cost: number;
7454
- durationMs: number;
7455
- ok: boolean;
7456
- error?: string;
7457
- }
7458
- /** /api/dsh-rez-suite/audit response. */
7459
- interface RezAuditResponse {
7460
- totalCalls: number;
7461
- totalInputTokens: number;
7462
- totalOutputTokens: number;
7463
- totalCost: number;
7464
- monthlyBudget: number;
7465
- monthCost: number;
7466
- byServer: Record<string, {
7467
- calls: number;
7468
- tokens: number;
7469
- cost: number;
7470
- }>;
7471
- recent: RezAuditRecord[];
7472
- }
7473
- //#endregion
7474
- //#region src/client/api.d.ts
7475
- declare class RezApi {
7476
- getConfig(): Promise<RezPublicConfig>;
7477
- saveConfig(patch: unknown): Promise<RezPublicConfig>;
7478
- test(): Promise<RezTestResult[]>;
7479
- status(): Promise<RezStatusResponse>;
7480
- audit(): Promise<RezAuditResponse>;
7481
- resetAudit(): Promise<void>;
7482
- weixinStatus(): Promise<RezWeixinStatus>;
7483
- weixinLogin(): Promise<RezWeixinStatus>;
7484
- weixinVerify(code: string): Promise<RezWeixinStatus>;
7485
- weixinLogout(): Promise<RezWeixinStatus>;
7486
- }
7487
- //#endregion
7488
- //#region src/client/panel/RezPanel.d.ts
7489
- interface RezPanelProps {
7490
- controller: PanelController;
7491
- api: RezApi;
7492
- }
7493
- //#endregion
7494
7345
  //#region src/client/index.d.ts
7495
7346
  declare module '@deepseek-ai/dsh-client-ui-slots' {
7496
7347
  interface LocaleNamespaceMap {
7497
7348
  'dsh-rez-suite': RezKey;
7498
7349
  }
7350
+ interface SlotMap {
7351
+ 'settings.plugin.item': {
7352
+ kind: 'list';
7353
+ scope: 'root';
7354
+ owner: {
7355
+ children?: never;
7356
+ };
7357
+ };
7358
+ 'settings.plugins.tab': {
7359
+ kind: 'list';
7360
+ scope: 'root';
7361
+ owner: {
7362
+ children?: never;
7363
+ };
7364
+ };
7365
+ }
7499
7366
  }
7500
7367
  declare const inject: string[];
7501
7368
  declare function apply(ctx: ClientContext): void;
7502
7369
  //#endregion
7503
- export { type PanelControllerSnapshot, type RezKey, type RezPanelProps, apply, inject };
7370
+ export { type RezKey, apply, inject };