weaver-work-cli 0.1.54 → 0.1.57

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 (189) hide show
  1. package/dist/chunks/{archive-ZQ4A4TV6.js → archive-4SQAVTIB.js} +3 -2
  2. package/dist/chunks/{archive-oa-57R2FYHV.js → archive-oa-W2UEJ67L.js} +137 -8
  3. package/dist/chunks/{asset-ZOJVBWZH.js → asset-EGZEABBI.js} +3 -2
  4. package/dist/chunks/{asset-idle-XGB5IPGT.js → asset-idle-EBUZBB6M.js} +3 -2
  5. package/dist/chunks/{attachment-content-2EPEI4HV.js → attachment-content-QGM5MLQE.js} +4 -3
  6. package/dist/chunks/{blog-QSHLZSFW.js → blog-2YKMWOWI.js} +3 -2
  7. package/dist/chunks/{caizhilian-KCQYFH72.js → caizhilian-QJ4FLSQJ.js} +5 -4
  8. package/dist/chunks/{calendar-DLGMRJQA.js → calendar-H4QTJCUY.js} +3 -2
  9. package/dist/chunks/{chunk-XPQN4E5O.js → chunk-44KJ7WFA.js} +300 -55
  10. package/dist/chunks/{chunk-CZNZKOHR.js → chunk-4GG72JAT.js} +2 -2
  11. package/dist/chunks/{chunk-YIKSL36S.js → chunk-5N222HK6.js} +2 -2
  12. package/dist/chunks/{chunk-XHMJBRLZ.js → chunk-6DVL5IN5.js} +4 -1
  13. package/dist/chunks/{chunk-JJRIT2ZN.js → chunk-6MS3RLPO.js} +5 -334
  14. package/dist/chunks/{chunk-QUDHSMG3.js → chunk-7EBV7Q3R.js} +112 -27
  15. package/dist/chunks/{chunk-CNVZETM5.js → chunk-AHJZIMCX.js} +1 -1
  16. package/dist/chunks/{chunk-TGAGQV4I.js → chunk-CQ4OVCKG.js} +2 -2
  17. package/dist/chunks/{chunk-2BQESR2U.js → chunk-DVR2EDUU.js} +99 -34
  18. package/dist/chunks/{chunk-7KKI5KDY.js → chunk-FDAJC7R4.js} +4 -4
  19. package/dist/chunks/{chunk-GR76ZDDX.js → chunk-FMNCSYIG.js} +2 -2
  20. package/dist/chunks/{chunk-6LGLI46Q.js → chunk-L2LMBFG5.js} +1 -1
  21. package/dist/chunks/{chunk-DLY5GUXX.js → chunk-PH7N4UFT.js} +1 -1
  22. package/dist/chunks/{chunk-U6R6FZHD.js → chunk-SFM3M2L3.js} +286 -93
  23. package/dist/chunks/chunk-SHYQUBY3.js +48 -0
  24. package/dist/chunks/{chunk-HFXK54M4.js → chunk-TGM7BWEH.js} +2 -2
  25. package/dist/chunks/{chunk-Z7B7QSR2.js → chunk-TJUAGZU7.js} +11 -11
  26. package/dist/chunks/{chunk-LYOFRYC4.js → chunk-UI66EMOR.js} +4 -4
  27. package/dist/chunks/{chunk-762M5XJS.js → chunk-VMCCRWFO.js} +2 -2
  28. package/dist/chunks/{chunk-FE3CQAAM.js → chunk-WHJIUKJW.js} +681 -48
  29. package/dist/chunks/{chunk-PGO4ILMQ.js → chunk-WMB3SMXI.js} +1 -1
  30. package/dist/chunks/chunk-WMRNO6IU.js +337 -0
  31. package/dist/chunks/{chunk-6NXT4ICB.js → chunk-WVH5ESDA.js} +1 -1
  32. package/dist/chunks/{chunk-O6RIBG5E.js → chunk-XU3FL3AW.js} +4 -4
  33. package/dist/chunks/{chunk-Z6UUBY37.js → chunk-Z4IPY5GV.js} +2 -2
  34. package/dist/chunks/{conflict-K2IAKKFR.js → conflict-VAFFPUY3.js} +2 -2
  35. package/dist/chunks/{contract-LJRAXVZU.js → contract-LLRKMLQQ.js} +2655 -1319
  36. package/dist/chunks/{cowork-3ACICHDQ.js → cowork-2RDFBZWB.js} +3 -2
  37. package/dist/chunks/{create-flow-UL37MZGP.js → create-flow-TVYE3IOH.js} +6 -6
  38. package/dist/chunks/{data-WK5CQXNF.js → data-WVICO3DT.js} +57 -11
  39. package/dist/chunks/{ebuilder-form-CBYI6CQ6.js → ebuilder-form-TWSXS5NA.js} +7 -6
  40. package/dist/chunks/{ehr-XI4BIVR2.js → ehr-52GBKNJR.js} +3 -2
  41. package/dist/chunks/{env-BZDB5OVZ.js → env-BVVFIN4P.js} +2 -2
  42. package/dist/chunks/{esb-4BQHNP5C.js → esb-HJSXCEOM.js} +5 -4
  43. package/dist/chunks/{factory-VD3YI6N7.js → factory-RCQ36LLE.js} +1 -1
  44. package/dist/chunks/{fna-ECOYBQYL.js → fna-OBACRT3J.js} +72 -3
  45. package/dist/chunks/{group-chat-DHNVO76L.js → group-chat-YFZDUUY3.js} +3 -3
  46. package/dist/chunks/{host-TUOIOEMC.js → host-2BKMPWDH.js} +4 -3
  47. package/dist/chunks/{host-3TNBMDTR.js → host-KJT3G5D2.js} +4 -3
  48. package/dist/chunks/{host-7OWWPLM4.js → host-KOWUMNAY.js} +4 -3
  49. package/dist/chunks/{host-M4XP5URR.js → host-MFXRA2MY.js} +4 -3
  50. package/dist/chunks/{host-7NTIBSPK.js → host-TTSGY5NZ.js} +4 -3
  51. package/dist/chunks/{host-G3VU7SDW.js → host-W4JCNRFS.js} +4 -3
  52. package/dist/chunks/{hrm-YGIR3HGF.js → hrm-AK3WGBMN.js} +4 -3
  53. package/dist/chunks/{im-TN2JYVGJ.js → im-JZSBPO4Z.js} +4 -3
  54. package/dist/chunks/{invoice-V7ZTITUO.js → invoice-7JGSEWT5.js} +22 -9
  55. package/dist/chunks/{jiuchuanhui-ASFZBMPU.js → jiuchuanhui-K4EQU6GK.js} +3 -2
  56. package/dist/chunks/{lazy-dispatch-XSAHDK6Z.js → lazy-dispatch-JHGFCKJN.js} +5 -4
  57. package/dist/chunks/{mail-M3HJF5ER.js → mail-IKVCQCVZ.js} +3 -2
  58. package/dist/chunks/{meeting-OWG4O2XH.js → meeting-JOHV4RH3.js} +14 -12
  59. package/dist/chunks/minute-doc-JLS4KMFZ.js +156 -0
  60. package/dist/chunks/{okr-EVX7FB5G.js → okr-KV43FPPX.js} +3 -2
  61. package/dist/chunks/{operations-J7PUIVWZ.js → operations-ZPWBMYKE.js} +5 -4
  62. package/dist/chunks/{plan-2QJQEPBO.js → plan-WOYR4WEG.js} +3 -2
  63. package/dist/chunks/{project-XELELW2T.js → project-CQJKBUIL.js} +3 -2
  64. package/dist/chunks/{reception-QGPNTGHG.js → reception-MPBU3JXC.js} +3 -2
  65. package/dist/chunks/{recruit-stage-XCMVEQA2.js → recruit-stage-USTTRHOX.js} +3 -2
  66. package/dist/chunks/{registry-CJOVECZD.js → registry-GURQG4ZV.js} +3 -2
  67. package/dist/chunks/{registry-ASYCWF2U.js → registry-LITYOH2W.js} +12 -10
  68. package/dist/chunks/{registry-QJCZ2GVG.js → registry-SS5J2FZQ.js} +5 -4
  69. package/dist/chunks/{room-recommend-LSVAMGKV.js → room-recommend-62MECG4J.js} +4 -4
  70. package/dist/chunks/{schedule-7QOPRUU4.js → schedule-6QRXIBGU.js} +4 -4
  71. package/dist/chunks/{smart-extract-FOUYNIG3.js → smart-extract-APX2PNIN.js} +3 -2
  72. package/dist/chunks/{workflow-YHXFIU63.js → workflow-WMPW3WSB.js} +5 -4
  73. package/dist/index.js +33 -32
  74. package/dist/internal/e10/auth/agent-host-key.js +68 -0
  75. package/dist/internal/e10/auth/agent-hosts.js +250 -0
  76. package/dist/internal/e10/auth/commands.js +99 -30
  77. package/dist/internal/e10/auth/paths.js +9 -0
  78. package/dist/internal/e10/auth/session.js +17 -0
  79. package/dist/internal/e10/auth/xiaoe.js +37 -3
  80. package/dist/shortcuts/archive-oa/operations/contract-modules.js +106 -0
  81. package/dist/shortcuts/archive-oa/operations/contract.js +38 -4
  82. package/dist/shortcuts/archive-oa/operations/registry.js +2 -1
  83. package/dist/shortcuts/contract/index.js +6 -7
  84. package/dist/shortcuts/contract/manifest.js +101 -24
  85. package/dist/shortcuts/contract/ooxml/docx-table.js +75 -3
  86. package/dist/shortcuts/contract/ooxml/xlsx.js +49 -13
  87. package/dist/shortcuts/contract/operations/card-action.js +113 -12
  88. package/dist/shortcuts/contract/operations/card-ebdf-list.js +29 -7
  89. package/dist/shortcuts/contract/operations/card-plan.js +75 -9
  90. package/dist/shortcuts/contract/operations/card-risk-report.js +2 -2
  91. package/dist/shortcuts/contract/operations/card.js +1 -1
  92. package/dist/shortcuts/contract/operations/clause-library.js +88 -16
  93. package/dist/shortcuts/contract/operations/compare-screen.js +378 -0
  94. package/dist/shortcuts/contract/operations/compare.js +1 -1
  95. package/dist/shortcuts/contract/operations/credit-page.js +1 -1
  96. package/dist/shortcuts/contract/operations/docx-slots.js +1000 -0
  97. package/dist/shortcuts/contract/operations/flow.js +2 -2
  98. package/dist/shortcuts/contract/operations/quote-to-contract.js +495 -0
  99. package/dist/shortcuts/contract/operations/quote.js +2 -229
  100. package/dist/shortcuts/contract/operations/recommend.js +1 -1
  101. package/dist/shortcuts/contract/operations/registry.js +6 -2
  102. package/dist/shortcuts/contract/operations/review.js +230 -4
  103. package/dist/shortcuts/contract/operations/save-recognize.js +122 -3
  104. package/dist/shortcuts/contract/operations/template.js +11 -10
  105. package/dist/shortcuts/data/operations/ds.js +5 -5
  106. package/dist/shortcuts/data/operations/shared.js +76 -4
  107. package/dist/shortcuts/fna/manifest.js +7 -2
  108. package/dist/shortcuts/fna/operations/budget.js +68 -0
  109. package/dist/shortcuts/invoice/manifest.js +8 -3
  110. package/dist/shortcuts/invoice/operations/reim.js +10 -3
  111. package/dist/shortcuts/meeting/minute-doc.js +153 -0
  112. package/dist/shortcuts/meeting/operations/compose-outcome.js +176 -0
  113. package/dist/shortcuts/meeting/operations/eb/catalog.js +1 -1
  114. package/dist/shortcuts/meeting/operations/eb/create-flow.js +26 -0
  115. package/dist/shortcuts/meeting/operations/eb/decision-task-batch.js +144 -0
  116. package/dist/shortcuts/meeting/operations/eb/decision.js +92 -4
  117. package/dist/shortcuts/meeting/operations/eb/index.js +133 -4
  118. package/dist/shortcuts/meeting/operations/eb/meeting-link.js +90 -0
  119. package/dist/shortcuts/meeting/operations/from-group-chat.js +46 -0
  120. package/dist/shortcuts/meeting/operations/minute-content.js +61 -0
  121. package/dist/shortcuts/meeting/operations/registry.js +14 -1
  122. package/dist/shortcuts/meeting/operations/self-check.js +49 -0
  123. package/dist/shortcuts/workflow/endpoints.js +2 -0
  124. package/dist/shortcuts/workflow/operations/read.js +114 -8
  125. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +72 -46
  126. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +41 -0
  127. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +46 -11
  128. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +18 -1
  129. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroupAdd.js +51 -0
  130. package/docs/e10-auth.md +78 -0
  131. package/docs/fna.md +8 -3
  132. package/docs/invoice.md +1 -1
  133. package/package.json +4 -2
  134. package/scripts/pack-offline.mjs +228 -0
  135. package/scripts/package-skill.mjs +14 -5
  136. package/skill-template/business-info.json +3 -0
  137. package/skill-template/domains/qiyecheng.md +4 -3
  138. package/skills/weaver-e10-archive-oa/SKILL.md +6 -1
  139. package/skills/weaver-e10-archive-oa/references/contract-search.md +91 -4
  140. package/skills/weaver-e10-jinchengda/SKILL.md +100 -81
  141. package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +11 -6
  142. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +5 -4
  143. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +38 -12
  144. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +1 -1
  145. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
  146. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +20 -6
  147. package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +8 -3
  148. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +56 -13
  149. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +7 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
  151. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +11 -5
  152. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
  153. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
  154. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +38 -7
  155. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +13 -25
  156. package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +9 -8
  157. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +8 -6
  158. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +10 -7
  159. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +2 -2
  160. package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +3 -1
  161. package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +26 -18
  162. package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +4 -4
  163. package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +18 -13
  164. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +5 -3
  165. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +105 -49
  166. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
  167. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +3 -6
  168. package/skills/weaver-e10-meeting/SKILL.md +47 -9
  169. package/skills/weaver-e10-qiyecheng/SKILL.md +16 -7
  170. package/skills/weaver-e10-qiyecheng/references/budget.md +77 -3
  171. package/skills/weaver-e10-qiyecheng/references/catalog.md +6 -4
  172. package/skills/weaver-e10-qiyecheng/references/getEnabledTemplate-api.md +255 -0
  173. package/skills/weaver-e10-qiyecheng/references/source-manifest.json +70 -25
  174. package/skills/weaver-e10-workflow/SKILL.md +54 -40
  175. package/skills/weaver-e10-workflow/references/todo-dialogue.md +134 -0
  176. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +102 -80
  177. package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +23 -13
  178. package/skills/weaver-e10-workflow/references/workflow-query.md +68 -46
  179. package/skills/weaver-e10-workflow/references/workflow-view.md +21 -13
  180. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +317 -332
  181. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1 -0
  182. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +23 -13
  183. package/skills/weaver-e10-yepiaotong.zip +0 -0
  184. package/dist/shortcuts/contract/ooxml/docx.js +0 -295
  185. package/dist/shortcuts/contract/operations/docx-fillfromquote.js +0 -532
  186. package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +0 -178
  187. package/skills/weaver-e10-jinchengda/references/source-manifest.json +0 -1270
  188. package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +0 -998
  189. package/skills/weaver-e10-workflow/tools/todo-serve.cjs +0 -327
@@ -30,17 +30,56 @@ function excelSerialToIso(serial) {
30
30
  const iso = d.toISOString().slice(0, 10);
31
31
  return iso;
32
32
  }
33
+ /**
34
+ * 解析 `workbook.xml.rels`,返回 `rId → Target` 映射。
35
+ *
36
+ * 2026-11-16 修正:原正则 `/<Relationship[^>]*Id="..."[^>]*Target="..."[^>]*\/?>/gu`
37
+ * **要求 Id 必须出现在 Target 之前**。openpyxl、部分导出工具与系统生成的报表模板会把
38
+ * 属性写成 `Target` 在前,例如:
39
+ *
40
+ * ```xml
41
+ * <Relationship Type="...worksheet" Target="/xl/worksheets/sheet1.xml" Id="rId1"/>
42
+ * ```
43
+ *
44
+ * 此时正则整体失配 → 映射为空 → `readGrid` 报「workbook.xml.rels 缺少 sheet 关系」,
45
+ * 而 `listSheetNames` 因只读 workbook.xml 的 name 属性反而正常,掩盖了该问题。
46
+ * 改为先取标签、再逐个取属性,与属性顺序无关。
47
+ */
48
+ export function parseRelationships(relsXml) {
49
+ const relMap = new Map();
50
+ for (const m of relsXml.matchAll(/<Relationship\b[^>]*?\/?>/gu)) {
51
+ const id = /\bId="([^"]+)"/u.exec(m[0])?.[1];
52
+ const target = /\bTarget="([^"]+)"/u.exec(m[0])?.[1];
53
+ if (id && target)
54
+ relMap.set(id, target);
55
+ }
56
+ return relMap;
57
+ }
58
+ /**
59
+ * 解析 `workbook.xml` 的 `<sheet>` 列表。
60
+ *
61
+ * 同样不依赖 `name` 与 `r:id` 的先后顺序(原实现要求 `name` 在前)。
62
+ * 用 `<sheet\b` 而非 `<sheet`,避免误匹配 `<sheets>` 容器标签
63
+ * (`t` 与 `s` 之间不构成单词边界)。
64
+ */
65
+ export function parseSheetEntries(workbookXml) {
66
+ const entries = [];
67
+ for (const m of workbookXml.matchAll(/<sheet\b[^>]*?\/?>/gu)) {
68
+ const name = /\bname="([^"]*)"/u.exec(m[0])?.[1];
69
+ const rid = /\br:id="([^"]+)"/u.exec(m[0])?.[1];
70
+ if (name !== undefined)
71
+ entries.push({ name: decodeXml(name), rid: rid ?? '' });
72
+ }
73
+ return entries;
74
+ }
33
75
  export function listSheetNames(buffer) {
34
76
  const workbook = readZipText(buffer, 'xl/workbook.xml');
35
77
  const rels = readZipText(buffer, 'xl/_rels/workbook.xml.rels');
36
- const relMap = new Map();
37
- for (const m of rels.matchAll(/<Relationship[^>]*Id="([^"]+)"[^>]*Target="([^"]+)"[^>]*\/?>/gu)) {
38
- relMap.set(m[1], m[2]);
39
- }
78
+ const relMap = parseRelationships(rels);
40
79
  const names = [];
41
- for (const m of workbook.matchAll(/<sheet[^>]*name="([^"]*)"[^>]*r:id="([^"]+)"[^>]*\/?>/gu)) {
42
- names.push(decodeXml(m[1]));
43
- void relMap.get(m[2]);
80
+ for (const sheet of parseSheetEntries(workbook)) {
81
+ names.push(sheet.name);
82
+ void relMap.get(sheet.rid);
44
83
  }
45
84
  return names;
46
85
  }
@@ -82,15 +121,12 @@ function loadDateStyles(buffer) {
82
121
  export function readGrid(buffer, sheetIndex) {
83
122
  const workbook = readZipText(buffer, 'xl/workbook.xml');
84
123
  const rels = readZipText(buffer, 'xl/_rels/workbook.xml.rels');
85
- const relMap = new Map();
86
- for (const m of rels.matchAll(/<Relationship[^>]*Id="([^"]+)"[^>]*Target="([^"]+)"[^>]*\/?>/gu)) {
87
- relMap.set(m[1], m[2]);
88
- }
89
- const sheetMatches = [...workbook.matchAll(/<sheet[^>]*r:id="([^"]+)"[^>]*\/?>/gu)];
124
+ const relMap = parseRelationships(rels);
125
+ const sheetMatches = parseSheetEntries(workbook);
90
126
  const hit = sheetMatches[sheetIndex];
91
127
  if (!hit)
92
128
  throw new Error(`sheet 序号越界:${sheetIndex}`);
93
- let target = relMap.get(hit[1]);
129
+ let target = relMap.get(hit.rid);
94
130
  if (!target)
95
131
  throw new Error('workbook.xml.rels 缺少 sheet 关系,无法定位工作表。');
96
132
  if (target.startsWith('/'))
@@ -109,18 +109,23 @@ const JS_BASE = "var P=window.xiaoePlugin||(window.rawWindow&&window.rawWindow.x
109
109
  + "el.onmouseleave=function(){el.style.borderColor='#e8ebf2';el.style.boxShadow='none';};}";
110
110
  // 2026-11-13 用户指定:不再绑定 onkeydown。卡片是原生 <button>,Enter/Space 由浏览器原生触发 click,
111
111
  // 模板中因此不含任何 === 比较,避免模型手写时把 === 写成 = 造成 JS 语法异常。
112
- /** 内嵌模板(与 references/contract-action-card-template.html 一致)。 */
113
- const CARD_TEMPLATE = `<!--
112
+ /** 内嵌模板(与 references/contract-action-card-template.html 互为镜像,两者必须一致)。 */
113
+ export const CARD_TEMPLATE = `<!--
114
114
  行为卡片内层模板(contract-action-card-template.html)
115
- 2026-11-09 重写:由「可照抄的样例」改为「供 render_action_card.py 填充的真模板」
116
115
 
117
- 旧版问题:卡片与 handler 全部写死、button 布局不符合标准卡、只绑 click 无 hover、
118
- review 缺 params.compName、残留调试文案。照抄必错。
116
+ 定位:本模板由本文件下方的 renderActionCard() 在进程内替换占位符后产出完整 browsertool payload。
117
+ 模型**不写 HTML、不替换占位符、不做引号转义、不跑 node --check**。
119
118
 
120
- 占位符(全部由 render_action_card.py 替换):
119
+ 历史(不要照旧文档操作):
120
+ 2026-11-09 重写:由「可照抄的样例」改为「供渲染器填充的真模板」;
121
+ —— 旧版问题:卡片与 handler 全部写死、button 布局不符合标准卡、只绑 click 无 hover、
122
+ review 缺 params.compName、残留调试文案,照抄必错。
123
+ 2026-11-12:原负责替换占位符的 scripts/render_action_card.py 已删除,能力下沉为本 operation。
124
+
125
+ 占位符(全部由 renderActionCard() 替换):
121
126
  {{CARD_ID}} {{CARDS}} {{SUMMARY_JS}} {{COMPARE_JS}} {{REPORT_JS}} {{BODY}}
122
127
 
123
- 注意:本注释块在渲染时会被丢弃,脚本按「section 开标签含 id 属性」定位正文起点。
128
+ 注意:本注释块在渲染时会被丢弃,渲染器按「section 开标签含 id 属性」定位正文起点。
124
129
  -->
125
130
  <section id='{{CARD_ID}}' style='padding:4px 2px;font-family:Microsoft YaHei,PingFang SC,sans-serif'>
126
131
  {{CARDS}}
@@ -157,6 +162,28 @@ function jsStr(text) {
157
162
  function safeInline(value) {
158
163
  return truthyText(value).split("'").join('').split('\\').join('');
159
164
  }
165
+ /**
166
+ * 从多种入参形态里取出一侧比对文件。
167
+ *
168
+ * 兼容三类来源:`{fileId,fileName}` 对象、`comparePair` 里的平铺字段、顶层平铺字段。
169
+ * 任一来源给出非空 fileId 即采用(对象优先),全空返回 undefined。
170
+ */
171
+ function pickCompareFileRef(objects, ids, names) {
172
+ for (const candidate of objects) {
173
+ if (!candidate || typeof candidate !== 'object')
174
+ continue;
175
+ const row = candidate;
176
+ const fileId = truthyText(row.fileId) || truthyText(row.file_id);
177
+ if (!fileId)
178
+ continue;
179
+ return { fileId, fileName: truthyText(row.fileName) || truthyText(row.file_name) };
180
+ }
181
+ const fileId = ids.map((item) => truthyText(item)).find((item) => item.length > 0);
182
+ if (!fileId)
183
+ return undefined;
184
+ const fileName = names.map((item) => truthyText(item)).find((item) => item.length > 0) || '';
185
+ return { fileId, fileName };
186
+ }
160
187
  /** 按 action id 生成 handler 函数体;返回 null 表示缺关键参数、该卡不进。 */
161
188
  function buildHandler(action, cfg) {
162
189
  const aid = String(action.id ?? '');
@@ -164,8 +191,11 @@ function buildHandler(action, cfg) {
164
191
  const dom = `c-${meta[0]}`;
165
192
  if (aid === 'launch-flow') {
166
193
  const wid = FLOW_IDS.get(cfg.flow_key || '');
194
+ // flowKey 未定(报价单刚转出合同、未判类型)→ 提示语卡:发消息由对话侧判类型后办理。
195
+ // 2026-11-16 修复:旧实现此处直接 return null,把「发起合同流程」整张卡吞掉,
196
+ // 表现为「只有查资信一张卡」,且引擎侧 planned 里仍有它,排查时极易误判为引擎问题。
167
197
  if (!wid)
168
- return { dom, body: null };
198
+ return { dom, body: "function(){send('按这份合同发起合同流程');}" };
169
199
  let src = `${cfg.base}/sp/workflow/flowpage/create/${wid}?workflowId=${wid}&isCreate=1`;
170
200
  if (cfg.file_id)
171
201
  src += `&fileId=${cfg.file_id}`;
@@ -239,11 +269,18 @@ function buildHandler(action, cfg) {
239
269
  return { dom, body };
240
270
  }
241
271
  if (aid === 'view-compare') {
272
+ const baseFile = cfg.base_file;
273
+ const compareFile = cfg.compare_file;
274
+ // 比对页必须带两份文件;缺任一侧时该卡不出(空壳卡能打开但左右栏全空,且全程无报错)
275
+ if (!baseFile?.fileId || !compareFile?.fileId)
276
+ return { dom, body: null };
242
277
  const body = "function(){op({type:'e10Sdk',width:__W__,contentProps:{"
243
278
  + `src:'${cfg.base}/sp/contract/business/doc-compare',`
244
279
  + "sdkOptions:{compName:'ui.CorsComponent',routerType:'MemoryRouter',"
245
280
  + "routerProps:{initialEntries:['/sp/contract/business/doc-compare']},"
246
- + "params:{app:'@weapp/contract',compName:'AIDocCompare'}}}});}";
281
+ + "params:{app:'@weapp/contract',compName:'AIDocCompare',"
282
+ + `baseFile:{fileId:'${safeInline(baseFile.fileId)}',fileName:'${safeInline(baseFile.fileName)}'},`
283
+ + `compareFile:{fileId:'${safeInline(compareFile.fileId)}',fileName:'${safeInline(compareFile.fileName)}'}}}}});}`;
247
284
  return { dom, body };
248
285
  }
249
286
  if (aid === 'export-review') {
@@ -724,6 +761,37 @@ export function contentCheckActionCard(payload, expected) {
724
761
  else
725
762
  pass('审查详情卡 fileName', fname);
726
763
  }
764
+ // ── 3.5) 比对详情卡 params:缺 baseFile / compareFile 时页面能打开,但左右栏全空且不报错
765
+ const compareHit = /compName:'AIDocCompare',baseFile:\{fileId:'([^']*)',fileName:'([^']*)'\},compareFile:\{fileId:'([^']*)',fileName:'([^']*)'\}/u.exec(html);
766
+ const hasCompareSrc = /\/sp\/contract\/business\/doc-compare/u.test(html);
767
+ if (!hasCompareSrc) {
768
+ pass('比对详情卡 baseFile/compareFile', '无比对详情入口,跳过');
769
+ }
770
+ else if (!compareHit) {
771
+ fail('比对详情卡 baseFile/compareFile', 'params 缺 baseFile/compareFile(左右栏全空,且不报错)');
772
+ }
773
+ else {
774
+ const cardBaseId = String(compareHit[1]).trim();
775
+ const cardCompareId = String(compareHit[3]).trim();
776
+ const wantBaseId = String(expected.baseFileId ?? '').trim();
777
+ const wantCompareId = String(expected.compareFileId ?? '').trim();
778
+ if (!cardBaseId)
779
+ fail('比对详情卡 baseFile', 'fileId 为空(左栏空白)');
780
+ else if (!wantBaseId)
781
+ fail('比对详情卡 baseFile', `卡片=${cardBaseId},但 cfg.base_file 为空`);
782
+ else if (cardBaseId !== wantBaseId)
783
+ fail('比对详情卡 baseFile', `卡片=${cardBaseId},应为=${wantBaseId}`);
784
+ else
785
+ pass('比对详情卡 baseFile', cardBaseId);
786
+ if (!cardCompareId)
787
+ fail('比对详情卡 compareFile', 'fileId 为空(右栏空白)');
788
+ else if (!wantCompareId)
789
+ fail('比对详情卡 compareFile', `卡片=${cardCompareId},但 cfg.compare_file 为空`);
790
+ else if (cardCompareId !== wantCompareId)
791
+ fail('比对详情卡 compareFile', `卡片=${cardCompareId},应为=${wantCompareId}`);
792
+ else
793
+ pass('比对详情卡 compareFile', cardCompareId);
794
+ }
727
795
  // ── 4) 被 art() 引用的内容常量:空常量点开就是空白页,且不会报 JS 错误
728
796
  const consts = new Map();
729
797
  for (const hit of eachMatch(/var ([SRC])='((?:[^'\\]|\\.)*)'/gu, html)) {
@@ -777,7 +845,11 @@ export function selfCheckActionCard(payload, expected) {
777
845
  if (doubleQuotes !== 0 && !(doubleQuotes === 2 && sWrapped)) {
778
846
  problems.push(`html 内双引号 ${doubleQuotes} 个(只允许 0,或 var S="..." 的包裹对)`);
779
847
  }
780
- const unsafe = (html.match(/\\(?!\/script>|')/gu) ?? []).length;
848
+ // 允许三类安全转义:`\\`(合法双反斜杠,jsStr 会把内嵌内容里的原始 \ 翻倍)、
849
+ // `<\/script>`(闭标签转义)、`\'`(单引号转义)。
850
+ // 内嵌报告若自带 `\'`(如 charset=\'utf-8\'),jsStr 会逐级转成 `\\\'`,
851
+ // 只认后两种会让合法内容被误判成非安全转义(2026-11-16 实测误报 4 处)。
852
+ const unsafe = (html.match(/\\(?!\\|\/script>|')/gu) ?? []).length;
781
853
  if (unsafe)
782
854
  problems.push(`非安全转义反斜杠 ${unsafe} 处`);
783
855
  const scriptMatch = /<script>([\s\S]*)<\/script>/u.exec(html);
@@ -927,7 +999,11 @@ export function verifyBrowsertoolText(text) {
927
999
  problems.push('缺少 params_pc.customParams.html');
928
1000
  return { passed: false, problems, bytes };
929
1001
  }
930
- const scriptOpen = html.lastIndexOf('<script>');
1002
+ // 必须用 indexOf 取**最外层** script 起点:内嵌报告(如风险审查报告)自带 <script>,
1003
+ // 而 jsStr 只转义了闭标签 </script> → <\/script>,开标签仍是字面 <script>。
1004
+ // 用 lastIndexOf 会命中字符串内部那个开标签,截出的片段从字符串中间开始,
1005
+ // 表现为「脚本语法错误:Invalid or unexpected token」(2026-11-16 实测)。
1006
+ const scriptOpen = html.indexOf('<script>');
931
1007
  const scriptClose = html.lastIndexOf('</script>');
932
1008
  if (scriptOpen < 0 || scriptClose <= scriptOpen) {
933
1009
  problems.push('html 内缺少完整 <script> 块');
@@ -969,8 +1045,17 @@ function loadContext(input) {
969
1045
  if (direct && typeof direct === 'object' && !Array.isArray(direct)) {
970
1046
  return { ctx: direct, source: 'context' };
971
1047
  }
1048
+ // contextJson 既接受 JSON 字符串,也接受直接传对象。
1049
+ // 历史缺陷(2026-11-16 实测):旧实现只认字符串,传对象时被静默忽略 → 落到目录兜底,
1050
+ // 从 out 目录里的 first_screen_result.json 读出旧 flowKey,显式传 null 也压不住,
1051
+ // 最终多出一张「发起流程」卡,且流程附件会挂到错误的 fileId 上。
1052
+ if (input.contextJson && typeof input.contextJson === 'object' && !Array.isArray(input.contextJson)) {
1053
+ return { ctx: input.contextJson, source: 'contextJson' };
1054
+ }
972
1055
  const inline = typeof input.contextJson === 'string' && input.contextJson.trim() ? input.contextJson.trim() : '';
973
- const file = typeof input.contextFile === 'string' && input.contextFile.trim() ? resolve(input.contextFile.trim()) : '';
1056
+ const fileRaw = typeof input.contextFile === 'string' ? input.contextFile.trim() : '';
1057
+ const file = fileRaw ? resolve(fileRaw) : '';
1058
+ const explicit = Boolean(inline || fileRaw);
974
1059
  if (file) {
975
1060
  if (!isFile(file))
976
1061
  throw contractValidationError('context_unreadable', `上下文文件不存在:${file}`);
@@ -999,6 +1084,11 @@ function loadContext(input) {
999
1084
  throw contractValidationError('context_invalid', `上下文不是合法 JSON 对象:${message}`);
1000
1085
  }
1001
1086
  }
1087
+ // 显式给了上下文却没用上(如上一步未返回)→ 直接报错,不回落到目录扫描。
1088
+ // 回落的后果是静默使用上一轮的旧状态,卡片看起来正常但状态是错的,排查成本极高。
1089
+ if (explicit) {
1090
+ throw contractValidationError('context_empty', '已传 context 相关参数但未得到有效上下文,请检查取值,不要依赖目录兜底');
1091
+ }
1002
1092
  // 兜底:按产物所在目录找 card_context.json / first_screen_result.json
1003
1093
  const dirs = [];
1004
1094
  for (const key of ['out', 'summaryHtml', 'reportHtml', 'compareHtml']) {
@@ -1077,6 +1167,13 @@ export const contractCardActionOperation = {
1077
1167
  if (comparePath)
1078
1168
  setDefault('compared', true);
1079
1169
  setDefault('scene', 'doc');
1170
+ // 比对页要左右两份文件:对象形态优先,其次 comparePair 平铺字段,最后顶层入参
1171
+ const rawInput = input;
1172
+ const pair = (ctx.comparePair && typeof ctx.comparePair === 'object')
1173
+ ? ctx.comparePair
1174
+ : {};
1175
+ const baseFileRef = pickCompareFileRef([ctx.baseFile, rawInput.baseFile], [pair.baseFileId, ctx.baseFileId, rawInput.baseFileId], [pair.baseFileName, ctx.baseFileName, rawInput.baseFileName]);
1176
+ const compareFileRef = pickCompareFileRef([ctx.compareFile, rawInput.compareFile], [pair.compareFileId, ctx.compareFileId, rawInput.compareFileId], [pair.compareFileName, ctx.compareFileName, rawInput.compareFileName]);
1080
1177
  const stamp = stampNow();
1081
1178
  const cfg = {
1082
1179
  file_id: fileId || undefined,
@@ -1086,6 +1183,8 @@ export const contractCardActionOperation = {
1086
1183
  summary_html: readTextOrThrow(summaryPath, 'summaryHtml'),
1087
1184
  report_html: readTextOrThrow(reportPath, 'reportHtml'),
1088
1185
  compare_html: readTextOrThrow(comparePath, 'compareHtml'),
1186
+ base_file: baseFileRef,
1187
+ compare_file: compareFileRef,
1089
1188
  base: (truthyText(input.baseUrl) || DEFAULT_BASE).replace(/\/+$/u, ''),
1090
1189
  aiid: truthyText(input.aiid) || DEFAULT_AIID,
1091
1190
  ai_extra_id: truthyText(input.aiExtraId) || truthyText(ctx.aiExtraId) || '',
@@ -1123,6 +1222,8 @@ export const contractCardActionOperation = {
1123
1222
  summaryHtml: cfg.summary_html || '',
1124
1223
  reportHtml: cfg.report_html || '',
1125
1224
  compareHtml: cfg.compare_html || '',
1225
+ baseFileId: cfg.base_file?.fileId || '',
1226
+ compareFileId: cfg.compare_file?.fileId || '',
1126
1227
  });
1127
1228
  const text = `<browsertool>\n${JSON.stringify(payload, null, 1)}\n</browsertool>`;
1128
1229
  // 成品文本自检:查的是「最终要发出去的那段字符串」。
@@ -67,7 +67,7 @@ const LEDGER_FILTER_KINDS = {
67
67
  qdrq: 'dateRange',
68
68
  htzje: 'amountRange',
69
69
  xslx: 'text',
70
- xsjl2: 'text',
70
+ xsjl2: 'person',
71
71
  qy2: 'text',
72
72
  hsjg: 'text',
73
73
  },
@@ -75,9 +75,9 @@ const LEDGER_FILTER_KINDS = {
75
75
  hth: 'text',
76
76
  khmc: 'text',
77
77
  yjny: 'text',
78
- xsjl: 'text',
79
- tdfzr: 'text',
80
- jgfzr: 'text',
78
+ xsjl: 'person',
79
+ tdfzr: 'person',
80
+ jgfzr: 'person',
81
81
  },
82
82
  agree: {
83
83
  dls: 'text',
@@ -108,6 +108,8 @@ const LEDGER_FILTER_KINDS = {
108
108
  const LEDGER_ROUTE = '/sp/contract/ledger';
109
109
  const DATE_TEXT = /^\d{4}-\d{2}-\d{2}$/u;
110
110
  const AMOUNT_TEXT = /^-?\d+(\.\d+)?$/u;
111
+ /** 人员 ID:E10 人员主键是纯数字长串(如 732851919151005700);姓名一律视为非法值。 */
112
+ const PERSON_ID_TEXT = /^\d{6,32}$/u;
111
113
  const FIELD_KEY = /^field_\d+$/u;
112
114
  const PAGE_ID = /^\d{6,}$/u;
113
115
  const ORIGIN = /^https?:\/\/[^/]+$/u;
@@ -238,6 +240,7 @@ function buildCard(pageId, origin, title, callId, comParams) {
238
240
  type: 'e10',
239
241
  title,
240
242
  src: `${origin}/sp/ebdfpage/list/${pageId}`,
243
+ width: 1300,
241
244
  sdkRenderType: 'inline',
242
245
  sdkOptions: {
243
246
  compName: 'ui.CorsComponent',
@@ -322,6 +325,20 @@ function parseLedgerFilters(pairs, rawJson, viewKey) {
322
325
  out[key] = bounds;
323
326
  continue;
324
327
  }
328
+ if (kind === 'person') {
329
+ if (Array.isArray(raw)) {
330
+ throw contractValidationError('ledger_filter_person_invalid', `${key} 只接受单个人员 ID 字符串(如 "732851919151005700"),不要传数组;多人请分别出卡或改走取数链路。`);
331
+ }
332
+ if (raw !== null && typeof raw === 'object') {
333
+ throw contractValidationError('ledger_filter_person_invalid', `${key} 需要人员 ID 字符串,不能传对象。`);
334
+ }
335
+ const personId = raw === null || raw === undefined ? '' : typeof raw === 'string' ? raw.trim() : pyStr(raw);
336
+ if (personId && !PERSON_ID_TEXT.test(personId)) {
337
+ throw contractValidationError('ledger_filter_person_invalid', `${key} 需要纯数字人员 ID,收到 ${pyReprText(personId)};传姓名页面不生效,可先用 hrm.employee.query 取 id。`);
338
+ }
339
+ out[key] = personId;
340
+ continue;
341
+ }
325
342
  if (Array.isArray(raw) || (raw !== null && typeof raw === 'object')) {
326
343
  throw contractValidationError('ledger_filter_value_invalid', `${key} 需要一个字符串值。`);
327
344
  }
@@ -417,6 +434,11 @@ function selfCheckLedger(card, viewKey) {
417
434
  bad.push(`filters 区间不是两段字符串:${key}`);
418
435
  }
419
436
  }
437
+ else if (kind === 'person') {
438
+ if (typeof value !== 'string' || !PERSON_ID_TEXT.test(value)) {
439
+ bad.push(`filters 人员键必须是纯数字人员 ID 字符串:${key}`);
440
+ }
441
+ }
420
442
  else if (typeof value !== 'string') {
421
443
  bad.push(`filters 值不是字符串:${key}`);
422
444
  }
@@ -443,8 +465,8 @@ function selfCheck(card, pageId) {
443
465
  bad.push('arguments.type != e10');
444
466
  if (args.sdkRenderType !== 'inline')
445
467
  bad.push('sdkRenderType != inline');
446
- if ('width' in args)
447
- bad.push('ebdf 列表卡不应带 arguments.width');
468
+ if (args.width !== 1300)
469
+ bad.push('width 应为 1300');
448
470
  if (!String(args.src ?? '').endsWith(`/sp/ebdfpage/list/${pageId}`))
449
471
  bad.push('src 与 pageId 不一致');
450
472
  if (options.compName !== 'ui.CorsComponent')
@@ -563,7 +585,7 @@ export const contractCardEbdfListOperation = {
563
585
  card,
564
586
  selfCheck: problems,
565
587
  ...(output ? { output } : {}),
566
- note: 'ebdf 列表卡不带 arguments.width;comParams 键必须是 field_<字段id>',
588
+ note: 'ebdf 列表卡 arguments.width 固定 1300;comParams 键必须是 field_<字段id>',
567
589
  },
568
590
  };
569
591
  },
@@ -27,11 +27,19 @@ const ACTIONS = [
27
27
  },
28
28
  {
29
29
  id: 'launch-flow',
30
+ // 两条成立路径(2026-11-16 修复):
31
+ // ① flowKey 已定且有流程文件 → 直开表单并回填(walk=e10Sdk);
32
+ // ② 报价单刚转出合同、flowKey 未定且未上传 → 只给提示语,点击走 sendQuestion。
33
+ //
34
+ // 旧实现 requires 硬要求 `flowKey` + `hasFileId`,与「生成后不上传、不传 flowKey」
35
+ // 的定稿规则直接冲突:过滤发生在 requires 阶段,抑制规则里的
36
+ // 「flowKey=null 不抑制 launch-flow」根本轮不到执行,该卡在本场景永远消失。
30
37
  title: '发起「{flowKey}」合同流程',
31
38
  weight: 100,
32
39
  walk: 'e10Sdk',
33
40
  desc: '生成正式审批单并进入流转 | 证据齐 | 4~7 步 · 确认 2 次',
34
- requires: { flowKey: 'set', hasFileId: true },
41
+ requires: {},
42
+ any_of: [{ flowKey: 'set', hasFileId: true }, { generatedDocx: true, flowTypeUndetermined: true }],
35
43
  blocked: ['submitted'],
36
44
  },
37
45
  {
@@ -169,6 +177,34 @@ const QUERY_ACTIONS = [
169
177
  blocked: [],
170
178
  },
171
179
  ];
180
+ /**
181
+ * doc 场景的跨域补位动作(contract-action-engine.md §5)。
182
+ *
183
+ * 仅允许「与当前这份文件相关」的两条:客户历史合同、该合同收款。
184
+ * 业绩 / 渠道订单 / 我的合同属全局查询,塞进文件上下文里是噪音,禁止补位。
185
+ * 2026-11-16 修复:旧实现完全没有补位步骤,doc 域动作不足 2 条时也不补。
186
+ */
187
+ const DOC_TOPUP_ACTIONS = [
188
+ {
189
+ id: 'query-customer-contracts',
190
+ title: '查该客户的合同',
191
+ weight: 96,
192
+ walk: 'sendQuestion',
193
+ desc: '按客户主体查历史合同 | 只读',
194
+ requires: { hasCounterparty: true },
195
+ blocked: [],
196
+ },
197
+ {
198
+ id: 'query-contract-receipt',
199
+ title: '查该合同收款',
200
+ weight: 88,
201
+ walk: 'sendQuestion',
202
+ desc: '按客户或合同号查收款台账 | 只读',
203
+ requires: {},
204
+ any_of: [{ hasContractNo: true }, { hasCounterparty: true }],
205
+ blocked: [],
206
+ },
207
+ ];
172
208
  /** Python 真值语义:None/False/0/""/[]/{} 均为假。 */
173
209
  function pyTruthy(value) {
174
210
  if (value === null || value === undefined || value === false)
@@ -262,15 +298,45 @@ export function planActions(ctx) {
262
298
  return 1;
263
299
  return 0;
264
300
  });
265
- const picked = scored.slice(0, MAX_CARDS);
301
+ let picked = scored.slice(0, MAX_CARDS);
302
+ // 跨域补位(contract-action-engine.md §5):doc 场景动作少于 2 条时,
303
+ // 从「与当前文件相关」的查询动作里补足。补位必须在 requires 过滤之后、
304
+ // 截断之前执行,且不覆盖已有动作。
305
+ if (scene === 'doc' && picked.length < 2) {
306
+ const seen = new Set(picked.map((action) => action.id));
307
+ for (const action of DOC_TOPUP_ACTIONS) {
308
+ if (picked.length >= 2)
309
+ break;
310
+ if (seen.has(action.id))
311
+ continue;
312
+ if (!matches(action, ctx) || suppressed(action, ctx))
313
+ continue;
314
+ picked = [...picked, action];
315
+ seen.add(action.id);
316
+ }
317
+ }
266
318
  const flowKey = pyTruthy(ctx.flowKey) ? String(ctx.flowKey) : '';
267
- const cards = picked.map((action) => ({
268
- id: action.id,
269
- title: action.title.split('{flowKey}').join(flowKey),
270
- weight: action.weight,
271
- walk: action.walk,
272
- desc: action.desc,
273
- }));
319
+ // flowKey 未定 → 该卡是「提示语」而非真实流程入口:标题不带流程名,点击发消息。
320
+ // 同时避免 title 模板拼出「发起「」合同流程」这种空壳文案。
321
+ const launchIsHint = !pyTruthy(ctx.flowKey);
322
+ const cards = picked.map((action) => {
323
+ if (action.id === 'launch-flow' && launchIsHint) {
324
+ return {
325
+ id: action.id,
326
+ title: '发起合同流程',
327
+ weight: action.weight,
328
+ walk: 'sendQuestion',
329
+ desc: '按这份合同发起审批 | 由对话侧判定类型后办理 | 点后继续',
330
+ };
331
+ }
332
+ return {
333
+ id: action.id,
334
+ title: action.title.split('{flowKey}').join(flowKey),
335
+ weight: action.weight,
336
+ walk: action.walk,
337
+ desc: action.desc,
338
+ };
339
+ });
274
340
  return {
275
341
  scene,
276
342
  count: cards.length,
@@ -395,7 +395,7 @@ function passTags(d) {
395
395
  function detailCfg(d) {
396
396
  const cfg = {
397
397
  type: 'e10Sdk',
398
- width: 1200,
398
+ width: 1300,
399
399
  contentProps: {
400
400
  src: `${truthyText(d.base)}${DEFAULT_SRC_PATH}`,
401
401
  sdkOptions: {
@@ -441,7 +441,7 @@ export function buildRiskPayload(html, d, callId) {
441
441
  type: 'e10',
442
442
  title: truthyText(d.title) || '合同风险审查报告',
443
443
  src: `${truthyText(d.base)}/sp/contract/xiaoe-custom-page`,
444
- width: 1200,
444
+ width: 1300,
445
445
  sdkRenderType: 'inline',
446
446
  sdkOptions: {
447
447
  compName: 'ui.CorsComponent',
@@ -59,7 +59,7 @@ function run(c){
59
59
  var h=sb?sb.value:'';
60
60
  if(!h){say('摘要内容为空');return;}
61
61
  cfg.type='artifact';
62
- cfg.width=a.width||760;
62
+ cfg.width=a.width||${CARD_PANEL_WIDTH};
63
63
  cfg.contentProps={initialArtifactKeys:['summary-1'],artifacts:[{id:'summary-1',name:'合同摘要.html',fileType:'html',raw:{html:h}}]};
64
64
  }else{say('不支持的动作类型');return;}
65
65
  try{p.rightPanel.open(cfg);say('已打开');}catch(e){say('面板打开失败,请检查右侧面板');}