weaver-work-cli 0.1.29 → 0.1.32

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 (185) hide show
  1. package/dist/chunks/archive-UMGX72K6.js +2537 -0
  2. package/dist/chunks/archive-oa-N2IYBLF3.js +1317 -0
  3. package/dist/chunks/asset-GLEGKFG5.js +2109 -0
  4. package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
  5. package/dist/chunks/blog-E44OTVDA.js +2157 -0
  6. package/dist/chunks/caizhilian-DQUFZXZL.js +10087 -0
  7. package/dist/chunks/calendar-JKPIRKFD.js +1195 -0
  8. package/dist/chunks/chunk-2GA5ZIQL.js +1615 -0
  9. package/dist/chunks/chunk-4YC43QQ4.js +403 -0
  10. package/dist/chunks/chunk-6EFWDL7Y.js +161 -0
  11. package/dist/chunks/chunk-6RKD4DRZ.js +5556 -0
  12. package/dist/chunks/chunk-AJ62BGAW.js +29 -0
  13. package/dist/chunks/chunk-BUSC6UAE.js +43 -0
  14. package/dist/chunks/chunk-C6R3B2ML.js +358 -0
  15. package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
  16. package/dist/chunks/chunk-DW6AUUKS.js +508 -0
  17. package/dist/chunks/chunk-E4Z23GHM.js +6962 -0
  18. package/dist/chunks/chunk-EG6ZU444.js +654 -0
  19. package/dist/chunks/chunk-EZALDOQH.js +383 -0
  20. package/dist/chunks/chunk-FMPJJYYI.js +106 -0
  21. package/dist/chunks/chunk-G2JSIUWF.js +769 -0
  22. package/dist/chunks/chunk-G3QJULO2.js +387 -0
  23. package/dist/chunks/chunk-GCG2NMWR.js +703 -0
  24. package/dist/chunks/chunk-GPMFD4RD.js +75 -0
  25. package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
  26. package/dist/chunks/chunk-H7J4DC5R.js +464 -0
  27. package/dist/chunks/chunk-IURUFGZK.js +477 -0
  28. package/dist/chunks/chunk-LUSPKZKY.js +53 -0
  29. package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
  30. package/dist/chunks/chunk-NOODWMCL.js +584 -0
  31. package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
  32. package/dist/chunks/chunk-P26ZWSKU.js +73 -0
  33. package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
  34. package/dist/chunks/chunk-WKI2FBIQ.js +15606 -0
  35. package/dist/chunks/chunk-WSKBSQ2U.js +231 -0
  36. package/dist/chunks/chunk-YLCYX7LE.js +371 -0
  37. package/dist/chunks/chunk-YRVDW4WN.js +205 -0
  38. package/dist/chunks/chunk-ZEDWSH32.js +68 -0
  39. package/dist/chunks/continuation-2CKSBLA6.js +11 -0
  40. package/dist/chunks/continuation-HZIZRZBX.js +13 -0
  41. package/dist/chunks/continuation-NLECEJPX.js +11 -0
  42. package/dist/chunks/ebuilder-form-V5FG2EHC.js +2276 -0
  43. package/dist/chunks/ehr-HMFY6VIL.js +5241 -0
  44. package/dist/chunks/employee-SAK2QYXX.js +11 -0
  45. package/dist/chunks/esb-ZYSVB7SG.js +141 -0
  46. package/dist/chunks/fna-B7RKPAZD.js +1444 -0
  47. package/dist/chunks/host-45WED2KK.js +21 -0
  48. package/dist/chunks/host-I4Z6BFYX.js +23 -0
  49. package/dist/chunks/host-KNZ52LJZ.js +17 -0
  50. package/dist/chunks/host-OCH2BCCV.js +19 -0
  51. package/dist/chunks/hrm-2KAZGUHI.js +244 -0
  52. package/dist/chunks/im-ACJJWH4U.js +252 -0
  53. package/dist/chunks/invoice-ZK3WCX2U.js +5179 -0
  54. package/dist/chunks/jiuchuanhui-5PQD3IL2.js +1940 -0
  55. package/dist/chunks/lazy-dispatch-JQXBW3GM.js +28 -0
  56. package/dist/chunks/mail-S2HDDXO2.js +2695 -0
  57. package/dist/chunks/meeting-QVN3I37L.js +504 -0
  58. package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
  59. package/dist/chunks/okr-QNG4VC2Q.js +2482 -0
  60. package/dist/chunks/plan-A25EMW6U.js +2025 -0
  61. package/dist/chunks/project-G6XV66DZ.js +1361 -0
  62. package/dist/chunks/registry-2VLUAESA.js +14 -0
  63. package/dist/chunks/registry-7C5UMIPL.js +19 -0
  64. package/dist/chunks/registry-DC6KR3NH.js +18 -0
  65. package/dist/chunks/registry-NYPYMZXG.js +16 -0
  66. package/dist/chunks/registry-TI3CIUXF.js +19 -0
  67. package/dist/chunks/room-recommend-WRTHO6Y2.js +20 -0
  68. package/dist/chunks/schedule-KFIITGSK.js +24 -0
  69. package/dist/chunks/state-Y2XBP6YE.js +15 -0
  70. package/dist/chunks/workflow-DJ7SYWAF.js +245 -0
  71. package/dist/cmd/argv.js +45 -0
  72. package/dist/cmd/docs/index.js +3 -3
  73. package/dist/cmd/lazy-dispatch.js +20 -0
  74. package/dist/cmd/root.js +2 -4
  75. package/dist/cmd/setup/index.js +2 -2
  76. package/dist/cmd/skills/index.js +2 -2
  77. package/dist/core/package-paths.js +61 -0
  78. package/dist/index.js +163 -7
  79. package/dist/internal/e10/auth/xiaoe.js +3 -3
  80. package/dist/internal/e10/request-runtime.js +18 -62
  81. package/dist/internal/skills/detector.js +2 -2
  82. package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
  83. package/dist/shortcuts/contract/host.js +91 -35
  84. package/dist/shortcuts/contract/index.js +213 -0
  85. package/dist/shortcuts/contract/manifest.js +928 -0
  86. package/dist/shortcuts/contract/ooxml/docx.js +295 -0
  87. package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
  88. package/dist/shortcuts/contract/ooxml/zip.js +158 -0
  89. package/dist/shortcuts/contract/operations/assistant.js +1156 -0
  90. package/dist/shortcuts/contract/operations/clause-library.js +522 -0
  91. package/dist/shortcuts/contract/operations/compare.js +193 -0
  92. package/dist/shortcuts/contract/operations/credit-page.js +34 -0
  93. package/dist/shortcuts/contract/operations/flow.js +98 -0
  94. package/dist/shortcuts/contract/operations/page.js +66 -0
  95. package/dist/shortcuts/contract/operations/performance.js +733 -0
  96. package/dist/shortcuts/contract/operations/quote.js +557 -0
  97. package/dist/shortcuts/contract/operations/recommend.js +78 -0
  98. package/dist/shortcuts/contract/operations/registry.js +18 -0
  99. package/dist/shortcuts/contract/operations/review.js +83 -0
  100. package/dist/shortcuts/contract/operations/shared.js +37 -0
  101. package/dist/shortcuts/contract/operations/upload.js +108 -0
  102. package/dist/shortcuts/contract/operations/write.js +3 -2
  103. package/dist/shortcuts/index.js +140 -40
  104. package/dist/shortcuts/invoice/manifest.js +34 -11
  105. package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
  106. package/dist/shortcuts/invoice/operations/reim.js +81 -5
  107. package/dist/shortcuts/invoice/operations/shared.js +12 -5
  108. package/dist/shortcuts/meeting/host.js +45 -3
  109. package/dist/shortcuts/meeting/invitation/docx.js +442 -0
  110. package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
  111. package/dist/shortcuts/meeting/operations/attachment.js +442 -0
  112. package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
  113. package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
  114. package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
  115. package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
  116. package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
  117. package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
  118. package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
  119. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
  120. package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
  121. package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
  122. package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
  123. package/dist/shortcuts/meeting/operations/invitation.js +458 -0
  124. package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
  125. package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
  126. package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
  127. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  128. package/dist/shortcuts/meeting/operations/registry.js +18 -0
  129. package/dist/shortcuts/meeting/operations/summary.js +276 -0
  130. package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
  131. package/dist/shortcuts/meeting/operations.js +42 -1
  132. package/dist/shortcuts/meeting/qr/encoder.js +427 -0
  133. package/dist/shortcuts/meeting/qr/render.js +103 -0
  134. package/dist/shortcuts/workflow/operations/form.js +17 -5
  135. package/docs/contract.md +39 -4
  136. package/docs/invoice.md +5 -5
  137. package/package.json +3 -2
  138. package/scripts/bundle.mjs +63 -0
  139. package/skill-template/business-info.json +25 -4
  140. package/skill-template/domains/jinchengda.md +16 -3
  141. package/skill-template/domains/yepiaotong.md +1 -1
  142. package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
  143. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
  144. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
  145. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
  146. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
  148. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
  149. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
  151. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
  152. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
  153. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
  154. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
  155. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
  156. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
  157. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
  158. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
  159. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
  160. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
  161. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
  162. package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
  163. package/skills/weaver-e10-meeting/SKILL.md +493 -17
  164. package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
  165. package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
  166. package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
  167. package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
  168. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
  169. package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
  170. package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
  171. package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
  172. package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
  173. package/skills/weaver-e10-meeting.zip +0 -0
  174. package/skills/weaver-e10-yepiaotong/SKILL.md +9 -5
  175. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
  176. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
  177. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
  178. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
  179. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
  180. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
  181. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
  182. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
  183. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
  184. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +6 -0
  185. package/templates/meeting/invitation.docx +0 -0
@@ -0,0 +1,84 @@
1
+ # 发起合同流程(打开流程页 / 带文件自动回填)
2
+
3
+ ## 四个流程(必须由用户指定)
4
+
5
+ | `flow` | 流程名 | workflowId | 上传 fieldId |
6
+ |---|---|---|---|
7
+ | `契约锁` | 契约锁合同审批流程 | `100003460000002066` | `100003720000025579` |
8
+ | `新客户` | 新客户购买合同审批流程 | `1269716062340284522` | `1269716066559755048` |
9
+ | `老客户增值` | 老客户增值合同审批流程 | `1283761429944369334` | `100003720000039590` |
10
+ | `常规二次销售` | 常规二次销售合同审批流程 | `1283761687634100307` | `100003720000029309` |
11
+
12
+ 这些是**业务常量**(不是环境占位符)。用户未指定时必须先问,**不能替用户选择**;只有唯一模糊命中(如"常规二次")才自动收敛。
13
+
14
+ ## operation 与接口
15
+
16
+ | operation | 方法 | 路径 | 关键输入 | 风险 |
17
+ |---|---|---|---|---|
18
+ | `contract.flow.page` | — | 无请求,直接拼页面地址 | `flow` | read |
19
+ | `contract.flow.launch` | POST ×3 | `/api/workflow/core/flowPage/loadBaseParam` → `/api/file/preUploadCheck` → `/api/file/module/upload` | `flow`、`path` | read-with-upload |
20
+
21
+ ## 处理链
22
+
23
+ 场景 A:用户只要打开流程页
24
+
25
+ 1. `contract.flow.page` 拿 `url`。
26
+ 2. 原样交给 `browsertool`,带 `"width": 1000`。
27
+
28
+ 场景 B:用户给了合同文件(**已提供文件不得二次询问**)
29
+
30
+ 1. `contract.flow.launch` 先调 `loadBaseParam`(`isCreate:1`,body 含 `workflowId`、`isMobile:0`)。
31
+ 2. 从 `requestInfo.requestId` 取 `requestId`;取不到就**在提交上传前**停止(`request_id_missing`),避免文件挂到错误流程。
32
+ 3. 上传 `module=workflow`,附加固定字段:
33
+
34
+ | 字段 | 值 |
35
+ |---|---|
36
+ | `authModule` | `workflow` |
37
+ | `source` | `form` |
38
+ | `fieldId` | 该流程的 fieldId |
39
+ | `sourceRefId` / `refId` | 同一个 `requestId` |
40
+ | `folderId` | `300` |
41
+
42
+ 4. 返回带 `fileId` + `automaticFormFilling=true` 的流程页地址。
43
+
44
+ ## URL 规则
45
+
46
+ ```text
47
+ {baseUrl}/sp/workflow/flowpage/create/{workflowId}?workflowId={workflowId}&isCreate=1
48
+ {baseUrl}/sp/workflow/flowpage/create/{workflowId}?workflowId={workflowId}&isCreate=1&fileId={fileId}&automaticFormFilling=true
49
+ ```
50
+
51
+ - 不做整体编码,中文与 `[]` 保持原样。
52
+ - 不带 `fileId` 时**不要**加 `automaticFormFilling`。
53
+
54
+ ## 调用示例
55
+
56
+ Windows PowerShell:
57
+
58
+ ```powershell
59
+ weaver-work-cli --json contract run contract.flow.page --input-json '{"flow":"新客户"}'
60
+ weaver-work-cli --json contract run contract.flow.launch --input-json '{"flow":"契约锁","path":"D:/contracts/合同.docx"}'
61
+ ```
62
+
63
+ macOS/Linux(bash/zsh):
64
+
65
+ ```bash
66
+ weaver-work-cli --json contract run contract.flow.page --input-json '{"flow":"新客户"}'
67
+ weaver-work-cli --json contract run contract.flow.launch --input-json '{"flow":"契约锁","path":"/data/contracts/合同.docx"}'
68
+ ```
69
+
70
+ ## 与 `contract.request.*` 的分工
71
+
72
+ - 本文件的 `contract.flow.*` 是**打开页面 / 带文件预填**,不创建流程实例、不保存表单、不提交审批。
73
+ - 需要走完整审批链(创建 → 保存 → 提交 → 催办)时,按 [`contract-request-write.md`](contract-request-write.md) 使用 `contract.request.*` 的 `prepare → apply`。
74
+ - 不要把"打开了流程页"报告成"流程已发起"。
75
+
76
+ ## 错误处理
77
+
78
+ | 现象 | 处理 |
79
+ |---|---|
80
+ | `flow_unknown` | 列出四个 `flow` 取值请用户选择,不要猜 |
81
+ | `request_id_missing` | 停止,检查流程是否启用、登录态是否有效 |
82
+ | `file_type_unsupported` | 只接受 `.doc` / `.docx` |
83
+ | `upload_no_fileid` | 上传未完成,不要拼 URL 打开页面 |
84
+ | `session_expired` | 停止并按共享规则重新登录 |
@@ -0,0 +1,29 @@
1
+ # 业绩核算:六菜单链接 + 来源台账只读查询
2
+
3
+ 对应 operation:`contract.performance.*`(8 个)。
4
+
5
+ ## 两条链路
6
+
7
+ 1. **过滤链接(不发起网络请求)**:`performance.link` / `performance.fields` / `performance.source.entry` 只做本地构造,六菜单(直销合同、直销业绩、合同收款、项目验收、渠道订单、渠道订单-商务)由内置 catalog 驱动。
8
+ 2. **实际数据(HTTP)**:`performance.menu.search` -> `performance.list.init`(校验 objId)-> `performance.list.filters` -> `performance.list.query`(getListDatas + getListDataCount 全页)。
9
+
10
+ ## 硬规则(与源资料对齐,违反即错)
11
+
12
+ - `origin` 必须是完整 http/https 域名(与合同办公同一 baseUrl),不含 `{baseUrl}` 占位符。
13
+ - **人员 / 枚举 / 数值条件一律进 `needs_ui`**:由用户在页面检索、选择、填写后搜索,AI 不代操作,也不控制浏览器。
14
+ - **组合页(合同收款)不透传筛选 query**:`link` 只出入口地址,全部条件进 `needs_ui`;实际收款查询走 `performance.receipt.query`(底层 List,精确 eq)。
15
+ - URL 参数名和值分别编码一次;`urlPageTitle` 的 `+` 必须是 `%2B`;ID 全程字符串。
16
+ - `searchPermittedEbMenus` 请求体是**关键词字符串数组**,不是对象。
17
+ - `listId` 每次查询前用 `list.init` 解析真实运行上下文并校验 `objId`;总数取 `getListDataCount` 的 `data.total`,不能用 getListDatas 里的 total。
18
+ - 达到 `maxPages` 仍有剩余时结果带 `truncated: true` 与警告:缩小范围重查,不把部分结果当全量。
19
+ - 前轮合同年份不自动变为收款年份;收款附加条件必须来自用户本轮明确要求。
20
+ - 401/登录失效:停止并重新登录;403 是权限边界,如实说明并停止,不得靠重新登录绕过。
21
+
22
+ ## 返回结构
23
+
24
+ `performance.link` 返回 `url` + `browsertool.arguments`(`width: 1000`)+ `filters` + `needs_ui` + `warnings` + `execution`(filtered-link / manual-page-filter)。`needs_ui` 是交给用户的待补填清单,逐项列出字段、比较符和值。
25
+
26
+ ## 边界
27
+
28
+ - VIEWPORT/NList 分支未实现(customConfig 需平台 LZW 编码);`pageType=VIEWPORT` 时说明缺口,不猜测组件。
29
+ - 台账查询是只读的;不调用 /api/bs/、不做表单级全量查询、不新增接口。
@@ -0,0 +1,28 @@
1
+ # 报价单转合同(本地 xlsx/docx,零依赖)
2
+
3
+ 对应 operation:`contract.quote.*`(4 个)。xlsx/docx 均为本 CLI 内置 OOXML 读写,无需外部依赖。
4
+
5
+ ## 流程(顺序不可乱)
6
+
7
+ 1. `contract.quote.sheets`:列出 sheet 名,**由用户选择**,禁止自动选(第一个除外)。
8
+ 2. `contract.quote.parse`:输出 `meta`(客户/日期/经理/电话)、`totals`(标准价/最终优惠报价+大写)、`sections`(分节明细)、`checks`、`warnings`。
9
+ 3. 把 warnings/checks 给用户核对:明细求和≠表内合计、明细总计≠标准价、存在折扣(以最终优惠报价为准)、缺客户名称。
10
+ 4. **硬门禁:必须先拿到真实 .docx 合同模板**。取不到模板就停止并请用户提供;禁止把报价单内容直接渲染成一份合同。
11
+ 5. 用户确认数据后 `contract.quote.fill`:数据 JSON(可含 `__sections` 追加明细表)+ 模板 -> 输出 docx + filled/unfilled 映射日志(`mapOut`)。
12
+ 6. `unfilled` 非空时逐项给用户确认补值后重填;禁止编造任何未提供的值。
13
+
14
+ ## 字段识别(分层打分)
15
+
16
+ 100 别名精确 > 98 去括号精确 > 70~95 别名是标签子串 > 60 标签是别名子串 > 40 字符重合;`大写/小写` 硬约束(含"大写"只归 amount_upper)。表格空值格只认 **≥95** 的精确命中——签名栏(如"甲方(盖章)"85 分)不会自动填,留给用户手填。
17
+
18
+ ## 数值语义(防重复计价)
19
+
20
+ - 纵向合并:文本列(名称/描述)每行都可继承;**数值列(单价/数量/金额)只归首行**——防止 20 万被重复计成 200 万。
21
+ - 金额缺失时按 单价×数量(数量缺失视为 1)补算;数量 0 或金额 0 的未选购项默认不入合同(`includeZero` 可保留)。
22
+ - 数值 key(amount 等)输出自动千分位;`contract.quote.rmb` 输出人民币大写(支持负数、零头、整)。
23
+
24
+ ## 模板填充行为
25
+
26
+ - 具名占位符 `{{key}}` / `\${key}` / 【标签】 + 匿名空白(____ / 【】),填值以标签为准。
27
+ - 改写策略:首个 w:t 写入新文本、其余清空;明细追加表自带边框,不依赖模板样式。
28
+ - `detail=none` 跳过明细表追加。
@@ -1,25 +1,5 @@
1
1
  # 审批状态与签字意见
2
2
 
3
- ## 请求头 / 认证
4
-
5
- 本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
6
-
7
- | 请求头 | 值 |
8
- |--------|-----|
9
- | `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
10
- | `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
11
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
12
-
13
- 业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
14
-
15
-
16
- 用途:查审批进度、查审批意见,以及写操作后的持久化回读。两个 operation 均为 `read`。
17
-
18
- | operation | 方法 | 路径 | 输入 |
19
- |---|---|---|---|
20
- | `contract.request.status` | GET | `/api/workflow/core/paService/v1/getRequestStatus` | `requestId`(必填)、`userid` 由 CLI 注入 query |
21
- | `contract.request.log` | GET | `/api/workflow/core/paService/v1/getRequestLog` | `requestId`(必填)、`otherParams`(分页 JSON 串,如 `{"pageSize":10,"pageNumber":1}`) |
22
-
23
3
  ## `flowStatus.code` 枚举(源资料原文)
24
4
 
25
5
  | code | 含义 |
@@ -40,7 +20,8 @@ Windows PowerShell(复杂入参写 UTF-8 文件后传 `--input`,不要在单
40
20
 
41
21
  ```powershell
42
22
  weaver-work-cli --json contract run contract.request.status --input-json '{"requestId":"67890"}'
43
- weaver-work-cli --json contract run contract.request.log --input .\request-log.json
23
+ # otherParams 是嵌套 JSON 串,PowerShell 单引号内不能写反斜杠转义,改用 UTF-8 文件
24
+ weaver-work-cli --json contract run contract.request.log --input request-log.json
44
25
  ```
45
26
 
46
27
  macOS/Linux(bash/zsh):
@@ -1,29 +1,5 @@
1
1
  # 合同审批流程:创建、保存、提交、催办(写操作)
2
2
 
3
- ## 请求头 / 认证
4
-
5
- 本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
6
-
7
- | 请求头 | 值 |
8
- |--------|-----|
9
- | `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
10
- | `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
11
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
12
-
13
- 业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
14
-
15
-
16
- 四个写操作全部是 `prepare -> apply` 两段,且必须分别报告每一步结果。
17
-
18
- | 动作 | prepare | apply | 路径 | 风险 |
19
- |---|---|---|---|---|
20
- | 创建流程实例 | `contract.request.create.prepare` | `contract.request.create.apply` | `POST /api/workflow/core/paService/v2/doCreateRequest` | write |
21
- | 保存表单 | `contract.request.save.prepare` | `contract.request.save.apply` | `POST /api/workflow/core/paService/v1/saveFormData` | write |
22
- | 提交审批 | `contract.request.submit.prepare` | `contract.request.submit.apply` | `POST /api/workflow/core/paService/v1/submitRequest` | high-impact |
23
- | 催办 | `contract.request.supervise.prepare` | `contract.request.supervise.apply` | `POST /api/workflow/core/paService/v1/requestSupervise` | high-impact |
24
-
25
- 用户 ID 由 CLI 从会话注入:前三个接口注入 `userid`,催办接口注入 `userId`(源资料原文如此)。
26
-
27
3
  ## 创建流程实例
28
4
 
29
5
  - 输入:`workflowId`(必填)、`requestname`、`remark`、`isnextflow`(默认 0)、`isVerifyFormRequired`(默认 false)、`requestLevel`(默认 0)、`formData`、`isNewFormData`、`seniorFormParam`
@@ -1,20 +1,5 @@
1
1
  # 签约主体:定位与查询
2
2
 
3
- ## 请求头 / 认证
4
-
5
- 本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
6
-
7
- | 请求头 | 值 |
8
- |--------|-----|
9
- | `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
10
- | `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
11
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
12
-
13
- 业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
14
-
15
-
16
- 用途:查询我方、客户方或供应商签约主体。全部为 `read`。
17
-
18
3
  ## 调用链(每步只能用上一步运行时返回的 ID)
19
4
 
20
5
  ```
@@ -1,22 +1,5 @@
1
1
  # 新建签约主体(写操作)
2
2
 
3
- ## 请求头 / 认证
4
-
5
- 本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
6
-
7
- | 请求头 | 值 |
8
- |--------|-----|
9
- | `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
10
- | `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
11
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
12
-
13
- 业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
14
-
15
-
16
- - operation:`contract.subject.create.prepare` -> `contract.subject.create.apply`
17
- - 方法/路径:`POST /api/ebuilder/form/dataset/v2/saveFormData`
18
- - 风险:`read-before-write` / `high-risk-write`
19
-
20
3
  ## 输入
21
4
 
22
5
  | 字段 | 必填 | 说明 |
@@ -0,0 +1,70 @@
1
+ # 合同模板 / 范文智能推荐
2
+
3
+ ## 触发场景
4
+
5
+ - "我要卖一套 e-cology 给某公司,有推荐模板吗"
6
+ - "签一份软件开发合同,100 万,有没有合适范文"
7
+ - "信息化平台建设的采购合同模板推荐"
8
+
9
+ 判定:用户在**找模板/范文**,不是审查具体合同、也不是发起流程。
10
+
11
+ ## operation 与接口
12
+
13
+ | operation | 方法 | 路径 | 关键输入 | 风险 |
14
+ |---|---|---|---|---|
15
+ | `contract.recommend.doc` | POST | `/api/ebd/contract/file/recommendContractDoc` | `content`(自然语言需求,≤4000 字) | read |
16
+
17
+ 固定业务常量(**禁止替换**):
18
+
19
+ | 常量 | 值 |
20
+ |---|---|
21
+ | `textObjId` | `1290191829260230657`(「合同范文管理」对象 ID) |
22
+
23
+ ## 请求与响应
24
+
25
+ ```json
26
+ { "content": "销售一套 e-cology 协同办公系统,含实施服务,金额 80 万", "textObjId": "1290191829260230657" }
27
+ ```
28
+
29
+ 成功判据:`code = 200`、`status = true`、`fail = false`(CLI 已按此判定)。关键取值:
30
+
31
+ | 字段 | 用途 |
32
+ |---|---|
33
+ | `data.cacheKey` | 打开推荐结果页必带(形如 `contract_doc_recommend:xxx`) |
34
+ | `data.recommendList[]` | 推荐列表,按 `rank` 排序 |
35
+
36
+ `recommendList` 单项:`rank`、`file_name`、`match_score`、`match_reason`、`matched_fields`、`template_id`、`doc_id`、`file_id`、`classification_id`、`creator`/`updater`、`create_time`/`update_time`,以及 AI 提取标签 `extract_labels`(title / summary / contract_type / risk_level / amount_range / industry / scene / role / payment_terms / key_clauses / jurisdiction / tags)。
37
+
38
+ CLI 已把上述字段映射成 `recommendations[]`(`fileName`、`matchScore`、`matchReason`、`matchedFields`、`labels.*`)。
39
+
40
+ ## 处理链
41
+
42
+ 1. `contract.recommend.doc` 传整理后的需求描述。
43
+ 2. **先用表格向用户展示**:排名 / 文件名 / 匹配分 / 合同类型 / 风险等级 / 匹配理由。
44
+ 3. 再打开结果页:`data.url` = `{baseUrl}/sp/contract/business/template-list?recommendKey={cacheKey}`,带 `"width": 1000`。
45
+ 4. `status = EMPTY` 表示没有匹配到范文,如实说明,不要编造模板名。
46
+
47
+ 耗时提示:服务端 AI 语义匹配本身需要 **30~40 秒**,CLI 超时设为 180 秒。**慢不是失败,不要重试、不要换接口**。
48
+
49
+ ## 调用示例
50
+
51
+ Windows PowerShell:
52
+
53
+ ```powershell
54
+ weaver-work-cli --json contract run contract.recommend.doc --input-json '{"content":"销售一套协同办公系统,含实施服务,金额80万"}'
55
+ ```
56
+
57
+ macOS/Linux(bash/zsh):
58
+
59
+ ```bash
60
+ weaver-work-cli --json contract run contract.recommend.doc --input-json '{"content":"销售一套协同办公系统,含实施服务,金额80万"}'
61
+ ```
62
+
63
+ ## 错误处理
64
+
65
+ | 现象 | 处理 |
66
+ |---|---|
67
+ | `recommend_cache_key_missing` | 接口没给 `cacheKey`,无法打开结果页;如实报失败,不要自行拼接 |
68
+ | 超时(`network/timeout`) | 说明服务端匹配慢,询问用户是否再等一轮;不要连续重试 |
69
+ | `code` 非 0/200 或 `status=false` | 按业务错误处理,不重试 |
70
+ | `session_expired` | 停止并按共享规则重新登录 |
@@ -1,20 +1,5 @@
1
1
  # 合同类型与模板查询
2
2
 
3
- ## 请求头 / 认证
4
-
5
- 本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
6
-
7
- | 请求头 | 值 |
8
- |--------|-----|
9
- | `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
10
- | `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
11
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
12
-
13
- 业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
14
-
15
-
16
- 用途:按合同类型定位可选模板,或对指定模板查看详情。四个 operation 全部为 `read`。
17
-
18
3
  ## operation 与接口
19
4
 
20
5
  | operation | 方法 | 路径 | 关键输入 |
@@ -1,20 +1,5 @@
1
1
  # 合同审批流程:流程与表单解析
2
2
 
3
- ## 请求头 / 认证
4
-
5
- 本文件描述的 API 请求通过 `weaver-work-cli` 执行,CLI 从 E10 登录会话自动注入以下凭证头(禁止业务输入携带):
6
-
7
- | 请求头 | 值 |
8
- |--------|-----|
9
- | `Cookie` | `<e10-login 返回的完整原始 Cookie 串>`(禁止裁剪/去重/改写) |
10
- | `eteamsid` | `<e10-login 返回的 ETEAMSID>` |
11
- | `User-Agent` | `AgentType=<agentType>,IsAgent=true` |
12
-
13
- 业务输入(`--input-json` / `--input`)**不得包含** `userid`、`userId`、`token`、`cookie`、`eteamsid` 等字段,用户 ID 由 CLI 从会话注入。
14
-
15
-
16
- 用途:把"流程名称""字段名称""选项名称"等人类语义,解析成运行时可用的 `workflowId`、`fieldId`、`optionId`。全部为 `read`。
17
-
18
3
  ## operation 与接口
19
4
 
20
5
  | operation | 方法 | 路径 | 关键输入 |