weaver-work-cli 0.1.33 → 0.1.38

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 (126) hide show
  1. package/dist/chunks/{archive-FVFY6GZN.js → archive-PDV724YK.js} +5 -4
  2. package/dist/chunks/{archive-oa-NW3OD4UV.js → archive-oa-4XE4MNXQ.js} +4 -3
  3. package/dist/chunks/{asset-7QJKMIDV.js → asset-PDL2QE2N.js} +8 -7
  4. package/dist/chunks/{attachment-content-OSAVA6K3.js → attachment-content-MDDGOE5E.js} +3 -3
  5. package/dist/chunks/{blog-I7SDPNW4.js → blog-UYR3EUXW.js} +5 -4
  6. package/dist/chunks/{caizhilian-O37ZIQNY.js → caizhilian-LG2X5NMF.js} +5 -4
  7. package/dist/chunks/{calendar-7KXE4ED3.js → calendar-FG4BAZHE.js} +4 -3
  8. package/dist/chunks/{chunk-Q6LWB5HX.js → chunk-6FTTSA45.js} +4 -3
  9. package/dist/chunks/{chunk-MQ2I5AA3.js → chunk-6LTFIFLM.js} +3 -2
  10. package/dist/chunks/{chunk-WRRJ4GG2.js → chunk-CORFRD7Q.js} +4 -3
  11. package/dist/chunks/{chunk-WY74UBJ6.js → chunk-DMV2TOMH.js} +2194 -240
  12. package/dist/chunks/{chunk-MEEFGWTM.js → chunk-ELYDWBZJ.js} +135 -10
  13. package/dist/chunks/{chunk-EEWPQE3O.js → chunk-FUWVHMVV.js} +7 -6
  14. package/dist/chunks/{chunk-HEL5XTYI.js → chunk-GGJFMNJM.js} +26 -4
  15. package/dist/chunks/{chunk-KAS45KNR.js → chunk-IZUDA353.js} +1 -1
  16. package/dist/chunks/{chunk-2FLWXFVS.js → chunk-J7USS3ED.js} +4 -4
  17. package/dist/chunks/{chunk-IHUYP6LO.js → chunk-JSMFPO43.js} +1 -1
  18. package/dist/chunks/{chunk-RBGOMK4Y.js → chunk-KKRL3REV.js} +5 -4
  19. package/dist/chunks/{chunk-OCU4RLHC.js → chunk-NI6GIPIM.js} +195 -36
  20. package/dist/chunks/{chunk-PRHJGPMA.js → chunk-NR6RKXPA.js} +2 -2
  21. package/dist/chunks/{chunk-D223PTXU.js → chunk-OJQUJZQF.js} +33 -7
  22. package/dist/chunks/{chunk-ILMBNVSG.js → chunk-UJJD4QWF.js} +4 -3
  23. package/dist/chunks/{chunk-6ATGWRZM.js → chunk-UZZBA6PV.js} +177 -14
  24. package/dist/chunks/{chunk-GFPXQIY2.js → chunk-VRYHGG6O.js} +2 -2
  25. package/dist/chunks/{chunk-NHA62QD7.js → chunk-XJY7G4DD.js} +3 -3
  26. package/dist/chunks/{chunk-VBCFFFGT.js → chunk-Z32KWY6G.js} +4 -1
  27. package/dist/chunks/{conflict-SFNEVJY5.js → conflict-BQZEQ4SP.js} +2 -2
  28. package/dist/chunks/contract-XIRAFTEV.js +9111 -0
  29. package/dist/chunks/{cowork-CKWYHXYB.js → cowork-BLG62BL2.js} +46 -26
  30. package/dist/chunks/{ebuilder-form-KOLJRVZD.js → ebuilder-form-NUKG5QW4.js} +3 -3
  31. package/dist/chunks/{ehr-WFOC3B4D.js → ehr-2STW5ILH.js} +174 -10
  32. package/dist/chunks/{esb-LJZTN663.js → esb-UUDQUNKY.js} +4 -4
  33. package/dist/chunks/{fna-F7QRIIZC.js → fna-6RCY4NU5.js} +15 -9
  34. package/dist/chunks/{host-VQ6JJXGQ.js → host-7RXEDMAH.js} +3 -3
  35. package/dist/chunks/{host-KXPTEWFS.js → host-EJZFROU3.js} +3 -3
  36. package/dist/chunks/{host-BCGUVEWX.js → host-FWDOSRH5.js} +3 -3
  37. package/dist/chunks/{host-DGE2TZD4.js → host-RHM3NPXV.js} +3 -3
  38. package/dist/chunks/{host-BQBRHVR3.js → host-UFF33TWJ.js} +3 -3
  39. package/dist/chunks/{hrm-NI6XAKW5.js → hrm-PKJ6ELSH.js} +3 -3
  40. package/dist/chunks/{im-7TRTF3KT.js → im-YJAXS7CO.js} +3 -3
  41. package/dist/chunks/{invoice-AOXWJKYT.js → invoice-HWVSXGX6.js} +3 -3
  42. package/dist/chunks/{jiuchuanhui-7NQWEZAW.js → jiuchuanhui-L7VKILZB.js} +4 -3
  43. package/dist/chunks/{lazy-dispatch-RNS4EE4S.js → lazy-dispatch-NMYEIHRH.js} +4 -4
  44. package/dist/chunks/{mail-VDHJAB4O.js → mail-B42RRU7G.js} +46 -24
  45. package/dist/chunks/{meeting-GA7XCNNP.js → meeting-CFYVBJSS.js} +77 -12
  46. package/dist/chunks/{okr-TQIRERPQ.js → okr-GCLF6V7W.js} +4 -3
  47. package/dist/chunks/{plan-4RY4LN2P.js → plan-ZVL7GBRI.js} +4 -3
  48. package/dist/chunks/{project-D6XT2OC5.js → project-4YWAAE2K.js} +4 -3
  49. package/dist/chunks/{registry-QKMI43Q6.js → registry-EP4VTHZS.js} +8 -8
  50. package/dist/chunks/{registry-JHRIDQ3A.js → registry-FRJ6H7BT.js} +4 -4
  51. package/dist/chunks/{registry-VOGKFFTR.js → registry-SG2PGVCF.js} +2 -2
  52. package/dist/chunks/{room-recommend-D4EUOOWY.js → room-recommend-R3JVUUAC.js} +4 -4
  53. package/dist/chunks/{schedule-XPFBHPCV.js → schedule-NIJBTYDO.js} +4 -4
  54. package/dist/chunks/{workflow-HLBZRWIY.js → workflow-BB24DFBY.js} +11 -4
  55. package/dist/index.js +31 -26
  56. package/dist/internal/e10/auth-recovery.js +114 -1
  57. package/dist/internal/e10/client.js +16 -2
  58. package/dist/internal/e10/fetch-timing.js +31 -0
  59. package/dist/internal/e10/request-runtime.js +108 -7
  60. package/dist/shortcuts/archive/host.js +3 -2
  61. package/dist/shortcuts/archive-oa/host.js +2 -1
  62. package/dist/shortcuts/asset/host.js +6 -5
  63. package/dist/shortcuts/blog/host.js +3 -2
  64. package/dist/shortcuts/caizhilian/host.js +3 -2
  65. package/dist/shortcuts/calendar/host.js +2 -1
  66. package/dist/shortcuts/contract/host.js +2 -1
  67. package/dist/shortcuts/cowork/host.js +10 -1
  68. package/dist/shortcuts/cowork/operations/types.js +17 -2
  69. package/dist/shortcuts/ebuilder-form/host.js +3 -1
  70. package/dist/shortcuts/ehr/host.js +2 -1
  71. package/dist/shortcuts/ehr/operations/recruit-write.js +35 -0
  72. package/dist/shortcuts/ehr/operations/recruit.js +147 -0
  73. package/dist/shortcuts/esb/host.js +2 -1
  74. package/dist/shortcuts/fna/host.js +2 -1
  75. package/dist/shortcuts/fna/operations/expense-chart.js +19 -7
  76. package/dist/shortcuts/hrm/host.js +2 -1
  77. package/dist/shortcuts/im/host.js +3 -2
  78. package/dist/shortcuts/index.js +5 -0
  79. package/dist/shortcuts/invoice/host.js +5 -4
  80. package/dist/shortcuts/jiuchuanhui/host.js +2 -1
  81. package/dist/shortcuts/mail/host.js +10 -1
  82. package/dist/shortcuts/mail/operations/types.js +17 -2
  83. package/dist/shortcuts/meeting/host.js +3 -2
  84. package/dist/shortcuts/meeting/index.js +79 -1
  85. package/dist/shortcuts/meeting/invitation/text.js +71 -0
  86. package/dist/shortcuts/meeting/manifest.js +10 -0
  87. package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -0
  88. package/dist/shortcuts/meeting/operations/eb/conflict.js +6 -1
  89. package/dist/shortcuts/meeting/operations/eb/create-flow.js +2105 -169
  90. package/dist/shortcuts/meeting/operations/eb/crm-search.js +478 -0
  91. package/dist/shortcuts/meeting/operations/eb/factory.js +161 -8
  92. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  93. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +36 -2
  94. package/dist/shortcuts/meeting/operations/eb-fallback.js +4 -0
  95. package/dist/shortcuts/meeting/operations/env.js +6 -0
  96. package/dist/shortcuts/meeting/operations/invitation.js +200 -28
  97. package/dist/shortcuts/okr/host.js +2 -1
  98. package/dist/shortcuts/plan/host.js +2 -1
  99. package/dist/shortcuts/project/host.js +2 -1
  100. package/dist/shortcuts/workflow/endpoints.js +8 -3
  101. package/dist/shortcuts/workflow/operations/form.js +341 -36
  102. package/dist/shortcuts/workflow/operations.js +23 -1
  103. package/docs/ehr.md +1 -1
  104. package/docs/fna.md +2 -1
  105. package/package.json +1 -1
  106. package/skill-template/business-info.json +18 -0
  107. package/skill-template/domains/cowork.md +14 -0
  108. package/skills/weaver-e10-cowork/SKILL.md +101 -0
  109. package/skills/weaver-e10-cowork/references/cowork-read.md +90 -0
  110. package/skills/weaver-e10-cowork/references/cowork-write.md +131 -0
  111. package/skills/weaver-e10-cowork/references/safety-boundaries.md +45 -0
  112. package/skills/weaver-e10-jucailin/SKILL.md +21 -3
  113. package/skills/weaver-e10-jucailin/references/recruit-read.md +25 -0
  114. package/skills/weaver-e10-jucailin/references/recruit-write.md +13 -0
  115. package/skills/weaver-e10-jucailin/references/salary.md +15 -11
  116. package/skills/weaver-e10-mail/SKILL.md +12 -9
  117. package/skills/weaver-e10-meeting/SKILL.md +499 -300
  118. package/skills/weaver-e10-meeting/references/meeting-eb.md +334 -0
  119. package/skills/weaver-e10-meeting/references/meeting-invitation.md +64 -6
  120. package/skills/weaver-e10-meeting.zip +0 -0
  121. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  122. package/skills/weaver-e10-qiyecheng/SKILL.md +5 -2
  123. package/skills/weaver-e10-qiyecheng/references/catalog.md +2 -2
  124. package/skills/weaver-e10-qiyecheng/references/expense-chart.md +15 -1
  125. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +22 -21
  126. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
@@ -3,12 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  E10ApiError,
5
5
  createE10RequestRuntime,
6
+ isE10SessionExpiredResponse,
6
7
  requireE10Session
7
- } from "./chunk-6ATGWRZM.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-D223PTXU.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -145,6 +146,42 @@ function createCoworkContinuationSigner(ctx) {
145
146
  };
146
147
  }
147
148
 
149
+ // src/shortcuts/cowork/operations/types.ts
150
+ var READ = "read";
151
+ var READ_BEFORE_WRITE = "read-before-write";
152
+ var WRITE = "write";
153
+ var coworkPerf = {
154
+ t0: Date.now(),
155
+ sessionMs: 0,
156
+ requestCount: 0,
157
+ requestMs: 0
158
+ };
159
+ function coworkSuccess(action, data, meta) {
160
+ const payload = { ok: true, action, data };
161
+ const perf = {
162
+ elapsed_ms: Date.now() - coworkPerf.t0,
163
+ session_ms: coworkPerf.sessionMs || void 0,
164
+ requests: coworkPerf.requestCount || void 0,
165
+ network_ms: coworkPerf.requestMs || void 0
166
+ };
167
+ for (const k of Object.keys(perf)) if (perf[k] === void 0) delete perf[k];
168
+ payload.meta = { ...meta || {}, ...perf };
169
+ return payload;
170
+ }
171
+ function schemaOf(properties, options = {}) {
172
+ return {
173
+ type: "object",
174
+ additionalProperties: false,
175
+ properties,
176
+ ...options.required?.length ? { required: options.required } : {},
177
+ ...options.description ? { description: options.description } : {}
178
+ };
179
+ }
180
+ var SCHEMA_ID = { oneOf: [{ type: "integer" }, { type: "string", pattern: "^\\d+$" }] };
181
+ var SCHEMA_PAGE_CURRENT = { type: "integer", minimum: 1 };
182
+ var SCHEMA_PAGE_SIZE = { type: "integer", minimum: 1, maximum: 200 };
183
+ var SCHEMA_DATETIME = { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$" };
184
+
148
185
  // src/shortcuts/cowork/host.ts
149
186
  function inferProfile(ctx) {
150
187
  const options = ctx.getGlobalOptions();
@@ -214,7 +251,9 @@ function createCoworkHost(ctx, dependencies = {}) {
214
251
  const requireSession = dependencies.requireSession || ((innerCtx) => requireE10Session(innerCtx, { skipProfileEnrichment: true }));
215
252
  async function ensureSession() {
216
253
  if (!e10Session) {
254
+ const sessionStart = Date.now();
217
255
  e10Session = await requireSession(ctx);
256
+ coworkPerf.sessionMs = Date.now() - sessionStart;
218
257
  sessionContext = {
219
258
  baseUrl: e10Session.getBaseUrl(),
220
259
  profile: inferProfile(ctx),
@@ -249,6 +288,7 @@ function createCoworkHost(ctx, dependencies = {}) {
249
288
  assertPath(path);
250
289
  const resolvedMethod = method || (body === void 0 && form === void 0 ? "GET" : "POST");
251
290
  let response;
291
+ const reqStart = Date.now();
252
292
  try {
253
293
  response = await (await runtime()).requestJson({
254
294
  module: "cowork",
@@ -263,8 +303,11 @@ function createCoworkHost(ctx, dependencies = {}) {
263
303
  });
264
304
  } catch (error) {
265
305
  mapRuntimeNetworkError(error);
306
+ } finally {
307
+ coworkPerf.requestCount += 1;
308
+ coworkPerf.requestMs += Date.now() - reqStart;
266
309
  }
267
- if (response.status === 401 || response.status === 302) {
310
+ if (isE10SessionExpiredResponse(response)) {
268
311
  throw coworkAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
269
312
  }
270
313
  if (response.parseError) {
@@ -296,29 +339,6 @@ function createCoworkHost(ctx, dependencies = {}) {
296
339
  return { request, getSession };
297
340
  }
298
341
 
299
- // src/shortcuts/cowork/operations/types.ts
300
- var READ = "read";
301
- var READ_BEFORE_WRITE = "read-before-write";
302
- var WRITE = "write";
303
- function coworkSuccess(action, data, meta) {
304
- const payload = { ok: true, action, data };
305
- if (meta && Object.keys(meta).length > 0) payload.meta = meta;
306
- return payload;
307
- }
308
- function schemaOf(properties, options = {}) {
309
- return {
310
- type: "object",
311
- additionalProperties: false,
312
- properties,
313
- ...options.required?.length ? { required: options.required } : {},
314
- ...options.description ? { description: options.description } : {}
315
- };
316
- }
317
- var SCHEMA_ID = { oneOf: [{ type: "integer" }, { type: "string", pattern: "^\\d+$" }] };
318
- var SCHEMA_PAGE_CURRENT = { type: "integer", minimum: 1 };
319
- var SCHEMA_PAGE_SIZE = { type: "integer", minimum: 1, maximum: 200 };
320
- var SCHEMA_DATETIME = { type: "string", pattern: "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$" };
321
-
322
342
  // src/shortcuts/cowork/operations/shared.ts
323
343
  var FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
324
344
  function asObject(value) {
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  createEbuilderFormHost
5
- } from "./chunk-WRRJ4GG2.js";
5
+ } from "./chunk-CORFRD7Q.js";
6
6
  import {
7
7
  createEbuilderFormContinuationSigner
8
8
  } from "./chunk-3SO6QL6U.js";
@@ -13,8 +13,8 @@ import {
13
13
  import {
14
14
  ebuilderValidationError
15
15
  } from "./chunk-BYATLLEF.js";
16
- import "./chunk-6ATGWRZM.js";
17
- import "./chunk-D223PTXU.js";
16
+ import "./chunk-UZZBA6PV.js";
17
+ import "./chunk-OJQUJZQF.js";
18
18
  import {
19
19
  isCliError,
20
20
  toErrorEnvelope
@@ -3,12 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  E10ApiError,
5
5
  createE10RequestRuntime,
6
+ isE10SessionExpiredResponse,
6
7
  requireE10Session
7
- } from "./chunk-6ATGWRZM.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-D223PTXU.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -276,7 +277,7 @@ function createEhrHost(ctx, dependencies = {}) {
276
277
  } catch (error) {
277
278
  mapRuntimeNetworkError(error);
278
279
  }
279
- if (response.status === 401 || response.status === 302) {
280
+ if (isE10SessionExpiredResponse(response)) {
280
281
  throw ehrAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
281
282
  }
282
283
  if (response.parseError) {
@@ -3085,6 +3086,140 @@ var candidateList = {
3085
3086
  });
3086
3087
  }
3087
3088
  };
3089
+ function personNames(value) {
3090
+ const text = String(value ?? "").trim();
3091
+ if (!text) return "";
3092
+ if (text.startsWith("[")) {
3093
+ try {
3094
+ const arr = JSON.parse(text);
3095
+ if (Array.isArray(arr)) {
3096
+ const names = arr.map((item) => typeof item === "string" ? item : item?.name ?? item?.username ?? "").filter(Boolean);
3097
+ if (names.length) return names.join("\u3001");
3098
+ }
3099
+ } catch {
3100
+ }
3101
+ }
3102
+ return text;
3103
+ }
3104
+ function nameLike(value) {
3105
+ const text = String(value ?? "").trim();
3106
+ if (!text || /^\d{16,}$/.test(text)) return null;
3107
+ return text;
3108
+ }
3109
+ async function resolveCurrentUserName(host) {
3110
+ try {
3111
+ const session = await host.getSession();
3112
+ const baseUrl = String(session?.baseUrl || "");
3113
+ if (!baseUrl) return "";
3114
+ const resp = await fetch(
3115
+ `${baseUrl}/api/baseserver/layout/teamsCheck?clientType=not_xinchuang&client=WEB&domainName=${encodeURIComponent(baseUrl)}`,
3116
+ {
3117
+ method: "POST",
3118
+ headers: {
3119
+ accept: "application/json",
3120
+ "content-type": "application/json",
3121
+ eteamsid: String(session?.eteamsId || ""),
3122
+ cookie: typeof session?.cookieHeader === "function" ? session.cookieHeader() : "",
3123
+ "user-agent": typeof session?.uaHeader === "function" ? session.uaHeader() : "weaver-work-cli",
3124
+ origin: baseUrl
3125
+ },
3126
+ redirect: "manual"
3127
+ }
3128
+ );
3129
+ const data = await resp.json().catch(() => ({}));
3130
+ const cu = data.currentUser ?? data.data?.currentUser ?? null;
3131
+ return cu ? String(cu.username ?? cu.id ?? "") : "";
3132
+ } catch {
3133
+ return "";
3134
+ }
3135
+ }
3136
+ var interviewFeedbackTodo = {
3137
+ name: "ehr.recruit.interview.feedbackTodo",
3138
+ resource: "recruit",
3139
+ method: "interview.feedbackTodo",
3140
+ action: "ehr.recruit.interview.feedbackTodo",
3141
+ summary: "\u9762\u8BD5\u5F85\u529E\uFF1A**\u53EA\u8FD4\u56DE\u6211\u4F5C\u4E3A\u9762\u8BD5\u5B98\u7684 AI \u9762\u8BD5\u5F85\u53CD\u9988\u6E05\u5355**\uFF08\u5019\u9009\u4EBA\u5DF2\u7B54\u5B8C\u3001\u5DF2\u6709\u5F55\u50CF\u3001\u6211\u8FD8\u6CA1\u586B\u610F\u89C1\uFF09\uFF1B\u6309\u9700\u7FFB\u9875 + \u5BA2\u6237\u7AEF\u7B5B\u9009\uFF0C\u4E0D\u8FD4\u56DE\u5168\u91CF\u9762\u8BD5",
3142
+ capability: "recruit",
3143
+ risk: READ,
3144
+ inputSchema: schemaOf({
3145
+ maxPages: { type: "integer", minimum: 1, maximum: 50, description: "\u6700\u591A\u7FFB\u9875\u6570\uFF08\u9ED8\u8BA4 5\uFF09" },
3146
+ pageSize: { type: "integer", minimum: 1, maximum: 200, description: "\u5355\u9875\u6761\u6570\uFF08\u9ED8\u8BA4 200\uFF0C\u5B9E\u6D4B\u670D\u52A1\u7AEF\u4E0A\u9650 200\uFF09" }
3147
+ }),
3148
+ handler: async (args, env) => {
3149
+ if (!env.recruitContext) throw ehrValidationError("recruit_context_unavailable", "\u62DB\u8058\u4E0A\u4E0B\u6587\u52A0\u8F7D\u5668\u672A\u521D\u59CB\u5316");
3150
+ const cache = await env.recruitContext.load(env.host);
3151
+ const listParam = cache.lists.interview;
3152
+ const form = cache.forms.interview_plan;
3153
+ if (!listParam?.listId || !form?.objId) {
3154
+ throw new RecruitContextError(
3155
+ "recruit_list_unavailable",
3156
+ "\u5F53\u524D\u73AF\u5883\u672A\u542F\u7528\u300C\u9762\u8BD5\u7BA1\u7406\u300D\u529F\u80FD\uFF08\u672A\u627E\u5230\u9762\u8BD5\u5217\u8868/\u8868\u5355\u53C2\u6570\uFF0C\u6309\u80FD\u529B\u63A2\u6D4B\u62E6\u622A\uFF09\u3002"
3157
+ );
3158
+ }
3159
+ const pageSize = toNumber(args.pageSize, "pageSize") ?? 200;
3160
+ const maxPages = toNumber(args.maxPages, "maxPages") ?? 5;
3161
+ const me = await resolveCurrentUserName(env.host);
3162
+ const fields = cache.fields[form.objId] || {};
3163
+ const fieldOpts = cache.field_options[form.objId] || {};
3164
+ const statusOpts = fieldOpts[fields.union_status] || {};
3165
+ const typeOpts = fieldOpts[fields.interview_type] || {};
3166
+ const toCn = (map, raw) => {
3167
+ const text = String(raw ?? "");
3168
+ return map[text] ?? text;
3169
+ };
3170
+ const statusOf = (row) => toCn(statusOpts, row?.union_status_key ?? row?.union_status);
3171
+ const typeOf = (row) => toCn(typeOpts, row?.interview_type_key ?? row?.interview_type);
3172
+ const interviewerOf = (row) => personNames(row?.interviewer);
3173
+ const scanned = [];
3174
+ let lastPageCount = 0;
3175
+ for (let i = 0; i < maxPages; i++) {
3176
+ const body = buildListBody({
3177
+ listId: listParam.listId,
3178
+ cusMenuId: listParam.cusMenuId,
3179
+ menuName: listParam.menuName || "\u9762\u8BD5\u7BA1\u7406",
3180
+ title: "\u9762\u8BD5\u7BA1\u7406",
3181
+ current: i + 1,
3182
+ pageSize
3183
+ });
3184
+ const page = await fetchListRows(env.host, form.objId, listParam.listId, body);
3185
+ const use = page.displayRows && page.displayRows.length ? page.displayRows : page.rows;
3186
+ scanned.push(...use);
3187
+ lastPageCount = use.length;
3188
+ if (use.length < pageSize) break;
3189
+ }
3190
+ const pending = scanned.filter((row) => /待反馈/.test(statusOf(row)));
3191
+ const mineAll = me ? pending.filter((row) => interviewerOf(row).includes(me)) : [];
3192
+ const mineAi = mineAll.filter((row) => /AI\s*面试/i.test(typeOf(row)));
3193
+ const slim = (row) => ({
3194
+ form_data_id: row?.form_data_id ?? row?.id ?? null,
3195
+ candidate_name: nameLike(row?.candidate_name) ?? nameLike(row?.talent_id) ?? nameLike(row?.name),
3196
+ position_name: nameLike(row?.position_name) ?? nameLike(row?.position_manage_id),
3197
+ start_time: row?.start_time ?? null,
3198
+ interview_type_key: typeOf(row) || null,
3199
+ interview_session: row?.interview_session ?? null,
3200
+ interviewer: interviewerOf(row) || null,
3201
+ union_status_key: statusOf(row) || null,
3202
+ subject: row?.subject ?? null,
3203
+ talent_id: row?.talent_id ?? null,
3204
+ position_manage_id: row?.position_manage_id ?? null
3205
+ });
3206
+ const notes = [];
3207
+ if (!me) notes.push("\u672A\u80FD\u89E3\u6790\u5F53\u524D\u767B\u5F55\u4EBA\u59D3\u540D\uFF08teamsCheck \u5931\u8D25\uFF09\uFF0C\u65E0\u6CD5\u6309\u9762\u8BD5\u5B98\u8FC7\u6EE4");
3208
+ if (lastPageCount >= pageSize && scanned.length >= pageSize * maxPages) {
3209
+ notes.push(`\u5DF2\u626B\u63CF ${scanned.length} \u6761\uFF08\u8FBE maxPages=${maxPages} \u4E0A\u9650\uFF09\uFF0C\u5982\u6000\u7591\u9057\u6F0F\u53EF\u52A0\u5927 maxPages`);
3210
+ }
3211
+ return ehrSuccess("ehr.recruit.interview.feedbackTodo", {
3212
+ currentUser: me || null,
3213
+ scanned: scanned.length,
3214
+ myAiPendingFeedback: { count: mineAi.length, rows: mineAi.map(slim) },
3215
+ myOtherPendingFeedback: {
3216
+ count: mineAll.length - mineAi.length,
3217
+ rows: mineAll.filter((row) => !/AI\s*面试/i.test(typeOf(row))).map(slim)
3218
+ },
3219
+ ...notes.length ? { note: notes.join("\uFF1B") } : {}
3220
+ });
3221
+ }
3222
+ };
3088
3223
  var candidateCard = {
3089
3224
  name: "ehr.recruit.candidate.card",
3090
3225
  resource: "recruit",
@@ -3199,7 +3334,8 @@ var recruitOperations = [
3199
3334
  contextResolve,
3200
3335
  candidateSearch,
3201
3336
  candidateList,
3202
- candidateCard
3337
+ candidateCard,
3338
+ interviewFeedbackTodo
3203
3339
  ];
3204
3340
 
3205
3341
  // src/shortcuts/ehr/operations/recruit-write.ts
@@ -3230,6 +3366,24 @@ async function requireRecruitCache(env) {
3230
3366
  }
3231
3367
  return env.recruitContext.load(env.host);
3232
3368
  }
3369
+ function recruitTalentCardUrl(cache, baseUrl, talentId) {
3370
+ if (!cache.ebdDetailPageId || !talentId) return null;
3371
+ const extra = String(cache.selfUse) === "1" ? "&recruitType=useSelf" : "";
3372
+ return `${baseUrl.replace(/\/+$/, "")}/sp/ebdpage/view/${cache.ebdDetailPageId}?talentId=${talentId}${extra}`;
3373
+ }
3374
+ function recruitSlideLocateUrl(cache, baseUrl, listKey, formKey, dataId) {
3375
+ const listId = cache.lists?.[listKey]?.listId;
3376
+ const objId = cache.forms?.[formKey]?.objId;
3377
+ if (!listId || !objId || !dataId || !cache.appId) return null;
3378
+ const base = baseUrl.replace(/\/+$/, "");
3379
+ return `${base}/sp/ebdfpage/list/${listId}/card/0/${objId}/${dataId}/${listId}?id=${dataId}&openSource=field&openSourceId=${dataId}&openSourceAppId=${cache.appId}`;
3380
+ }
3381
+ function recruitOpenListUrl(cache, baseUrl, listKey, talentId) {
3382
+ const menu = cache.lists?.[listKey];
3383
+ if (!menu?.listId) return null;
3384
+ const extra = talentId ? `?talentId=${talentId}${String(cache.selfUse) === "1" ? "&recruitType=useSelf" : ""}` : "";
3385
+ return `${baseUrl.replace(/\/+$/, "")}/sp/ebdfpage/list/${menu.listId}${extra}`;
3386
+ }
3233
3387
  async function checkDuplicateByMobile(env, cache, mobile) {
3234
3388
  const talent = cache.lists.talent;
3235
3389
  const objId = cache.forms.talent_pool?.objId;
@@ -3694,7 +3848,9 @@ var candidateCreateApply = {
3694
3848
  status: "COMPLETE",
3695
3849
  talentId: newId,
3696
3850
  initTalentBatch: initMsg,
3697
- searchHint: `\u53EF\u7528 ehr.recruit.candidate.search \u6309 name=${name} \u6216 mobile=${mobile} \u56DE\u67E5`
3851
+ searchHint: `\u53EF\u7528 ehr.recruit.candidate.search \u6309 name=${name} \u6216 mobile=${mobile} \u56DE\u67E5`,
3852
+ talentCardUrl: recruitTalentCardUrl(cache, lease.baseUrl, newId),
3853
+ talentListLocateUrl: recruitOpenListUrl(cache, lease.baseUrl, "talent", newId)
3698
3854
  });
3699
3855
  }
3700
3856
  };
@@ -3918,7 +4074,9 @@ var interviewArrangeApply = {
3918
4074
  assigned: assigned?.data || {},
3919
4075
  candidate: `${plan.candidateName}\uFF08talentId=${args.talentId}\uFF09`,
3920
4076
  time: plan.interviewTime,
3921
- interviewer: plan.interviewer
4077
+ interviewer: plan.interviewer,
4078
+ talentCardUrl: recruitTalentCardUrl(cache, lease.baseUrl, args.talentId),
4079
+ interviewLocateUrl: recruitSlideLocateUrl(cache, lease.baseUrl, "interview", "interview_plan", planFormId)
3922
4080
  });
3923
4081
  }
3924
4082
  };
@@ -4169,7 +4327,9 @@ var offerSendApply = {
4169
4327
  validateOffer: "\u901A\u8FC7",
4170
4328
  sendOffer: "SUCCESS",
4171
4329
  runEsb: { successNum: esbResult.successNum, failNum: esbResult.failNum, msg: esbResult.successMsg },
4172
- nextStep: "\u56DE\u67E5 offer_status_select \u5E94\u5DF2\u53D8\u66F4\u4E3A\u300C\u5DF2\u53D1\u9001\u5F85\u53CD\u9988\u300D"
4330
+ nextStep: "\u56DE\u67E5 offer_status_select \u5E94\u5DF2\u53D8\u66F4\u4E3A\u300C\u5DF2\u53D1\u9001\u5F85\u53CD\u9988\u300D",
4331
+ talentCardUrl: recruitTalentCardUrl(cache, lease.baseUrl, payload.talentId),
4332
+ offerListUrl: recruitOpenListUrl(cache, lease.baseUrl, "offer")
4173
4333
  });
4174
4334
  }
4175
4335
  };
@@ -4448,7 +4608,8 @@ var entryProcessApply = {
4448
4608
  saveFormData: "\u5DF2\u66F4\u65B0",
4449
4609
  saveEstPreEntry: "\u5DF2\u843D\u8D26\u53F7",
4450
4610
  runEsb: { successNum: esbResult.successNum, failNum: esbResult.failNum, msg: esbResult.successMsg },
4451
- nextStep: "\u56DE\u67E5\u5165\u804C\u5217\u8868 transact_status \u5E94\u7531 1 \u53D8\u4E3A 2"
4611
+ nextStep: "\u56DE\u67E5\u5165\u804C\u5217\u8868 transact_status \u5E94\u7531 1 \u53D8\u4E3A 2",
4612
+ entryListUrl: recruitOpenListUrl(cache, lease.baseUrl, "entry")
4452
4613
  });
4453
4614
  }
4454
4615
  };
@@ -4677,7 +4838,8 @@ var feedbackEditApply = {
4677
4838
  feedbackId: payload.feedbackId,
4678
4839
  saved: Boolean(savedId),
4679
4840
  verify: backFeedback ? { result: backFeedback.result, comment: backFeedback.judgement, changed } : "\u56DE\u67E5\u672A\u53D6\u5230\u8BE5\u53CD\u9988",
4680
- ...changed ? {} : { warning: "\u56DE\u67E5\u672A\u786E\u8BA4\u53D8\u66F4\u751F\u6548\uFF0C\u8BF7\u4EBA\u5DE5\u5728 E10 \u4E2D\u6838\u5BF9\u9762\u8BD5\u53CD\u9988\uFF0C\u7981\u6B62\u81EA\u52A8\u91CD\u8BD5" }
4841
+ ...changed ? {} : { warning: "\u56DE\u67E5\u672A\u786E\u8BA4\u53D8\u66F4\u751F\u6548\uFF0C\u8BF7\u4EBA\u5DE5\u5728 E10 \u4E2D\u6838\u5BF9\u9762\u8BD5\u53CD\u9988\uFF0C\u7981\u6B62\u81EA\u52A8\u91CD\u8BD5" },
4842
+ talentCardUrl: recruitTalentCardUrl(cache, lease.baseUrl, payload.talentId)
4681
4843
  });
4682
4844
  }
4683
4845
  };
@@ -4796,6 +4958,7 @@ var feedbackUrgeApply = {
4796
4958
  requireConfirm2(args, "ehr.recruit.candidate.interview.feedback.urge.apply");
4797
4959
  const lease = await verifyLease2(args, "ehr.recruit.candidate.interview.feedback.urge.apply", env);
4798
4960
  const payload = lease.payload || {};
4961
+ const cache = await requireRecruitCache(env);
4799
4962
  if (!payload.feedbackRecordId || !payload.esbActionId || !payload.interviewDetailObjId) {
4800
4963
  throw ehrValidationError("continuation_payload_invalid", "continuation \u7F3A\u5C11\u50AC\u8BC4\u53C2\u6570\uFF0C\u8BF7\u91CD\u65B0\u6267\u884C prepare");
4801
4964
  }
@@ -4814,7 +4977,8 @@ var feedbackUrgeApply = {
4814
4977
  return ehrSuccess("ehr.recruit.candidate.interview.feedback.urge.apply", {
4815
4978
  status: "COMPLETE",
4816
4979
  feedbackRecordId: payload.feedbackRecordId,
4817
- runEsb: { successNum: esbResult.successNum, failNum: esbResult.failNum, msg: esbResult.successMsg }
4980
+ runEsb: { successNum: esbResult.successNum, failNum: esbResult.failNum, msg: esbResult.successMsg },
4981
+ talentCardUrl: recruitTalentCardUrl(cache, lease.baseUrl, payload.talentId)
4818
4982
  });
4819
4983
  }
4820
4984
  };
@@ -9,15 +9,15 @@ import {
9
9
  assertNoForbiddenKeys,
10
10
  esbManifest,
11
11
  getEsbOperation
12
- } from "./chunk-KAS45KNR.js";
12
+ } from "./chunk-IZUDA353.js";
13
13
  import {
14
14
  createEsbHost
15
- } from "./chunk-ILMBNVSG.js";
15
+ } from "./chunk-UJJD4QWF.js";
16
16
  import {
17
17
  esbValidationError
18
18
  } from "./chunk-GPMFD4RD.js";
19
- import "./chunk-6ATGWRZM.js";
20
- import "./chunk-D223PTXU.js";
19
+ import "./chunk-UZZBA6PV.js";
20
+ import "./chunk-OJQUJZQF.js";
21
21
  import {
22
22
  isCliError,
23
23
  toErrorEnvelope
@@ -3,12 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  E10ApiError,
5
5
  createE10RequestRuntime,
6
+ isE10SessionExpiredResponse,
6
7
  requireE10Session
7
- } from "./chunk-6ATGWRZM.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-D223PTXU.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -251,7 +252,7 @@ function createFnaHost(ctx, dependencies = {}) {
251
252
  } catch (error) {
252
253
  mapRuntimeNetworkError(error);
253
254
  }
254
- if (response.status === 401 || response.status === 302) {
255
+ if (isE10SessionExpiredResponse(response)) {
255
256
  throw fnaAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
256
257
  }
257
258
  if (response.parseError) {
@@ -719,6 +720,7 @@ var MAX_ROWS_LIMIT = 5e3;
719
720
  var USER_INPUT_LIMIT = 500;
720
721
  var BLOCKED_MESSAGE = /拦截|高危|安全校验/;
721
722
  var CLARIFY_MESSAGE = /不明确|请补充|补充查询/;
723
+ var PERMISSION_DENIED_MESSAGE = /权限|越权/;
722
724
  function requireUserInput(value) {
723
725
  if (typeof value !== "string" || value.trim().length === 0) {
724
726
  throw fnaValidationError("user_input_required", "userInput \u5FC5\u586B\uFF08\u81EA\u7136\u8BED\u8A00\u95EE\u9898\uFF0C\u4E0D\u80FD\u4E3A\u7A7A\u767D\uFF09");
@@ -773,8 +775,9 @@ function collectColumns(rows) {
773
775
  return columns;
774
776
  }
775
777
  function classifyMessage(message) {
776
- if (BLOCKED_MESSAGE.test(message)) return "blocked";
777
- if (CLARIFY_MESSAGE.test(message)) return "clarify";
778
+ if (PERMISSION_DENIED_MESSAGE.test(message)) return { kind: "clarify", permissionDenied: true };
779
+ if (BLOCKED_MESSAGE.test(message)) return { kind: "blocked", permissionDenied: false };
780
+ if (CLARIFY_MESSAGE.test(message)) return { kind: "clarify", permissionDenied: false };
778
781
  return void 0;
779
782
  }
780
783
  function normalizeChart(data, maxRows) {
@@ -807,9 +810,12 @@ function normalizeChart(data, maxRows) {
807
810
  });
808
811
  }
809
812
  if (typeof data === "string") {
810
- const kind = classifyMessage(data);
811
- if (kind) {
812
- return fnaSuccess("fna.expense.chart", { kind, message: data }, { messageKindInferred: true });
813
+ const classified = classifyMessage(data);
814
+ if (classified) {
815
+ return fnaSuccess("fna.expense.chart", { kind: classified.kind, message: data }, {
816
+ messageKindInferred: true,
817
+ permissionDenied: classified.permissionDenied
818
+ });
813
819
  }
814
820
  }
815
821
  return fnaSuccess("fna.expense.chart", { kind: "unexpected" }, { dataType: dataTypeOf(data) });
@@ -819,7 +825,7 @@ var fnaExpenseChart = {
819
825
  resource: "expense",
820
826
  method: "expense.chart",
821
827
  action: "fna.expense.chart",
822
- summary: "\u62A5\u9500\u62A5\u8868 AI \u95EE\u7B54\uFF1A\u7528\u81EA\u7136\u8BED\u8A00\u67E5\u8BE2\u5206\u7EC4/\u6392\u540D/\u8D8B\u52BF\uFF0C\u8FD4\u56DE kind=rows/empty/clarify/blocked/unexpected\uFF1BmaxRows \u53EA\u622A\u65AD\u672C\u5730\u5C55\u793A",
828
+ summary: "\u62A5\u9500\u62A5\u8868 AI \u95EE\u7B54\uFF1A\u7528\u81EA\u7136\u8BED\u8A00\u67E5\u8BE2\u5206\u7EC4/\u6392\u540D/\u8D8B\u52BF\uFF0C\u8FD4\u56DE kind=rows/empty/clarify/blocked/unexpected\uFF1B\u65E0\u6743\u9650\u6587\u6848\u989D\u5916\u8FD4\u56DE meta.permissionDenied=true\uFF0C\u6B64\u65F6\u5FC5\u987B\u505C\u4F4F\u3001\u4E0D\u5F97\u6539\u8C03\u5176\u5B83\u63A5\u53E3\u62FC\u6570\u636E\uFF1BmaxRows \u53EA\u622A\u65AD\u672C\u5730\u5C55\u793A",
823
829
  capability: "expense-chart",
824
830
  risk: READ,
825
831
  inputSchema: schemaOf(
@@ -5,10 +5,10 @@ import {
5
5
  extractApiBusinessError,
6
6
  isAtustRedirect,
7
7
  isLoginExpired
8
- } from "./chunk-PRHJGPMA.js";
8
+ } from "./chunk-NR6RKXPA.js";
9
9
  import "./chunk-FMPJJYYI.js";
10
- import "./chunk-6ATGWRZM.js";
11
- import "./chunk-D223PTXU.js";
10
+ import "./chunk-UZZBA6PV.js";
11
+ import "./chunk-OJQUJZQF.js";
12
12
  import "./chunk-LUSPKZKY.js";
13
13
  import "./chunk-BUSC6UAE.js";
14
14
  export {
@@ -4,10 +4,10 @@ import {
4
4
  businessMessage,
5
5
  createHrmHost,
6
6
  isBusinessSuccess
7
- } from "./chunk-Q6LWB5HX.js";
7
+ } from "./chunk-6FTTSA45.js";
8
8
  import "./chunk-OOUTBLZ4.js";
9
- import "./chunk-6ATGWRZM.js";
10
- import "./chunk-D223PTXU.js";
9
+ import "./chunk-UZZBA6PV.js";
10
+ import "./chunk-OJQUJZQF.js";
11
11
  import "./chunk-LUSPKZKY.js";
12
12
  import "./chunk-BUSC6UAE.js";
13
13
  export {
@@ -6,10 +6,10 @@ import {
6
6
  createEsbHost,
7
7
  isEsbFlowUnavailable,
8
8
  triggerResultCode
9
- } from "./chunk-ILMBNVSG.js";
9
+ } from "./chunk-UJJD4QWF.js";
10
10
  import "./chunk-GPMFD4RD.js";
11
- import "./chunk-6ATGWRZM.js";
12
- import "./chunk-D223PTXU.js";
11
+ import "./chunk-UZZBA6PV.js";
12
+ import "./chunk-OJQUJZQF.js";
13
13
  import "./chunk-LUSPKZKY.js";
14
14
  import "./chunk-BUSC6UAE.js";
15
15
  export {
@@ -7,10 +7,10 @@ import {
7
7
  dirname,
8
8
  mkdir,
9
9
  writeFile
10
- } from "./chunk-RBGOMK4Y.js";
10
+ } from "./chunk-KKRL3REV.js";
11
11
  import "./chunk-ZEDWSH32.js";
12
- import "./chunk-6ATGWRZM.js";
13
- import "./chunk-D223PTXU.js";
12
+ import "./chunk-UZZBA6PV.js";
13
+ import "./chunk-OJQUJZQF.js";
14
14
  import "./chunk-LUSPKZKY.js";
15
15
  import "./chunk-BUSC6UAE.js";
16
16
  export {
@@ -7,10 +7,10 @@ import {
7
7
  pickEbuilderDataKey,
8
8
  resolveApiPrefix,
9
9
  routeEbuilderPath
10
- } from "./chunk-WRRJ4GG2.js";
10
+ } from "./chunk-CORFRD7Q.js";
11
11
  import "./chunk-BYATLLEF.js";
12
- import "./chunk-6ATGWRZM.js";
13
- import "./chunk-D223PTXU.js";
12
+ import "./chunk-UZZBA6PV.js";
13
+ import "./chunk-OJQUJZQF.js";
14
14
  import "./chunk-LUSPKZKY.js";
15
15
  import "./chunk-BUSC6UAE.js";
16
16
  export {
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  createHrmHost
5
- } from "./chunk-Q6LWB5HX.js";
5
+ } from "./chunk-6FTTSA45.js";
6
6
  import {
7
7
  getHrmOperation,
8
8
  hrmOperationDefinitions
@@ -14,8 +14,8 @@ import {
14
14
  import {
15
15
  hrmValidationError
16
16
  } from "./chunk-OOUTBLZ4.js";
17
- import "./chunk-6ATGWRZM.js";
18
- import "./chunk-D223PTXU.js";
17
+ import "./chunk-UZZBA6PV.js";
18
+ import "./chunk-OJQUJZQF.js";
19
19
  import {
20
20
  isCliError,
21
21
  toErrorEnvelope
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-2LV74IWP.js";
9
9
  import {
10
10
  createImHost
11
- } from "./chunk-RBGOMK4Y.js";
11
+ } from "./chunk-KKRL3REV.js";
12
12
  import {
13
13
  createImContinuationSigner
14
14
  } from "./chunk-P26ZWSKU.js";
@@ -16,8 +16,8 @@ import {
16
16
  imValidationError
17
17
  } from "./chunk-ZEDWSH32.js";
18
18
  import "./chunk-YLCYX7LE.js";
19
- import "./chunk-6ATGWRZM.js";
20
- import "./chunk-D223PTXU.js";
19
+ import "./chunk-UZZBA6PV.js";
20
+ import "./chunk-OJQUJZQF.js";
21
21
  import {
22
22
  isCliError,
23
23
  toErrorEnvelope
@@ -7,9 +7,9 @@ import {
7
7
  invoicePartialError,
8
8
  invoiceValidationError,
9
9
  isInvoiceNetworkError
10
- } from "./chunk-EEWPQE3O.js";
11
- import "./chunk-6ATGWRZM.js";
12
- import "./chunk-D223PTXU.js";
10
+ } from "./chunk-FUWVHMVV.js";
11
+ import "./chunk-UZZBA6PV.js";
12
+ import "./chunk-OJQUJZQF.js";
13
13
  import {
14
14
  isCliError,
15
15
  toErrorEnvelope
@@ -3,12 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  E10ApiError,
5
5
  createE10RequestRuntime,
6
+ isE10SessionExpiredResponse,
6
7
  requireE10Session
7
- } from "./chunk-6ATGWRZM.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-D223PTXU.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -260,7 +261,7 @@ function createJiuchuanhuiHost(ctx, dependencies = {}) {
260
261
  } catch (error) {
261
262
  mapRuntimeNetworkError(error);
262
263
  }
263
- if (response.status === 401 || response.status === 302) {
264
+ if (isE10SessionExpiredResponse(response)) {
264
265
  throw jiuchuanhuiAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
265
266
  }
266
267
  if (response.parseError) {