weaver-work-cli 0.1.49 → 0.1.50
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-MU2LPI5P.js → attachment-content-EJYIOJPH.js} +3 -3
- package/dist/chunks/{chunk-6GWU63YF.js → chunk-3NCFFHB2.js} +1 -1
- package/dist/chunks/{chunk-NBEWUR7L.js → chunk-6T53BSWZ.js} +158 -44
- package/dist/chunks/{chunk-EJVA5ZVB.js → chunk-7AYQJSFY.js} +2 -2
- package/dist/chunks/{chunk-D2QRZUW4.js → chunk-7ECB22G3.js} +35 -28
- package/dist/chunks/{chunk-72MI3MBX.js → chunk-ATEXBEPD.js} +55 -15
- package/dist/chunks/{chunk-3NV2ETZR.js → chunk-BFKLQLBK.js} +8 -8
- package/dist/chunks/{chunk-BRRW7CWA.js → chunk-HARQF5IP.js} +26 -26
- package/dist/chunks/{chunk-K3BT54CU.js → chunk-K67FODVC.js} +1 -1
- package/dist/chunks/{chunk-YLCYX7LE.js → chunk-KMRT7NAT.js} +18 -5
- package/dist/chunks/{chunk-GEOMANP7.js → chunk-MCZG6HPM.js} +2 -2
- package/dist/chunks/{chunk-ZKEUGS2U.js → chunk-RYFRGTUV.js} +4 -4
- package/dist/chunks/{chunk-3X7VOSBA.js → chunk-WNJUGI2F.js} +1 -1
- package/dist/chunks/{chunk-KV5SOWMS.js → chunk-YB3AJYPY.js} +4 -4
- package/dist/chunks/{conflict-6347A7YK.js → conflict-C4UDHCWV.js} +2 -2
- package/dist/chunks/{contract-N6P2HIIE.js → contract-VUC6JOPG.js} +464 -9
- package/dist/chunks/{create-flow-7WG7LVX5.js → create-flow-6OG2LYBD.js} +6 -6
- package/dist/chunks/{env-LHRKSLG6.js → env-WP57TF2S.js} +2 -2
- package/dist/chunks/{factory-2H7Z4RWJ.js → factory-VUXI7N5C.js} +1 -1
- package/dist/chunks/{fna-ZVB2IILI.js → fna-ECOYBQYL.js} +328 -5
- package/dist/chunks/{group-chat-EW6PNDDT.js → group-chat-UQRGXILK.js} +3 -3
- package/dist/chunks/{im-3RCNL5GT.js → im-TN2JYVGJ.js} +2 -2
- package/dist/chunks/{invoice-FXWH5GPO.js → invoice-E7GOITEU.js} +1 -1
- package/dist/chunks/{meeting-N2FQBHXI.js → meeting-4BBLVAWM.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/{registry-CKUVBS53.js → registry-5CRCN2TV.js} +10 -10
- package/dist/chunks/{registry-BUTEDK3C.js → registry-E5RQJVWN.js} +2 -2
- package/dist/chunks/{registry-7VZ6YJUF.js → registry-V4CHRQDI.js} +1 -1
- package/dist/chunks/{room-recommend-MBCYENQ2.js → room-recommend-AYR3UG7R.js} +4 -4
- package/dist/chunks/{schedule-5IFMCXME.js → schedule-JZEFIXUS.js} +4 -4
- package/dist/chunks/{workflow-2TRU2ZSP.js → workflow-3ZAF2J5E.js} +1 -1
- package/dist/index.js +7 -7
- package/dist/shortcuts/contract/host.js +11 -0
- package/dist/shortcuts/contract/index.js +13 -0
- package/dist/shortcuts/contract/manifest.js +53 -0
- package/dist/shortcuts/contract/operations/performance.js +58 -7
- package/dist/shortcuts/contract/operations/quote.js +283 -1
- package/dist/shortcuts/contract/operations/registry.js +2 -0
- package/dist/shortcuts/contract/operations/save-recognize.js +151 -0
- 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/invoice/manifest.js +1 -1
- 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/workflow/operations/read.js +58 -14
- 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 +1 -1
- package/docs/fna.md +11 -4
- package/package.json +1 -1
- package/skill-template/business-info.json +6 -1
- package/skill-template/domains/qiyecheng.md +4 -2
- package/skills/weaver-e10-jinchengda/SKILL.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +1 -1
- 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 +219 -0
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +50 -30
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +24 -15
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +96 -2
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +43 -0
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +997 -0
- package/skills/weaver-e10-jinchengda/scripts/render_ebdf_list_card.py +265 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +83 -0
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +118 -0
- package/skills/weaver-e10-qiyecheng/SKILL.md +21 -7
- package/skills/weaver-e10-qiyecheng/references/ai-check-audit.md +104 -0
- package/skills/weaver-e10-qiyecheng/references/catalog.md +17 -3
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +136 -30
- 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 +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +3 -3
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +6 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +3 -3
- 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/tools/todo-summary.cjs +162 -10
- package/skills/weaver-e10-yepiaotong/SKILL.md +10 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +19 -32
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +6 -45
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +5 -5
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +4 -37
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +4 -4
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +22 -35
- 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
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
looksLikeFileId,
|
|
9
9
|
meetingAttachmentContentOperations,
|
|
10
10
|
parseFileIdList
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-7AYQJSFY.js";
|
|
12
|
+
import "./chunk-3NCFFHB2.js";
|
|
13
|
+
import "./chunk-K67FODVC.js";
|
|
14
14
|
import "./chunk-7BDPM5ST.js";
|
|
15
15
|
import "./chunk-UG5G54VL.js";
|
|
16
16
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -946,6 +946,23 @@ async function resolveTerm(env, systemKey, rawValue, label) {
|
|
|
946
946
|
clarificationCandidates(selected, 10)
|
|
947
947
|
);
|
|
948
948
|
}
|
|
949
|
+
async function resolveTermForNotin(env, systemKey, rawValue, label) {
|
|
950
|
+
const text = asString(rawValue);
|
|
951
|
+
if (!text) return [];
|
|
952
|
+
const parsed = parseNameWithId(text);
|
|
953
|
+
if (parsed.id) return [{ id: parsed.id, name: parsed.name || text }];
|
|
954
|
+
const candidates = await resolveNameCandidates(env, SYSTEM_FIELDS[systemKey], text);
|
|
955
|
+
if (!candidates.length) return [];
|
|
956
|
+
const exact = candidates.filter((item) => item.name.trim().toLowerCase() === text.trim().toLowerCase());
|
|
957
|
+
if (exact.length >= 1) return exact;
|
|
958
|
+
if (candidates.length === 1) return candidates;
|
|
959
|
+
throw workflowClarificationError(
|
|
960
|
+
SYSTEM_CLARIFICATION_TYPES[systemKey],
|
|
961
|
+
text,
|
|
962
|
+
`${label}\u300C${text}\u300D\u5339\u914D\u5230 ${candidates.length} \u4E2A\u5019\u9009\u9879\u4E14\u65E0\u5168\u540D\u7CBE\u786E\u5339\u914D\uFF0C\u6392\u9664\u8303\u56F4\u4E0D\u660E\u786E\uFF0C\u8BF7\u786E\u8BA4\u8981\u6392\u9664\u7684\u5177\u4F53${label}\u3002`,
|
|
963
|
+
clarificationCandidates(candidates, 10)
|
|
964
|
+
);
|
|
965
|
+
}
|
|
949
966
|
async function fetchRequestLevels(env) {
|
|
950
967
|
const response = await env.host.workflowRequest({
|
|
951
968
|
method: "GET",
|
|
@@ -1430,19 +1447,24 @@ async function buildSearchQuery(env, args, mode) {
|
|
|
1430
1447
|
if (workflowType) formDatas.workflowtype = [{ browserDatas: [{ id: workflowType.id, name: workflowType.name }] }];
|
|
1431
1448
|
const workflows = asStringArray(args.workflow, "workflow") ?? splitCsv(args.workflow).map((w) => [w]).flat();
|
|
1432
1449
|
const resolvedWorkflows = [];
|
|
1450
|
+
const workflowTerm = asString(args.workflowTerm) === "notin" ? "notin" : "in";
|
|
1451
|
+
const notinMisses = [];
|
|
1433
1452
|
if (workflows && workflows.length) {
|
|
1434
1453
|
const seenWorkflowIds = /* @__PURE__ */ new Set();
|
|
1435
1454
|
for (const w of workflows) {
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
if (
|
|
1440
|
-
|
|
1455
|
+
const resolvedList = workflowTerm === "notin" ? await resolveTermForNotin(env, "workflowid", w, "\u5DE5\u4F5C\u6D41") : [await resolveTerm(env, "workflowid", w, "\u5DE5\u4F5C\u6D41")].filter(
|
|
1456
|
+
(resolved) => resolved !== null
|
|
1457
|
+
);
|
|
1458
|
+
if (workflowTerm === "notin" && resolvedList.length === 0) notinMisses.push(String(w));
|
|
1459
|
+
for (const resolved of resolvedList) {
|
|
1460
|
+
if (resolved.id && seenWorkflowIds.has(resolved.id)) continue;
|
|
1461
|
+
if (resolved.id) seenWorkflowIds.add(resolved.id);
|
|
1462
|
+
resolvedWorkflows.push(resolved);
|
|
1463
|
+
}
|
|
1441
1464
|
}
|
|
1442
1465
|
if (resolvedWorkflows.length) {
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
const firstWorkflowId = asString(resolvedWorkflows[0]?.id) ?? "";
|
|
1466
|
+
formDatas.workflowid = [{ term: workflowTerm, browserDatas: resolvedWorkflows }];
|
|
1467
|
+
const firstWorkflowId = workflowTerm === "in" ? asString(resolvedWorkflows[0]?.id) ?? "" : "";
|
|
1446
1468
|
if (firstWorkflowId) {
|
|
1447
1469
|
query.params = { ...query.params || {}, searchAdWorkflowid: firstWorkflowId };
|
|
1448
1470
|
}
|
|
@@ -1550,7 +1572,12 @@ async function buildSearchQuery(env, args, mode) {
|
|
|
1550
1572
|
}
|
|
1551
1573
|
if (items.length) query.sortParams = items;
|
|
1552
1574
|
}
|
|
1553
|
-
return {
|
|
1575
|
+
return {
|
|
1576
|
+
query,
|
|
1577
|
+
tabid,
|
|
1578
|
+
// 2026-11-11:notin(排除)语义下 0 命中被跳过的词要透出(不静默丢弃条件)。
|
|
1579
|
+
...notinMisses.length > 0 ? { warnings: notinMisses.map((word) => `\u6392\u9664\u5BF9\u8C61\u300C${word}\u300D\u672A\u5339\u914D\u5230\u4EFB\u4F55\u5DE5\u4F5C\u6D41\uFF0C\u8BE5\u6392\u9664\u6761\u4EF6\u672A\u751F\u6548`) } : {}
|
|
1580
|
+
};
|
|
1554
1581
|
}
|
|
1555
1582
|
function safeJsonArray(value) {
|
|
1556
1583
|
try {
|
|
@@ -10161,10 +10188,7 @@ var RESUME_INPUT_KEYS = [
|
|
|
10161
10188
|
"skillTiming",
|
|
10162
10189
|
"smartSmmaryTitle"
|
|
10163
10190
|
];
|
|
10164
|
-
var DEFAULT_FETCH_LIMIT = 200;
|
|
10165
|
-
var MAX_FETCH_LIMIT = 500;
|
|
10166
10191
|
var FETCH_PAGE_SIZE = 100;
|
|
10167
|
-
var MAX_FETCH_PAGES = 5;
|
|
10168
10192
|
var LIST_ENDPOINT_BY_CATEGORY = {
|
|
10169
10193
|
todo: WORKFLOW_ENDPOINTS.TODO_LIST,
|
|
10170
10194
|
done: WORKFLOW_ENDPOINTS.DONE_LIST,
|
|
@@ -10173,14 +10197,25 @@ var LIST_ENDPOINT_BY_CATEGORY = {
|
|
|
10173
10197
|
};
|
|
10174
10198
|
var DEFAULT_CATEGORY = "todo";
|
|
10175
10199
|
var DEFAULT_TABID2 = "0";
|
|
10200
|
+
var DEGRADE_TOTAL_THRESHOLD = 200;
|
|
10201
|
+
var DEGRADE_WINDOW_DAYS = [365, 180, 90, 30];
|
|
10202
|
+
var DEGRADE_WINDOW_LABELS = ["\u8FD1\u4E00\u5E74", "\u8FD16\u4E2A\u6708", "\u8FD13\u4E2A\u6708", "\u8FD11\u4E2A\u6708"];
|
|
10203
|
+
var DEGRADE_TABID = "7";
|
|
10204
|
+
var TIME_FILTER_KEYS = ["createTime", "operateTime", "receiveTime", "finishTime"];
|
|
10205
|
+
function totalEndpointFor(listPath) {
|
|
10206
|
+
const totalPath = listPath.replace("/data/", "/total/").replace(/Data$/u, "Total");
|
|
10207
|
+
if (totalPath === listPath) {
|
|
10208
|
+
throw workflowValidationError("total_endpoint_unknown", `\u65E0\u6CD5\u4ECE\u5217\u8868\u63A5\u53E3\u63A8\u5BFC\u603B\u6570\u63A5\u53E3\uFF1A${listPath}`);
|
|
10209
|
+
}
|
|
10210
|
+
return totalPath;
|
|
10211
|
+
}
|
|
10176
10212
|
var CATEGORY_VALUES = ["todo", "done", "mine", "all"];
|
|
10177
10213
|
function readFetchLimit(value) {
|
|
10178
|
-
if (value === void 0 || value === null || value === "") return { limit:
|
|
10214
|
+
if (value === void 0 || value === null || value === "") return { limit: null };
|
|
10179
10215
|
const parsed = Number(value);
|
|
10180
10216
|
if (!Number.isInteger(parsed) || parsed < 1) {
|
|
10181
10217
|
throw workflowValidationError("limit_invalid", `limit \u5FC5\u987B\u662F \u22651 \u7684\u6574\u6570\uFF0C\u6536\u5230 ${String(value)}`);
|
|
10182
10218
|
}
|
|
10183
|
-
if (parsed > MAX_FETCH_LIMIT) return { limit: MAX_FETCH_LIMIT, cappedFrom: parsed };
|
|
10184
10219
|
return { limit: parsed };
|
|
10185
10220
|
}
|
|
10186
10221
|
function readCategory(value) {
|
|
@@ -10196,6 +10231,7 @@ function readCategory(value) {
|
|
|
10196
10231
|
return text;
|
|
10197
10232
|
}
|
|
10198
10233
|
function readPageSize(limit) {
|
|
10234
|
+
if (limit === null) return FETCH_PAGE_SIZE;
|
|
10199
10235
|
return limit <= FETCH_PAGE_SIZE ? limit : FETCH_PAGE_SIZE;
|
|
10200
10236
|
}
|
|
10201
10237
|
function guardListOnlyHost(env) {
|
|
@@ -10205,7 +10241,7 @@ function guardListOnlyHost(env) {
|
|
|
10205
10241
|
if (prop === "workflowRequest") {
|
|
10206
10242
|
return async (request) => {
|
|
10207
10243
|
const path = String(request?.path ?? "");
|
|
10208
|
-
if (/getTodo(?!
|
|
10244
|
+
if (/getTodo(?!List(?:Data|Total))/u.test(path)) {
|
|
10209
10245
|
throw workflowValidationError(
|
|
10210
10246
|
"forbidden_endpoint",
|
|
10211
10247
|
`\u53D6\u6570\u9636\u6BB5\u53EA\u5141\u8BB8\u8C03\u7528 getTodoListData\uFF1B${path} \u5C5E\u4E8E getTodo* \u5206\u9875/\u7EDF\u8BA1\u8F85\u52A9\u63A5\u53E3\uFF0C\u5DF2\u7981\u6B62`,
|
|
@@ -10342,12 +10378,6 @@ function readItems(rawItems) {
|
|
|
10342
10378
|
if (rawItems.length === 0) {
|
|
10343
10379
|
throw workflowValidationError("items_empty", "items \u4E3A\u7A7A\u6570\u7EC4\uFF0C\u6CA1\u6709\u53EF\u6C47\u603B\u7684\u5F85\u529E");
|
|
10344
10380
|
}
|
|
10345
|
-
if (rawItems.length > 500) {
|
|
10346
|
-
throw workflowValidationError(
|
|
10347
|
-
"items_too_many",
|
|
10348
|
-
`\u5355\u6B21\u6700\u591A 500 \u6761\uFF0C\u6536\u5230 ${rawItems.length} \u6761\uFF1B\u8BF7\u5148\u5206\u9875\u7F29\u51CF\u8303\u56F4`
|
|
10349
|
-
);
|
|
10350
|
-
}
|
|
10351
10381
|
const seen = /* @__PURE__ */ new Set();
|
|
10352
10382
|
const rows = [];
|
|
10353
10383
|
let duplicateCount = 0;
|
|
@@ -12579,9 +12609,11 @@ var DEFAULT_REQUEST_SUMMARY_MAX = 50;
|
|
|
12579
12609
|
async function collectRawTodos(args, env) {
|
|
12580
12610
|
const category = readCategory(args.category);
|
|
12581
12611
|
const priorityFields = priorityRuleFields();
|
|
12582
|
-
const
|
|
12612
|
+
const readLimit = readFetchLimit(args.limit);
|
|
12613
|
+
const requestedLimit = readLimit.limit;
|
|
12614
|
+
const limit = readLimit.limit;
|
|
12583
12615
|
const pageSize = readPageSize(limit);
|
|
12584
|
-
const plannedPages = Math.max(1, Math.
|
|
12616
|
+
const plannedPages = limit === null ? null : Math.max(1, Math.ceil(limit / pageSize));
|
|
12585
12617
|
const listEnv = guardListOnlyHost(env);
|
|
12586
12618
|
const searchArgs = { category };
|
|
12587
12619
|
for (const key of [...COLLECT_FILTER_KEYS, ...COLLECT_ORDER_KEYS]) {
|
|
@@ -12600,15 +12632,10 @@ async function collectRawTodos(args, env) {
|
|
|
12600
12632
|
warnings.push(`\u5DF2\u6309\u901A\u7528\u89C4\u5219\u9ED8\u8BA4\u6392\u9664\u6284\u9001\u7C7B\u8EAB\u4EFD\uFF08isremarks=${defaultIsremarks}\uFF09\uFF1B\u5982\u9700\u5305\u542B\u6284\u9001\uFF0C\u8BF7\u5728\u63D0\u793A\u8BCD\u4E2D\u8BF4\u660E`);
|
|
12601
12633
|
}
|
|
12602
12634
|
}
|
|
12603
|
-
if (cappedFrom !== void 0) {
|
|
12604
|
-
warnings.push(
|
|
12605
|
-
`\u5355\u6B21\u6700\u591A\u53EA\u80FD\u53D6 ${MAX_FETCH_LIMIT} \u6761\uFF08${MAX_FETCH_PAGES} \u6B21\u8BF7\u6C42 \xD7 ${FETCH_PAGE_SIZE} \u6761\uFF09\uFF0C\u4F60\u8981\u6C42\u7684 ${cappedFrom} \u6761\u5DF2\u6309\u4E0A\u9650 ${MAX_FETCH_LIMIT} \u6761\u5904\u7406\uFF1B\u5982\u9700\u8986\u76D6\u66F4\u591A\uFF0C\u8BF7\u7F29\u5C0F\u7B5B\u9009\u6761\u4EF6\uFF08\u5982\u6309\u5DE5\u4F5C\u6D41\u3001\u65F6\u95F4\u8303\u56F4\u5206\u6279\uFF09\u540E\u518D\u6C47\u603B`
|
|
12606
|
-
);
|
|
12607
|
-
}
|
|
12608
12635
|
const requestedPageSize = args.pageSize;
|
|
12609
12636
|
if (requestedPageSize !== void 0 && requestedPageSize !== null && requestedPageSize !== "" && Number(requestedPageSize) !== pageSize) {
|
|
12610
12637
|
warnings.push(
|
|
12611
|
-
`\u5355\u9875\u6761\u6570\u5DF2\u6309 limit \u63A8\u5BFC\u4E3A ${pageSize}\
|
|
12638
|
+
`\u5355\u9875\u6761\u6570\u5DF2\u6309 limit \u63A8\u5BFC\u4E3A ${pageSize}\uFF0C\u5FFD\u7565\u4F20\u5165\u7684 pageSize=${String(requestedPageSize)}`
|
|
12612
12639
|
);
|
|
12613
12640
|
}
|
|
12614
12641
|
const sortText = String(searchArgs.sort ?? "").trim();
|
|
@@ -12617,19 +12644,97 @@ async function collectRawTodos(args, env) {
|
|
|
12617
12644
|
`\u5DF2\u6309\u81EA\u5B9A\u4E49\u6392\u5E8F\u53D6\u6570\uFF08sort=${sortText}\uFF09\uFF1B\u8DE8\u9875\u6309 requestId \u53BB\u91CD\uFF0C\u6392\u5E8F\u952E\u540C\u503C\u8F83\u591A\u65F6\u76F8\u90BB\u9875\u53EF\u80FD\u91CD\u590D\u6216\u6F0F\u9879\uFF0C\u5EFA\u8BAE\u914D\u5408\u65F6\u95F4 / \u5DE5\u4F5C\u6D41\u6761\u4EF6\u7F29\u5C0F\u8303\u56F4`
|
|
12618
12645
|
);
|
|
12619
12646
|
}
|
|
12647
|
+
const listPath = LIST_ENDPOINT_BY_CATEGORY[category] ?? WORKFLOW_ENDPOINTS.TODO_LIST;
|
|
12648
|
+
const degradeSteps = [];
|
|
12649
|
+
let degradeApplied = false;
|
|
12650
|
+
let degradeLevel = 0;
|
|
12651
|
+
const hasTimeCondition = TIME_FILTER_KEYS.some((key) => {
|
|
12652
|
+
const value = searchArgs[key];
|
|
12653
|
+
return value !== void 0 && value !== null && String(value).trim() !== "";
|
|
12654
|
+
});
|
|
12655
|
+
const receiveTimeWindow = (days) => {
|
|
12656
|
+
const end = /* @__PURE__ */ new Date();
|
|
12657
|
+
const start = new Date(end.getTime() - days * 24 * 3600 * 1e3);
|
|
12658
|
+
const fmt = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
12659
|
+
return `${fmt(start)} ${fmt(end)}`;
|
|
12660
|
+
};
|
|
12661
|
+
const probeTodoTotal = async () => {
|
|
12662
|
+
const { query } = await buildSearchQuery(listEnv, { ...searchArgs, current: 1, pageSize }, "list");
|
|
12663
|
+
const totalBody = JSON.parse(JSON.stringify(query));
|
|
12664
|
+
delete totalBody.customDisplayPage;
|
|
12665
|
+
try {
|
|
12666
|
+
const response = await listEnv.host.workflowRequest({
|
|
12667
|
+
method: "POST",
|
|
12668
|
+
path: totalEndpointFor(listPath),
|
|
12669
|
+
operation: "workflow.todoSmartConvert.total",
|
|
12670
|
+
body: totalBody
|
|
12671
|
+
});
|
|
12672
|
+
return extractTotal(response);
|
|
12673
|
+
} catch {
|
|
12674
|
+
return null;
|
|
12675
|
+
}
|
|
12676
|
+
};
|
|
12677
|
+
if (category === DEFAULT_CATEGORY) {
|
|
12678
|
+
const initialTotal = await probeTodoTotal();
|
|
12679
|
+
degradeSteps.push({ level: "initial", scope: "\u7528\u6237\u6761\u4EF6\u539F\u6837", total: initialTotal });
|
|
12680
|
+
if (!hasTimeCondition && (initialTotal === null || initialTotal > DEGRADE_TOTAL_THRESHOLD)) {
|
|
12681
|
+
if (initialTotal === null) {
|
|
12682
|
+
searchArgs.receiveTime = receiveTimeWindow(DEGRADE_WINDOW_DAYS[DEGRADE_WINDOW_DAYS.length - 1]);
|
|
12683
|
+
if (!explicitTab) searchArgs.tabid = DEGRADE_TABID;
|
|
12684
|
+
degradeApplied = true;
|
|
12685
|
+
degradeLevel = DEGRADE_WINDOW_DAYS.length + 1;
|
|
12686
|
+
const scope2 = explicitTab ? `\u63A5\u6536\u65F6\u95F4\u8FD11\u4E2A\u6708\uFF08\u4FDD\u6301\u7528\u6237\u6307\u5B9A\u9875\u7B7E\uFF09` : `\u63A5\u6536\u65F6\u95F4\u8FD11\u4E2A\u6708 + \u5F85\u5904\u7406\uFF08tabid=${DEGRADE_TABID}\uFF09`;
|
|
12687
|
+
degradeSteps.push({ level: "final", scope: scope2, total: null });
|
|
12688
|
+
warnings.push(
|
|
12689
|
+
`\u5F85\u529E\u603B\u6570\u63A5\u53E3\uFF08getTodoListTotal\uFF09\u8C03\u7528\u5931\u8D25\u6216\u65E0\u6CD5\u89E3\u6790\u603B\u6570\uFF0C\u5DF2\u76F4\u63A5\u6309\u6700\u4E25\u964D\u7EA7\u8D70\uFF1A\u300C${scope2}\u300D\uFF1B\u8FD9\u662F\u6700\u540E\u4E00\u7EA7\uFF0C\u53D6\u5230\u591A\u5C11\u5904\u7406\u591A\u5C11\uFF0C\u4E0D\u518D\u622A\u65AD`
|
|
12690
|
+
);
|
|
12691
|
+
} else {
|
|
12692
|
+
let matched = false;
|
|
12693
|
+
for (let i = 0; i < DEGRADE_WINDOW_DAYS.length; i += 1) {
|
|
12694
|
+
searchArgs.receiveTime = receiveTimeWindow(DEGRADE_WINDOW_DAYS[i]);
|
|
12695
|
+
const scope2 = `\u63A5\u6536\u65F6\u95F4${DEGRADE_WINDOW_LABELS[i]}`;
|
|
12696
|
+
const total = await probeTodoTotal();
|
|
12697
|
+
degradeSteps.push({ level: `window${i + 1}`, scope: scope2, total });
|
|
12698
|
+
if (total !== null && total <= DEGRADE_TOTAL_THRESHOLD) {
|
|
12699
|
+
degradeApplied = true;
|
|
12700
|
+
degradeLevel = i + 1;
|
|
12701
|
+
warnings.push(
|
|
12702
|
+
`\u65E0\u65F6\u95F4\u6761\u4EF6\u4E14\u5F85\u529E\u603B\u6570 ${initialTotal} \u6761 > ${DEGRADE_TOTAL_THRESHOLD}\uFF0C\u5DF2\u964D\u7EA7\u4E3A\u300C${scope2}\u300D\uFF1B\u8BE5\u8303\u56F4\u603B\u6570 ${total} \u6761\u5728\u9608\u503C\u5185\uFF0C\u6309\u8BE5\u8303\u56F4\u53D6\u6570`
|
|
12703
|
+
);
|
|
12704
|
+
matched = true;
|
|
12705
|
+
break;
|
|
12706
|
+
}
|
|
12707
|
+
if (total === null) break;
|
|
12708
|
+
}
|
|
12709
|
+
if (!matched) {
|
|
12710
|
+
searchArgs.receiveTime = receiveTimeWindow(DEGRADE_WINDOW_DAYS[DEGRADE_WINDOW_DAYS.length - 1]);
|
|
12711
|
+
if (!explicitTab) searchArgs.tabid = DEGRADE_TABID;
|
|
12712
|
+
degradeApplied = true;
|
|
12713
|
+
degradeLevel = DEGRADE_WINDOW_DAYS.length + 1;
|
|
12714
|
+
const scope2 = explicitTab ? `\u63A5\u6536\u65F6\u95F4\u8FD11\u4E2A\u6708\uFF08\u4FDD\u6301\u7528\u6237\u6307\u5B9A\u9875\u7B7E\uFF09` : `\u63A5\u6536\u65F6\u95F4\u8FD11\u4E2A\u6708 + \u5F85\u5904\u7406\uFF08tabid=${DEGRADE_TABID}\uFF09`;
|
|
12715
|
+
degradeSteps.push({ level: "final", scope: scope2, total: null });
|
|
12716
|
+
warnings.push(
|
|
12717
|
+
`\u65E0\u65F6\u95F4\u6761\u4EF6\u4E14\u5404\u964D\u7EA7\u7A97\u53E3\u603B\u6570\u5747 > ${DEGRADE_TOTAL_THRESHOLD}\uFF0C\u5DF2\u964D\u7EA7\u4E3A\u300C${scope2}\u300D\uFF1B\u8FD9\u662F\u6700\u540E\u4E00\u7EA7\uFF0C\u53D6\u5230\u591A\u5C11\u5904\u7406\u591A\u5C11\uFF0C\u4E0D\u518D\u622A\u65AD`
|
|
12718
|
+
);
|
|
12719
|
+
}
|
|
12720
|
+
}
|
|
12721
|
+
}
|
|
12722
|
+
}
|
|
12620
12723
|
const seen = /* @__PURE__ */ new Set();
|
|
12621
12724
|
const items = [];
|
|
12622
12725
|
let duplicateCount = 0;
|
|
12623
12726
|
let totalAvailable = null;
|
|
12624
12727
|
let pages = 0;
|
|
12625
12728
|
let stoppedEarly = false;
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
const { query } = await buildSearchQuery(
|
|
12729
|
+
for (let pageNo = 1; limit === null || pageNo <= (plannedPages ?? 0); pageNo += 1) {
|
|
12730
|
+
const { query, warnings: buildWarnings } = await buildSearchQuery(
|
|
12629
12731
|
listEnv,
|
|
12630
12732
|
{ ...searchArgs, current: pageNo, pageSize },
|
|
12631
12733
|
"list"
|
|
12632
12734
|
);
|
|
12735
|
+
for (const warning of buildWarnings ?? []) {
|
|
12736
|
+
if (!warnings.includes(warning)) warnings.push(warning);
|
|
12737
|
+
}
|
|
12633
12738
|
const isremarks = String(searchArgs.isremarks ?? "").trim();
|
|
12634
12739
|
if (isremarks !== "") {
|
|
12635
12740
|
query.params = { ...query.params || {}, isremarks };
|
|
@@ -12688,7 +12793,7 @@ async function collectRawTodos(args, env) {
|
|
|
12688
12793
|
added += 1;
|
|
12689
12794
|
}
|
|
12690
12795
|
if (added === 0) break;
|
|
12691
|
-
if (items.length >= limit) break;
|
|
12796
|
+
if (limit !== null && items.length >= limit) break;
|
|
12692
12797
|
if (pageRows.length < pageSize) break;
|
|
12693
12798
|
}
|
|
12694
12799
|
const workflowNames = /* @__PURE__ */ new Map();
|
|
@@ -12757,7 +12862,7 @@ async function collectRawTodos(args, env) {
|
|
|
12757
12862
|
if (stoppedEarly && items.length === 0) {
|
|
12758
12863
|
warnings.push("\u5217\u8868\u63A5\u53E3\u6CA1\u6709\u8FD4\u56DE\u4EFB\u4F55\u660E\u7EC6\uFF0C\u8BF7\u786E\u8BA4\u7B5B\u9009\u6761\u4EF6\u662F\u5426\u8FC7\u7A84");
|
|
12759
12864
|
}
|
|
12760
|
-
if (totalAvailable !== null && items.length < totalAvailable) {
|
|
12865
|
+
if (limit !== null && totalAvailable !== null && items.length < totalAvailable) {
|
|
12761
12866
|
warnings.push(
|
|
12762
12867
|
`\u5171 ${totalAvailable} \u6761\u5F85\u529E\uFF0C\u672C\u6B21\u6309 ${pages} \u6B21\u8BF7\u6C42\uFF08\u6BCF\u6B21\u6700\u591A ${FETCH_PAGE_SIZE} \u6761\uFF09\u53D6\u5230 ${items.length} \u6761\uFF1B\u5DF2\u5230\u672C\u6B21 limit=${limit} \u7684\u9608\u503C\u2014\u2014\u9700\u8981\u8986\u76D6\u66F4\u591A\u8BF7\u8C03\u5927 limit\uFF0C\u6216\u7F29\u5C0F\u7B5B\u9009\u6761\u4EF6\uFF08\u5DE5\u4F5C\u6D41 / \u65F6\u95F4\u8303\u56F4\uFF09\u5206\u6279\u6C47\u603B`
|
|
12763
12868
|
);
|
|
@@ -12888,19 +12993,31 @@ async function collectRawTodos(args, env) {
|
|
|
12888
12993
|
query: {
|
|
12889
12994
|
category,
|
|
12890
12995
|
...scope ? { tabid: searchArgs.tabid } : {},
|
|
12891
|
-
/**
|
|
12892
|
-
requestedLimit
|
|
12893
|
-
/**
|
|
12996
|
+
/** 用户原始诉求;不传 = null(不限条数,翻页取完为止)。 */
|
|
12997
|
+
requestedLimit,
|
|
12998
|
+
/** 计划请求次数;limit 不传(不限条数)时为 null(按需翻页,无上限)。 */
|
|
12894
12999
|
plannedPages,
|
|
12895
13000
|
/** 实际发出的列表请求次数 */
|
|
12896
13001
|
pages,
|
|
12897
13002
|
/** 单页大小(limit ≤ 100 时等于 limit,否则固定 100) */
|
|
12898
13003
|
pageSize,
|
|
12899
|
-
/** 计划能覆盖的条数上限 = 计划页数 ×
|
|
12900
|
-
appliedLimit: plannedPages * pageSize,
|
|
13004
|
+
/** 计划能覆盖的条数上限 = 计划页数 × 单页(实际可能更少,取决于服务端还有没有数据);不限条数时为 null。 */
|
|
13005
|
+
appliedLimit: plannedPages === null ? null : plannedPages * pageSize,
|
|
12901
13006
|
totalAvailable,
|
|
12902
13007
|
/** 取数只用了这一个接口(照实写出来,便于核对「有没有偷偷调别的」) */
|
|
12903
13008
|
endpoint: listPath,
|
|
13009
|
+
/** 无时间条件时的查询降级留痕(2026-11-11 新链路):steps 按探数顺序记录每级的范围与总数;
|
|
13010
|
+
* level 0=未降级、1..4=接收时间近一年/近6个月/近3个月/近1个月、5=近1个月+待处理(终点级,
|
|
13011
|
+
* 不再截断)。首轮探数对带时间条件的查询也会做(2026-11-10 起),此时 applied=false、level=0,
|
|
13012
|
+
* 总数供交付正文展示。 */
|
|
13013
|
+
...degradeSteps.length > 0 ? {
|
|
13014
|
+
degrade: {
|
|
13015
|
+
threshold: DEGRADE_TOTAL_THRESHOLD,
|
|
13016
|
+
applied: degradeApplied,
|
|
13017
|
+
level: degradeLevel,
|
|
13018
|
+
steps: degradeSteps
|
|
13019
|
+
}
|
|
13020
|
+
} : {},
|
|
12904
13021
|
/** 自定义排序原文(不在 filters 里:它是排序不是筛选条件) */
|
|
12905
13022
|
...sortText ? { sort: sortText } : {},
|
|
12906
13023
|
filters: Object.fromEntries(
|
|
@@ -14431,8 +14548,7 @@ var inputSchema = schemaOf({
|
|
|
14431
14548
|
items: {
|
|
14432
14549
|
type: "array",
|
|
14433
14550
|
minItems: 1,
|
|
14434
|
-
|
|
14435
|
-
description: "\u5F85\u529E\u6761\u76EE\u3002\u672A\u4F20\u65F6 collect \u51FA\u7F51\u53D6\u6570\uFF1B\u4F20\u5165\u540E\u53EA\u505A\u672C\u5730\u5F52\u4E00\u3001\u5206\u7EC4\u6216\u6458\u8981\u56DE\u586B\u3002",
|
|
14551
|
+
description: "\u5F85\u529E\u6761\u76EE\u3002\u672A\u4F20\u65F6 collect \u51FA\u7F51\u53D6\u6570\uFF1B\u4F20\u5165\u540E\u53EA\u505A\u672C\u5730\u5F52\u4E00\u3001\u5206\u7EC4\u6216\u6458\u8981\u56DE\u586B\u3002\u6761\u6570\u4E0D\u8BBE\u4E0A\u9650\uFF082026-11-11\uFF1A\u4E0E collect\u300C\u67E5\u6240\u6709\u300D\u5BF9\u9F50\uFF09\u3002",
|
|
14436
14552
|
items: { type: "object" }
|
|
14437
14553
|
},
|
|
14438
14554
|
aiGroups: {
|
|
@@ -14479,9 +14595,7 @@ var inputSchema = schemaOf({
|
|
|
14479
14595
|
limit: {
|
|
14480
14596
|
type: "integer",
|
|
14481
14597
|
minimum: 1,
|
|
14482
|
-
|
|
14483
|
-
default: DEFAULT_FETCH_LIMIT,
|
|
14484
|
-
description: "collect \u76EE\u6807\u6761\u6570\uFF1B\u5355\u9875\u6700\u591A " + FETCH_PAGE_SIZE + " \u6761\uFF0C\u6700\u591A " + MAX_FETCH_PAGES + " \u9875\u3002"
|
|
14598
|
+
description: "collect \u76EE\u6807\u6761\u6570\uFF1B\u4E0D\u4F20 = \u4E0D\u9650\u6761\u6570\uFF08\u7FFB\u9875\u53D6\u5B8C\u4E3A\u6B62\uFF0C\u65E0\u65F6\u95F4\u6761\u4EF6\u65F6\u6309\u964D\u7EA7\u94FE\u81EA\u52A8\u6536\u7A84\u8303\u56F4\uFF09\uFF1B\u4F20\u4E86\u5219\u7D2F\u8BA1\u5230\u8BE5\u6761\u6570\u5373\u505C\u3002\u5355\u9875\u6700\u591A " + FETCH_PAGE_SIZE + " \u6761\u3002\uFF082026-11-11\uFF1A\u539F 500 \u4E0A\u9650\u5DF2\u5E9F\u9664\uFF09"
|
|
14485
14599
|
},
|
|
14486
14600
|
pageSize: {
|
|
14487
14601
|
type: "integer",
|
|
@@ -2,13 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
meetingStateDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3NCFFHB2.js";
|
|
6
6
|
import {
|
|
7
7
|
SCHEMA_ID,
|
|
8
8
|
meetingSuccess,
|
|
9
9
|
meetingValidationError,
|
|
10
10
|
schemaOf
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-K67FODVC.js";
|
|
12
12
|
|
|
13
13
|
// src/shortcuts/meeting/operations/attachment-content.ts
|
|
14
14
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -5,35 +5,35 @@ import {
|
|
|
5
5
|
listMeetingAttachments,
|
|
6
6
|
meetingAttachmentContentOperations,
|
|
7
7
|
renderDocx
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7AYQJSFY.js";
|
|
9
9
|
import {
|
|
10
10
|
meetingEbGroupChatOperations
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BFKLQLBK.js";
|
|
12
12
|
import {
|
|
13
13
|
meetingEbCreateFlowOperations
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HARQF5IP.js";
|
|
15
15
|
import {
|
|
16
16
|
ebMeetingWritePreflight,
|
|
17
17
|
meetingEbConflictOperations
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RYFRGTUV.js";
|
|
19
19
|
import {
|
|
20
20
|
meetingEbScheduleOperations
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MCZG6HPM.js";
|
|
22
22
|
import {
|
|
23
23
|
ebRoomRecommendOperation,
|
|
24
24
|
recommendRooms,
|
|
25
25
|
rememberFrequentRoom
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YB3AJYPY.js";
|
|
27
27
|
import {
|
|
28
28
|
cacheScopeSuffix,
|
|
29
29
|
readCache,
|
|
30
30
|
writeCache
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WNJUGI2F.js";
|
|
32
32
|
import {
|
|
33
33
|
meetingEnvOperations,
|
|
34
34
|
meetingStateDir,
|
|
35
35
|
resolveMeetingEnvMode
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3NCFFHB2.js";
|
|
37
37
|
import {
|
|
38
38
|
EB_BASE,
|
|
39
39
|
EB_ENDPOINTS,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
toIdString,
|
|
66
66
|
verifyLease,
|
|
67
67
|
writeBody
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-K67FODVC.js";
|
|
69
69
|
import {
|
|
70
70
|
CONTINUATION_TTL_SECONDS
|
|
71
71
|
} from "./chunk-7BDPM5ST.js";
|
|
@@ -2229,7 +2229,7 @@ var meetingAttachmentAttach = {
|
|
|
2229
2229
|
if (mode === "append" && existingIds.length === 0) {
|
|
2230
2230
|
existingIds.push(...beforeIds);
|
|
2231
2231
|
}
|
|
2232
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2232
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
2233
2233
|
const list = getMeetingOperation2("meeting.eb.meeting.list");
|
|
2234
2234
|
let fileId = incomingFileId;
|
|
2235
2235
|
let name = String(args.name ?? "").trim();
|
|
@@ -2317,7 +2317,7 @@ function textOf(value) {
|
|
|
2317
2317
|
return value === void 0 || value === null ? "" : String(value);
|
|
2318
2318
|
}
|
|
2319
2319
|
async function readMinute(env, id) {
|
|
2320
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2320
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
2321
2321
|
const detail = getMeetingOperation2("meeting.eb.minute.detail");
|
|
2322
2322
|
const result = await detail.handler({ id }, env);
|
|
2323
2323
|
const row = result?.data?.data;
|
|
@@ -2396,7 +2396,7 @@ var meetingMinuteWriteContent = {
|
|
|
2396
2396
|
} else {
|
|
2397
2397
|
statusReason = "\u4EC5\u6E05\u7A7A\u5185\u5BB9\uFF0C\u672A\u6539\u72B6\u6001";
|
|
2398
2398
|
}
|
|
2399
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2399
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
2400
2400
|
const prepare = getMeetingOperation2("meeting.eb.minute.update.prepare");
|
|
2401
2401
|
const apply = getMeetingOperation2("meeting.eb.minute.update.apply");
|
|
2402
2402
|
const prepared = await prepare.handler({ id, mt_id: mtId, ...patch }, env);
|
|
@@ -2518,6 +2518,13 @@ var DEFAULT_AI_MINUTE_PAGE = "1250830691712172036";
|
|
|
2518
2518
|
function textOf2(value) {
|
|
2519
2519
|
return value === void 0 || value === null ? "" : String(value);
|
|
2520
2520
|
}
|
|
2521
|
+
var SYSTEM_NOTICE_TYPES = /* @__PURE__ */ new Set(["9", "14"]);
|
|
2522
|
+
var SYSTEM_NOTICE_TYPE_NAMES = /* @__PURE__ */ new Set(["\u7CFB\u7EDF", "\u901A\u77E5", "\u5C45\u4E2D"]);
|
|
2523
|
+
function isSystemNotice(message) {
|
|
2524
|
+
const type = textOf2(message.type).trim();
|
|
2525
|
+
if (type) return SYSTEM_NOTICE_TYPES.has(type);
|
|
2526
|
+
return SYSTEM_NOTICE_TYPE_NAMES.has(textOf2(message.typeName));
|
|
2527
|
+
}
|
|
2521
2528
|
var DAY_MS = 24 * 36e5;
|
|
2522
2529
|
function parseLocalTime(value) {
|
|
2523
2530
|
const text = textOf2(value).trim();
|
|
@@ -2619,7 +2626,7 @@ function formatLine(message, nameByUid) {
|
|
|
2619
2626
|
}
|
|
2620
2627
|
function composeTranscript(messages, nameByUid, keepSystem) {
|
|
2621
2628
|
const ordered = [...messages].sort((a, b) => Number(a.msgtime ?? 0) - Number(b.msgtime ?? 0));
|
|
2622
|
-
const keptMessages = keepSystem ? ordered : ordered.filter((m) =>
|
|
2629
|
+
const keptMessages = keepSystem ? ordered : ordered.filter((m) => !isSystemNotice(m));
|
|
2623
2630
|
const ignoredSystem = ordered.length - keptMessages.length;
|
|
2624
2631
|
return {
|
|
2625
2632
|
transcript: keptMessages.map((message) => formatLine(message, nameByUid)).join("\n"),
|
|
@@ -2630,7 +2637,7 @@ function composeTranscript(messages, nameByUid, keepSystem) {
|
|
|
2630
2637
|
var DIGEST_PATTERN = /(@|负责|分工|安排|决定|结论|确定|定稿|通过|不同意|同意|截止|完成|上线|提测|排期|汇报|跟进|待办|风险|问题|方案|需求|下周|本周|明天|后天|月底|之前|号前)/;
|
|
2631
2638
|
function buildDigest(messages, nameByUid, keepSystem, maxChars) {
|
|
2632
2639
|
const ordered = [...messages].sort((a, b) => Number(a.msgtime ?? 0) - Number(b.msgtime ?? 0));
|
|
2633
|
-
const base = keepSystem ? ordered : ordered.filter((m) =>
|
|
2640
|
+
const base = keepSystem ? ordered : ordered.filter((m) => !isSystemNotice(m));
|
|
2634
2641
|
const essence = base.filter((message) => {
|
|
2635
2642
|
const content = textOf2(message.content).trim();
|
|
2636
2643
|
if (!content) return false;
|
|
@@ -2755,7 +2762,7 @@ var meetingMinuteFromGroupChat = {
|
|
|
2755
2762
|
const mtId = textOf2(args.mt_id).trim();
|
|
2756
2763
|
if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
|
|
2757
2764
|
const pipeline = ["text", "minutes", "document"].includes(args.pipeline) ? args.pipeline : "text";
|
|
2758
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2765
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
2759
2766
|
const ctx = env.ctx;
|
|
2760
2767
|
let stepStart = Date.now();
|
|
2761
2768
|
const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
|
|
@@ -2781,7 +2788,7 @@ var meetingMinuteFromGroupChat = {
|
|
|
2781
2788
|
const pullStart = Date.now();
|
|
2782
2789
|
const { createImHost } = await import("./host-M4XP5URR.js");
|
|
2783
2790
|
const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
|
|
2784
|
-
const { getImOperation } = await import("./registry-
|
|
2791
|
+
const { getImOperation } = await import("./registry-E5RQJVWN.js");
|
|
2785
2792
|
const imEnv = { ctx, host: createImHost(ctx), continuation: createImContinuationSigner(ctx) };
|
|
2786
2793
|
const syncOp = getImOperation("im.msg.sync.group");
|
|
2787
2794
|
const chatWindow = computeChatWindow(meeting);
|
|
@@ -2849,7 +2856,7 @@ var meetingMinuteFromGroupChat = {
|
|
|
2849
2856
|
try {
|
|
2850
2857
|
const { readFile: readFile4 } = await import("node:fs/promises");
|
|
2851
2858
|
const buffer = await readFile4(file);
|
|
2852
|
-
const { extractText } = await import("./attachment-content-
|
|
2859
|
+
const { extractText } = await import("./attachment-content-EJYIOJPH.js");
|
|
2853
2860
|
const extracted = extractText(buffer, file, "");
|
|
2854
2861
|
if (extracted.text.trim()) {
|
|
2855
2862
|
extraSections.push(`\u3010\u6750\u6599\uFF1A${file.split(/[\\/]/).pop() ?? file}\u3011
|
|
@@ -3168,7 +3175,7 @@ var meetingDecisionNotifyGroup = {
|
|
|
3168
3175
|
const warnings = [];
|
|
3169
3176
|
const mtId = textOf3(args.mt_id).trim();
|
|
3170
3177
|
if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
|
|
3171
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
3178
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
3172
3179
|
const ctx = env.ctx;
|
|
3173
3180
|
const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
|
|
3174
3181
|
{ mt_id: mtId, pageNo: 1, pageSize: 1 },
|
|
@@ -3240,7 +3247,7 @@ var meetingDecisionNotifyGroup = {
|
|
|
3240
3247
|
const mentioned = [];
|
|
3241
3248
|
if (args.mention !== false) {
|
|
3242
3249
|
try {
|
|
3243
|
-
const { getImOperation } = await import("./registry-
|
|
3250
|
+
const { getImOperation } = await import("./registry-E5RQJVWN.js");
|
|
3244
3251
|
const membersResult = await getImOperation("im.group.users").handler(
|
|
3245
3252
|
{ groupId },
|
|
3246
3253
|
{ ctx, host: imHost }
|
|
@@ -3470,7 +3477,7 @@ var meetingPipelineRun = {
|
|
|
3470
3477
|
const needsConfirm = level === "tasks" || level === "notify";
|
|
3471
3478
|
const confirmed = args.confirm === true;
|
|
3472
3479
|
const executedLevel = needsConfirm && !confirmed ? "document" : level;
|
|
3473
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
3480
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
3474
3481
|
const ctx = env.ctx;
|
|
3475
3482
|
let stepStart = Date.now();
|
|
3476
3483
|
const reuseMinuteId = textOf4(args.minuteId).trim();
|
|
@@ -3842,7 +3849,7 @@ function formatTimeRange(start, end) {
|
|
|
3842
3849
|
}
|
|
3843
3850
|
async function loadAgendaFromTopics(env, mtId) {
|
|
3844
3851
|
try {
|
|
3845
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
3852
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
3846
3853
|
const operation = getMeetingOperation2("meeting.eb.topic.list");
|
|
3847
3854
|
const result = await operation.handler({ mt_id: mtId, pageNo: 1, pageSize: 200 }, env);
|
|
3848
3855
|
const rows = result.data?.rows ?? [];
|
|
@@ -3993,7 +4000,7 @@ async function supplementRowFromDetail(row, mtId, env) {
|
|
|
3993
4000
|
const missing = DETAIL_FALLBACK_KEYS.filter((key) => isBlank(row[key]));
|
|
3994
4001
|
if (missing.length === 0) return { row, filled: [] };
|
|
3995
4002
|
try {
|
|
3996
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
4003
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
3997
4004
|
const detailOperation = getMeetingOperation2("meeting.eb.meeting.detail");
|
|
3998
4005
|
const result = await detailOperation.handler({ id: mtId }, env);
|
|
3999
4006
|
const flat = result?.data?.data ?? result?.data ?? {};
|
|
@@ -4167,7 +4174,7 @@ var meetingInvitationRender = {
|
|
|
4167
4174
|
};
|
|
4168
4175
|
dataSource = "payload";
|
|
4169
4176
|
} else {
|
|
4170
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
4177
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
4171
4178
|
const listOperation = getMeetingOperation2("meeting.eb.meeting.list");
|
|
4172
4179
|
try {
|
|
4173
4180
|
const listed = await listOperation.handler({ mt_id: mtId, pageNo: 1, pageSize: 1 }, env);
|
|
@@ -4511,7 +4518,7 @@ var meetingInvitationPublish = {
|
|
|
4511
4518
|
"\u4F1A\u771F\u5B9E\u521B\u5EFA\u6587\u6863\uFF0C\u5FC5\u987B\u663E\u5F0F\u4F20 confirm: true\uFF08\u53EF\u5148\u4E0D\u5E26 confirm \u8C03 meeting.invitation.render \u9884\u89C8\u6B63\u6587\uFF09"
|
|
4512
4519
|
);
|
|
4513
4520
|
}
|
|
4514
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
4521
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
4515
4522
|
const render = getMeetingOperation2("meeting.invitation.render");
|
|
4516
4523
|
const rendered = await render.handler(
|
|
4517
4524
|
{
|
|
@@ -5226,7 +5233,7 @@ var meetingSummaryGet = {
|
|
|
5226
5233
|
const mtId = textOf5(args.mt_id).trim();
|
|
5227
5234
|
if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
|
|
5228
5235
|
const ctx = env.ctx;
|
|
5229
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
5236
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
5230
5237
|
const warnings = [];
|
|
5231
5238
|
const timings = {};
|
|
5232
5239
|
const include = Array.isArray(args.include) && args.include.length > 0 ? args.include.filter((item) => ALL_SECTIONS.includes(item)) : ALL_SECTIONS;
|
|
@@ -5364,7 +5371,7 @@ var meetingSummaryGet = {
|
|
|
5364
5371
|
try {
|
|
5365
5372
|
const { createImHost } = await import("./host-M4XP5URR.js");
|
|
5366
5373
|
const { createImContinuationSigner } = await import("./continuation-3S37AUSH.js");
|
|
5367
|
-
const { getImOperation } = await import("./registry-
|
|
5374
|
+
const { getImOperation } = await import("./registry-E5RQJVWN.js");
|
|
5368
5375
|
const imEnv = {
|
|
5369
5376
|
ctx,
|
|
5370
5377
|
// 测试环境靠 env.imHost 注入假实现,否则会真的打到线上群聊
|
|
@@ -5547,7 +5554,7 @@ var MT_STATUS_OVER = "8";
|
|
|
5547
5554
|
var CANCELLED_MARK_DELAY_MS = 800;
|
|
5548
5555
|
async function isCancelledMeeting(env, mtId) {
|
|
5549
5556
|
try {
|
|
5550
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
5557
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
5551
5558
|
const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
|
|
5552
5559
|
// withCount:false —— 这里只要一行状态,不必额外请求 count(少一次往返,也便于测试替身)
|
|
5553
5560
|
{ mt_id: mtId, pageNo: 1, pageSize: 1, withCount: false },
|
|
@@ -6572,7 +6579,7 @@ var ebAutoInvitationAfterWrite = async (context) => {
|
|
|
6572
6579
|
const mtId = String(context.dataIds?.[0] ?? "").trim();
|
|
6573
6580
|
if (!isCreate || !enabled || !mtId) return association;
|
|
6574
6581
|
try {
|
|
6575
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
6582
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-5CRCN2TV.js");
|
|
6576
6583
|
const render = getMeetingOperation2("meeting.invitation.render");
|
|
6577
6584
|
const result = await render.handler({ mtId }, context.env);
|
|
6578
6585
|
return { ...association ?? {}, invitation: result?.data ?? null };
|