weaver-work-cli 0.1.75 → 0.1.76

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 (150) hide show
  1. package/dist/chunks/{archive-OZJ6PYUR.js → archive-ENBSUMHV.js} +1 -1
  2. package/dist/chunks/{archive-oa-BHL5RK2F.js → archive-oa-7BFPQ6M5.js} +1 -1
  3. package/dist/chunks/{asset-HKRFRQR2.js → asset-V5SUD3PW.js} +1 -1
  4. package/dist/chunks/{asset-idle-GGIR4KE7.js → asset-idle-3CEL7WFX.js} +1 -1
  5. package/dist/chunks/{attachment-content-4OV65NK5.js → attachment-content-24RL44SE.js} +3 -3
  6. package/dist/chunks/{blog-HYDP4DV3.js → blog-FLI4SS3P.js} +1 -1
  7. package/dist/chunks/{caizhilian-JS4RQZ6Z.js → caizhilian-7WCTKCCP.js} +3 -3
  8. package/dist/chunks/{calendar-SWRY4DIT.js → calendar-G726HUUH.js} +1 -1
  9. package/dist/chunks/{chunk-5ZJGPEIB.js → chunk-2KW7AI6P.js} +1 -1
  10. package/dist/chunks/{chunk-JOY3HZXL.js → chunk-2UV4IZIT.js} +21 -15
  11. package/dist/chunks/{chunk-VOMDD2C5.js → chunk-5E2FDXBU.js} +1 -1
  12. package/dist/chunks/{chunk-NWYHCZTY.js → chunk-AZC53XSQ.js} +1 -1
  13. package/dist/chunks/{chunk-U6Y32KEV.js → chunk-BWFCTE43.js} +1 -1
  14. package/dist/chunks/{chunk-MXCRKXOP.js → chunk-FPWCCRKT.js} +1 -1
  15. package/dist/chunks/{chunk-2AUFKU2D.js → chunk-H6N6U2D6.js} +10 -10
  16. package/dist/chunks/{chunk-I6NOHKEK.js → chunk-KJA7CRES.js} +1 -1
  17. package/dist/chunks/{chunk-PG5YSNYY.js → chunk-L5SCNJKX.js} +2 -2
  18. package/dist/chunks/{chunk-4FCBEWNB.js → chunk-MS7MKBGJ.js} +49 -49
  19. package/dist/chunks/{chunk-QJWVYOOV.js → chunk-NZQRW4KL.js} +2 -2
  20. package/dist/chunks/{chunk-BNKUHN4N.js → chunk-OVTCWLNQ.js} +2 -2
  21. package/dist/chunks/{chunk-5D2V7ZAN.js → chunk-PMRNIGKZ.js} +1 -1
  22. package/dist/chunks/{chunk-BSR5TM7U.js → chunk-Q7RXCK2Y.js} +4 -4
  23. package/dist/chunks/{chunk-ZWIMLT6P.js → chunk-R4PN3OFK.js} +6 -6
  24. package/dist/chunks/{chunk-OQCK5SAU.js → chunk-RVEKGVZU.js} +1 -1
  25. package/dist/chunks/{chunk-ZUB4M4N3.js → chunk-SQFKBWTR.js} +32 -32
  26. package/dist/chunks/{chunk-KWJEICD4.js → chunk-T7HVQ2WP.js} +2 -2
  27. package/dist/chunks/{chunk-TA2RBUTH.js → chunk-TBCKK6LH.js} +1 -1
  28. package/dist/chunks/{chunk-J7FAAHWH.js → chunk-UDBQJLQF.js} +1 -1
  29. package/dist/chunks/{chunk-ERZY6GYL.js → chunk-WHI6YAUE.js} +1 -1
  30. package/dist/chunks/{chunk-KEA4XQPO.js → chunk-WJQJ7YEX.js} +4 -4
  31. package/dist/chunks/{chunk-LJI4N6FV.js → chunk-XNN5PZTI.js} +1 -1
  32. package/dist/chunks/{cli-FULPXIKJ.js → cli-DFLV57LO.js} +33 -33
  33. package/dist/chunks/{commands-BNWFNTD3.js → commands-J52MJ6NF.js} +3 -3
  34. package/dist/chunks/{conflict-5BKCDV2F.js → conflict-72Q6DM4I.js} +2 -2
  35. package/dist/chunks/{contract-WI23OXVC.js → contract-IRNRQ5FY.js} +1 -1
  36. package/dist/chunks/{cowork-DZBBVNMQ.js → cowork-GZDODGKF.js} +1 -1
  37. package/dist/chunks/{create-flow-7ZRBRKX7.js → create-flow-UGTDI7SP.js} +6 -6
  38. package/dist/chunks/{data-PAZVE6QE.js → data-HTQZRPPI.js} +1 -1
  39. package/dist/chunks/{ebuilder-form-5SQXIGXN.js → ebuilder-form-GHNIZ7ET.js} +2 -2
  40. package/dist/chunks/{ehr-CX5F4ZAU.js → ehr-PHIBBUIG.js} +1 -1
  41. package/dist/chunks/{entry-mode-I2BYNONZ.js → entry-mode-5WOXFE67.js} +3 -3
  42. package/dist/chunks/{env-ZAQZ7EHN.js → env-H4ALHESA.js} +2 -2
  43. package/dist/chunks/{esb-DQTXDIBF.js → esb-ATRKVHCD.js} +3 -3
  44. package/dist/chunks/{factory-XRI6KZ7H.js → factory-COX6AVK7.js} +1 -1
  45. package/dist/chunks/{fna-FK6HQVJL.js → fna-IKYI3SST.js} +1 -1
  46. package/dist/chunks/{group-chat-MLWNYM2P.js → group-chat-ZIWQQO4G.js} +3 -3
  47. package/dist/chunks/{host-MEC4VQZA.js → host-6UOXYOOY.js} +2 -2
  48. package/dist/chunks/{host-KUMU3DDK.js → host-EJSJSLVK.js} +2 -2
  49. package/dist/chunks/{host-3EPREGXS.js → host-EYNLB6S4.js} +2 -2
  50. package/dist/chunks/{host-T6NNQGVZ.js → host-OT4KNR3G.js} +2 -2
  51. package/dist/chunks/{host-VI7Q45PM.js → host-UY4LQPN4.js} +2 -2
  52. package/dist/chunks/{host-J74JGYAW.js → host-XXGDQM7D.js} +2 -2
  53. package/dist/chunks/{hrm-KKVAW4P5.js → hrm-5JQ7QZ6A.js} +2 -2
  54. package/dist/chunks/{im-47CIWQNL.js → im-2YJW3EI5.js} +2 -2
  55. package/dist/chunks/{invoice-CDYRBNIG.js → invoice-37HR6L3W.js} +937 -552
  56. package/dist/chunks/{jiuchuanhui-M7QTRHZK.js → jiuchuanhui-KBWUZ7WT.js} +1 -1
  57. package/dist/chunks/{lazy-dispatch-FKQJZFI5.js → lazy-dispatch-MZ3EZYDL.js} +4 -4
  58. package/dist/chunks/{mail-NRBS5N6Y.js → mail-YBKUM6HM.js} +1 -1
  59. package/dist/chunks/{meeting-WC5LD3IO.js → meeting-XE6CTXYA.js} +12 -12
  60. package/dist/chunks/{minute-doc-OQUMDTKG.js → minute-doc-4BA2R5EA.js} +4 -4
  61. package/dist/chunks/{okr-EHKSKMPL.js → okr-HW7IULIR.js} +1 -1
  62. package/dist/chunks/{operations-V5VM5MS2.js → operations-4P2UYVLH.js} +3 -3
  63. package/dist/chunks/{performance-ZJADXJPN.js → performance-PM2G6L3E.js} +1 -1
  64. package/dist/chunks/{plan-OTDNBDJ7.js → plan-3YYGZ7ZM.js} +1 -1
  65. package/dist/chunks/{project-4XVBQ3HX.js → project-XREEXFU2.js} +1 -1
  66. package/dist/chunks/{reception-3FAHOOH7.js → reception-7G3J2MA6.js} +1 -1
  67. package/dist/chunks/{recruit-stage-3WTVWW2K.js → recruit-stage-TSQWOGQD.js} +1 -1
  68. package/dist/chunks/{registry-TJGCVRCW.js → registry-3VTB3KLV.js} +3 -3
  69. package/dist/chunks/{registry-NBTBXR4L.js → registry-7UDUWYB5.js} +11 -11
  70. package/dist/chunks/{room-recommend-KL62XB2Y.js → room-recommend-FO3HLPNB.js} +4 -4
  71. package/dist/chunks/{schedule-XOISYUPB.js → schedule-DHNNOHVS.js} +4 -4
  72. package/dist/chunks/{smart-extract-UYGNV3BM.js → smart-extract-T5Z4AULN.js} +1 -1
  73. package/dist/chunks/{workflow-V54LJPXL.js → workflow-MAGCHWYZ.js} +2 -2
  74. package/dist/index.js +1 -1
  75. package/dist/shortcuts/invoice/business-response.js +13 -0
  76. package/dist/shortcuts/invoice/calendar.js +24 -0
  77. package/dist/shortcuts/invoice/host.js +26 -15
  78. package/dist/shortcuts/invoice/index.js +2 -2
  79. package/dist/shortcuts/invoice/invoice-record.js +7 -2
  80. package/dist/shortcuts/invoice/manifest.js +179 -155
  81. package/dist/shortcuts/invoice/operations/get.js +9 -3
  82. package/dist/shortcuts/invoice/operations/issuing-red-requests.js +138 -0
  83. package/dist/shortcuts/invoice/operations/registry.js +4 -5
  84. package/dist/shortcuts/invoice/operations/reim-auto.js +40 -2
  85. package/dist/shortcuts/invoice/operations/reim-customer-projects.js +79 -0
  86. package/dist/shortcuts/invoice/operations/reim-customer.js +79 -30
  87. package/dist/shortcuts/invoice/operations/reim-relation.js +0 -146
  88. package/dist/shortcuts/invoice/operations/reim.js +2 -126
  89. package/dist/shortcuts/invoice/operations/shared.js +15 -17
  90. package/dist/shortcuts/invoice/preapproval-enrichment.js +180 -0
  91. package/dist/shortcuts/invoice/projection.js +14 -0
  92. package/dist/shortcuts/invoice/read-enrichment.js +123 -0
  93. package/docs/agent-invoice.md +28 -2
  94. package/docs/invoice.md +60 -9
  95. package/package.json +1 -1
  96. package/skill-template/domains/yepiaotong.md +36 -7
  97. package/skills/weaver-e10-recruit-stage/SKILL.md +104 -95
  98. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +43 -33
  99. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +36 -4
  100. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +168 -27
  101. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +10 -13
  102. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +1 -1
  103. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +2 -2
  104. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +13 -14
  105. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +2 -2
  106. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +20 -25
  107. package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +1 -1
  108. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +19 -7
  109. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +21 -30
  110. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +1 -1
  111. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -1
  112. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +1 -1
  113. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +1 -1
  114. package/skills/weaver-e10-recruit-stage/templates/match-report.html +15 -9
  115. package/skills/weaver-e10-yepiaotong/SKILL.md +133 -61
  116. package/skills/weaver-e10-yepiaotong/references/invoice-add.md +3 -1
  117. package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +18 -2
  118. package/skills/weaver-e10-yepiaotong/references/invoice-disabled-capabilities.md +3 -3
  119. package/skills/weaver-e10-yepiaotong/references/invoice-download.md +1 -1
  120. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +13 -1
  121. package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +3 -1
  122. package/skills/weaver-e10-yepiaotong/references/invoice-import.md +6 -4
  123. package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +42 -45
  124. package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +1 -1
  125. package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +18 -2
  126. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +14 -1
  127. package/skills/weaver-e10-yepiaotong/references/invoice-red-workflow.md +96 -0
  128. package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +56 -369
  129. package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +16 -6
  130. package/skills/weaver-e10-yepiaotong/references/name-fuzzy-search.md +38 -0
  131. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +163 -646
  132. package/skills/weaver-e10-yepiaotong/references/reim-customer-search.md +90 -44
  133. package/skills/weaver-e10-yepiaotong/references/reim-eligibility-rules.md +85 -0
  134. package/skills/weaver-e10-yepiaotong/references/reim-fill-validation.md +61 -0
  135. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +91 -280
  136. package/skills/weaver-e10-yepiaotong/references/reim-preapproval-rules.md +98 -0
  137. package/skills/weaver-e10-yepiaotong/references/reim-travel-invoice-matching.md +48 -0
  138. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +234 -695
  139. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +395 -204
  140. package/skills/weaver-e10-yepiaotong/references/travel-application-fill.md +84 -0
  141. package/skills/weaver-e10-yepiaotong/references/workflow-direct-fill.md +165 -0
  142. package/skills/weaver-e10-yepiaotong.zip +0 -0
  143. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  144. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  145. package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
  146. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +0 -93
  147. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +0 -774
  148. package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +0 -111
  149. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +0 -360
  150. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +0 -167
@@ -24,7 +24,7 @@ import {
24
24
  createE10RequestRuntime,
25
25
  isE10SessionExpiredResponse,
26
26
  requireE10Session
27
- } from "./chunk-MXCRKXOP.js";
27
+ } from "./chunk-FPWCCRKT.js";
28
28
  import {
29
29
  E10_SESSION_EXPIRED_MESSAGE
30
30
  } from "./chunk-IZCQU5D5.js";
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  builtinCommands
5
- } from "./chunk-PG5YSNYY.js";
5
+ } from "./chunk-L5SCNJKX.js";
6
6
  import {
7
7
  toCommandMetadata
8
8
  } from "./chunk-ZM7RN2IM.js";
@@ -17,11 +17,11 @@ import "./chunk-257JXJGD.js";
17
17
  import "./chunk-AJ62BGAW.js";
18
18
  import "./chunk-SU6IJD6D.js";
19
19
  import "./chunk-OJ4JPD25.js";
20
- import "./chunk-BNKUHN4N.js";
20
+ import "./chunk-OVTCWLNQ.js";
21
21
  import "./chunk-JWF2R6EQ.js";
22
22
  import "./chunk-MD5CW4B6.js";
23
- import "./chunk-JOY3HZXL.js";
24
- import "./chunk-MXCRKXOP.js";
23
+ import "./chunk-2UV4IZIT.js";
24
+ import "./chunk-FPWCCRKT.js";
25
25
  import "./chunk-IZCQU5D5.js";
26
26
  import "./chunk-QVKRNL7L.js";
27
27
  import "./chunk-Y3C6MDL7.js";
@@ -17,7 +17,7 @@ import {
17
17
  createE10RequestRuntime,
18
18
  isE10SessionExpiredResponse,
19
19
  requireE10Session
20
- } from "./chunk-MXCRKXOP.js";
20
+ } from "./chunk-FPWCCRKT.js";
21
21
  import {
22
22
  E10_SESSION_EXPIRED_MESSAGE
23
23
  } from "./chunk-IZCQU5D5.js";
@@ -3,21 +3,21 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  getMeetingOperation,
5
5
  meetingOperationDefinitions
6
- } from "./chunk-4FCBEWNB.js";
7
- import "./chunk-KWJEICD4.js";
6
+ } from "./chunk-MS7MKBGJ.js";
7
+ import "./chunk-T7HVQ2WP.js";
8
8
  import "./chunk-WMRNO6IU.js";
9
- import "./chunk-2AUFKU2D.js";
10
- import "./chunk-QJWVYOOV.js";
11
- import "./chunk-KEA4XQPO.js";
12
- import "./chunk-ZUB4M4N3.js";
13
- import "./chunk-ZWIMLT6P.js";
14
- import "./chunk-BSR5TM7U.js";
15
- import "./chunk-NWYHCZTY.js";
9
+ import "./chunk-H6N6U2D6.js";
10
+ import "./chunk-NZQRW4KL.js";
11
+ import "./chunk-WJQJ7YEX.js";
12
+ import "./chunk-SQFKBWTR.js";
13
+ import "./chunk-R4PN3OFK.js";
14
+ import "./chunk-Q7RXCK2Y.js";
15
+ import "./chunk-AZC53XSQ.js";
16
16
  import {
17
17
  degradeMeetingEnvToStandard,
18
18
  meetingStateDir,
19
19
  readCache
20
- } from "./chunk-I6NOHKEK.js";
20
+ } from "./chunk-KJA7CRES.js";
21
21
  import {
22
22
  MeetingCliError,
23
23
  asObject,
@@ -25,7 +25,7 @@ import {
25
25
  meetingAuthError,
26
26
  meetingNetworkError,
27
27
  meetingValidationError
28
- } from "./chunk-ERZY6GYL.js";
28
+ } from "./chunk-WHI6YAUE.js";
29
29
  import {
30
30
  MANIFEST_LIST_COMPACT_PATHS,
31
31
  manifestView,
@@ -42,7 +42,7 @@ import {
42
42
  createE10RequestRuntime,
43
43
  isE10SessionExpiredResponse,
44
44
  requireE10Session
45
- } from "./chunk-MXCRKXOP.js";
45
+ } from "./chunk-FPWCCRKT.js";
46
46
  import {
47
47
  E10_SESSION_EXPIRED_MESSAGE
48
48
  } from "./chunk-IZCQU5D5.js";
@@ -65,8 +65,8 @@ async function ensureMinuteDoc(env, input) {
65
65
  const id = String(input.id ?? "").trim();
66
66
  const mtId = String(input.mtId ?? "").trim();
67
67
  if (!id || !mtId) return null;
68
- const { getMeetingOperation } = await import("./registry-NBTBXR4L.js");
69
- const { meetingStateDir } = await import("./env-ZAQZ7EHN.js");
68
+ const { getMeetingOperation } = await import("./registry-7UDUWYB5.js");
69
+ const { meetingStateDir } = await import("./env-H4ALHESA.js");
70
70
  const { mkdir, writeFile } = await import("node:fs/promises");
71
71
  const { join } = await import("node:path");
72
72
  const subject = String(input.subject ?? "").trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
@@ -89,8 +89,8 @@ async function ensureMinuteDoc(env, input) {
89
89
  let docId = "";
90
90
  let docError = "";
91
91
  try {
92
- const { executeCaizhilianOperation } = await import("./operations-V5VM5MS2.js");
93
- const { createCaizhilianHost } = await import("./host-T6NNQGVZ.js");
92
+ const { executeCaizhilianOperation } = await import("./operations-4P2UYVLH.js");
93
+ const { createCaizhilianHost } = await import("./host-OT4KNR3G.js");
94
94
  const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
95
95
  const caizhilianEnv = {
96
96
  ctx: env.ctx,
@@ -17,7 +17,7 @@ import {
17
17
  createE10RequestRuntime,
18
18
  isE10SessionExpiredResponse,
19
19
  requireE10Session
20
- } from "./chunk-MXCRKXOP.js";
20
+ } from "./chunk-FPWCCRKT.js";
21
21
  import {
22
22
  E10_SESSION_EXPIRED_MESSAGE
23
23
  } from "./chunk-IZCQU5D5.js";
@@ -2,11 +2,11 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  executeCaizhilianOperation
5
- } from "./chunk-LJI4N6FV.js";
6
- import "./chunk-5D2V7ZAN.js";
5
+ } from "./chunk-XNN5PZTI.js";
6
+ import "./chunk-PMRNIGKZ.js";
7
7
  import "./chunk-P5GQRWDC.js";
8
8
  import "./chunk-7BDPM5ST.js";
9
- import "./chunk-MXCRKXOP.js";
9
+ import "./chunk-FPWCCRKT.js";
10
10
  import "./chunk-IZCQU5D5.js";
11
11
  import "./chunk-QVKRNL7L.js";
12
12
  import "./chunk-Y3C6MDL7.js";
@@ -8,7 +8,7 @@ import {
8
8
  createE10RequestRuntime,
9
9
  isE10SessionExpiredResponse,
10
10
  requireE10Session
11
- } from "./chunk-MXCRKXOP.js";
11
+ } from "./chunk-FPWCCRKT.js";
12
12
  import {
13
13
  E10_SESSION_EXPIRED_MESSAGE
14
14
  } from "./chunk-IZCQU5D5.js";
@@ -17,7 +17,7 @@ import {
17
17
  createE10RequestRuntime,
18
18
  isE10SessionExpiredResponse,
19
19
  requireE10Session
20
- } from "./chunk-MXCRKXOP.js";
20
+ } from "./chunk-FPWCCRKT.js";
21
21
  import {
22
22
  E10_SESSION_EXPIRED_MESSAGE
23
23
  } from "./chunk-IZCQU5D5.js";
@@ -16,7 +16,7 @@ import {
16
16
  createE10RequestRuntime,
17
17
  isE10SessionExpiredResponse,
18
18
  requireE10Session
19
- } from "./chunk-MXCRKXOP.js";
19
+ } from "./chunk-FPWCCRKT.js";
20
20
  import {
21
21
  E10_SESSION_EXPIRED_MESSAGE
22
22
  } from "./chunk-IZCQU5D5.js";
@@ -13,7 +13,7 @@ import {
13
13
  createE10RequestRuntime,
14
14
  getE10Session,
15
15
  requireE10Session
16
- } from "./chunk-MXCRKXOP.js";
16
+ } from "./chunk-FPWCCRKT.js";
17
17
  import {
18
18
  E10_AUTH_REQUIRED_MESSAGE
19
19
  } from "./chunk-IZCQU5D5.js";
@@ -23,7 +23,7 @@ import {
23
23
  createE10RequestRuntime,
24
24
  isE10SessionExpiredResponse,
25
25
  requireE10Session
26
- } from "./chunk-MXCRKXOP.js";
26
+ } from "./chunk-FPWCCRKT.js";
27
27
  import {
28
28
  E10_SESSION_EXPIRED_MESSAGE
29
29
  } from "./chunk-IZCQU5D5.js";
@@ -4,11 +4,11 @@ import {
4
4
  esbOperationDefinitions,
5
5
  getEsbOperation,
6
6
  hasEsbOperation
7
- } from "./chunk-VOMDD2C5.js";
8
- import "./chunk-OQCK5SAU.js";
7
+ } from "./chunk-5E2FDXBU.js";
8
+ import "./chunk-RVEKGVZU.js";
9
9
  import "./chunk-TXUG266F.js";
10
10
  import "./chunk-7BDPM5ST.js";
11
- import "./chunk-MXCRKXOP.js";
11
+ import "./chunk-FPWCCRKT.js";
12
12
  import "./chunk-IZCQU5D5.js";
13
13
  import "./chunk-QVKRNL7L.js";
14
14
  import "./chunk-Y3C6MDL7.js";
@@ -4,18 +4,18 @@ import {
4
4
  getMeetingOperation,
5
5
  hasMeetingOperation,
6
6
  meetingOperationDefinitions
7
- } from "./chunk-4FCBEWNB.js";
8
- import "./chunk-KWJEICD4.js";
7
+ } from "./chunk-MS7MKBGJ.js";
8
+ import "./chunk-T7HVQ2WP.js";
9
9
  import "./chunk-WMRNO6IU.js";
10
- import "./chunk-2AUFKU2D.js";
11
- import "./chunk-QJWVYOOV.js";
12
- import "./chunk-KEA4XQPO.js";
13
- import "./chunk-ZUB4M4N3.js";
14
- import "./chunk-ZWIMLT6P.js";
15
- import "./chunk-BSR5TM7U.js";
16
- import "./chunk-NWYHCZTY.js";
17
- import "./chunk-I6NOHKEK.js";
18
- import "./chunk-ERZY6GYL.js";
10
+ import "./chunk-H6N6U2D6.js";
11
+ import "./chunk-NZQRW4KL.js";
12
+ import "./chunk-WJQJ7YEX.js";
13
+ import "./chunk-SQFKBWTR.js";
14
+ import "./chunk-R4PN3OFK.js";
15
+ import "./chunk-Q7RXCK2Y.js";
16
+ import "./chunk-AZC53XSQ.js";
17
+ import "./chunk-KJA7CRES.js";
18
+ import "./chunk-WHI6YAUE.js";
19
19
  import "./chunk-7BDPM5ST.js";
20
20
  import "./chunk-QVKRNL7L.js";
21
21
  import "./chunk-Y3C6MDL7.js";
@@ -7,10 +7,10 @@ import {
7
7
  loadRooms,
8
8
  recommendRooms,
9
9
  rememberFrequentRoom
10
- } from "./chunk-BSR5TM7U.js";
11
- import "./chunk-NWYHCZTY.js";
12
- import "./chunk-I6NOHKEK.js";
13
- import "./chunk-ERZY6GYL.js";
10
+ } from "./chunk-Q7RXCK2Y.js";
11
+ import "./chunk-AZC53XSQ.js";
12
+ import "./chunk-KJA7CRES.js";
13
+ import "./chunk-WHI6YAUE.js";
14
14
  import "./chunk-7BDPM5ST.js";
15
15
  import "./chunk-UG5G54VL.js";
16
16
  import "./chunk-BUSC6UAE.js";
@@ -8,10 +8,10 @@ import {
8
8
  resolveMeetingScheduleTypeIds,
9
9
  resolveMemberIdsByName,
10
10
  runScheduleConflictFlow
11
- } from "./chunk-KEA4XQPO.js";
12
- import "./chunk-NWYHCZTY.js";
13
- import "./chunk-I6NOHKEK.js";
14
- import "./chunk-ERZY6GYL.js";
11
+ } from "./chunk-WJQJ7YEX.js";
12
+ import "./chunk-AZC53XSQ.js";
13
+ import "./chunk-KJA7CRES.js";
14
+ import "./chunk-WHI6YAUE.js";
15
15
  import "./chunk-7BDPM5ST.js";
16
16
  import "./chunk-UG5G54VL.js";
17
17
  import "./chunk-BUSC6UAE.js";
@@ -21,7 +21,7 @@ import {
21
21
  createE10RequestRuntime,
22
22
  isE10SessionExpiredResponse,
23
23
  requireE10Session
24
- } from "./chunk-MXCRKXOP.js";
24
+ } from "./chunk-FPWCCRKT.js";
25
25
  import "./chunk-IZCQU5D5.js";
26
26
  import {
27
27
  getActiveProfile
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-HP7JIYMT.js";
21
21
  import {
22
22
  createWorkflowHost
23
- } from "./chunk-TA2RBUTH.js";
23
+ } from "./chunk-TBCKK6LH.js";
24
24
  import {
25
25
  CLARIFICATION_SUBTYPE,
26
26
  WorkflowCliError,
@@ -36,7 +36,7 @@ import "./chunk-7BDPM5ST.js";
36
36
  import {
37
37
  reportPlatformError
38
38
  } from "./chunk-MD5CW4B6.js";
39
- import "./chunk-MXCRKXOP.js";
39
+ import "./chunk-FPWCCRKT.js";
40
40
  import "./chunk-IZCQU5D5.js";
41
41
  import "./chunk-QVKRNL7L.js";
42
42
  import "./chunk-Y3C6MDL7.js";
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@ async function bootstrap(argv = process.argv.slice(2)) {
112
112
  var startup = await bootstrap();
113
113
  if (!startup.handled) {
114
114
  try {
115
- await import("./chunks/cli-FULPXIKJ.js");
115
+ await import("./chunks/cli-DFLV57LO.js");
116
116
  } finally {
117
117
  startup.release?.();
118
118
  }
@@ -0,0 +1,13 @@
1
+ import { InvoiceCliError } from './errors.js';
2
+ export function assertBusinessSuccess(value, subtype, fallbackMessage) {
3
+ const result = value && typeof value === 'object' ? value : {};
4
+ const code = result.code ?? result.res_base?.ret;
5
+ const failed = result.fail === true || result.status === false || (code !== undefined && code !== 0 && code !== 200);
6
+ if (!failed)
7
+ return;
8
+ throw new InvoiceCliError('api', subtype, result.message || result.msg || result.res_base?.message || fallbackMessage, {
9
+ code,
10
+ details: { result },
11
+ exitCode: 1,
12
+ });
13
+ }
@@ -0,0 +1,24 @@
1
+ function formatUtcDate(date) {
2
+ const y = date.getUTCFullYear();
3
+ const m = String(date.getUTCMonth() + 1).padStart(2, '0');
4
+ const d = String(date.getUTCDate()).padStart(2, '0');
5
+ return `${y}-${m}-${d}`;
6
+ }
7
+ /** 按日历日加减,跨月、跨年按公历进位。 */
8
+ export function addCalendarDays(isoDate, offsetDays) {
9
+ const [year, month, day] = isoDate.split('-').map(Number);
10
+ return formatUtcDate(new Date(Date.UTC(year, (month ?? 1) - 1, (day ?? 1) + offsetDays)));
11
+ }
12
+ /** 按日历月加减;目标月没有这一天时取该月最后一天。 */
13
+ export function addCalendarMonths(isoDate, offsetMonths) {
14
+ const [year, month, day] = isoDate.split('-').map(Number);
15
+ const target = new Date(Date.UTC(year, (month ?? 1) - 1 + offsetMonths, 1));
16
+ const lastDay = new Date(Date.UTC(target.getUTCFullYear(), target.getUTCMonth() + 1, 0)).getUTCDate();
17
+ target.setUTCDate(Math.min(day ?? 1, lastDay));
18
+ return formatUtcDate(target);
19
+ }
20
+ /** 东八区日历日。 */
21
+ export function shanghaiCalendarDate(offsetDays = 0, now = new Date()) {
22
+ const today = new Intl.DateTimeFormat('en-CA', { timeZone: 'Asia/Shanghai' }).format(now);
23
+ return offsetDays === 0 ? today : addCalendarDays(today, offsetDays);
24
+ }
@@ -99,6 +99,7 @@ export function createInvoiceHost(ctx, dependencies = {}) {
99
99
  let e10Session = null;
100
100
  let sessionContext = null;
101
101
  let invoiceToken = null;
102
+ let invoiceTokenPromise = null;
102
103
  let tokenStore = null;
103
104
  const requireSession = dependencies.requireSession || requireE10Session;
104
105
  const tokenStoreFactory = dependencies.tokenStoreFactory || createInvoiceTokenStore;
@@ -118,6 +119,21 @@ export function createInvoiceHost(ctx, dependencies = {}) {
118
119
  return sessionContext;
119
120
  }
120
121
  async function ensureInvoiceToken(timeoutMs = 30_000) {
122
+ if (invoiceToken)
123
+ return invoiceToken;
124
+ if (invoiceTokenPromise)
125
+ return invoiceTokenPromise;
126
+ const pending = loadInvoiceToken(timeoutMs);
127
+ invoiceTokenPromise = pending;
128
+ try {
129
+ return await pending;
130
+ }
131
+ finally {
132
+ if (invoiceTokenPromise === pending)
133
+ invoiceTokenPromise = null;
134
+ }
135
+ }
136
+ async function loadInvoiceToken(timeoutMs) {
121
137
  await ensureSession();
122
138
  const context = await getSession();
123
139
  tokenStore ||= tokenStoreFactory(context);
@@ -145,11 +161,15 @@ export function createInvoiceHost(ctx, dependencies = {}) {
145
161
  invoiceToken = token;
146
162
  return token;
147
163
  }
148
- async function ensureContext(needsInvoiceToken, timeoutMs, path) {
149
- await ensureSession();
164
+ async function ensureContext(needsInvoiceToken, timeoutMs, path, operation) {
165
+ const session = await ensureSession();
150
166
  const tokenEndpoint = path === '/api/inc/proxy/getToken' || path === '/api/app/inc/proxy/getToken';
151
167
  if (tokenEndpoint)
152
168
  return undefined;
169
+ // 当前人员卡片使用 E10 公共会话,此路径不发送业票通专用 Token。
170
+ const employeeCardPath = `/api/bs/hrm/card/get/${encodeURIComponent(session.userId)}`;
171
+ if (!needsInvoiceToken && path === employeeCardPath)
172
+ return undefined;
153
173
  if (!needsInvoiceToken) {
154
174
  // 兼容调用方参数,但业务路径仍强制补齐发票 Token。
155
175
  }
@@ -188,7 +208,7 @@ export function createInvoiceHost(ctx, dependencies = {}) {
188
208
  async function invoiceRequest(request, canRetryExpiredToken = true) {
189
209
  const { method = 'POST', path, query, headers, body, operation, needsInvoiceToken = true, timeoutMs = 30_000, } = request;
190
210
  assertPath(path);
191
- const token = await ensureContext(needsInvoiceToken, timeoutMs, path);
211
+ const token = await ensureContext(needsInvoiceToken, timeoutMs, path, operation);
192
212
  const response = await (await runtime()).requestJson({
193
213
  module: 'invoice',
194
214
  operation,
@@ -220,16 +240,7 @@ export function createInvoiceHost(ctx, dependencies = {}) {
220
240
  exitCode: 1,
221
241
  });
222
242
  }
223
- let value = response.value;
224
- if (request.rewriteJsonText && response.text) {
225
- try {
226
- value = JSON.parse(request.rewriteJsonText(response.text));
227
- }
228
- catch {
229
- value = response.value;
230
- }
231
- }
232
- return handleBusinessResponse(value, () => invoiceRequest(request, false), canRetryExpiredToken && Boolean(token));
243
+ return handleBusinessResponse(response.value, () => invoiceRequest(request, false), canRetryExpiredToken && Boolean(token));
233
244
  }
234
245
  async function invoiceMultipartRequest(request, canRetryExpiredToken = true) {
235
246
  const { method = 'POST', path, query, fields = {}, file, headers, operation, needsInvoiceToken = true, timeoutMs = 30_000, } = request;
@@ -237,7 +248,7 @@ export function createInvoiceHost(ctx, dependencies = {}) {
237
248
  throw invoiceValidationError('input_invalid', 'multipart 请求需要文件、URL 或表单字段');
238
249
  }
239
250
  assertPath(path);
240
- const token = await ensureContext(needsInvoiceToken, timeoutMs, path);
251
+ const token = await ensureContext(needsInvoiceToken, timeoutMs, path, operation);
241
252
  const form = new FormData();
242
253
  for (const [key, value] of Object.entries(fields)) {
243
254
  if (value === undefined || value === null)
@@ -277,7 +288,7 @@ export function createInvoiceHost(ctx, dependencies = {}) {
277
288
  async function invoiceFormRequest(request, canRetryExpiredToken = true) {
278
289
  const { method = 'POST', path, query, fields = {}, operation, needsInvoiceToken = true, timeoutMs = 30_000, } = request;
279
290
  assertPath(path);
280
- const token = await ensureContext(needsInvoiceToken, timeoutMs, path);
291
+ const token = await ensureContext(needsInvoiceToken, timeoutMs, path, operation);
281
292
  const form = new URLSearchParams();
282
293
  for (const [key, value] of Object.entries(fields)) {
283
294
  if (value === undefined || value === null)
@@ -110,7 +110,7 @@ function successEnvelope(operation, result, meta) {
110
110
  operation,
111
111
  data: result.data,
112
112
  meta: { status: result.status, ...(meta ?? {}) },
113
- warnings: [],
113
+ warnings: result.warnings ?? [],
114
114
  };
115
115
  }
116
116
  function failureEnvelope(error) {
@@ -130,7 +130,7 @@ async function executeAndPrint(ctx, operation, input, projection = {}) {
130
130
  continuation: createInvoiceContinuationSigner(ctx),
131
131
  });
132
132
  const projected = applyInvoiceProjection(operation, result.data, projection);
133
- ctx.output.write(successEnvelope(operation, { status: result.status, data: projected.data }, projected.meta), { json: true });
133
+ ctx.output.write(successEnvelope(operation, { status: result.status, data: projected.data, warnings: result.warnings }, projected.meta), { json: true });
134
134
  }
135
135
  catch (error) {
136
136
  reportPlatformError(error);
@@ -2,8 +2,8 @@
2
2
  * 发票记录与票面扩展信息 `ext` 的语义提取。
3
3
  *
4
4
  * `ext` 是**字符串化的 JSON**。费用说明、城市、备注(常写出差地、订单行程)、起止地、上下车站点
5
- * 只在这里,报销按城市 / 行程筛票离不开它。list 的完整输出(`extInfo`)、summary 视图、
6
- * detail 视图共用这一份口径,避免同一业务概念在不同出口换名。
5
+ * 及乘车人身份信息在这里提取。列表 / 详情的完整输出(`extInfo`)、summary / detail 视图
6
+ * 共用这一份口径,避免同一业务概念在不同出口换名。
7
7
  */
8
8
  /**
9
9
  * `/api/inc/sync` 的 `mext` 按位选择返回哪些 ext 字段(1=trate、2=ttax …),不传就不返回 ext。
@@ -21,6 +21,8 @@ export const EXT_INFO_FIELDS = [
21
21
  'to',
22
22
  'stationGetOn',
23
23
  'stationGetOff',
24
+ 'userId',
25
+ 'passengerName',
24
26
  ];
25
27
  function asRecord(value) {
26
28
  return value && typeof value === 'object' && !Array.isArray(value) ? value : {};
@@ -84,6 +86,9 @@ export function invoiceExtInfo(invoice) {
84
86
  to: firstText(ext.to, invoice.to, passenger.to),
85
87
  stationGetOn: firstText(ext.station_geton, invoice.station_geton, passenger.station_geton),
86
88
  stationGetOff: firstText(ext.station_getoff, invoice.station_getoff, passenger.station_getoff),
89
+ // ext.userId 是乘车人身份证号,不是票夹用户 / 登录用户的 ID;保留字符串及末尾 X。
90
+ userId: text(ext.userId),
91
+ passengerName: text(ext.passengerName),
87
92
  };
88
93
  for (const [key, value] of Object.entries(info)) {
89
94
  if (!value)