weaver-work-cli 0.1.49 → 0.1.52
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.
- package/README.md +1 -1
- package/dist/chunks/{attachment-content-MU2LPI5P.js → attachment-content-MBYYSQIX.js} +3 -3
- package/dist/chunks/{chunk-ZKEUGS2U.js → chunk-7UOXOGFL.js} +4 -4
- package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
- package/dist/chunks/{chunk-3NV2ETZR.js → chunk-D3TDNRFE.js} +8 -8
- package/dist/chunks/{chunk-6GWU63YF.js → chunk-DZOC77ZD.js} +1 -1
- package/dist/chunks/{chunk-K3BT54CU.js → chunk-IRMA3GVP.js} +1 -1
- package/dist/chunks/{chunk-3X7VOSBA.js → chunk-KLZ3ULQQ.js} +1 -1
- package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
- package/dist/chunks/{chunk-NBEWUR7L.js → chunk-LALWNK6M.js} +167 -44
- package/dist/chunks/{chunk-BRRW7CWA.js → chunk-LM2H7SZI.js} +26 -26
- package/dist/chunks/{chunk-KV5SOWMS.js → chunk-LTRLF6MM.js} +4 -4
- package/dist/chunks/{chunk-D2QRZUW4.js → chunk-RPRFIG6I.js} +35 -28
- package/dist/chunks/{chunk-GEOMANP7.js → chunk-RWFRZSIP.js} +2 -2
- package/dist/chunks/{chunk-EJVA5ZVB.js → chunk-ZRHKGQRQ.js} +2 -2
- package/dist/chunks/{conflict-6347A7YK.js → conflict-D2HYKBMH.js} +2 -2
- package/dist/chunks/{contract-N6P2HIIE.js → contract-MFOFMM2J.js} +4284 -254
- package/dist/chunks/{create-flow-7WG7LVX5.js → create-flow-7ZATJVTM.js} +6 -6
- package/dist/chunks/{data-QO7QWOIV.js → data-WK5CQXNF.js} +17 -32
- package/dist/chunks/{env-LHRKSLG6.js → env-5DO4YENS.js} +2 -2
- package/dist/chunks/{factory-2H7Z4RWJ.js → factory-3M7D7WJC.js} +1 -1
- package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
- package/dist/chunks/{group-chat-EW6PNDDT.js → group-chat-B2HT5NEO.js} +3 -3
- package/dist/chunks/{im-3RCNL5GT.js → im-TN2JYVGJ.js} +2 -2
- package/dist/chunks/{invoice-FXWH5GPO.js → invoice-V7ZTITUO.js} +726 -206
- package/dist/chunks/{meeting-N2FQBHXI.js → meeting-HZOX3CBB.js} +10 -10
- package/dist/chunks/{msg-parse-4GSQ2WTO.js → msg-parse-FPFVPMYI.js} +5 -1
- package/dist/chunks/{reception-MYOKJULO.js → reception-QGPNTGHG.js} +98 -82
- package/dist/chunks/{recruit-stage-FKWS5UQF.js → recruit-stage-XCMVEQA2.js} +718 -131
- package/dist/chunks/{registry-BUTEDK3C.js → registry-E5RQJVWN.js} +2 -2
- package/dist/chunks/{registry-7VZ6YJUF.js → registry-KYPFFQIH.js} +1 -1
- package/dist/chunks/{registry-CKUVBS53.js → registry-SJHSBO5G.js} +10 -10
- package/dist/chunks/{room-recommend-MBCYENQ2.js → room-recommend-5AHR4YQV.js} +4 -4
- package/dist/chunks/{schedule-5IFMCXME.js → schedule-KZPJUPC2.js} +4 -4
- package/dist/chunks/smart-extract-IXHCZE4R.js +2846 -0
- package/dist/chunks/{workflow-2TRU2ZSP.js → workflow-UHKCZJMY.js} +1 -1
- package/dist/index.js +14 -9
- package/dist/shortcuts/contract/host.js +11 -0
- package/dist/shortcuts/contract/index.js +13 -0
- package/dist/shortcuts/contract/manifest.js +204 -0
- package/dist/shortcuts/contract/operations/card-action.js +585 -0
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +315 -0
- package/dist/shortcuts/contract/operations/card-plan.js +327 -0
- package/dist/shortcuts/contract/operations/card-risk-report.js +565 -0
- package/dist/shortcuts/contract/operations/elements-build.js +714 -0
- package/dist/shortcuts/contract/operations/elements-spec.js +216 -0
- package/dist/shortcuts/contract/operations/first-screen.js +563 -0
- package/dist/shortcuts/contract/operations/flow.js +81 -25
- package/dist/shortcuts/contract/operations/modeltext.js +132 -0
- package/dist/shortcuts/contract/operations/op-resolver.js +22 -0
- package/dist/shortcuts/contract/operations/performance.js +58 -7
- package/dist/shortcuts/contract/operations/quote.js +410 -22
- package/dist/shortcuts/contract/operations/registry.js +22 -0
- package/dist/shortcuts/contract/operations/review.js +73 -58
- package/dist/shortcuts/contract/operations/save-recognize.js +151 -0
- package/dist/shortcuts/contract/operations/summary-validate.js +293 -0
- package/dist/shortcuts/contract/operations/summary.js +4 -2
- package/dist/shortcuts/contract/operations/upload.js +48 -7
- package/dist/shortcuts/contract/prewarm-cache.js +90 -0
- package/dist/shortcuts/contract/prewarm.js +88 -0
- package/dist/shortcuts/contract/upload-cache.js +49 -4
- package/dist/shortcuts/data/index.js +1 -6
- package/dist/shortcuts/data/manifest.js +2 -2
- package/dist/shortcuts/data/operations/index.js +1 -1
- package/dist/shortcuts/data/operations/query.js +23 -46
- package/dist/shortcuts/fna/host.js +4 -2
- package/dist/shortcuts/fna/manifest.js +14 -5
- package/dist/shortcuts/fna/operations/audit.js +334 -0
- package/dist/shortcuts/fna/operations/registry.js +2 -0
- package/dist/shortcuts/im/operations/at-mention.js +6 -3
- package/dist/shortcuts/im/operations/msg-parse.js +35 -5
- package/dist/shortcuts/im/operations/msg-sync.js +3 -1
- package/dist/shortcuts/im/operations/msg-write.js +57 -9
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/invoice/index.js +0 -12
- package/dist/shortcuts/invoice/manifest.js +201 -50
- package/dist/shortcuts/invoice/operations/registry.js +4 -2
- package/dist/shortcuts/invoice/operations/reim-relation.js +438 -0
- package/dist/shortcuts/invoice/operations/shared.js +3 -19
- package/dist/shortcuts/invoice/operations/upload-and-validate.js +109 -73
- package/dist/shortcuts/meeting/operations/from-group-chat.js +16 -2
- package/dist/shortcuts/reception/constants.js +3 -7
- package/dist/shortcuts/reception/operations/leads.js +30 -6
- package/dist/shortcuts/reception/operations/panels.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +4 -2
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +6 -2
- package/dist/shortcuts/recruit-stage/operations/list.js +217 -1
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +144 -158
- package/dist/shortcuts/recruit-stage/operations/search.js +348 -0
- package/dist/shortcuts/recruit-stage/shared.js +5 -0
- package/dist/shortcuts/recruit-stage/tag-lookup.js +136 -0
- package/dist/shortcuts/smart-extract/constants.js +79 -0
- package/dist/shortcuts/smart-extract/continuation.js +71 -0
- package/dist/shortcuts/smart-extract/errors.js +68 -0
- package/dist/shortcuts/smart-extract/host.js +191 -0
- package/dist/shortcuts/smart-extract/index.js +105 -0
- package/dist/shortcuts/smart-extract/ledger.js +70 -0
- package/dist/shortcuts/smart-extract/manifest.js +35 -0
- package/dist/shortcuts/smart-extract/operations/attachment.js +212 -0
- package/dist/shortcuts/smart-extract/operations/batch.js +67 -0
- package/dist/shortcuts/smart-extract/operations/config.js +118 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +489 -0
- package/dist/shortcuts/smart-extract/operations/preview.js +174 -0
- package/dist/shortcuts/smart-extract/operations/registry.js +34 -0
- package/dist/shortcuts/smart-extract/operations/save.js +355 -0
- package/dist/shortcuts/smart-extract/operations/shared.js +191 -0
- package/dist/shortcuts/smart-extract/operations/structure.js +401 -0
- package/dist/shortcuts/smart-extract/operations/target.js +167 -0
- package/dist/shortcuts/smart-extract/operations/types.js +22 -0
- package/dist/shortcuts/smart-extract/operations/validate.js +408 -0
- package/dist/shortcuts/workflow/operations/read.js +77 -15
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +140 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +42 -14
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -6
- package/docs/SKILL.md +1 -1
- package/docs/_catalog.md +4 -1
- package/docs/agent-invoice.md +5 -7
- package/docs/data.md +5 -1
- package/docs/fna.md +24 -4
- package/docs/invoice.md +7 -5
- package/docs/smart-extract.md +156 -0
- package/package.json +1 -1
- package/skill-template/business-info.json +21 -1
- package/skill-template/domains/qiyecheng.md +6 -2
- package/skill-template/domains/smart-extract.md +16 -0
- package/skill-template/domains/yepiaotong.md +2 -2
- package/skills/weaver-e10-data/references/scene-and-misc.md +4 -3
- package/skills/weaver-e10-jinchengda/SKILL.md +159 -11
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +13 -8
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +44 -2
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +220 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +68 -33
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +26 -15
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +128 -0
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +90 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +96 -2
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +167 -5
- package/skills/weaver-e10-jinchengda/scripts/contract_first_screen.py +200 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_contract_from_quote.py +572 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +997 -0
- package/skills/weaver-e10-jinchengda/scripts/quote_screen.py +560 -0
- package/skills/weaver-e10-jinchengda/scripts/triage_contract.py +894 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +93 -0
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +118 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +58 -7
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +118 -0
- package/skills/weaver-e10-qiyecheng/references/budget.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +42 -3
- package/skills/weaver-e10-qiyecheng/references/expense-center.md +8 -0
- package/skills/weaver-e10-qiyecheng/references/expense-chart.md +9 -0
- package/skills/weaver-e10-qiyecheng/references/invoice-writeoff.md +13 -0
- package/skills/weaver-e10-qiyecheng/references/loan-management.md +14 -0
- package/skills/weaver-e10-qiyecheng/references/self-hosted-mode.md +239 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +153 -40
- package/skills/weaver-e10-reception-flow/SKILL.md +43 -6
- package/skills/weaver-e10-reception-flow/references/guide.md +1 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +62 -4
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +42 -8
- package/skills/weaver-e10-recruit-stage/references/env-ziyong.md +79 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +11 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +3 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +153 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +7 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +66 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +156 -40
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +122 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +36 -8
- package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +157 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +35 -0
- package/skills/weaver-e10-smart-extract/SKILL.md +169 -0
- package/skills/weaver-e10-smart-extract/references/api-contract.md +71 -0
- package/skills/weaver-e10-smart-extract/references/result-format.md +102 -0
- package/skills/weaver-e10-smart-extract/references/troubleshooting.md +105 -0
- package/skills/weaver-e10-workflow/SKILL.md +2 -1
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +29 -6
- package/skills/weaver-e10-workflow/references/workflow-query.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-view.md +1 -1
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +162 -10
- package/skills/weaver-e10-yepiaotong/SKILL.md +53 -35
- package/skills/weaver-e10-yepiaotong/references/invoice-add.md +2 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-file-upload.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-import.md +19 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +19 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-ocr-preview.md +8 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +407 -0
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +18 -53
- package/skills/weaver-e10-yepiaotong/references/invoice-upload-and-validate.md +97 -39
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +96 -7
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +5 -38
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +14 -14
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +139 -94
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +131 -58
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +110 -43
- package/skills/weaver-e10-yimiaoban/SKILL.md +8 -6
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +20 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +7 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +18 -15
- package/dist/shortcuts/invoice/operations/validate-preview.js +0 -40
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +0 -279
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +0 -450
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +0 -358
- package/skills/weaver-e10-yepiaotong/references/invoice-validation-preview.md +0 -40
|
@@ -90,8 +90,85 @@ def extract_outer_json(text):
|
|
|
90
90
|
return None
|
|
91
91
|
|
|
92
92
|
|
|
93
|
+
EBDF_LIST_MARK = "/sp/ebdfpage/list/"
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def check_outer_ebdf(obj):
|
|
97
|
+
"""ebdf 列表页组件卡(业绩核算六菜单):纯组件,不渲染自定义 HTML。
|
|
98
|
+
|
|
99
|
+
与动作卡的区别:没有 customParams.html,组件名在 params_pc / params_mobile,
|
|
100
|
+
带 noMDialog,且不写 arguments.width。
|
|
101
|
+
"""
|
|
102
|
+
a = obj.get("arguments") or {}
|
|
103
|
+
so = a.get("sdkOptions") or {}
|
|
104
|
+
pp = so.get("params_pc") or {}
|
|
105
|
+
pm = so.get("params_mobile") or {}
|
|
106
|
+
par = so.get("params") or {}
|
|
107
|
+
rpc = so.get("routerProps_pc") or {}
|
|
108
|
+
rmb = so.get("routerProps_mobile") or {}
|
|
109
|
+
|
|
110
|
+
def eq(actual, expect, item):
|
|
111
|
+
if actual == expect:
|
|
112
|
+
add(PASS, item)
|
|
113
|
+
else:
|
|
114
|
+
add(FAIL, item, "expected %r, got %r" % (expect, actual))
|
|
115
|
+
|
|
116
|
+
eq(obj.get("version"), 1, "outer.version == 1")
|
|
117
|
+
if obj.get("callId"):
|
|
118
|
+
add(PASS, "outer.callId present")
|
|
119
|
+
else:
|
|
120
|
+
add(FAIL, "outer.callId present", "missing or empty")
|
|
121
|
+
eq(obj.get("toolId"), "fill_form", "outer.toolId == fill_form")
|
|
122
|
+
eq(a.get("type"), "e10", "arguments.type == e10 (not browsertool)")
|
|
123
|
+
eq(a.get("sdkRenderType"), "inline", "arguments.sdkRenderType == inline")
|
|
124
|
+
if "width" in a:
|
|
125
|
+
add(FAIL, "ebdf list card has no arguments.width",
|
|
126
|
+
"got %r -> use client default" % a.get("width"))
|
|
127
|
+
else:
|
|
128
|
+
add(PASS, "ebdf list card has no arguments.width")
|
|
129
|
+
|
|
130
|
+
src = a.get("src") or ""
|
|
131
|
+
m = re.search(r"/sp/ebdfpage/list/(\d+)", src)
|
|
132
|
+
page_id = m.group(1) if m else ""
|
|
133
|
+
if page_id:
|
|
134
|
+
add(PASS, "arguments.src -> /sp/ebdfpage/list/<pageId>")
|
|
135
|
+
else:
|
|
136
|
+
add(FAIL, "arguments.src -> /sp/ebdfpage/list/<pageId>", "got %r" % src)
|
|
137
|
+
|
|
138
|
+
eq(so.get("compName"), "ui.CorsComponent", "sdkOptions.compName == ui.CorsComponent")
|
|
139
|
+
eq(so.get("routerType"), "MemoryRouter", "sdkOptions.routerType == MemoryRouter")
|
|
140
|
+
eq(pp.get("app"), "@weapp/ebdfpage", "params_pc.app == @weapp/ebdfpage")
|
|
141
|
+
eq(pp.get("compName"), "TableViewList", "params_pc.compName == TableViewList")
|
|
142
|
+
eq(pm.get("app"), "@weapp/ebdfpage", "params_mobile.app == @weapp/ebdfpage")
|
|
143
|
+
eq(pm.get("compName"), "MTableViewList", "params_mobile.compName == MTableViewList")
|
|
144
|
+
eq(pp.get("noMDialog"), True, "params_pc.noMDialog == true")
|
|
145
|
+
eq(pm.get("noMDialog"), True, "params_mobile.noMDialog == true")
|
|
146
|
+
eq(par.get("pageId"), page_id, "params.pageId matches src pageId")
|
|
147
|
+
|
|
148
|
+
want = ["/list/%s" % page_id] if page_id else []
|
|
149
|
+
eq(rpc.get("initialEntries"), want, "routerProps_pc.initialEntries == /list/<pageId>")
|
|
150
|
+
eq(rmb.get("initialEntries"), want, "routerProps_mobile.initialEntries == /list/<pageId>")
|
|
151
|
+
|
|
152
|
+
cp = par.get("comParams")
|
|
153
|
+
if cp is None:
|
|
154
|
+
add(WARN, "params.comParams absent (no preset filter)")
|
|
155
|
+
elif not isinstance(cp, dict):
|
|
156
|
+
add(FAIL, "params.comParams is an object", "got %s" % type(cp).__name__)
|
|
157
|
+
else:
|
|
158
|
+
bad_keys = [k for k in cp if not re.match(r"^field_\d+$", str(k))]
|
|
159
|
+
if bad_keys:
|
|
160
|
+
add(FAIL, "comParams keys are field_<fieldId>", "bad: %r" % bad_keys)
|
|
161
|
+
elif any(not isinstance(v, str) for v in cp.values()):
|
|
162
|
+
add(FAIL, "comParams values are strings", "non-string value found")
|
|
163
|
+
else:
|
|
164
|
+
add(PASS, "comParams keys/values ok (%d)" % len(cp))
|
|
165
|
+
return None
|
|
166
|
+
|
|
167
|
+
|
|
93
168
|
def check_outer(obj, has_placeholder):
|
|
94
169
|
a = obj.get("arguments") or {}
|
|
170
|
+
if EBDF_LIST_MARK in (a.get("src") or ""):
|
|
171
|
+
return check_outer_ebdf(obj)
|
|
95
172
|
so = a.get("sdkOptions") or {}
|
|
96
173
|
pp = so.get("params_pc") or {}
|
|
97
174
|
rp = so.get("routerProps_pc") or {}
|
|
@@ -257,6 +334,8 @@ E10_COMP_EXPECT = (
|
|
|
257
334
|
("/sp/contract/business/credit", "ContractCreditDetail"),
|
|
258
335
|
("/sp/contract/business/ai-contract", "AIContractV2"),
|
|
259
336
|
("/sp/contract/business/doc-compare", "AIDocCompare"),
|
|
337
|
+
("/sp/contract/terms-library", "ClauseLibraryPage"),
|
|
338
|
+
("/sp/ebdfpage/list/", "TableViewList"),
|
|
260
339
|
("/sp/workflow/flowpage/create/", "Comp.WffpRoute"),
|
|
261
340
|
("/sp/contract/xiaoe-list", "XiaoeList"),
|
|
262
341
|
)
|
|
@@ -284,6 +363,10 @@ def check_e10sdk_comp(js):
|
|
|
284
363
|
|
|
285
364
|
m_pc = re.search(r"params\s*:\s*\{[^{}]*?compName\s*:\s*'([^']+)'", seg)
|
|
286
365
|
pc = m_pc.group(1) if m_pc else None
|
|
366
|
+
if pc is None:
|
|
367
|
+
# ebdf 列表卡的组件名在 params_pc / params_mobile,不在 params
|
|
368
|
+
m_pc2 = re.search(r"params_pc\s*:\s*\{[^{}]*?compName\s*:\s*'([^']+)'", seg)
|
|
369
|
+
pc = m_pc2.group(1) if m_pc2 else None
|
|
287
370
|
|
|
288
371
|
expected = None
|
|
289
372
|
for path, comp in E10_COMP_EXPECT:
|
|
@@ -349,6 +432,16 @@ def check_inner(html, has_placeholder):
|
|
|
349
432
|
js = extract_script(html)
|
|
350
433
|
if js:
|
|
351
434
|
node_check(js)
|
|
435
|
+
# 2.1) 宽度占位符必须已全部替换(2026-11-11 修复的回归防线)。
|
|
436
|
+
# 历史缺陷:handler 体在 JS_BASE 替换之后才拼接,__W__ 原样残留,
|
|
437
|
+
# 点击抛 ReferenceError 又被 try/catch 吞成「面板打开失败」,静默失效。
|
|
438
|
+
n_ph = js.count("__W__")
|
|
439
|
+
if n_ph == 0:
|
|
440
|
+
add(PASS, "no unreplaced __W__ placeholder")
|
|
441
|
+
else:
|
|
442
|
+
add(FAIL, "no unreplaced __W__ placeholder",
|
|
443
|
+
"found %d -> click throws ReferenceError; "
|
|
444
|
+
"replace __W__ after concatenating handlers" % n_ph)
|
|
352
445
|
else:
|
|
353
446
|
add(WARN, "script block present", "no <script> found")
|
|
354
447
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""合同 docx 占位符残留校验(XML 全量 + python-docx 双向交叉验证)。
|
|
3
|
+
|
|
4
|
+
2026-11-10 新增。背景(真实事故):
|
|
5
|
+
只遍历 python-docx 的 paragraphs / tables 时,文本框 <w:txbxContent> 里的内容
|
|
6
|
+
完全遍历不到。实测《新客户购买合同模板》的合同标题 2 处就位于文本框内,
|
|
7
|
+
于是自检报告「残留 0」,实际文件里仍是 xxx公司协同办公系统(e-cology)…
|
|
8
|
+
—— 差一步就把带占位符的合同交付给客户。
|
|
9
|
+
|
|
10
|
+
用法:
|
|
11
|
+
python verify_docx_placeholders.py --docx <绝对路径>
|
|
12
|
+
python verify_docx_placeholders.py --docx <绝对路径> --expect "xxx公司" --expect "***"
|
|
13
|
+
python verify_docx_placeholders.py --docx <绝对路径> --title "客户全称协同办公系统(e-cology)软件产品及实施服务购买合同"
|
|
14
|
+
|
|
15
|
+
退出码:
|
|
16
|
+
0 = 全部通过(无残留,且交叉验证一致)
|
|
17
|
+
1 = 有残留 / 交叉验证不一致 / 文件不可读
|
|
18
|
+
"""
|
|
19
|
+
import argparse
|
|
20
|
+
import io
|
|
21
|
+
import json
|
|
22
|
+
import re
|
|
23
|
+
import sys
|
|
24
|
+
import zipfile
|
|
25
|
+
|
|
26
|
+
import docx
|
|
27
|
+
|
|
28
|
+
DEFAULT_PATTERNS = ['xxx公司', 'XXX公司', '***', '年 月 日', '年 月 日', '【】', '____', '{{', '}}']
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def xml_full_text(path):
|
|
32
|
+
"""读取 word/ 下所有 xml(正文、页眉页脚、批注、脚注),去标签后拼成全文。
|
|
33
|
+
|
|
34
|
+
文本框 <w:txbxContent> 就在 document.xml 内,只要不去掉该节点就能覆盖到。
|
|
35
|
+
"""
|
|
36
|
+
buf = []
|
|
37
|
+
with zipfile.ZipFile(path) as z:
|
|
38
|
+
for name in z.namelist():
|
|
39
|
+
if not name.startswith('word/') or not name.endswith('.xml'):
|
|
40
|
+
continue
|
|
41
|
+
raw = z.read(name).decode('utf-8', 'ignore')
|
|
42
|
+
buf.append(re.sub(r'<[^>]+>', '', raw))
|
|
43
|
+
return '\n'.join(buf)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def docx_visible_text(path):
|
|
47
|
+
"""python-docx 能看到的文本(用于与 XML 全量结果交叉比对)。"""
|
|
48
|
+
d = docx.Document(path)
|
|
49
|
+
buf = [p.text for p in d.paragraphs]
|
|
50
|
+
for t in d.tables:
|
|
51
|
+
for row in t.rows:
|
|
52
|
+
for c in row.cells:
|
|
53
|
+
buf.append(c.text)
|
|
54
|
+
return '\n'.join(buf)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def main():
|
|
58
|
+
ap = argparse.ArgumentParser(description='合同 docx 占位符残留校验')
|
|
59
|
+
ap.add_argument('--docx', required=True)
|
|
60
|
+
ap.add_argument('--expect', action='append', default=None,
|
|
61
|
+
help='需要检查残留的占位文本,可多次传;缺省用内置集合')
|
|
62
|
+
ap.add_argument('--title', default=None, help='应出现的合同名称,用于校验标题替换完整')
|
|
63
|
+
ap.add_argument('--title-count', type=int, default=None,
|
|
64
|
+
help='合同名称的期望出现次数(模板通常为 2:封面 + 正文首行)')
|
|
65
|
+
args = ap.parse_args()
|
|
66
|
+
|
|
67
|
+
patterns = args.expect or DEFAULT_PATTERNS
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
full = xml_full_text(args.docx)
|
|
71
|
+
visible = docx_visible_text(args.docx)
|
|
72
|
+
except Exception as exc: # noqa: BLE001
|
|
73
|
+
print(json.dumps({'ok': False, 'error': 'unreadable_docx', 'detail': str(exc)},
|
|
74
|
+
ensure_ascii=False))
|
|
75
|
+
return 1
|
|
76
|
+
|
|
77
|
+
residue = {}
|
|
78
|
+
for p in patterns:
|
|
79
|
+
n = full.count(p)
|
|
80
|
+
if n:
|
|
81
|
+
residue[p] = n
|
|
82
|
+
|
|
83
|
+
# 交叉验证:XML 全量计数必须 >= python-docx 可见计数;
|
|
84
|
+
# 若可见计数反而更大,说明遍历方式本身有问题,结果不可信。
|
|
85
|
+
cross = {}
|
|
86
|
+
inconsistent = []
|
|
87
|
+
for p in patterns:
|
|
88
|
+
x, v = full.count(p), visible.count(p)
|
|
89
|
+
cross[p] = {'xml': x, 'docx': v}
|
|
90
|
+
if v > x:
|
|
91
|
+
inconsistent.append(p)
|
|
92
|
+
|
|
93
|
+
title_hits = full.count(args.title) if args.title else None
|
|
94
|
+
title_ok = True
|
|
95
|
+
if args.title:
|
|
96
|
+
expect_n = args.title_count if args.title_count is not None else 2
|
|
97
|
+
title_ok = (title_hits == expect_n)
|
|
98
|
+
|
|
99
|
+
ok = (not residue) and (not inconsistent) and title_ok
|
|
100
|
+
|
|
101
|
+
out = {
|
|
102
|
+
'ok': ok,
|
|
103
|
+
'docx': args.docx,
|
|
104
|
+
'residue': residue,
|
|
105
|
+
'cross_check': cross,
|
|
106
|
+
'inconsistent': inconsistent,
|
|
107
|
+
'title': args.title,
|
|
108
|
+
'title_hits': title_hits,
|
|
109
|
+
'title_ok': title_ok,
|
|
110
|
+
'note': ('通过:无占位符残留' if ok else
|
|
111
|
+
'不通过:见 residue / inconsistent / title_ok'),
|
|
112
|
+
}
|
|
113
|
+
print(json.dumps(out, ensure_ascii=False, indent=2))
|
|
114
|
+
return 0 if ok else 1
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
if __name__ == '__main__':
|
|
118
|
+
sys.exit(main())
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
name: weaver-e10-qiyecheng
|
|
3
3
|
display_name: 泛微齐业成费控
|
|
4
4
|
display_name_en: Weaver Qiyecheng FNA
|
|
5
|
-
description:
|
|
6
|
-
description_zh: 泛微齐业成费控中心助手:事前申请单预算详情、预算执行报表、报销/借款/预付核销金额、报销报表 AI
|
|
7
|
-
description_en: Expense, budget and loan assistant for Weaver Qiyecheng FNA. Queries pre-application budget details, budget execution reports, reimbursed/loan/prepay amounts, natural-language expense reports (grouping by department, period or expense type), company-wide loan summary and list, invoice write-off summary and list. Sends repayment reminders
|
|
8
|
-
version: 1.0
|
|
5
|
+
description: 泛微齐业成费控中心(预算查询/费用中心/报销报表/AI规则预审/借款管理/发票核销)的 E10 查询与提醒写操作能力,通过 weaver-work-cli fna 命令执行。
|
|
6
|
+
description_zh: 泛微齐业成费控中心助手:事前申请单预算详情、预算执行报表、报销/借款/预付核销金额、报销报表 AI 问答(自然语言出部门/期间/费用类型分组报表)、按流程 AI 规则预审单据(逐条通过与风险等级)、全公司借款汇总与列表、提醒还款、发票核销金额与列表、催票。所有能力通过 weaver-work-cli fna 命令执行,提醒还款、催票与 AI 预审为写操作,必须先 prepare 预览并经用户明确确认后 apply。
|
|
7
|
+
description_en: Expense, budget and loan assistant for Weaver Qiyecheng FNA. Queries pre-application budget details, budget execution reports, reimbursed/loan/prepay amounts, natural-language expense reports (grouping by department, period or expense type), runs AI rule pre-audit against a workflow request, company-wide loan summary and list, invoice write-off summary and list. Sends repayment reminders, invoice call-tickets and AI pre-audits through the weaver-work-cli fna command with a prepare/apply confirmation chain.
|
|
8
|
+
version: 1.1.0
|
|
9
9
|
author: 泛微网络科技股份有限公司
|
|
10
10
|
agent_created: true
|
|
11
11
|
requires:
|
|
@@ -24,7 +24,7 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
24
24
|
|
|
25
25
|
## 适用场景(何时使用本技能)
|
|
26
26
|
|
|
27
|
-
用户提到事前申请单预算、预算执行报表、报销/借款/预付核销金额、报销报表 AI
|
|
27
|
+
用户提到事前申请单预算、预算执行报表、报销/借款/预付核销金额、报销报表 AI 问答(部门/期间/费用类型分组、排名、趋势)、AI 规则预审(提交前按规则校验单据)、全公司借款汇总与列表、提醒还款、发票核销金额与列表或催票时,使用本技能。
|
|
28
28
|
|
|
29
29
|
发票票夹与 OCR 走 `weaver-e10-yepiaotong`,人员与流程 ID 解析不属于本技能范围。
|
|
30
30
|
|
|
@@ -40,12 +40,29 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
40
40
|
| 预算查询 | 事前申请单预算详情、预算执行报表(只读) | 登录即可(接口公开) |
|
|
41
41
|
| 费用中心 | 报销金额合计、借款金额分段、预付核销金额(只读) | 登录即可(默认当前登录人) |
|
|
42
42
|
| 报销报表 AI 问答 | 自然语言问题 → AI 生成 SQL → 部门/期间/费用类型等分组报表(只读,每次消耗一次大模型对话 + 一次 SQL) | 登录即可(接口公开,结果可能是全租户范围) |
|
|
43
|
+
| AI 规则预审 | 按流程配置的 AI 规则预审单据,返回逐条 `passed`/`riskName` 与汇总计数(写:会落预审记录并消耗大模型) | 登录即可(默认当前登录人;可用 `userId` 指定执行人) |
|
|
43
44
|
| 借款管理 | 全公司待还/还款中汇总、全员借款单列表(只读);提醒还款(写) | 管理员 |
|
|
44
45
|
| 发票核销财务 | 金额 tab 汇总、核销列表(只读);催票(写) | 财务/管理员 |
|
|
45
46
|
|
|
47
|
+
## 仅面向自用系统(两个能力)
|
|
48
|
+
|
|
49
|
+
以下两个能力**只对泛微自用系统**(`baseUrl` 主机名含 `e-cology`)开放,完整规则见 [references/self-hosted-mode.md](references/self-hosted-mode.md):
|
|
50
|
+
|
|
51
|
+
| 能力 | 一句话 |
|
|
52
|
+
|---|---|
|
|
53
|
+
| 报销待办 AI 规则预审 | 查待办 → 按措辞决定是否预审(不多问一次)→ 总览 + 分状态分组 → 一段自然语言收尾 → 按需批量提交 |
|
|
54
|
+
| 查报销流程的客户/项目/合同信息 | 流程字段与卡片主数据两段一起给;主数据转 `weaver-e10-jiuchuanhui` / `weaver-e10-jinchengda` / 项目 Skill |
|
|
55
|
+
|
|
56
|
+
- 自用环境里用户说「查报销 / 报销流程 / 报销待办 / 待审批的报销」等报销类近义词时,**只查「总部费用报销」(workflowId `100003460000000060`)**,不再解析关键词候选;预算、借款、预付核销、发票核销、报销报表 AI 问答等其他意图**不受影响**,仍按本文其余章节执行。
|
|
57
|
+
- 非自用环境要执行这两个能力时,固定回复:`当前登录环境 <baseUrl> 不支持「<能力名>」:该能力仅面向自用系统(www.e-cology.com.cn)。`,**不做降级实现、不改用其它接口拼装**。
|
|
58
|
+
- 当前待办节点的 `nodeId` 获取**不在本 Skill 职责内**,由调用前置能力或用户提供。
|
|
59
|
+
- 单据链接一律按本文「流程链接(单据跳转)」章节渲染,本文件不复述规则。
|
|
60
|
+
|
|
46
61
|
## 路由优先级
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
**先判环境**:`baseUrl` 主机名含 `e-cology`(自用系统)且意图属报销类查询、AI 预审或客户/项目/合同信息查询 → 先读 [references/self-hosted-mode.md](references/self-hosted-mode.md),按其口径执行;其余环境与意图按下列路由。
|
|
64
|
+
|
|
65
|
+
先判断用户意图归属哪个模块,再选择 operation;一个意图只选最匹配的一个接口,目标不明确先提问收窄,不自动切换近义接口。**借款/发票核销的提醒类写操作与 AI 规则预审都必须先 `prepare` 出预览并请用户明确确认,再 `apply`;禁止未确认自动执行。**
|
|
49
66
|
|
|
50
67
|
- 「这个事前申请单预算还剩多少」「某 requestId 的预算情况」→ `fna.budget.application.detail`
|
|
51
68
|
- 「预算执行报表」「某模板/部门/期间预算执行情况」→ `fna.budget.execute.list`
|
|
@@ -53,6 +70,7 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
53
70
|
- 「本月各部门报销金额排名」「按月份/费用类型统计报销金额」「报销金额 TOP10」→ `fna.expense.chart`
|
|
54
71
|
- 「还有多少借款没还」「各状态借款金额/笔数」→ `fna.expense.loan.sum`
|
|
55
72
|
- 「预付核销进度」「未到账多少」→ `fna.expense.prepay.writeoff.sum`
|
|
73
|
+
- 「把这张单预审一下」「有没有规则没过」「按节点维度再查一次」→ `fna.audit.check.prepare` → 确认 → `fna.audit.check.apply`
|
|
56
74
|
- 「全公司待还款/还款中多少钱」→ `fna.loan.main.page`
|
|
57
75
|
- 「列出借款单」「谁还欠多少」→ `fna.loan.main.list`
|
|
58
76
|
- 「提醒某人/批量提醒还款」→ `fna.loan.remind.repay.prepare` → 确认 → `fna.loan.remind.repay.apply`
|
|
@@ -70,6 +88,8 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
70
88
|
| `fna.expense.loan.sum` | read | 借款金额分段汇总(已知缺陷:仅统计首条借款记录;瞬时空响应自动重试) |
|
|
71
89
|
| `fna.expense.prepay.writeoff.sum` | read | 预付核销金额汇总 |
|
|
72
90
|
| `fna.expense.chart` | read | 报销报表 AI 问答(userInput 必填;按 data.kind=rows/empty/clarify/blocked/unexpected 判成败;每次消耗一次大模型对话 + 一次 SQL) |
|
|
91
|
+
| `fna.audit.check.prepare` | write | AI 规则预审预览:校验 workflowId/requestId/nodeId 并签发 continuation,不触网、不消耗额度 |
|
|
92
|
+
| `fna.audit.check.apply` | write | AI 规则预审执行(confirm+continuation):按 status=checked/empty/unparsed 返回逐条结果;写预审记录并消耗大模型 |
|
|
73
93
|
| `fna.loan.main.page` | read | 借款首页汇总(dhk/hkz) |
|
|
74
94
|
| `fna.loan.main.list` | read | 借款首页列表(menuCode/permissionSetCode 必填) |
|
|
75
95
|
| `fna.loan.remind.repay.prepare` | write | 提醒还款预览(不发送) |
|
|
@@ -88,6 +108,8 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
88
108
|
- 借款费用中心接口 requestId/employeeId/workflowId 只认**数字**(字符串会静默返回空);超 2^53 的巨型 ID 保留字符串并提示人工核验。
|
|
89
109
|
- `fna.expense.chart` 是二开接口(`/api/secondev/fna/getExpenseChart`):服务端只把当前人/当前部门作为**提示文本**拼进 prompt,不做强制过滤,返回可能是全租户数据;个人金额口径必须改用 `fna.expense.reimbursed.sum`(按 `employeeId` 过滤),并在汇报中注明数据范围。
|
|
90
110
|
- `fna.expense.chart` 返回 `meta.permissionDenied=true`(或文案含「权限 / 越权」)表示当前账号数据权限不覆盖该范围,按执行原则第 9 条**立即停住**,不得改调其它接口拼装同一份报表。
|
|
111
|
+
- `fna.audit.check.*` 走 `/api/ai/application/rule/check/aiCheckAudit`(不在 fna 命名空间):`workflowId`/`requestId`/`nodeId` 三个必填且**不能传 0**(服务端不校验必填,传 0 会静默返回空数据);ID 超 2^53 必须传字符串,CLI 统一按数字字符串发送。
|
|
112
|
+
- `fna.audit.check.apply` 的 `data.status` 才是判据(`checked`/`empty`/`unparsed`);`empty` 是业务成功但无可审数据,不是报错;`recordId` 是字符串且可能超 2^53,刷新后不要转数字。
|
|
91
113
|
|
|
92
114
|
## 执行原则
|
|
93
115
|
|
|
@@ -100,6 +122,27 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
100
122
|
7. `fna.expense.chart` 的成败看 `data.kind` 而不是 `code`(`code` 恒为 200,追问/拦截也走 success):`rows`/`empty` 属正常,`clarify` 按文案补口径后最多重问一次,`blocked` 换更贴近报销业务的问法而**不是**自己写 SQL;`unexpected` 只描述现象并反馈维护者。
|
|
101
123
|
8. `fna.expense.chart` 每次调用都真实消耗一次大模型对话 + 一次 SQL,一轮对话最多问 1-2 次,禁止循环试探;`maxRows` 只截断本地展示、不改变服务端查询;列名由 AI SQL 别名决定,不要假设固定列名。
|
|
102
124
|
9. **权限拦截即终点(硬规则)**:`fna.expense.chart` 返回 `meta.permissionDenied=true`,或文案明确提示无数据权限 / 越权访问时,把接口原文如实告知用户并说明「当前账号数据权限不足,查不到该范围数据」,然后给出替代路径(换具备该权限的账号 / 请管理员扩权 / 由有权限方导出明细后再分析),由用户决定下一步。**禁止**换问法、换口径继续试探,**禁止**改调 `fna.expense.reimbursed.sum`、`fna.budget.*`、借款 / 发票核销等其它接口按部门 / 人员 / 金额自行拼装同一份报表,**禁止**自写 SQL 绕过——拼装结果与原报表口径不同源,属于越权尝试且极易产出错误结论。详见 [references/expense-chart.md](references/expense-chart.md) 的「无权限时的处理」。
|
|
125
|
+
10. **AI 预审按 `status` 回话,不按 HTTP 成功**:`checked` → 先给结论(`failedCount/totalRules`)再列未通过的 `rule`+`result`+`riskName`;`empty` → 按 `emptyReason` 说明「没有可审数据/没有规则」,不重试、不自造规则;`unparsed` → 说明接口已执行但结果格式无法解析,给 `recordId` 与预览,不伪造结论。预审有写副作用且消耗大模型,一轮最多跑 1-2 次;`partial`/`write_uncertain`/超时**禁止自动重试**,先按 `requestId`+`nodeId` 回查预审记录。
|
|
126
|
+
|
|
127
|
+
## 流程链接(单据跳转)
|
|
128
|
+
|
|
129
|
+
凡输出单据列表或单据详情(申请名称、单据标题、流程名称)时,**必须为每张单据附上可点击的流程详情链接**,不能只给纯文本标题:
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
{baseUrl}/sp/workflow/flowpage/view/{requestId}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
| 变量 | 取值 |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `{baseUrl}` | 当前激活环境的登录域名,取 `weaver-work-cli auth status --no-check` 输出中的 `baseUrl`;**禁止硬编码**某个租户域名 |
|
|
138
|
+
| `{requestId}` | 单据的流程实例 ID。列表类接口取返回行的 `id` 字段(`fna.loan.main.list`、`fna.invoice.writeoff.list` 等);预算详情、AI 预审等以入参 `requestId` 为准 |
|
|
139
|
+
|
|
140
|
+
约束:
|
|
141
|
+
|
|
142
|
+
1. **ID 必须按字符串拼接**:E10 流程实例 ID 常超 2^53(如 `1336891193208324097`),转成数字会丢精度并链到错误单据。
|
|
143
|
+
2. **链接只带 `requestId`**,鉴权依赖浏览器已有登录态;禁止把 Cookie / ETEAMSID / token 拼进 URL,否则文档一转发即泄露凭证。
|
|
144
|
+
3. 渲染方式:Markdown 用 `[申请名称]({url})`;Excel 用 `=HYPERLINK("{url}","申请名称")`;纯文本表格单列一列「流程链接」。
|
|
145
|
+
4. 链接可见性受当前账号数据权限约束,向他人分享时须提示对方可能无权限打开。
|
|
103
146
|
|
|
104
147
|
## References
|
|
105
148
|
|
|
@@ -109,8 +152,10 @@ cliHelp: "weaver-work-cli fna --help"
|
|
|
109
152
|
| 预算:事前申请单预算详情 / 预算执行报表 | [references/budget.md](references/budget.md) |
|
|
110
153
|
| 费用中心:报销 / 借款 / 预付核销 | [references/expense-center.md](references/expense-center.md) |
|
|
111
154
|
| 报销报表 AI 问答:自然语言出报表、五个 `kind`、无权限硬规则、额度与数据范围风险 | [references/expense-chart.md](references/expense-chart.md) |
|
|
155
|
+
| AI 规则预审:三个 `status`、逐条结果字段、ID 约定、`checkMode`/`dimension`/`recordId` 语义 | [references/ai-check-audit.md](references/ai-check-audit.md) |
|
|
112
156
|
| 借款管理:汇总 / 列表 / 提醒还款(prepare→apply) | [references/loan-management.md](references/loan-management.md) |
|
|
113
157
|
| 发票核销:金额 tab / 列表 / 催票(prepare→apply) | [references/invoice-writeoff.md](references/invoice-writeoff.md) |
|
|
158
|
+
| 自用系统专场:环境判定与非自用拦截、报销只查总部费用报销、AI 预审五步、客户/项目/合同转 Skill 与自动补齐 | [references/self-hosted-mode.md](references/self-hosted-mode.md) |
|
|
114
159
|
| 源资料指纹与更新检测 | [references/source-manifest.json](references/source-manifest.json) |
|
|
115
160
|
|
|
116
161
|
## 命令示例
|
|
@@ -121,6 +166,8 @@ Windows PowerShell:
|
|
|
121
166
|
weaver-work-cli --json fna run fna.budget.application.detail --input-json '{"requestId":"1001"}'
|
|
122
167
|
weaver-work-cli --json fna run fna.expense.loan.sum --input-json '{"employeeId":12345,"startDate":"2026-01-01","endDate":"2026-08-31"}'
|
|
123
168
|
weaver-work-cli --json fna run fna.expense.chart --input-json '{"userInput":"2026-08 各部门报销金额排名前三"}'
|
|
169
|
+
weaver-work-cli --json fna run fna.audit.check.prepare --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node"}'
|
|
170
|
+
weaver-work-cli --json fna run fna.audit.check.apply --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node","confirm":true,"continuation":"PREPARE_CONTINUATION"}'
|
|
124
171
|
weaver-work-cli --json fna run fna.loan.main.list --input-json '{"current":1,"pageSize":20,"menuCode":"fesx_fna_borrowingManagement","permissionSetCode":"fesx_fna_borrowingManagement.default"}'
|
|
125
172
|
```
|
|
126
173
|
|
|
@@ -130,16 +177,20 @@ macOS/Linux(bash/zsh):
|
|
|
130
177
|
weaver-work-cli --json fna run fna.budget.application.detail --input-json '{"requestId":"1001"}'
|
|
131
178
|
weaver-work-cli --json fna run fna.expense.loan.sum --input-json '{"employeeId":12345,"startDate":"2026-01-01","endDate":"2026-08-31"}'
|
|
132
179
|
weaver-work-cli --json fna run fna.expense.chart --input-json '{"userInput":"2026-08 各部门报销金额排名前三"}'
|
|
180
|
+
weaver-work-cli --json fna run fna.audit.check.prepare --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node"}'
|
|
181
|
+
weaver-work-cli --json fna run fna.audit.check.apply --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node","confirm":true,"continuation":"PREPARE_CONTINUATION"}'
|
|
133
182
|
weaver-work-cli --json fna run fna.loan.main.list --input-json '{"current":1,"pageSize":20,"menuCode":"fesx_fna_borrowingManagement","permissionSetCode":"fesx_fna_borrowingManagement.default"}'
|
|
134
183
|
```
|
|
135
184
|
|
|
136
185
|
## 附件与文件安全
|
|
137
186
|
|
|
138
|
-
本 Skill 的
|
|
187
|
+
本 Skill 的 13 个接口均为查询/提醒/预审类,**不涉及附件、图片或文件上传解析**。若后续扩展接口涉及附件或文件内容解析,必须先向用户说明「附件内容可能会发送到当前大模型服务处理,可能进入大模型上下文」,并在用户明确确认后才能处理;不得把用户仅提供路径或文件名视为同意解析或上传。
|
|
139
188
|
|
|
140
189
|
## 不在本 Skill 范围
|
|
141
190
|
|
|
142
191
|
- 借款「确认已还 confirmRepay」、核销明细等页面按钮能力(源资料未提供接口)→ 见 `weaver-work-cli fna schema` 的 `withheldOperations`,不得编造 operation 或直连接口。
|
|
192
|
+
- AI 规则预审只按流程已配置的规则执行:不支持新增/编辑/删除规则或规则设置(`fna.audit.rule.configure` 已在 withheldOperations),也不回传 `formDataList` 明细(只给 `id/refId/title` 摘要)。
|
|
193
|
+
- 想用 `userId` 查看他人单据:该字段是**执行人**身份,不是查看权限,越权使用一律禁止。
|
|
143
194
|
- 报销报表 AI 问答只接受自然语言 `userInput`:不接受自写 SQL、不暴露 AI 生成的 SQL,也没有 `scope=self/dept/tenant` 之类的强制过滤参数(服务端未提供)。
|
|
144
195
|
- 报表返回无权限后改调其它报销/借款/预算/流程接口拼装同一份报表,或自写 SQL 绕过权限边界——属于越权尝试,一律禁止。
|
|
145
196
|
- 姓名/流程名 → ID 的解析、创建借款单/预付单/事前申请单等需联动工作流的写流程(未提供接口依据)。
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# AI 规则预审(fna.audit.check)
|
|
2
|
+
|
|
3
|
+
## 何时使用
|
|
4
|
+
|
|
5
|
+
用户要在提交前按流程已配置的 AI 规则校验一张单据(报销 / 借款 / 合同等流程)时使用:
|
|
6
|
+
|
|
7
|
+
- 「帮我把这张报销单预审一下」「这条待办能不能提交」
|
|
8
|
+
- 「看看有没有不通过的规则」「哪几条规则没过」
|
|
9
|
+
- 「按节点维度再跑一次预审」(`dimension=node`)
|
|
10
|
+
|
|
11
|
+
**不要用于**:
|
|
12
|
+
|
|
13
|
+
- 查规则配置本身(有哪些规则、规则怎么配)→ 本 Skill 未提供规则维护接口。
|
|
14
|
+
- 想改单据内容再校验 → 本接口只读单据、不改单据;改单请走对应流程表单 Skill。
|
|
15
|
+
- 想绕过预审直接提交 → 提交是流程动作,不在本 Skill 范围。
|
|
16
|
+
|
|
17
|
+
接口有**写副作用**:每次执行都会写入/更新预审记录(`ai_check_audit_record`),并消耗一次或多次大模型调用;`single` 模式逐条审核,更慢也更贵。
|
|
18
|
+
|
|
19
|
+
## 输入要点
|
|
20
|
+
|
|
21
|
+
| 字段 | 必填 | 说明 |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `workflowId` | 是 | 流程 ID,>0;与 `requestId`、`nodeId` 拼成数据源 ids:`workflowId_requestId_nodeId` |
|
|
24
|
+
| `requestId` | 是 | 流程实例 ID,即预审单据 ID,>0 |
|
|
25
|
+
| `nodeId` | 是 | 流程节点 ID,>0;取当前待办节点 |
|
|
26
|
+
| `dimension` | 否 | 默认 `node`;`node`(按节点,不记个人,动作流 RPC 用这个)/ `user`(按人)。只有明确要记在某人名下时才传 `user` |
|
|
27
|
+
| `checkMode` | 否 | `batch`(一次 AI 审核)/ `single`(逐条审核后合并);传了会**覆盖流程配置** |
|
|
28
|
+
| `recordId` | 否 | 已有预审记录 ID;传了本次结果**追加**到该记录,不传则每次新增 |
|
|
29
|
+
| `userId` | 否 | 执行人 ID,>0;不传用当前登录人。传了但人员不存在会**直接失败**,不会回退成当前登录人 |
|
|
30
|
+
| `refId` | 否 | 规则配置关联 ID,默认取 `workflowId`;EB 流程传表单 ID |
|
|
31
|
+
| `settingId` | 否 | 规则设置 ID;>0 时直接取该规则设置 |
|
|
32
|
+
| `ruleList` | 否 | 追加规则:JSON 字符串数组(`["规则1","规则2"]`)或 `##` 分隔文本。**必须传字符串**,数组要自己序列化 |
|
|
33
|
+
| `pageType` | 否 | 页面类型,默认 `flowPage` |
|
|
34
|
+
|
|
35
|
+
**ID 约定**:所有 ID 字段服务端按 long 解析,数字和数字字符串都收;**超过 2^53 的 ID 必须传字符串**(JS 数字会丢精度)。CLI 统一转成数字字符串发送。
|
|
36
|
+
|
|
37
|
+
**服务端不做必填校验**:`workflowId`/`requestId`/`nodeId` 传 `0` 不报错,只会返回空数据。CLI 已在入参阶段拦住 0 与非数字,不要绕过。
|
|
38
|
+
|
|
39
|
+
## 命令
|
|
40
|
+
|
|
41
|
+
预审固定两步:`prepare` 只做本地校验并签发 continuation,不触网;用户确认后才 `apply`。
|
|
42
|
+
|
|
43
|
+
Windows PowerShell:
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
weaver-work-cli --json fna run fna.audit.check.prepare --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node","checkMode":"batch"}'
|
|
47
|
+
|
|
48
|
+
weaver-work-cli --json fna run fna.audit.check.apply --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node","checkMode":"batch","confirm":true,"continuation":"PREPARE_CONTINUATION"}'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
macOS/Linux(bash/zsh):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
weaver-work-cli --json fna run fna.audit.check.prepare --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node","checkMode":"batch"}'
|
|
55
|
+
|
|
56
|
+
weaver-work-cli --json fna run fna.audit.check.apply --input-json '{"workflowId":"100000000000000001","requestId":"133000000000000001","nodeId":"111000000000000001","dimension":"node","checkMode":"batch","confirm":true,"continuation":"PREPARE_CONTINUATION"}'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`prepare` 成功返回 `status=AWAITING_CONFIRMATION` + `preview`(含归一化后的请求体、代价与副作用说明)+ `continuation` + `expiresInSeconds`(24 小时,与登录态无关)。`apply` 必须带与 `prepare` **完全一致**的业务参数,指纹不一致会返回 `validation.target_changed`。
|
|
60
|
+
|
|
61
|
+
## 输出处理
|
|
62
|
+
|
|
63
|
+
`apply` 的 `data.status` 是唯一判据:
|
|
64
|
+
|
|
65
|
+
| status | 含义 | 怎么回话 |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `checked` | 拿到逐条结果 | 先给结论(`conclusion=passed/failed`、`failedCount/totalRules`),再列**未通过**的 `rule` + `result` + `riskName`;通过的只给条数,不要逐条罗列 |
|
|
68
|
+
| `empty` | 业务成功但没有可审数据(`data.catResult=null`) | 按 `emptyReason` 说明原因:`formDataList is empty`(单据取不到)/ `dataSourceMap is empty`(数据源为空)/ `no rules to check`(没有规则)。**不是报错**,不要重试,也不要自己补规则 |
|
|
69
|
+
| `unparsed` | 接口已执行,但 `chatMessage.content` 不是可解析 JSON | 如实说明「预审已执行,但结果格式无法解析」,给出 `recordId` 与 `contentPreview`,不要伪造结论、不要重跑 |
|
|
70
|
+
|
|
71
|
+
稳定字段:
|
|
72
|
+
|
|
73
|
+
- `recordId`:预审记录 ID(**字符串**,可能超 2^53,不要转数字);二次执行时把它作为 `recordId` 传回可追加到同一条记录。
|
|
74
|
+
- `title` / `formData`:单据标题与 `{id, refId, title}` 摘要;`formDataList` 的完整主表/明细/发票数据**不回传**。
|
|
75
|
+
- `results[]`:`id`(规则 ID,不是记录 ID)、`rule`(规则原文)、`result`(AI 说明)、`passed`、`riskType`(0 低 / 1 中 / 2 高)、`riskName`、`generated`(是否 AI 生成规则)、`fieldId`;开启二次审核时另有 `auditResult`(`pass` 等)与 `auditReason`。
|
|
76
|
+
- `totalRules` / `passedCount` / `failedCount` / `conclusion`:汇总计数;`suggestions.tips` 是给用户的结论性提示(逐条模式或生成建议时才有,`batch` 通常没有)。
|
|
77
|
+
- `meta.checkMode`:`batch` / `single` / `flow-config`(未显式传,用流程配置);`meta.dimension` 始终有值,未传时为 `node`。
|
|
78
|
+
|
|
79
|
+
## 流程链接(单据跳转)
|
|
80
|
+
|
|
81
|
+
预审的对象是一张具体单据,输出预审结论时必须同时给出该单据的流程详情链接:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
{baseUrl}/sp/workflow/flowpage/view/{requestId}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- `{requestId}` 用 `apply`/`prepare` 的入参 `requestId`(同时就是数据源 ids `workflowId_requestId_nodeId` 的中段)。
|
|
88
|
+
- `{baseUrl}` 取 `weaver-work-cli auth status --no-check` 的 `baseUrl`,禁止硬编码。
|
|
89
|
+
- `requestId` 必须按**字符串**拼接(超 2^53,转数字会链到错误单据);`recordId` 是预审记录 ID,**不能**当作 `requestId` 拼链接。
|
|
90
|
+
- `nodeId` 不要拼进 URL(节点定位由页面自行处理)。
|
|
91
|
+
- 链接只带 `requestId`,禁止拼 Cookie/ETEAMSID/token。
|
|
92
|
+
|
|
93
|
+
## 注意
|
|
94
|
+
|
|
95
|
+
1. **耗时与额度**:接口内部轮询 180s,`single` 模式整体可能更久,CLI 超时设 10 分钟。每次执行都真实消耗大模型额度,一轮对话最多跑 1-2 次,禁止为「换个模式再试试」循环调用。
|
|
96
|
+
2. **写副作用**:会写入/更新预审记录。传 `recordId` 是**追加**语义,不是覆盖;不确定该不该追加就别传。
|
|
97
|
+
3. **`checkMode` 会覆盖流程配置**:用户没要求时不要传,交给流程配置决定;`single` 更慢更贵,只在用户明确要求逐条审核时用。
|
|
98
|
+
4. **`dimension` 影响记录归属**:不传默认 `node`(按节点、不记个人,动作流 RPC 走这条);`user` 记在当前/指定执行人名下。只有用户明确要求「记在某人名下」才传 `user`。
|
|
99
|
+
5. **`userId` 是执行人不是查看人**:传了会按该人员身份执行规则,人员不存在直接失败;不要用它做「查看别人的单据」。
|
|
100
|
+
6. **结果不确定时禁止重试**:请求超时或连接中断可能已生成预审记录,按 `requestId` + `nodeId` 回查预审记录后再决定。
|
|
101
|
+
7. **规则 ID ≠ 记录 ID**:`results[].id` 是规则 ID,`recordId` 是预审记录 ID,展示和回传都不要混。
|
|
102
|
+
|
|
103
|
+
## 失败处理
|
|
104
|
+
|
|
105
|
+
| 现象 | 含义 | 处理 |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| `validation.id_required` / `validation.id_invalid` | 缺 `workflowId`/`requestId`/`nodeId`,或传了 0 / 非数字 | 向用户要真实的流程/实例/节点 ID,不要用 0 或占位符试探 |
|
|
108
|
+
| `validation.dimension_invalid` / `validation.checkMode_invalid` | 枚举值写错 | 只能是 `node`/`user`、`batch`/`single` |
|
|
109
|
+
| `validation.rule_list_invalid` | `ruleList` 不是字符串,或以 `[` 开头但不是合法 JSON 字符串数组 | 数组先 `JSON.stringify` 再传 |
|
|
110
|
+
| `validation.target_changed` | `apply` 的业务参数与 `prepare` 不一致 | 重新 `prepare` 并把新 continuation 一起传 |
|
|
111
|
+
| `validation.continuation_invalid` / `continuation_expired` | 票据无效或过期 | 重新 `prepare`;**不要**当成登录失效去重新登录 |
|
|
112
|
+
| `confirmation.required` | `apply` 没带 `confirm=true` | 先向用户确认,再补 `confirm:true` |
|
|
113
|
+
| `api.person_unavailable` | 没取到当前人员,或 `userId` 对应人员不存在 | 说明是人员问题,确认登录人/`userId`;不自动重试 |
|
|
114
|
+
| `api.business_error` | 其它业务失败 | 按 `message` 转述,不猜测结论 |
|
|
115
|
+
| `api.http_error` | HTTP 非 2xx | 按状态码说明;404/500 先怀疑环境未部署该接口 |
|
|
116
|
+
| `partial.write_uncertain` | 请求发出后超时/断网,预审记录可能已生成 | **禁止重试**;先按 `requestId`+`nodeId` 回查预审记录,再决定是否重跑 |
|
|
117
|
+
| `network.timeout` | 超过 10 分钟未返回 | 同上,结果不确定;建议缩小规则范围(`settingId`/`ruleList`)或改 `batch` 模式后由用户决定 |
|
|
118
|
+
| `authentication.session_expired` | 登录态失效 | 先确认 E10 登录域名,再刷新登录;不得带失效 Cookie 重试 |
|
|
@@ -29,6 +29,20 @@ weaver-work-cli --json fna run fna.budget.application.detail --input-json '{"req
|
|
|
29
29
|
|
|
30
30
|
返回归一化对象:`requestId`/`requestName`/`createPerson`/`createTime` + `budget{totalAmount,reimbursedFee,reimbursingFee,remainingBudget,releasedBudgetAmount,isDisplay}`;`meta.rawForm` 为原始 WeaForm。汇报时展示申请名称、发起时间、预算总额与剩余可用预算即可,不必粘贴整份表单。
|
|
31
31
|
|
|
32
|
+
## 流程链接(单据跳转)
|
|
33
|
+
|
|
34
|
+
预算详情本身就是「一张事前申请单」,输出 `requestName`/申请名称时必须附流程详情链接:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
{baseUrl}/sp/workflow/flowpage/view/{requestId}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- `{requestId}` 直接用本接口(`fna.budget.application.detail`)的入参值,返回体里的 `requestId` 亦相同。
|
|
41
|
+
- `{baseUrl}` 取 `weaver-work-cli auth status --no-check` 的 `baseUrl`,禁止硬编码。
|
|
42
|
+
- `requestId` 必须按**字符串**拼接(超 2^53,转数字会链到错误单据)。
|
|
43
|
+
- 链接只带 `requestId`,禁止拼 Cookie/ETEAMSID/token。
|
|
44
|
+
- 预算执行报表(`fna.budget.execute.list`)的行是预算维度明细,通常不含 `requestId`,**不要**强行拼单据链接。
|
|
45
|
+
|
|
32
46
|
## 预算执行报表(fna.budget.execute.list)
|
|
33
47
|
|
|
34
48
|
### 输入要点
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FNA 齐业成费控接口目录
|
|
2
2
|
|
|
3
|
-
对应 `weaver-work-cli fna` 的
|
|
3
|
+
对应 `weaver-work-cli fna` 的 16 个 operation,覆盖源资料五大模块 13 个接口(预算 2 / 费用中心 3 + 报销报表 AI 问答 1 / AI 规则预审 1 / 借款管理 3 / 发票核销 3,其中提醒还款、催票与 AI 预审拆为 prepare/apply 两个操作)。完整接口路径与认证由 weaver-work-cli 托管,Agent 只写业务 JSON。
|
|
4
4
|
|
|
5
5
|
## 一、预算查询(budget,2 个)
|
|
6
6
|
|
|
@@ -28,7 +28,20 @@
|
|
|
28
28
|
- 借款接口 requestId 等必须传数字;预付核销接口日期按核销记录创建时间、employeeId 匹配预付单创建人。
|
|
29
29
|
- 报销报表 AI 问答(`fna.expense.chart`)是二开接口(`/api/secondev/fna/getExpenseChart`):自然语言进 AI 场景生成 SQL,服务端做租户隔离改写 + 安全校验后执行;返回 `kind=rows/empty/clarify/blocked/unexpected`(`code` 恒为 200,不能用它判成败)。每次调用消耗一次大模型对话 + 一次 SQL,且不做当前人强制过滤,详见 `expense-chart.md`。**返回无权限时(`meta.permissionDenied=true` 或文案含「权限 / 越权」)到此为止,不得改调其它接口拼数据,见 `expense-chart.md` 的「无权限时的处理」。**
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## 三、AI 规则预审(audit,1 个接口 / 2 个 operation)
|
|
32
|
+
|
|
33
|
+
| 用户意图 | operation | 风险 |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| 「把这张单预审一下」「有没有规则没过」「哪几条没过」 | `fna.audit.check.prepare` → `.apply` | **write** |
|
|
36
|
+
|
|
37
|
+
- 接口:`POST /api/ai/application/rule/check/aiCheckAudit`(在 `ai/application` 命名空间,不在 fna 下)。
|
|
38
|
+
- 三个必填 ID:`workflowId`/`requestId`/`nodeId`,**不能传 0**(服务端不校验必填,传 0 只返回空数据);ID 超 2^53 必须字符串。
|
|
39
|
+
- 写副作用:每次执行写入/更新预审记录 `ai_check_audit_record` 并消耗一次或多次大模型调用;`recordId` 是**追加**语义。
|
|
40
|
+
- 判据是 `data.status`(`checked`/`empty`/`unparsed`),不是 HTTP 成功;`empty` 属业务成功但无可审数据(`formDataList is empty` / `dataSourceMap is empty` / `no rules to check`)。
|
|
41
|
+
- `checkMode`(`batch`/`single`)会**覆盖流程配置**,用户没要求时不传;`dimension` 默认 `node`(按节点、不记个人),只有要记在某人名下才传 `user`。
|
|
42
|
+
- 逐条结果在 `results[]`:`rule`/`result`/`passed`/`riskType`(0 低/1 中/2 高)/`riskName`;`results[].id` 是规则 ID,不是记录 ID。详见 `ai-check-audit.md`。
|
|
43
|
+
|
|
44
|
+
## 四、借款管理(loan,管理员)
|
|
32
45
|
|
|
33
46
|
| 用户意图 | operation | 风险 |
|
|
34
47
|
|---|---|---|
|
|
@@ -40,7 +53,7 @@
|
|
|
40
53
|
- 数据流:`fna.loan.main.list` 返回 `rows`(displayData 行,含 id/workflowId/jkrPersonName/dhkAmount)→ 原样回传 `fna.loan.remind.repay.prepare` → 用户确认 → `apply`。
|
|
41
54
|
- 金额:`data` 原始精度、`displayData` 已格式化;`createTime` 在 displayData 为 `yyyy-MM-dd HH:mm:ss`。
|
|
42
55
|
|
|
43
|
-
##
|
|
56
|
+
## 五、发票核销财务(invoice-writeoff,财务/管理员)
|
|
44
57
|
|
|
45
58
|
| 用户意图 | operation | 风险 |
|
|
46
59
|
|---|---|---|
|
|
@@ -51,9 +64,35 @@
|
|
|
51
64
|
- `invoiceStatus` 过滤:`unWritten`/`unarrivedTicket`/`dealing`/`callTicket`;`menuCode`/`permissionSetCode` 示例 `inv_write_off_financial(.default)`。
|
|
52
65
|
- 数据流:`fna.invoice.writeoff.list` 返回行 `requestId`(= `id`)→ 组装 `requestids` 传给 `callticket.prepare` → 用户确认 → `apply`。
|
|
53
66
|
|
|
67
|
+
## 六、自用系统专场(无新增 operation,仅 e-cology)
|
|
68
|
+
|
|
69
|
+
`baseUrl` 主机名含 `e-cology` 时,两个跨 skill 的编排能力见 `self-hosted-mode.md`,本目录不重复实现:
|
|
70
|
+
|
|
71
|
+
| 能力 | 复用 | 要点 |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| 报销待办 AI 规则预审 | `workflow.search` + `fna.audit.check.prepare/apply` + `workflow.batchSubmit` | 报销类近义词只查「总部费用报销 `100003460000000060`」;按措辞决定是否预审,只问一次 |
|
|
74
|
+
| 查报销流程的客户/项目/合同信息 | workflow 详情 + 客户/合同/项目 Skill | 流程字段与卡片主数据两段一起给;主数据不在本 Skill |
|
|
75
|
+
|
|
76
|
+
- 非自用环境执行这两个能力固定拒绝(固定话术),不做降级实现、不改用其它接口拼装。
|
|
77
|
+
- 报销类近义词只在自用环境钉死工作流;预算、借款、预付核销、发票核销、报销报表 AI 问答等意图不受影响,仍按上文各节执行。
|
|
78
|
+
|
|
79
|
+
## 流程链接(单据跳转)
|
|
80
|
+
|
|
81
|
+
本目录涉及的所有单据(借款单、发票核销单、预付单、事前申请单、报销单)输出时必须带流程详情链接:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
{baseUrl}/sp/workflow/flowpage/view/{requestId}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- `{baseUrl}`:当前激活环境域名,取 `weaver-work-cli auth status --no-check` 的 `baseUrl`,**禁止硬编码**。
|
|
88
|
+
- `{requestId}`:列表接口取返回行 `id`(`fna.loan.main.list`、`fna.invoice.writeoff.list`);详情/预审类接口取入参 `requestId`。
|
|
89
|
+
- ID 必须按字符串拼接(超 2^53,转数字会链到错误单据);链接只带 `requestId`,禁止拼 Cookie/ETEAMSID/token。
|
|
90
|
+
- 各模块的具体字段来源见对应 reference 的「流程链接」小节。
|
|
91
|
+
|
|
54
92
|
## 通用约定
|
|
55
93
|
|
|
56
94
|
- 失败时按错误 envelope 的 `type/subtype` 处理:`confirmation.required` 缺确认;`partial.write_uncertain` 不确定结果立即停止并回查,禁止自动重试。
|
|
57
95
|
- 无记录时输出 `total=0`/空 `rows` 或 `segments:null`,提示「暂无记录」,不得伪造成功。
|
|
58
96
|
- `fna.expense.chart` 的「有结果」判断看 `kind`(不是 `code`):`code` 恒为 200,追问与安全拦截同样走 `WeaResult.success`;`clarify` 最多重问一次,`blocked` 换业务问法而不是自己写 SQL;`meta.permissionDenied=true` 时不再追问,直接告知权限边界。
|
|
97
|
+
- `fna.audit.check.apply` 的「有结果」判断看 `status`:`empty`(无可审数据)与 `unparsed`(结果无法解析)都不是失败,不得重跑或编造结论。
|
|
59
98
|
- 全部金额字段单位为元。
|
|
@@ -36,6 +36,14 @@ weaver-work-cli --json fna run fna.expense.loan.sum --input-json '{"requestId":1
|
|
|
36
36
|
weaver-work-cli --json fna run fna.expense.prepay.writeoff.sum --input-json '{}'
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
## 流程链接(单据跳转)
|
|
40
|
+
|
|
41
|
+
本文件三个接口**只回金额,不返回单据列表**,因此自身给不出链接;需要带链接的单据明细时:
|
|
42
|
+
|
|
43
|
+
- 已持有 `requestId`(用户指定或来自其它列表接口)→ 直接拼 `{baseUrl}/sp/workflow/flowpage/view/{requestId}`。
|
|
44
|
+
- 需要先列单据再拼链接 → 借款走 `fna.loan.main.list`(行 `id`)、发票核销走 `fna.invoice.writeoff.list`(行 `requestId`),不要用本文件的金额接口反推单据。
|
|
45
|
+
- `{baseUrl}` 取 `weaver-work-cli auth status --no-check` 的 `baseUrl`,禁止硬编码;`requestId` 按字符串拼接,链接不拼任何凭证。
|
|
46
|
+
|
|
39
47
|
## 输出处理
|
|
40
48
|
|
|
41
49
|
- 报销:`data.amount`(元);无数据返回 `0.0`。
|