weaver-work-cli 0.1.64 → 0.1.66
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/dist/chunks/{attachment-content-JQDW3BIB.js → attachment-content-NRBGS5XG.js} +3 -3
- package/dist/chunks/{chunk-RMOH2GMF.js → chunk-2BAZJCG7.js} +2 -2
- package/dist/chunks/{chunk-SHX7XBYR.js → chunk-4WCVRDC5.js} +83 -33
- package/dist/chunks/{chunk-KDFEHDIB.js → chunk-5FQT7GSN.js} +2 -2
- package/dist/chunks/{chunk-3PCXBG4H.js → chunk-AAOYOPHW.js} +1 -1
- package/dist/chunks/{chunk-5QQKLR6H.js → chunk-BZ6HAY2U.js} +7 -7
- package/dist/chunks/{chunk-I3MOFD6Q.js → chunk-EYEJW5SG.js} +4 -4
- package/dist/chunks/{chunk-SCMHG23G.js → chunk-GOZ75GHU.js} +38 -38
- package/dist/chunks/{chunk-4AFWOGOV.js → chunk-M7IEDTRI.js} +1 -1
- package/dist/chunks/{chunk-XHSEK2VM.js → chunk-NNXZMBIB.js} +6 -6
- package/dist/chunks/{chunk-K7QKQRSL.js → chunk-NP3ZZFGI.js} +24 -24
- package/dist/chunks/{chunk-INVYKG4I.js → chunk-SAADVUK6.js} +32 -32
- package/dist/chunks/{chunk-YTFNMQO4.js → chunk-VWQGF3KW.js} +103 -19
- package/dist/chunks/{chunk-AGSO3PIK.js → chunk-YFX5JKOY.js} +2 -2
- package/dist/chunks/{chunk-KYDXWYFB.js → chunk-YT73QQMS.js} +1 -1
- package/dist/chunks/{conflict-UUC7AFUI.js → conflict-LJYKIUJM.js} +2 -2
- package/dist/chunks/{contract-INMS7SYQ.js → contract-N5WNHKHI.js} +94 -30
- package/dist/chunks/{create-flow-YOR4QTAJ.js → create-flow-75MCKXGI.js} +6 -6
- package/dist/chunks/{entry-mode-S2ENJ6GZ.js → entry-mode-3PI6A7JD.js} +3 -3
- package/dist/chunks/{env-ZSAXU5PJ.js → env-FI62FOKK.js} +2 -2
- package/dist/chunks/{factory-N76QQA53.js → factory-HLS4SDQM.js} +1 -1
- package/dist/chunks/{group-chat-UM665WDZ.js → group-chat-MFBVOLKY.js} +3 -3
- package/dist/chunks/{lazy-dispatch-4WOIL3ZQ.js → lazy-dispatch-K25LTKQY.js} +2 -2
- package/dist/chunks/{meeting-MMTYDHXA.js → meeting-ROWDB3DO.js} +11 -11
- package/dist/chunks/{minute-doc-LCSBWGJ3.js → minute-doc-ABMO2UDX.js} +2 -2
- package/dist/chunks/{registry-BAWCWV4D.js → registry-NLAO2W6T.js} +2 -2
- package/dist/chunks/{registry-FNI5E76J.js → registry-QV6IPRVM.js} +11 -11
- package/dist/chunks/{room-recommend-I7QQRHEL.js → room-recommend-P54PQTCN.js} +4 -4
- package/dist/chunks/{schedule-3P7EWGNZ.js → schedule-BEBFGMT6.js} +4 -4
- package/dist/chunks/{smart-extract-FOBSVNYW.js → smart-extract-DEBLJPCQ.js} +11 -11
- package/dist/chunks/{workflow-U2KKTVQY.js → workflow-LBFFZZN2.js} +2 -2
- package/dist/cmd/refs/index.js +24 -23
- package/dist/core/output.js +134 -41
- package/dist/index.js +7 -7
- package/dist/shortcuts/contract/manifest.js +11 -4
- package/dist/shortcuts/contract/operations/first-screen.js +41 -19
- package/dist/shortcuts/contract/operations/flow.js +2 -0
- package/dist/shortcuts/contract/operations/ledger.js +58 -8
- package/dist/shortcuts/contract/operations/quote-recognize.js +31 -9
- package/dist/shortcuts/contract/operations/quote-submit.js +4 -1
- package/dist/shortcuts/contract/operations/upload.js +21 -1
- package/dist/shortcuts/contract/upload-cache.js +2 -2
- package/dist/shortcuts/smart-extract/operations/fill.js +14 -14
- package/dist/shortcuts/workflow/index.js +2 -2
- package/dist/shortcuts/workflow/operations/form.js +28 -4
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.categoryCounts.js +64 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +15 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +4 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.prepareQuery.js +4 -0
- package/docs/agent-io-channel-design.md +21 -10
- package/docs/smart-extract.md +1 -1
- package/docs/todo-smart-convert/data-contract.md +1 -1
- package/package.json +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +67 -31
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +18 -18
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +6 -6
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +6 -6
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +7 -7
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +9 -9
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +11 -11
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +18 -18
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +18 -15
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +51 -28
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +6 -6
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +20 -9
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +18 -18
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +9 -9
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +42 -30
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +8 -8
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +1 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-interview-overview.md +1 -1
- package/skills/weaver-e10-shared/references/json-output-contract.md +4 -3
- package/skills/weaver-e10-smart-extract/SKILL.md +1 -1
- package/skills/weaver-e10-workflow/SKILL.md +40 -16
- package/skills/weaver-e10-workflow/aigroup/default.json +1 -1
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +30 -27
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +90 -22
- package/skills/weaver-e10-workflow/references/workflow-view.md +18 -2
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +240 -43
|
@@ -1019,8 +1019,8 @@ var quoteContracts = [
|
|
|
1019
1019
|
fileId: { type: "string", minLength: 1, description: "flow.launch \u8FD4\u56DE\u7684 workflow fileId\uFF08\u552F\u4E00\u6765\u6E90\uFF09" },
|
|
1020
1020
|
flow: { type: "string", enum: ["\u5951\u7EA6\u9501", "\u65B0\u5BA2\u6237", "\u5E38\u89C4\u4E8C\u6B21\u9500\u552E", "\u8001\u5BA2\u6237\u589E\u503C"], description: "\u5408\u540C\u7C7B\u578B\uFF1B\u4E0D\u4F20\u5219\u6309\u62A5\u4EF7\u5355\u7C7B\u578B\u6807\u8BC6\u8BC6\u522B\uFF0C\u5224\u4E0D\u51FA\u8FD4\u56DE needsConfirm \u5F85\u786E\u8BA4" },
|
|
1021
1021
|
customerName: { type: "string", minLength: 1, description: "\u62A5\u4EF7\u5355\u5BA2\u6237\u5168\u79F0\uFF08\u5373\u6700\u7EC8\u7528\u6237\uFF09" },
|
|
1022
|
-
contractTitle: { type: "string", maxLength: 400, description: "\u5408\u540C\u540D\u79F0\uFF1B\u7F3A\u7701\u6309\u300C\u5BA2\u6237\u5168\u79F0
|
|
1023
|
-
contractFileName: { type: "string", maxLength: 400, description: "\u5408\u540C\u6587\u4EF6\u843D\u76D8\u540D\uFF1B\u7F3A\u7701\u4E0E contractTitle \u540C\u540D\uFF0C\u901A\u7528\u540D\uFF08\u5982\u300C\u5408\u540C\u300D\uFF09\u4F1A\u88AB\u7EA0\u6B63\u4E3A\u5408\u540C\u540D\
|
|
1022
|
+
contractTitle: { type: "string", maxLength: 400, description: "\u5408\u540C\u540D\u79F0\uFF1B\u7F3A\u7701\u6309 \xA75.2 \u89C4\u5219\u300C{\u5BA2\u6237\u5168\u79F0}\u534F\u540C\u529E\u516C\u7CFB\u7EDF(e-cology)\u8F6F\u4EF6\u4EA7\u54C1\u53CA\u5B9E\u65BD\u670D\u52A1\u8D2D\u4E70\u5408\u540C\u300D\u751F\u6210" },
|
|
1023
|
+
contractFileName: { type: "string", maxLength: 400, description: "\u5408\u540C\u6587\u4EF6\u843D\u76D8\u540D\uFF1B\u7F3A\u7701\u4E0E contractTitle \u540C\u540D\uFF0C\u901A\u7528\u540D\uFF08\u5982\u300C\u5408\u540C\u300D\uFF09\u4F1A\u88AB\u7EA0\u6B63\u4E3A\u89C4\u8303\u5408\u540C\u540D\uFF08\xA75.2\uFF09\u3002\u26A0\uFE0F \u672C\u9879\u76EE\u4E0D\u8981\u7528\u5B83\u6539\u4E0A\u4F20\u540D\u2014\u2014\u4E0A\u4F20\u540D\u7531 quotescreen.submit \u7EDF\u4E00\u51B3\u5B9A" },
|
|
1024
1024
|
totalAmount: {
|
|
1025
1025
|
anyOf: [{ type: "number" }, { type: "string" }, { type: "object" }],
|
|
1026
1026
|
description: '\u62A5\u4EF7\u5355\u6700\u7EC8\u4F18\u60E0\u62A5\u4EF7\uFF08\u4E0D\u662F\u6807\u51C6\u4EF7\u5408\u8BA1\uFF09\u3002\u4E09\u9009\u4E00\uFF1A\u2460 \u7EAF\u6570\u503C\uFF08\u5982 809166.76\uFF09\uFF1B\u2461 \u53EF\u552F\u4E00\u5F52\u4E00\u7684\u5B57\u7B26\u4E32\uFF08\u5982 "\xA5809,166.76"\uFF09\uFF1B\u2462 **\u63A8\u8350**\u503C\u5F15\u7528 {"$quote":"<\u89E3\u6790\u7ED3\u679C.json \u7EDD\u5BF9\u8DEF\u5F84>#totals.final_total"}\uFF0C\u771F\u503C\u7531\u672C\u8FDB\u7A0B\u8BFB\u3001\u91D1\u989D\u4E0D\u7ECF\u8FC7\u6A21\u578B\u4E0A\u4E0B\u6587\u3002\u4F20\u8131\u654F\u5360\u4F4D\u7B26 [[MONEY_*]] \u4F1A\u88AB total_amount_placeholder \u62D2\u6536'
|
|
@@ -1049,8 +1049,8 @@ var quoteContracts = [
|
|
|
1049
1049
|
anyOf: [{ type: "number" }, { type: "string" }, { type: "object" }],
|
|
1050
1050
|
description: '\u62A5\u4EF7\u5355\u6700\u7EC8\u4F18\u60E0\u62A5\u4EF7\uFF08\u4E0D\u662F\u6807\u51C6\u4EF7\u5408\u8BA1\uFF09\u3002\u4E09\u9009\u4E00\uFF1A\u2460 \u7EAF\u6570\u503C\uFF08\u5982 809166.76\uFF09\uFF1B\u2461 \u53EF\u552F\u4E00\u5F52\u4E00\u7684\u5B57\u7B26\u4E32\uFF08\u5982 "\xA5809,166.76"\uFF09\uFF1B\u2462 **\u63A8\u8350**\u503C\u5F15\u7528 {"$quote":"<\u89E3\u6790\u7ED3\u679C.json \u7EDD\u5BF9\u8DEF\u5F84>#totals.final_total"}\u3002\u4F20\u8131\u654F\u5360\u4F4D\u7B26 [[MONEY_*]] \u4F1A\u88AB total_amount_placeholder \u62D2\u6536'
|
|
1051
1051
|
},
|
|
1052
|
-
contractTitle: { type: "string", maxLength: 400, description: "\u5408\u540C\u540D\u79F0\uFF1B\u7F3A\u7701\u6309\u300C\u5BA2\u6237\u5168\u79F0
|
|
1053
|
-
fileName: { type: "string", maxLength: 400, description: "\u5408\u540C\u6587\u4EF6\u540D\uFF1B\u7F3A\u7701\u53D6 contractPath \u7684\u6587\u4EF6\u540D\uFF0C\u901A\u7528\u540D\uFF08\u5982\u300C\u5408\u540C\u300D\uFF09\u4F1A\u88AB\u7EA0\u6B63\u4E3A\u5408\u540C\u540D\
|
|
1052
|
+
contractTitle: { type: "string", maxLength: 400, description: "\u5408\u540C\u540D\u79F0\uFF1B\u7F3A\u7701\u6309 \xA75.2 \u89C4\u5219\u300C{\u5BA2\u6237\u5168\u79F0}\u534F\u540C\u529E\u516C\u7CFB\u7EDF(e-cology)\u8F6F\u4EF6\u4EA7\u54C1\u53CA\u5B9E\u65BD\u670D\u52A1\u8D2D\u4E70\u5408\u540C\u300D\u751F\u6210\u3002**\u5EFA\u8BAE\u7167\u5B9E\u4F20\u771F\u5B9E\u6807\u9898**\u2014\u2014\u5B83\u540C\u65F6\u51B3\u5B9A\u4E0A\u4F20\u6587\u4EF6\u540D" },
|
|
1053
|
+
fileName: { type: "string", maxLength: 400, description: "\u5408\u540C\u6587\u4EF6\u540D\uFF08**\u5C31\u662F\u4E0A\u4F20\u5230 E10 \u7684\u9644\u4EF6\u540D**\uFF09\uFF1B\u7F3A\u7701\u53D6 contractPath \u7684\u6587\u4EF6\u540D\uFF0C\u901A\u7528\u540D\uFF08\u5982\u300C\u5408\u540C\u300D\u300C\u5408\u540C\u6587\u4EF6\u300D\uFF09\u4F1A\u88AB\u7EA0\u6B63\u4E3A\u89C4\u8303\u5408\u540C\u540D\uFF08\xA75.2\uFF09\u5E76\u4E00\u8DEF\u900F\u4F20\u5230\u4E0A\u4F20\uFF1B\u8FD4\u56DE\u503C expectedFileName \u5373\u5B9E\u9645\u751F\u6548\u7684\u9644\u4EF6\u540D" },
|
|
1054
1054
|
ourCompany: { type: "string", description: "\u6211\u65B9\u7B7E\u7EA6\u4E3B\u4F53\uFF0C\u9ED8\u8BA4\u300C\u6CDB\u5FAE\u7F51\u7EDC\u79D1\u6280\u80A1\u4EFD\u6709\u9650\u516C\u53F8\u300D" },
|
|
1055
1055
|
sections: { type: "array", items: { type: "object" }, description: "\u62A5\u4EF7\u5355\u8D39\u7528\u5206\u8282\uFF08name + amount\uFF09\uFF0C\u7528\u4E8E\u5F52\u7EB3\u5408\u540C\u80CC\u666F\u8BF4\u660E" },
|
|
1056
1056
|
background: { type: "string", maxLength: 2e3, description: "\u5408\u540C\u80CC\u666F\u8BF4\u660E\uFF1B\u4E0D\u4F20\u6309\u62A5\u4EF7\u5355\u5206\u8282\u81EA\u52A8\u5F52\u7EB3" },
|
|
@@ -1888,7 +1888,12 @@ var contractOperations = [
|
|
|
1888
1888
|
},
|
|
1889
1889
|
inputSchema: readSchema({
|
|
1890
1890
|
flow: { type: "string", enum: ["\u5951\u7EA6\u9501", "\u65B0\u5BA2\u6237", "\u8001\u5BA2\u6237\u589E\u503C", "\u5E38\u89C4\u4E8C\u6B21\u9500\u552E"] },
|
|
1891
|
-
path: { type: "string", minLength: 1, maxLength: 1e3 }
|
|
1891
|
+
path: { type: "string", minLength: 1, maxLength: 1e3 },
|
|
1892
|
+
fileName: {
|
|
1893
|
+
type: "string",
|
|
1894
|
+
maxLength: 200,
|
|
1895
|
+
description: "\u4E0A\u4F20\u5230\u6587\u4EF6\u670D\u52A1\u65F6\u7528\u7684\u6587\u4EF6\u540D\uFF08\u7EAF\u6587\u4EF6\u540D\uFF0C\u4E0D\u542B\u8DEF\u5F84\uFF09\uFF1B\u7F3A\u7701\u53D6 path \u7684 basename\u3002**\u4EE3\u7801\u751F\u6210\u7684\u6587\u4EF6\u5FC5\u987B\u4F20\u89C4\u8303\u5408\u540C\u540D**\uFF08\u62A5\u4EF7\u5355\u8F6C\u5408\u540C\u94FE\u8DEF\u7531 quotescreen.submit \u81EA\u52A8\u900F\u4F20\uFF09\uFF0C\u5426\u5219 E10 \u9644\u4EF6\u5217\u8868\u91CC\u4F1A\u51FA\u73B0\u300C\u5408\u540C.docx\u300D\u8FD9\u79CD\u65E0\u6CD5\u8FA8\u8BC6\u7684\u540D\u5B57"
|
|
1896
|
+
}
|
|
1892
1897
|
}, ["flow", "path"])
|
|
1893
1898
|
},
|
|
1894
1899
|
{
|
|
@@ -6246,7 +6251,7 @@ function isCacheEnabled() {
|
|
|
6246
6251
|
return ttlMs() > 0;
|
|
6247
6252
|
}
|
|
6248
6253
|
function fingerprintKey(input) {
|
|
6249
|
-
return createHash2("sha256").update(`${input.sha256}|${input.module}|${input.baseUrl}|${input.userId}`).digest("hex");
|
|
6254
|
+
return createHash2("sha256").update(`${input.sha256}|${input.module}|${input.baseUrl}|${input.userId}|${input.name ?? ""}`).digest("hex");
|
|
6250
6255
|
}
|
|
6251
6256
|
function sha256Of(buffer) {
|
|
6252
6257
|
return createHash2("sha256").update(buffer).digest("hex");
|
|
@@ -6474,6 +6479,16 @@ async function ensurePrewarmed(host, fileIds, options = {}) {
|
|
|
6474
6479
|
var MAX_FILE_BYTES = 200 * 1024 * 1024;
|
|
6475
6480
|
var DEFAULT_UPLOAD_TIMEOUT_MS = 12e4;
|
|
6476
6481
|
var DOC_EXTENSIONS = /* @__PURE__ */ new Set([".doc", ".docx"]);
|
|
6482
|
+
var MAX_UPLOAD_NAME_CHARS = 200;
|
|
6483
|
+
function resolveUploadName(absolutePath, override) {
|
|
6484
|
+
const local = basename2(absolutePath);
|
|
6485
|
+
const raw = typeof override === "string" ? override.trim() : "";
|
|
6486
|
+
if (!raw) return local;
|
|
6487
|
+
const tail = basename2(raw.replace(/\\/gu, "/"));
|
|
6488
|
+
const cleaned = tail.replace(/[\\/:*?"<>|\r\n\t]/gu, "").trim();
|
|
6489
|
+
if (!cleaned) return local;
|
|
6490
|
+
return cleaned.length > MAX_UPLOAD_NAME_CHARS ? cleaned.slice(0, MAX_UPLOAD_NAME_CHARS) : cleaned;
|
|
6491
|
+
}
|
|
6477
6492
|
function text(value) {
|
|
6478
6493
|
if (typeof value === "string" && value.trim()) return value;
|
|
6479
6494
|
if (typeof value === "number" && Number.isFinite(value)) return String(value);
|
|
@@ -6494,7 +6509,7 @@ async function uploadFile(host, options) {
|
|
|
6494
6509
|
if (info.size > MAX_FILE_BYTES) {
|
|
6495
6510
|
throw contractValidationError("file_too_large", `\u6587\u4EF6\u8D85\u8FC7 ${MAX_FILE_BYTES / 1024 / 1024}MB \u4E0A\u9650\uFF1A${options.path}`);
|
|
6496
6511
|
}
|
|
6497
|
-
const name =
|
|
6512
|
+
const name = resolveUploadName(absolutePath, options.fileName);
|
|
6498
6513
|
const buffer = await readFile5(absolutePath);
|
|
6499
6514
|
const md5 = createHash3("md5").update(buffer).digest("hex");
|
|
6500
6515
|
const modified = String(Math.trunc(info.mtimeMs));
|
|
@@ -6507,7 +6522,9 @@ async function uploadFile(host, options) {
|
|
|
6507
6522
|
sha256,
|
|
6508
6523
|
module: options.module,
|
|
6509
6524
|
baseUrl: session.baseUrl,
|
|
6510
|
-
userId: session.userId ?? ""
|
|
6525
|
+
userId: session.userId ?? "",
|
|
6526
|
+
// 文件名进指纹:同一份内容以不同名字上传不能复用(附件名在上传那一刻就固定了)
|
|
6527
|
+
name
|
|
6511
6528
|
});
|
|
6512
6529
|
const hit = await lookupUpload(reuseKey);
|
|
6513
6530
|
if (hit) {
|
|
@@ -10365,6 +10382,24 @@ function pyTruthy2(value) {
|
|
|
10365
10382
|
function truthyText3(value) {
|
|
10366
10383
|
return pyTruthy2(value) ? String(value) : "";
|
|
10367
10384
|
}
|
|
10385
|
+
function finalizeRecognizePayload(payload, ids, artifactPath = null) {
|
|
10386
|
+
const primary = truthyText3(ids.workflowFileId);
|
|
10387
|
+
if (primary) {
|
|
10388
|
+
const all = Array.isArray(ids.workflowFileIds) ? ids.workflowFileIds.map((item) => truthyText3(item)).filter((item) => item) : [];
|
|
10389
|
+
payload.attachmentIds = (all.length ? all : [primary]).join(",");
|
|
10390
|
+
payload.attachmentFileId = primary;
|
|
10391
|
+
}
|
|
10392
|
+
try {
|
|
10393
|
+
const rows = payload.recognizeResult?.mainTable?.rows ?? [];
|
|
10394
|
+
for (const row of rows) {
|
|
10395
|
+
const list = Array.isArray(row.fieldResults) ? row.fieldResults : [];
|
|
10396
|
+
row.fieldResults = list.filter((item) => !String(item?.fieldInfo ?? "").endsWith(ATTACHMENT_FIELD_SUFFIX));
|
|
10397
|
+
}
|
|
10398
|
+
} catch {
|
|
10399
|
+
}
|
|
10400
|
+
if (artifactPath) writeFileSync8(artifactPath, JSON.stringify(payload), "utf8");
|
|
10401
|
+
return payload;
|
|
10402
|
+
}
|
|
10368
10403
|
function isFile3(path) {
|
|
10369
10404
|
try {
|
|
10370
10405
|
return existsSync7(path) && statSync3(path).isFile();
|
|
@@ -10629,19 +10664,12 @@ var contractFirstScreenOperation = {
|
|
|
10629
10664
|
out.warn.push(`recognizeResult \u6587\u4EF6\u65E0\u6CD5\u89E3\u6790\uFF1A${error instanceof Error ? error.message : String(error)}`);
|
|
10630
10665
|
return out;
|
|
10631
10666
|
}
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
payload
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
const rows2 = payload.recognizeResult?.mainTable?.rows ?? [];
|
|
10639
|
-
for (const row of rows2) {
|
|
10640
|
-
const list = Array.isArray(row.fieldResults) ? row.fieldResults : [];
|
|
10641
|
-
row.fieldResults = list.filter((item) => !String(item?.fieldInfo ?? "").endsWith(ATTACHMENT_FIELD_SUFFIX));
|
|
10642
|
-
}
|
|
10643
|
-
} catch {
|
|
10644
|
-
}
|
|
10667
|
+
const autoArtifact = join2(outDir, "recognize_auto.json");
|
|
10668
|
+
payload = finalizeRecognizePayload(
|
|
10669
|
+
payload,
|
|
10670
|
+
{ workflowFileId: result.workflowFileId, workflowFileIds: result.workflowFileIds },
|
|
10671
|
+
recPath === autoArtifact ? recPath : null
|
|
10672
|
+
);
|
|
10645
10673
|
const rows = payload.recognizeResult?.mainTable?.rows ?? [];
|
|
10646
10674
|
const hasFields = rows.length > 0 && Array.isArray(rows[0].fieldResults) && rows[0].fieldResults.length > 0;
|
|
10647
10675
|
if (!hasFields) {
|
|
@@ -10875,6 +10903,8 @@ var contractFlowOperations = [
|
|
|
10875
10903
|
uploaded = await uploadFile(host, {
|
|
10876
10904
|
path: rawPath,
|
|
10877
10905
|
module: "workflow",
|
|
10906
|
+
// 规范文件名(可选):报价单转合同链路由代码算好并透传,避免附件名等于本地临时名(如「合同.docx」)
|
|
10907
|
+
fileName: optionalText(input.fileName),
|
|
10878
10908
|
// 预热的 flowId = 本轮流程 workflowId(助手 URL 上的同一个值)
|
|
10879
10909
|
prewarmFlowId: flow.workflowId,
|
|
10880
10910
|
extraFields: {
|
|
@@ -11365,6 +11395,26 @@ function normalizeRoutePerson(raw) {
|
|
|
11365
11395
|
}
|
|
11366
11396
|
return out.length ? out : null;
|
|
11367
11397
|
}
|
|
11398
|
+
function buildPersonLookup(conditions, unsupported) {
|
|
11399
|
+
const field = ["person", "team"].find((name) => unsupported.includes(name));
|
|
11400
|
+
if (!field) return null;
|
|
11401
|
+
const raw = conditions[field];
|
|
11402
|
+
const keyword = isRecord2(raw) ? String(raw.name ?? "").trim() : String(raw ?? "").trim();
|
|
11403
|
+
return {
|
|
11404
|
+
field,
|
|
11405
|
+
keyword,
|
|
11406
|
+
reason: '\u53F0\u8D26\u4EBA\u5458\u5B57\u6BB5\u4E0E\u5361\u7247\u4EBA\u5458\u7B5B\u9009\u952E**\u90FD\u8981\u6C42\u4EBA\u5458 ID**\uFF1A\u4F20\u59D3\u540D\u4E0D\u4F1A\u62A5\u9519\uFF0C\u4F46\u4F1A\u88AB\u9759\u9ED8\u5FFD\u7565\u3001\u8FD4\u56DE\u5168\u91CF\uFF08\u5B9E\u6D4B \u76F4\u9500\u4E1A\u7EE9 like \u59D3\u540D \u2192 451,275 \u6761 = \u5168\u91CF\uFF09\uFF0C\u7528\u6237\u4F1A\u8BEF\u4EE5\u4E3A\u770B\u5230\u7684\u5C31\u662F\u8FD9\u4E2A\u4EBA\u7684\u6570\u636E\uFF0C\u6BD4"\u67E5\u4E0D\u5230"\u66F4\u5371\u9669\u3002\u800C CLI **\u672C\u6765\u5C31\u80FD\u6309\u59D3\u540D\u89E3\u6790**\uFF0C\u4E0D\u5B58\u5728"\u6CA1\u6709 ID \u6765\u6E90"\u3002',
|
|
11407
|
+
requiredAction: `\u5148\u89E3\u6790\u300C${keyword}\u300D\u7684\u4EBA\u5458 ID\uFF0C\u518D\u7528 conditions.${field}={"id":"<uid>","name":"${keyword}"} \u91CD\u8DD1\u672C\u547D\u4EE4\uFF08\u62FF\u5230 ID \u540E\u672C\u547D\u4EE4\u4F1A\u76F4\u63A5\u628A\u5361\u7247\u4E00\u8D77\u8FD4\u56DE\uFF09\u3002`,
|
|
11408
|
+
command: `weaver-work-cli --json im run im.person.resolve --input <\u542B {"name":"${keyword}"} \u7684 json>`,
|
|
11409
|
+
altCommand: `weaver-work-cli --json hrm run hrm.employee.query --input <\u542B {"username":"${keyword}","full":true} \u7684 json>`,
|
|
11410
|
+
idSource: "\u4EBA\u5458 ID \u53D6 im.person.resolve \u7684 `uid`\uFF08= hrm.employee.query \u7684 `id`\uFF09\uFF1B**\u4E0D\u662F** `userid`\u3001\u4E5F**\u4E0D\u662F** `cid`\uFF08\u8FD9\u4E24\u4E2A\u662F\u522B\u7684\u503C\uFF0C\u586B\u9519\u7B49\u4E8E\u6CA1\u7B5B\u9009\uFF09\u3002",
|
|
11411
|
+
forbiddenClaims: [
|
|
11412
|
+
"\u4E0D\u8981\u8BF4\u300C\u6211\u8FD9\u8FB9\u6CA1\u6709\u53EF\u9760\u7684\u4EBA\u5458 ID \u6765\u6E90\u300D\u2014\u2014\u5148\u8DD1\u4E0A\u9762\u7684\u547D\u4EE4",
|
|
11413
|
+
"\u4E0D\u8981\u628A\u4EBA\u5458\u6761\u4EF6\u4E22\u7ED9\u9875\u9762\u7B5B\u9009\u540E\u76F4\u63A5\u5F00\u5361\u2014\u2014\u90A3\u4F1A\u51FA\u6765\u4E00\u5F20\u5168\u91CF\u6570\u636E\u7684\u5361",
|
|
11414
|
+
"\u4E0D\u8981\u51ED\u59D3\u540D\u731C\u4E00\u4E2A ID \u586B\u8FDB\u53BB"
|
|
11415
|
+
]
|
|
11416
|
+
};
|
|
11417
|
+
}
|
|
11368
11418
|
var contractLedgerRouteOperation = {
|
|
11369
11419
|
name: "contract.ledger.route",
|
|
11370
11420
|
risk: "read",
|
|
@@ -11506,12 +11556,16 @@ var contractLedgerRouteOperation = {
|
|
|
11506
11556
|
route = "card";
|
|
11507
11557
|
reasons.push("\u672A\u547D\u4E2D\u7EDF\u8BA1\u4FE1\u53F7\uFF0C\u6309\u770B\u53F0\u8D26\u5904\u7406\uFF1B\u843D\u4E0D\u4E86\u7684\u6761\u4EF6\u7559\u7ED9\u9875\u9762\u7B5B\u9009");
|
|
11508
11558
|
}
|
|
11559
|
+
const personLookup = buildPersonLookup(conditions, unsupported);
|
|
11560
|
+
if (personLookup) {
|
|
11561
|
+
reasons.push(`\u4EBA\u5458\u6761\u4EF6\u7F3A\u4EBA\u5458 ID\uFF08\u53EA\u62FF\u5230\u300C${personLookup.keyword}\u300D\uFF09\uFF1A\u5FC5\u987B\u5148\u7528 im.person.resolve \u89E3\u6790\uFF0C\u4E0D\u5F97\u5F00\u65E0\u7B5B\u9009\u7684\u5361`);
|
|
11562
|
+
}
|
|
11509
11563
|
const prefillKeys = Object.keys(prefill);
|
|
11510
11564
|
const prefillHint = prefillKeys.length ? `\uFF0CcomParamsJson=${JSON.stringify(JSON.stringify(prefill))}` : "";
|
|
11511
11565
|
let card = null;
|
|
11512
11566
|
let cardSelfCheck = null;
|
|
11513
11567
|
let cardError = null;
|
|
11514
|
-
if (route === "card") {
|
|
11568
|
+
if (route === "card" && !personLookup) {
|
|
11515
11569
|
try {
|
|
11516
11570
|
const built = await contractLedgerCardOperation.execute(
|
|
11517
11571
|
{ menu, comParamsJson: JSON.stringify(prefill) },
|
|
@@ -11523,7 +11577,7 @@ var contractLedgerRouteOperation = {
|
|
|
11523
11577
|
cardError = error instanceof Error ? error.message : String(error);
|
|
11524
11578
|
}
|
|
11525
11579
|
}
|
|
11526
|
-
const nextCommand = route === "card" ? card ? "\uFF08\u5361\u7247\u5DF2\u968F\u672C\u54CD\u5E94\u8FD4\u56DE\uFF1A\u9876\u5C42 data.card \u76F4\u63A5\u4F5C\u4E3A <browsertool> \u8F93\u51FA\uFF0C\u65E0\u9700\u518D\u8C03 contract.ledger.card\uFF09" : `weaver-work-cli --json contract run contract.ledger.card --input <args.json>\uFF08menu=${menu}${prefillHint}\uFF09` : "contract.ledger.metrics \u53D6\u53E3\u5F84 \u2192 contract.performance.list.query \u53D6\u6570 \u2192 contract.ledger.aggregate \u6C47\u603B";
|
|
11580
|
+
const nextCommand = personLookup ? `${personLookup.command}\uFF08\u62FF\u5230 uid \u540E\u91CD\u8DD1\u672C\u547D\u4EE4\uFF1Aconditions.${personLookup.field}={"id":"<uid>","name":"${personLookup.keyword}"}\uFF09` : route === "card" ? card ? "\uFF08\u5361\u7247\u5DF2\u968F\u672C\u54CD\u5E94\u8FD4\u56DE\uFF1A\u9876\u5C42 data.card \u76F4\u63A5\u4F5C\u4E3A <browsertool> \u8F93\u51FA\uFF0C\u65E0\u9700\u518D\u8C03 contract.ledger.card\uFF09" : `weaver-work-cli --json contract run contract.ledger.card --input <args.json>\uFF08menu=${menu}${prefillHint}\uFF09` : "contract.ledger.metrics \u53D6\u53E3\u5F84 \u2192 contract.performance.list.query \u53D6\u6570 \u2192 contract.ledger.aggregate \u6C47\u603B";
|
|
11527
11581
|
return {
|
|
11528
11582
|
status: "COMPLETE",
|
|
11529
11583
|
data: {
|
|
@@ -11541,8 +11595,9 @@ var contractLedgerRouteOperation = {
|
|
|
11541
11595
|
card,
|
|
11542
11596
|
cardSelfCheck,
|
|
11543
11597
|
...cardError ? { cardError } : {},
|
|
11598
|
+
...personLookup ? { personLookup } : {},
|
|
11544
11599
|
conditions,
|
|
11545
|
-
note: "route=card \u65F6\u7981\u6B62\u5148\u8FDB\u53D6\u6570\u94FE\u8DEF\uFF1B\u53EA\u6709\u7EDF\u8BA1\u4FE1\u53F7\u6216\u663E\u5F0F intent \u624D\u8D70 ledger-query\u3002\u300C\u4E1A\u7EE9\u300D\u4E8C\u5B57\u3001\u5E74\u6708\u3001\u300C\u67D0\u4E2A\u4EBA\u7684 / \u67D0\u4E2A\u56E2\u961F\u7684\u300D\u90FD\u4E0D\u662F\u7EDF\u8BA1\u4FE1\u53F7\u3002\u672C operation \u4E0D\u8BBF\u95EE\u4E1A\u52A1\u63A5\u53E3\u3002route=card \u65F6\u9876\u5C42\u5DF2\u5E26\u6784\u5EFA\u597D\u7684 data.card\uFF08\u672C\u5730\u96F6\u63A5\u53E3\uFF09\uFF0C\u76F4\u63A5\u7528\uFF1Bdata.card \u4E3A null \u65F6\u624D\u6309 nextCommand \u81EA\u5EFA\u3002"
|
|
11600
|
+
note: "route=card \u65F6\u7981\u6B62\u5148\u8FDB\u53D6\u6570\u94FE\u8DEF\uFF1B\u53EA\u6709\u7EDF\u8BA1\u4FE1\u53F7\u6216\u663E\u5F0F intent \u624D\u8D70 ledger-query\u3002\u300C\u4E1A\u7EE9\u300D\u4E8C\u5B57\u3001\u5E74\u6708\u3001\u300C\u67D0\u4E2A\u4EBA\u7684 / \u67D0\u4E2A\u56E2\u961F\u7684\u300D\u90FD\u4E0D\u662F\u7EDF\u8BA1\u4FE1\u53F7\u3002\u672C operation \u4E0D\u8BBF\u95EE\u4E1A\u52A1\u63A5\u53E3\u3002route=card \u65F6\u9876\u5C42\u5DF2\u5E26\u6784\u5EFA\u597D\u7684 data.card\uFF08\u672C\u5730\u96F6\u63A5\u53E3\uFF09\uFF0C\u76F4\u63A5\u7528\uFF1Bdata.card \u4E3A null \u65F6\u624D\u6309 nextCommand \u81EA\u5EFA\u3002\u26A0\uFE0F \u51FA\u73B0 personLookup \u65F6\uFF1A**\u5148\u6309\u5B83\u7684 command \u89E3\u6790\u4EBA\u5458 ID \u518D\u91CD\u8DD1\u672C\u547D\u4EE4**\uFF0C\u6B64\u65F6 card \u6545\u610F\u4E3A null\u2014\u2014\u4E0D\u8981\u7ED5\u5F00\u5B83\u53BB\u81EA\u5EFA\u4E00\u5F20\u6CA1\u6709\u4EBA\u5458\u7B5B\u9009\u7684\u5361\u3002"
|
|
11546
11601
|
}
|
|
11547
11602
|
};
|
|
11548
11603
|
}
|
|
@@ -14696,10 +14751,13 @@ function normalizeSections(input) {
|
|
|
14696
14751
|
}
|
|
14697
14752
|
return out;
|
|
14698
14753
|
}
|
|
14699
|
-
function buildBackground(customer, sections, totalAmount) {
|
|
14754
|
+
function buildBackground(customer, sections, totalAmount, contractTitle = "") {
|
|
14700
14755
|
const parts = sections.slice(0, 8).map((section) => `${section.name} ${moneyText2(section.amount)} \u5143`);
|
|
14701
14756
|
const detail = parts.length ? `\u8D39\u7528\u6784\u6210\uFF1A${parts.join("\u3001")}\u3002` : "";
|
|
14702
|
-
|
|
14757
|
+
const raw = contractTitle.replace(/\.docx$/iu, "").trim();
|
|
14758
|
+
const withoutCustomer = raw.includes(customer) ? raw.split(customer).join("").trim() : raw;
|
|
14759
|
+
const subject = withoutCustomer.replace(/(?:购买)?合同$/u, "").trim() || "\u8F6F\u4EF6\u4EA7\u54C1\u53CA\u5B9E\u65BD\u670D\u52A1";
|
|
14760
|
+
return `${customer}\u91C7\u8D2D${subject}\uFF0C${detail}\u5408\u540C\u603B\u91D1\u989D ${moneyText2(totalAmount)} \u5143\u3002`;
|
|
14703
14761
|
}
|
|
14704
14762
|
function buildQuoteFieldResults(args) {
|
|
14705
14763
|
const spec = BUILTIN[args.flow];
|
|
@@ -14770,11 +14828,14 @@ function buildQuoteFieldResults(args) {
|
|
|
14770
14828
|
return results;
|
|
14771
14829
|
}
|
|
14772
14830
|
var GENERIC_FILE_STEMS = /* @__PURE__ */ new Set(["\u5408\u540C", "\u5408\u540C\u6587\u4EF6", "\u672A\u547D\u540D", "document", "new", "\u6A21\u677F", "temp", "output"]);
|
|
14831
|
+
function defaultContractTitle(customer) {
|
|
14832
|
+
return `${customer || "\u5BA2\u6237"}\u534F\u540C\u529E\u516C\u7CFB\u7EDF(e-cology)\u8F6F\u4EF6\u4EA7\u54C1\u53CA\u5B9E\u65BD\u670D\u52A1\u8D2D\u4E70\u5408\u540C`;
|
|
14833
|
+
}
|
|
14773
14834
|
function normalizeContractFileName(contractTitle, fallbackCustomer = "") {
|
|
14774
14835
|
const raw = String(contractTitle ?? "").replace(/\.docx$/iu, "");
|
|
14775
14836
|
const cleaned = raw.replace(/[\\/:*?"<>|\r\n\t]/gu, "").replace(/\s+/gu, " ").trim();
|
|
14776
14837
|
const isGeneric = !cleaned || GENERIC_FILE_STEMS.has(cleaned.toLowerCase());
|
|
14777
|
-
const stem = isGeneric ?
|
|
14838
|
+
const stem = isGeneric ? defaultContractTitle(fallbackCustomer) : cleaned;
|
|
14778
14839
|
return `${stem}.docx`;
|
|
14779
14840
|
}
|
|
14780
14841
|
var contractQuoteRecognizeOperations = [
|
|
@@ -14859,10 +14920,10 @@ var contractQuoteRecognizeOperations = [
|
|
|
14859
14920
|
{ raw: amountCheck.raw }
|
|
14860
14921
|
);
|
|
14861
14922
|
}
|
|
14862
|
-
const contractTitle = str2(input.contractTitle) ||
|
|
14923
|
+
const contractTitle = str2(input.contractTitle) || defaultContractTitle(customer);
|
|
14863
14924
|
const fileName = normalizeContractFileName(str2(input.contractFileName) || contractTitle, customer);
|
|
14864
14925
|
const sections = normalizeSections(input.sections);
|
|
14865
|
-
const background = str2(input.background) || buildBackground(customer, sections, totalAmount);
|
|
14926
|
+
const background = str2(input.background) || buildBackground(customer, sections, totalAmount, contractTitle);
|
|
14866
14927
|
const ourCompanyName = str2(input.ourCompany) || DEFAULT_OUR_COMPANY;
|
|
14867
14928
|
const verified = input.verified === void 0 ? true : input.verified === true;
|
|
14868
14929
|
const results = buildQuoteFieldResults({
|
|
@@ -15056,7 +15117,10 @@ var contractQuoteSubmitOperations = [
|
|
|
15056
15117
|
verified: input.verified === void 0 ? true : input.verified === true
|
|
15057
15118
|
};
|
|
15058
15119
|
const [launched, assembled] = await Promise.all([
|
|
15059
|
-
|
|
15120
|
+
// ⛔ 必须把规范文件名一起传下去(2026-11-23 修复):E10 附件名恒等于上传时的 multipart 文件名,
|
|
15121
|
+
// 而它原先取自本地 basename——模型把产物写成 `合同.docx`,系统附件列表里就是「合同.docx」,
|
|
15122
|
+
// 与表单里的合同名称字段、以及返回的 expectedFileName 都对不上。
|
|
15123
|
+
callOperation3("contract.flow.launch", { flow, path: contractPath, fileName }, context),
|
|
15060
15124
|
callOperation3("contract.quotescreen.recognize", recognizeInput, context)
|
|
15061
15125
|
]);
|
|
15062
15126
|
steps.push("flow.launch+quotescreen.recognize(parallel)");
|
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
resolveWorkflowId,
|
|
29
29
|
shapeBrowserValues,
|
|
30
30
|
shouldAutoPickFlow
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-SAADVUK6.js";
|
|
32
|
+
import "./chunk-NNXZMBIB.js";
|
|
33
|
+
import "./chunk-EYEJW5SG.js";
|
|
34
|
+
import "./chunk-YT73QQMS.js";
|
|
35
|
+
import "./chunk-AAOYOPHW.js";
|
|
36
|
+
import "./chunk-M7IEDTRI.js";
|
|
37
37
|
import "./chunk-7BDPM5ST.js";
|
|
38
38
|
import "./chunk-UG5G54VL.js";
|
|
39
39
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
meetingEntryOperations,
|
|
6
6
|
readEntryChoice,
|
|
7
7
|
verifyEntryToken
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-YFX5JKOY.js";
|
|
9
|
+
import "./chunk-AAOYOPHW.js";
|
|
10
|
+
import "./chunk-M7IEDTRI.js";
|
|
11
11
|
import "./chunk-7BDPM5ST.js";
|
|
12
12
|
import "./chunk-UG5G54VL.js";
|
|
13
13
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
meetingStateDir,
|
|
7
7
|
readCache,
|
|
8
8
|
resolveMeetingEnvMode
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-AAOYOPHW.js";
|
|
10
|
+
import "./chunk-M7IEDTRI.js";
|
|
11
11
|
import "./chunk-7BDPM5ST.js";
|
|
12
12
|
import "./chunk-UG5G54VL.js";
|
|
13
13
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
ensureMeetingGroupChat,
|
|
7
7
|
meetingEbGroupChatOperations,
|
|
8
8
|
savePendingForm
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-BZ6HAY2U.js";
|
|
10
|
+
import "./chunk-AAOYOPHW.js";
|
|
11
|
+
import "./chunk-M7IEDTRI.js";
|
|
12
12
|
import "./chunk-7BDPM5ST.js";
|
|
13
13
|
import "./chunk-UG5G54VL.js";
|
|
14
14
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
createProgram,
|
|
6
6
|
registerCommands,
|
|
7
7
|
toCommandMetadata
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-NP3ZZFGI.js";
|
|
9
|
+
import "./chunk-4WCVRDC5.js";
|
|
10
10
|
import "./chunk-AJ62BGAW.js";
|
|
11
11
|
import "./chunk-WSHIOSGM.js";
|
|
12
12
|
import "./chunk-6N4JPNFL.js";
|
|
@@ -3,21 +3,21 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
meetingOperationDefinitions
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GOZ75GHU.js";
|
|
7
|
+
import "./chunk-SAADVUK6.js";
|
|
8
|
+
import "./chunk-NNXZMBIB.js";
|
|
9
|
+
import "./chunk-2BAZJCG7.js";
|
|
10
10
|
import "./chunk-WMRNO6IU.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-BZ6HAY2U.js";
|
|
12
|
+
import "./chunk-YFX5JKOY.js";
|
|
13
|
+
import "./chunk-5FQT7GSN.js";
|
|
14
|
+
import "./chunk-EYEJW5SG.js";
|
|
15
|
+
import "./chunk-YT73QQMS.js";
|
|
16
16
|
import {
|
|
17
17
|
degradeMeetingEnvToStandard,
|
|
18
18
|
meetingStateDir,
|
|
19
19
|
readCache
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AAOYOPHW.js";
|
|
21
21
|
import {
|
|
22
22
|
MeetingCliError,
|
|
23
23
|
asObject,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
meetingAuthError,
|
|
26
26
|
meetingNetworkError,
|
|
27
27
|
meetingValidationError
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-M7IEDTRI.js";
|
|
29
29
|
import {
|
|
30
30
|
reportPlatformError
|
|
31
31
|
} from "./chunk-6N4JPNFL.js";
|
|
@@ -65,8 +65,8 @@ async function ensureMinuteDoc(env, input) {
|
|
|
65
65
|
const id = String(input.id ?? "").trim();
|
|
66
66
|
const mtId = String(input.mtId ?? "").trim();
|
|
67
67
|
if (!id || !mtId) return null;
|
|
68
|
-
const { getMeetingOperation } = await import("./registry-
|
|
69
|
-
const { meetingStateDir } = await import("./env-
|
|
68
|
+
const { getMeetingOperation } = await import("./registry-QV6IPRVM.js");
|
|
69
|
+
const { meetingStateDir } = await import("./env-FI62FOKK.js");
|
|
70
70
|
const { mkdir, writeFile } = await import("node:fs/promises");
|
|
71
71
|
const { join } = await import("node:path");
|
|
72
72
|
const subject = String(input.subject ?? "").trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
getWorkflowOperation,
|
|
5
5
|
hasWorkflowOperation,
|
|
6
6
|
workflowOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VWQGF3KW.js";
|
|
8
8
|
import "./chunk-HP7JIYMT.js";
|
|
9
9
|
import "./chunk-WRXSAVKO.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-4WCVRDC5.js";
|
|
11
11
|
import "./chunk-AJ62BGAW.js";
|
|
12
12
|
import "./chunk-7BDPM5ST.js";
|
|
13
13
|
import "./chunk-TJN4PIYO.js";
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-GOZ75GHU.js";
|
|
8
|
+
import "./chunk-SAADVUK6.js";
|
|
9
|
+
import "./chunk-NNXZMBIB.js";
|
|
10
|
+
import "./chunk-2BAZJCG7.js";
|
|
11
11
|
import "./chunk-WMRNO6IU.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-BZ6HAY2U.js";
|
|
13
|
+
import "./chunk-YFX5JKOY.js";
|
|
14
|
+
import "./chunk-5FQT7GSN.js";
|
|
15
|
+
import "./chunk-EYEJW5SG.js";
|
|
16
|
+
import "./chunk-YT73QQMS.js";
|
|
17
|
+
import "./chunk-AAOYOPHW.js";
|
|
18
|
+
import "./chunk-M7IEDTRI.js";
|
|
19
19
|
import "./chunk-7BDPM5ST.js";
|
|
20
20
|
import "./chunk-FDBAFANU.js";
|
|
21
21
|
import "./chunk-UG5G54VL.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
loadRooms,
|
|
8
8
|
recommendRooms,
|
|
9
9
|
rememberFrequentRoom
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-EYEJW5SG.js";
|
|
11
|
+
import "./chunk-YT73QQMS.js";
|
|
12
|
+
import "./chunk-AAOYOPHW.js";
|
|
13
|
+
import "./chunk-M7IEDTRI.js";
|
|
14
14
|
import "./chunk-7BDPM5ST.js";
|
|
15
15
|
import "./chunk-UG5G54VL.js";
|
|
16
16
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resolveMeetingScheduleTypeIds,
|
|
9
9
|
resolveMemberIdsByName,
|
|
10
10
|
runScheduleConflictFlow
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-5FQT7GSN.js";
|
|
12
|
+
import "./chunk-YT73QQMS.js";
|
|
13
|
+
import "./chunk-AAOYOPHW.js";
|
|
14
|
+
import "./chunk-M7IEDTRI.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
defaultResultThresholdChars
|
|
5
|
+
} from "./chunk-4WCVRDC5.js";
|
|
6
6
|
import {
|
|
7
7
|
stateRoot
|
|
8
8
|
} from "./chunk-AJ62BGAW.js";
|
|
@@ -2034,8 +2034,8 @@ function shortId(prefix) {
|
|
|
2034
2034
|
return `${prefix}${randomBytes3(12).toString("hex")}`;
|
|
2035
2035
|
}
|
|
2036
2036
|
var INLINE_BUDGET_RATIO = 0.95;
|
|
2037
|
-
var
|
|
2038
|
-
var
|
|
2037
|
+
var ENVELOPE_RESERVE_CHARS = 400;
|
|
2038
|
+
var MIN_INLINE_CHARS_PER_ATTACHMENT = 800;
|
|
2039
2039
|
function fillNextHint(sessionFile) {
|
|
2040
2040
|
return `\u6309 fields \u62BD\u53D6\uFF0Corigin \u7528\u300C\u9644\u4EF6ID#\u539F\u6587\u7247\u6BB5\u300D\uFF0C\u53EA\u586B\u6709\u503C\u7684\u5B57\u6BB5\u3002\u6B63\u6587\uFF1A\u6709 text \u7684\u76F4\u63A5\u7528\uFF1B\u53EA\u6709 textFile \u7684\u7528 read_file \u8BFB\u4E00\u6B21\uFF08\u5168\u6587\u5728\u91CC\u9762\uFF09\uFF1BPDF/\u56FE\u7247/Excel \u8BFB path\u3002\u4E0D\u8981\u7528 --input-ref / --pick-as\uFF0C\u4E0D\u8981\u91CD\u65B0\u4E0B\u8F7D\u9644\u4EF6\uFF0C\u4E0D\u8981\u81EA\u5DF1\u89E3\u6790 docx\u3002\u62BD\u5B8C\u8C03 smart-extract.fill.save --input-json '{"sessionFile":"${sessionFile}","result":{...}}'\uFF0C\u62FF\u5230 aiExtraId \u5373\u7ED3\u675F\u3002`;
|
|
2041
2041
|
}
|
|
@@ -2233,21 +2233,21 @@ var fill = {
|
|
|
2233
2233
|
resultContract: RESULT_CONTRACT,
|
|
2234
2234
|
next: fillNextHint(sessionFile)
|
|
2235
2235
|
};
|
|
2236
|
-
const
|
|
2237
|
-
const
|
|
2238
|
-
const inlineAllowed =
|
|
2236
|
+
const inlineBudgetChars = Math.floor(defaultResultThresholdChars() * INLINE_BUDGET_RATIO) - JSON.stringify({ ...basePayload, attachments: [] }).length - ENVELOPE_RESERVE_CHARS;
|
|
2237
|
+
const perAttachmentChars = Math.floor(inlineBudgetChars / Math.max(1, downloaded.items.length));
|
|
2238
|
+
const inlineAllowed = perAttachmentChars > MIN_INLINE_CHARS_PER_ATTACHMENT;
|
|
2239
2239
|
const extractedItems = await Promise.all(downloaded.items.map(async (item) => ({
|
|
2240
2240
|
item,
|
|
2241
2241
|
...await extractText(item)
|
|
2242
2242
|
})));
|
|
2243
|
-
const
|
|
2244
|
-
(sum, entry) => sum +
|
|
2243
|
+
const totalTextChars = extractedItems.reduce(
|
|
2244
|
+
(sum, entry) => sum + (entry.text ?? "").length,
|
|
2245
2245
|
0
|
|
2246
2246
|
);
|
|
2247
|
-
const allInline =
|
|
2247
|
+
const allInline = totalTextChars <= inlineBudgetChars;
|
|
2248
2248
|
const attachments = await Promise.all(extractedItems.map(async ({ item, text: extractedText, chars }) => {
|
|
2249
2249
|
const text = extractedText ?? "";
|
|
2250
|
-
const oversized = allInline ? false : !inlineAllowed ||
|
|
2250
|
+
const oversized = allInline ? false : !inlineAllowed || text.length > perAttachmentChars;
|
|
2251
2251
|
let textFile;
|
|
2252
2252
|
if (oversized && item.path) {
|
|
2253
2253
|
textFile = `${item.path}.txt`;
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
validateRuleFile,
|
|
18
18
|
workflowOperationDefinitions,
|
|
19
19
|
workflowSuccess
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VWQGF3KW.js";
|
|
21
21
|
import {
|
|
22
22
|
createWorkflowContinuationSigner
|
|
23
23
|
} from "./chunk-HP7JIYMT.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
WorkflowCliError,
|
|
27
27
|
workflowValidationError
|
|
28
28
|
} from "./chunk-WRXSAVKO.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-4WCVRDC5.js";
|
|
30
30
|
import "./chunk-AJ62BGAW.js";
|
|
31
31
|
import {
|
|
32
32
|
reportPlatformError
|