weaver-work-cli 0.1.36 → 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 (93) hide show
  1. package/dist/chunks/{archive-XBVH7JU7.js → archive-PDV724YK.js} +5 -4
  2. package/dist/chunks/{archive-oa-MZM3EKFQ.js → archive-oa-4XE4MNXQ.js} +4 -3
  3. package/dist/chunks/{asset-4XO7UOUW.js → asset-PDL2QE2N.js} +8 -7
  4. package/dist/chunks/{attachment-content-VXSWANAC.js → attachment-content-MDDGOE5E.js} +3 -3
  5. package/dist/chunks/{blog-PGZKOPSC.js → blog-UYR3EUXW.js} +5 -4
  6. package/dist/chunks/{caizhilian-BH4ZVGUN.js → caizhilian-LG2X5NMF.js} +5 -4
  7. package/dist/chunks/{calendar-MXEMTIO4.js → calendar-FG4BAZHE.js} +4 -3
  8. package/dist/chunks/{chunk-NCOVUAZK.js → chunk-6FTTSA45.js} +4 -3
  9. package/dist/chunks/{chunk-HXJQI5NM.js → chunk-6LTFIFLM.js} +3 -2
  10. package/dist/chunks/{chunk-QYGO5EE2.js → chunk-CORFRD7Q.js} +4 -3
  11. package/dist/chunks/{chunk-QHFANTX7.js → chunk-DMV2TOMH.js} +1348 -90
  12. package/dist/chunks/{chunk-TC6MZAO3.js → chunk-ELYDWBZJ.js} +52 -2
  13. package/dist/chunks/{chunk-JCSN3JGM.js → chunk-FUWVHMVV.js} +7 -6
  14. package/dist/chunks/{chunk-BPE37FPB.js → chunk-GGJFMNJM.js} +3 -3
  15. package/dist/chunks/{chunk-6LLJFKJE.js → chunk-IZUDA353.js} +1 -1
  16. package/dist/chunks/{chunk-XMGSYD6S.js → chunk-J7USS3ED.js} +4 -4
  17. package/dist/chunks/{chunk-F746NKNF.js → chunk-JSMFPO43.js} +1 -1
  18. package/dist/chunks/{chunk-T72N74ZT.js → chunk-KKRL3REV.js} +5 -4
  19. package/dist/chunks/{chunk-VPUTVEMC.js → chunk-NI6GIPIM.js} +98 -3
  20. package/dist/chunks/{chunk-VPXOPQJI.js → chunk-NR6RKXPA.js} +2 -2
  21. package/dist/chunks/{chunk-JNG42JKG.js → chunk-OJQUJZQF.js} +4 -6
  22. package/dist/chunks/{chunk-I6QGIBDM.js → chunk-UJJD4QWF.js} +4 -3
  23. package/dist/chunks/{chunk-JUXVYKII.js → chunk-UZZBA6PV.js} +174 -14
  24. package/dist/chunks/{chunk-JYKABYCV.js → chunk-VRYHGG6O.js} +2 -2
  25. package/dist/chunks/{chunk-WXFPWCXG.js → chunk-XJY7G4DD.js} +3 -3
  26. package/dist/chunks/{chunk-5DQEEGCC.js → chunk-Z32KWY6G.js} +1 -1
  27. package/dist/chunks/{conflict-JAB2LJEZ.js → conflict-BQZEQ4SP.js} +2 -2
  28. package/dist/chunks/{contract-XI2EEIZU.js → contract-XIRAFTEV.js} +4 -3
  29. package/dist/chunks/{cowork-SCPGLBA4.js → cowork-BLG62BL2.js} +4 -3
  30. package/dist/chunks/{ebuilder-form-EYLHNOTA.js → ebuilder-form-NUKG5QW4.js} +3 -3
  31. package/dist/chunks/{ehr-EAP77IMT.js → ehr-2STW5ILH.js} +4 -3
  32. package/dist/chunks/{esb-2TGGXEE7.js → esb-UUDQUNKY.js} +4 -4
  33. package/dist/chunks/{fna-2X7ZE7BU.js → fna-6RCY4NU5.js} +4 -3
  34. package/dist/chunks/{host-C6EL2RKL.js → host-7RXEDMAH.js} +3 -3
  35. package/dist/chunks/{host-XCLDDXKQ.js → host-EJZFROU3.js} +3 -3
  36. package/dist/chunks/{host-I4NRK4MX.js → host-FWDOSRH5.js} +3 -3
  37. package/dist/chunks/{host-Q4LZGCRU.js → host-RHM3NPXV.js} +3 -3
  38. package/dist/chunks/{host-UEI5FGDM.js → host-UFF33TWJ.js} +3 -3
  39. package/dist/chunks/{hrm-YXERJM76.js → hrm-PKJ6ELSH.js} +3 -3
  40. package/dist/chunks/{im-A4VZN2TQ.js → im-YJAXS7CO.js} +3 -3
  41. package/dist/chunks/{invoice-2Z6YPMIS.js → invoice-HWVSXGX6.js} +3 -3
  42. package/dist/chunks/{jiuchuanhui-AR5GMKZB.js → jiuchuanhui-L7VKILZB.js} +4 -3
  43. package/dist/chunks/{lazy-dispatch-QXW7P4X3.js → lazy-dispatch-NMYEIHRH.js} +4 -4
  44. package/dist/chunks/{mail-7GZ6CPBJ.js → mail-B42RRU7G.js} +4 -3
  45. package/dist/chunks/{meeting-3NMGA3MB.js → meeting-CFYVBJSS.js} +13 -12
  46. package/dist/chunks/{okr-BZ6XUOAG.js → okr-GCLF6V7W.js} +4 -3
  47. package/dist/chunks/{plan-DR5CMUYP.js → plan-ZVL7GBRI.js} +4 -3
  48. package/dist/chunks/{project-6J63MK33.js → project-4YWAAE2K.js} +4 -3
  49. package/dist/chunks/{registry-VRTNC6UR.js → registry-EP4VTHZS.js} +8 -8
  50. package/dist/chunks/{registry-KDD7DHNK.js → registry-FRJ6H7BT.js} +4 -4
  51. package/dist/chunks/{registry-TKX2E7C7.js → registry-SG2PGVCF.js} +2 -2
  52. package/dist/chunks/{room-recommend-XCWRMB5P.js → room-recommend-R3JVUUAC.js} +4 -4
  53. package/dist/chunks/{schedule-IVBICP32.js → schedule-NIJBTYDO.js} +4 -4
  54. package/dist/chunks/{workflow-D74NFK3C.js → workflow-BB24DFBY.js} +4 -4
  55. package/dist/index.js +27 -27
  56. package/dist/internal/e10/auth-recovery.js +114 -1
  57. package/dist/internal/e10/client.js +16 -2
  58. package/dist/internal/e10/request-runtime.js +103 -7
  59. package/dist/shortcuts/archive/host.js +3 -2
  60. package/dist/shortcuts/archive-oa/host.js +2 -1
  61. package/dist/shortcuts/asset/host.js +6 -5
  62. package/dist/shortcuts/blog/host.js +3 -2
  63. package/dist/shortcuts/caizhilian/host.js +3 -2
  64. package/dist/shortcuts/calendar/host.js +2 -1
  65. package/dist/shortcuts/contract/host.js +2 -1
  66. package/dist/shortcuts/cowork/host.js +2 -1
  67. package/dist/shortcuts/ebuilder-form/host.js +3 -1
  68. package/dist/shortcuts/ehr/host.js +2 -1
  69. package/dist/shortcuts/esb/host.js +2 -1
  70. package/dist/shortcuts/fna/host.js +2 -1
  71. package/dist/shortcuts/hrm/host.js +2 -1
  72. package/dist/shortcuts/im/host.js +3 -2
  73. package/dist/shortcuts/invoice/host.js +5 -4
  74. package/dist/shortcuts/jiuchuanhui/host.js +2 -1
  75. package/dist/shortcuts/mail/host.js +2 -1
  76. package/dist/shortcuts/meeting/host.js +3 -2
  77. package/dist/shortcuts/meeting/invitation/text.js +71 -0
  78. package/dist/shortcuts/meeting/operations/eb/create-flow.js +1073 -50
  79. package/dist/shortcuts/meeting/operations/eb/crm-search.js +478 -0
  80. package/dist/shortcuts/meeting/operations/eb/factory.js +60 -1
  81. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  82. package/dist/shortcuts/meeting/operations/invitation.js +122 -9
  83. package/dist/shortcuts/okr/host.js +2 -1
  84. package/dist/shortcuts/plan/host.js +2 -1
  85. package/dist/shortcuts/project/host.js +2 -1
  86. package/dist/shortcuts/workflow/operations/form.js +160 -2
  87. package/package.json +1 -1
  88. package/skills/weaver-e10-meeting/SKILL.md +250 -301
  89. package/skills/weaver-e10-meeting/references/meeting-eb.md +203 -0
  90. package/skills/weaver-e10-meeting/references/meeting-invitation.md +37 -5
  91. package/skills/weaver-e10-meeting.zip +0 -0
  92. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  93. 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-JUXVYKII.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-JNG42JKG.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -589,7 +590,7 @@ function createArchiveHost(ctx, dependencies = {}) {
589
590
  }
590
591
  async function request(request2) {
591
592
  const response = await doRequest(request2, false).catch((error) => mapRuntimeNetworkError(error));
592
- if (response.status === 401 || response.status === 302) {
593
+ if (isE10SessionExpiredResponse(response)) {
593
594
  throw archiveAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
594
595
  }
595
596
  if (response.parseError) {
@@ -620,7 +621,7 @@ function createArchiveHost(ctx, dependencies = {}) {
620
621
  }
621
622
  async function requestBinary(request2) {
622
623
  const response = await doRequest(request2, true).catch((error) => mapRuntimeNetworkError(error));
623
- if (response.status === 401 || response.status === 302) {
624
+ if (isE10SessionExpiredResponse(response)) {
624
625
  throw archiveAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
625
626
  }
626
627
  if (response.status < 200 || response.status >= 300) {
@@ -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-JUXVYKII.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-JNG42JKG.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -254,7 +255,7 @@ function createArchiveOaHost(ctx, dependencies = {}) {
254
255
  headers: { "X-Requested-With": "XMLHttpRequest", ...extraHeaders },
255
256
  timeoutMs
256
257
  }).catch((error) => mapRuntimeNetworkError(error));
257
- if (response.status === 401 || response.status === 302) {
258
+ if (isE10SessionExpiredResponse(response)) {
258
259
  throw archiveOaAuthError(
259
260
  "session_expired",
260
261
  E10_SESSION_EXPIRED_MESSAGE,
@@ -2,12 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  createE10RequestRuntime,
5
+ isE10SessionExpiredResponse,
5
6
  requireE10Session
6
- } from "./chunk-JUXVYKII.js";
7
+ } from "./chunk-UZZBA6PV.js";
7
8
  import {
8
9
  E10_SESSION_EXPIRED_MESSAGE,
9
10
  getActiveProfile
10
- } from "./chunk-JNG42JKG.js";
11
+ } from "./chunk-OJQUJZQF.js";
11
12
  import {
12
13
  CliError,
13
14
  isCliError,
@@ -271,7 +272,7 @@ function createZiguanjiaHost(ctx) {
271
272
  query,
272
273
  bigIntStrings: true
273
274
  });
274
- if (response.status === 401 || response.status === 302) {
275
+ if (isE10SessionExpiredResponse(response)) {
275
276
  throw ziguanjiaAuthError(
276
277
  "session_expired",
277
278
  E10_SESSION_EXPIRED_MESSAGE,
@@ -336,7 +337,7 @@ function createZiguanjiaHost(ctx) {
336
337
  formData: fd,
337
338
  bigIntStrings: false
338
339
  });
339
- if (response.status === 401 || response.status === 302) {
340
+ if (isE10SessionExpiredResponse(response)) {
340
341
  throw ziguanjiaAuthError(
341
342
  "session_expired",
342
343
  E10_SESSION_EXPIRED_MESSAGE,
@@ -408,7 +409,7 @@ function createZiguanjiaHost(ctx) {
408
409
  },
409
410
  bigIntStrings: true
410
411
  });
411
- if (response.status === 401 || response.status === 302) {
412
+ if (isE10SessionExpiredResponse(response)) {
412
413
  throw ziguanjiaAuthError(
413
414
  "session_expired",
414
415
  E10_SESSION_EXPIRED_MESSAGE,
@@ -464,7 +465,7 @@ function createZiguanjiaHost(ctx) {
464
465
  body: fullBody,
465
466
  bigIntStrings: true
466
467
  });
467
- if (response.status === 401 || response.status === 302) {
468
+ if (isE10SessionExpiredResponse(response)) {
468
469
  throw ziguanjiaAuthError(
469
470
  "session_expired",
470
471
  E10_SESSION_EXPIRED_MESSAGE,
@@ -497,7 +498,7 @@ function createZiguanjiaHost(ctx) {
497
498
  body: payload,
498
499
  bigIntStrings: true
499
500
  });
500
- if (response.status === 401 || response.status === 302) {
501
+ if (isE10SessionExpiredResponse(response)) {
501
502
  throw ziguanjiaAuthError(
502
503
  "session_expired",
503
504
  E10_SESSION_EXPIRED_MESSAGE,
@@ -8,9 +8,9 @@ import {
8
8
  looksLikeFileId,
9
9
  meetingAttachmentContentOperations,
10
10
  parseFileIdList
11
- } from "./chunk-HXJQI5NM.js";
12
- import "./chunk-5DQEEGCC.js";
13
- import "./chunk-TC6MZAO3.js";
11
+ } from "./chunk-6LTFIFLM.js";
12
+ import "./chunk-Z32KWY6G.js";
13
+ import "./chunk-ELYDWBZJ.js";
14
14
  import "./chunk-LUSPKZKY.js";
15
15
  import "./chunk-BUSC6UAE.js";
16
16
  export {
@@ -2,12 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  createE10RequestRuntime,
5
+ isE10SessionExpiredResponse,
5
6
  requireE10Session
6
- } from "./chunk-JUXVYKII.js";
7
+ } from "./chunk-UZZBA6PV.js";
7
8
  import {
8
9
  E10_SESSION_EXPIRED_MESSAGE,
9
10
  getActiveProfile
10
- } from "./chunk-JNG42JKG.js";
11
+ } from "./chunk-OJQUJZQF.js";
11
12
  import {
12
13
  CliError,
13
14
  isCliError,
@@ -222,7 +223,7 @@ function createBlogHost(ctx, dependencies = {}) {
222
223
  body,
223
224
  timeoutMs
224
225
  });
225
- if (response.status === 401 || response.status === 302) {
226
+ if (isE10SessionExpiredResponse(response)) {
226
227
  throw blogAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
227
228
  }
228
229
  if (response.parseError) {
@@ -265,7 +266,7 @@ function createBlogHost(ctx, dependencies = {}) {
265
266
  timeoutMs,
266
267
  headers: { Accept: "application/octet-stream, */*" }
267
268
  });
268
- if (response.status === 401 || response.status === 302) {
269
+ if (isE10SessionExpiredResponse(response)) {
269
270
  throw blogAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
270
271
  }
271
272
  const contentType = response.contentType;
@@ -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-JUXVYKII.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-JNG42JKG.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -273,7 +274,7 @@ function createCaizhilianHost(ctx, dependencies = {}) {
273
274
  }
274
275
  async function request(request2) {
275
276
  const response = await doRequest(request2, false).catch((error) => mapRuntimeNetworkError(error));
276
- if (response.status === 401 || response.status === 302) {
277
+ if (isE10SessionExpiredResponse(response)) {
277
278
  throw caizhilianAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
278
279
  }
279
280
  if (response.parseError) {
@@ -304,7 +305,7 @@ function createCaizhilianHost(ctx, dependencies = {}) {
304
305
  }
305
306
  async function requestBinary(request2) {
306
307
  const response = await doRequest(request2, true).catch((error) => mapRuntimeNetworkError(error));
307
- if (response.status === 401 || response.status === 302) {
308
+ if (isE10SessionExpiredResponse(response)) {
308
309
  throw caizhilianAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
309
310
  }
310
311
  if (response.status < 200 || response.status >= 300) {
@@ -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-JUXVYKII.js";
8
+ } from "./chunk-UZZBA6PV.js";
8
9
  import {
9
10
  E10_SESSION_EXPIRED_MESSAGE,
10
11
  getActiveProfile
11
- } from "./chunk-JNG42JKG.js";
12
+ } from "./chunk-OJQUJZQF.js";
12
13
  import {
13
14
  CliError,
14
15
  isCliError,
@@ -234,7 +235,7 @@ function createCalendarHost(ctx, dependencies = {}) {
234
235
  } catch (error) {
235
236
  mapRuntimeNetworkError(error);
236
237
  }
237
- if (response.status === 401 || response.status === 302) {
238
+ if (isE10SessionExpiredResponse(response)) {
238
239
  throw calendarAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
239
240
  }
240
241
  if (response.parseError) {
@@ -9,12 +9,13 @@ import {
9
9
  import {
10
10
  E10ApiError,
11
11
  createE10RequestRuntime,
12
+ isE10SessionExpiredResponse,
12
13
  requireE10Session
13
- } from "./chunk-JUXVYKII.js";
14
+ } from "./chunk-UZZBA6PV.js";
14
15
  import {
15
16
  E10_SESSION_EXPIRED_MESSAGE,
16
17
  getActiveProfile
17
- } from "./chunk-JNG42JKG.js";
18
+ } from "./chunk-OJQUJZQF.js";
18
19
 
19
20
  // src/shortcuts/hrm/host.ts
20
21
  function inferProfile(ctx) {
@@ -113,7 +114,7 @@ function createHrmHost(ctx, dependencies = {}) {
113
114
  } catch (error) {
114
115
  mapRuntimeNetworkError(error);
115
116
  }
116
- if (response.status === 401 || response.status === 302) {
117
+ if (isE10SessionExpiredResponse(response)) {
117
118
  throw hrmAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
118
119
  }
119
120
  if (response.parseError) {
@@ -2,13 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-5DQEEGCC.js";
5
+ } from "./chunk-Z32KWY6G.js";
6
6
  import {
7
7
  SCHEMA_ID,
8
8
  meetingSuccess,
9
9
  meetingValidationError,
10
10
  schemaOf
11
- } from "./chunk-TC6MZAO3.js";
11
+ } from "./chunk-ELYDWBZJ.js";
12
12
 
13
13
  // src/shortcuts/meeting/operations/attachment-content.ts
14
14
  import { mkdir, writeFile } from "node:fs/promises";
@@ -694,6 +694,7 @@ var meetingAttachmentContentOperations = [
694
694
  ];
695
695
 
696
696
  export {
697
+ PENDING_MARK,
697
698
  renderDocx,
698
699
  looksLikeFileId,
699
700
  parseFileIdList,
@@ -8,11 +8,12 @@ import {
8
8
  } from "./chunk-BYATLLEF.js";
9
9
  import {
10
10
  createE10RequestRuntime,
11
+ isE10SessionExpiredResponse,
11
12
  requireE10Session
12
- } from "./chunk-JUXVYKII.js";
13
+ } from "./chunk-UZZBA6PV.js";
13
14
  import {
14
15
  getActiveProfile
15
- } from "./chunk-JNG42JKG.js";
16
+ } from "./chunk-OJQUJZQF.js";
16
17
 
17
18
  // src/shortcuts/ebuilder-form/host.ts
18
19
  import { randomUUID } from "node:crypto";
@@ -219,7 +220,7 @@ function createEbuilderFormHost(ctx) {
219
220
  headers: options2.headers,
220
221
  bigIntStrings: options2.bigIntStrings ?? true
221
222
  });
222
- if ([302, 401, 403].includes(response.status)) {
223
+ if (isE10SessionExpiredResponse(response) || response.status === 403) {
223
224
  throw ebuilderAuthError("session_expired", "E10 \u767B\u5F55\u6001\u5DF2\u5931\u6548\u6216\u5F53\u524D\u8D26\u53F7\u65E0\u6743\u8BBF\u95EE\u8BE5 eBuilder \u6570\u636E", { httpStatus: response.status });
224
225
  }
225
226
  if (response.parseError) {