@rezti/dsh-rez-suite 0.1.37 → 0.1.39

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.
Files changed (3) hide show
  1. package/lib/index.js +13 -0
  2. package/package.json +2 -2
  3. package/src/qcc.ts +16 -0
package/lib/index.js CHANGED
@@ -8276,9 +8276,22 @@ function qccRiskMcpConfig(secret) {
8276
8276
  function mountQccMcp(ctx, start = startMcpWhenSecret) {
8277
8277
  let session;
8278
8278
  let pending = false;
8279
+ let retryTimer;
8280
+ const hasRezSso = () => {
8281
+ const host = ctx;
8282
+ if (typeof host.get !== "function") return true;
8283
+ return host.get("rezSso") !== void 0;
8284
+ };
8279
8285
  const ensure = () => {
8280
8286
  (async () => {
8281
8287
  if (session !== void 0 || pending) return;
8288
+ if (!hasRezSso()) {
8289
+ if (retryTimer === void 0) retryTimer = setTimeout(() => {
8290
+ retryTimer = void 0;
8291
+ ensure();
8292
+ }, 300);
8293
+ return;
8294
+ }
8282
8295
  pending = true;
8283
8296
  try {
8284
8297
  const disposeCompany = await start(ctx, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rezti/dsh-rez-suite",
3
3
  "description": "ReZ-TI one-package install for DeepSeek Harness. Update with: dsh plugin --profile web update @rezti/dsh-rez-suite",
4
- "version": "0.1.37",
4
+ "version": "0.1.39",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -42,7 +42,7 @@
42
42
  "@rezti/dsh-rez-intent": "^0.1.5",
43
43
  "@rezti/dsh-rez-nextcloud": "^0.1.9",
44
44
  "@rezti/dsh-rez-odoo": "^0.1.9",
45
- "@rezti/dsh-rez-sso": "^0.1.11",
45
+ "@rezti/dsh-rez-sso": "^0.1.12",
46
46
  "@rezti/dsh-rez-tapd": "^0.1.1",
47
47
  "@rezti/dsh-rez-token-manager": "^0.1.4",
48
48
  "@rezti/dsh-rez-wechat": "^0.1.14",
package/src/qcc.ts CHANGED
@@ -61,10 +61,26 @@ export function mountQccMcp(
61
61
  ): () => void {
62
62
  let session: (() => void) | undefined
63
63
  let pending = false
64
+ let retryTimer: ReturnType<typeof setTimeout> | undefined
65
+
66
+ const hasRezSso = (): boolean => {
67
+ const host = ctx as Context & { get?: (name: string) => unknown }
68
+ if (typeof host.get !== 'function') return true
69
+ return host.get('rezSso') !== undefined
70
+ }
64
71
 
65
72
  const ensure = (): void => {
66
73
  void (async () => {
67
74
  if (session !== undefined || pending) return
75
+ if (!hasRezSso()) {
76
+ if (retryTimer === undefined) {
77
+ retryTimer = setTimeout(() => {
78
+ retryTimer = undefined
79
+ ensure()
80
+ }, 300)
81
+ }
82
+ return
83
+ }
68
84
  pending = true
69
85
  try {
70
86
  const disposeCompany = await start(ctx, {