weaver-work-cli 0.1.57 → 0.1.59
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-QGM5MLQE.js → attachment-content-TP6WDNC6.js} +3 -3
- package/dist/chunks/{caizhilian-QJ4FLSQJ.js → caizhilian-5NM4X5HG.js} +1 -1
- package/dist/chunks/{chunk-7EBV7Q3R.js → chunk-2FHP4PYS.js} +50 -27
- package/dist/chunks/{chunk-DVR2EDUU.js → chunk-6YWHRXEQ.js} +17 -1
- package/dist/chunks/{chunk-FDAJC7R4.js → chunk-AQOPPNTR.js} +2 -2
- package/dist/chunks/{chunk-6DVL5IN5.js → chunk-CI2RF3AJ.js} +7 -4
- package/dist/chunks/{chunk-WHJIUKJW.js → chunk-FM7B5BIR.js} +206 -39
- package/dist/chunks/{chunk-L2LMBFG5.js → chunk-I3BFBBP2.js} +1 -1
- package/dist/chunks/{chunk-6MS3RLPO.js → chunk-MQBMMJUV.js} +2 -2
- package/dist/chunks/{chunk-XU3FL3AW.js → chunk-QNPIY5R6.js} +4 -4
- package/dist/chunks/{chunk-AHJZIMCX.js → chunk-U2DWV6JC.js} +1 -1
- package/dist/chunks/{chunk-WMB3SMXI.js → chunk-WINR2Q6K.js} +27 -4
- package/dist/chunks/{chunk-UI66EMOR.js → chunk-XR5BGFNT.js} +4 -4
- package/dist/chunks/{chunk-TJUAGZU7.js → chunk-ZHPCNM2S.js} +6 -6
- package/dist/chunks/{conflict-VAFFPUY3.js → conflict-Y3ESXYIA.js} +2 -2
- package/dist/chunks/{create-flow-TVYE3IOH.js → create-flow-JHQSA6JF.js} +6 -6
- package/dist/chunks/{data-WVICO3DT.js → data-ZVS3BWPT.js} +3 -5
- package/dist/chunks/{env-BVVFIN4P.js → env-LQBLL3MZ.js} +2 -2
- package/dist/chunks/{factory-RCQ36LLE.js → factory-X7PN6B3B.js} +1 -1
- package/dist/chunks/{group-chat-YFZDUUY3.js → group-chat-PPFY7SPV.js} +3 -3
- package/dist/chunks/{invoice-7JGSEWT5.js → invoice-6XDMPCWB.js} +59 -8
- package/dist/chunks/{lazy-dispatch-JHGFCKJN.js → lazy-dispatch-GCA6HDOB.js} +1 -1
- package/dist/chunks/{meeting-JOHV4RH3.js → meeting-GMRQZFJP.js} +16 -12
- package/dist/chunks/{minute-doc-JLS4KMFZ.js → minute-doc-JXH3MNC7.js} +5 -5
- package/dist/chunks/{operations-ZPWBMYKE.js → operations-6NXJ7RTE.js} +1 -1
- package/dist/chunks/{registry-LITYOH2W.js → registry-WZCCBI5L.js} +10 -10
- package/dist/chunks/{room-recommend-62MECG4J.js → room-recommend-CKU5NF2E.js} +4 -4
- package/dist/chunks/{schedule-6QRXIBGU.js → schedule-DEFAO2RY.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/internal/e10/auth/commands.js +29 -1
- package/dist/shortcuts/caizhilian/operations/files.js +4 -1
- package/dist/shortcuts/caizhilian/operations/handlers/document.js +33 -4
- package/dist/shortcuts/data/index.js +0 -1
- package/dist/shortcuts/data/manifest.js +1 -1
- package/dist/shortcuts/data/operations/module.js +2 -3
- package/dist/shortcuts/invoice/manifest.js +6 -4
- package/dist/shortcuts/invoice/operations/reim-subsidy.js +54 -4
- package/dist/shortcuts/meeting/host.js +6 -1
- package/dist/shortcuts/meeting/minute-doc.js +3 -2
- package/dist/shortcuts/meeting/operations/compose-outcome.js +4 -0
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +29 -3
- package/dist/shortcuts/meeting/operations/eb/crm-search.js +20 -0
- package/dist/shortcuts/meeting/operations/eb/decision-task-reassign.js +113 -0
- package/dist/shortcuts/meeting/operations/eb/decision.js +41 -1
- package/dist/shortcuts/meeting/operations/eb/factory.js +4 -4
- package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
- package/dist/shortcuts/meeting/operations/eb-fallback.js +3 -0
- package/dist/shortcuts/meeting/operations/registry.js +14 -1
- package/dist/shortcuts/meeting/operations/shared.js +4 -0
- package/docs/agent-invoice.md +0 -1
- package/docs/data.md +1 -1
- package/docs/e10-auth.md +5 -0
- package/docs/invoice.md +1 -1
- package/package.json +1 -1
- package/skill-template/domains/yepiaotong.md +2 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
- package/skills/weaver-e10-caizhilian/references/document.md +1 -1
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +2 -2
- package/skills/weaver-e10-data/references/config-center.md +0 -1
- package/skills/weaver-e10-jucailin/SKILL.md +6 -6
- package/skills/weaver-e10-jucailin/references/recruit-read.md +3 -2
- package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-write.md +15 -8
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +3 -1
- package/skills/weaver-e10-meeting/SKILL.md +14 -4
- package/skills/weaver-e10-recruit-stage/SKILL.md +42 -14
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +61 -20
- package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +194 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +5 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +4 -5
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +1 -10
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +25 -6
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +3 -2
- package/skills/weaver-e10-yepiaotong/SKILL.md +5 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +0 -23
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim-relation.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +15 -11
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +80 -35
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +9 -9
- package/skills/weaver-e10-yepiaotong/references/invoice-summarize.py +0 -217
- package/skills/weaver-e10-yepiaotong.zip +0 -0
|
@@ -3,40 +3,41 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
listMeetingAttachments,
|
|
5
5
|
meetingAttachmentContentOperations
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MQBMMJUV.js";
|
|
7
7
|
import {
|
|
8
8
|
PENDING_MARK,
|
|
9
9
|
renderDocx
|
|
10
10
|
} from "./chunk-WMRNO6IU.js";
|
|
11
11
|
import {
|
|
12
12
|
meetingEbGroupChatOperations
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZHPCNM2S.js";
|
|
14
14
|
import {
|
|
15
15
|
attachMeetingUrls,
|
|
16
|
-
meetingEbCreateFlowOperations
|
|
17
|
-
|
|
16
|
+
meetingEbCreateFlowOperations,
|
|
17
|
+
meetingUrlMap
|
|
18
|
+
} from "./chunk-2FHP4PYS.js";
|
|
18
19
|
import {
|
|
19
20
|
ebMeetingWritePreflight,
|
|
20
21
|
meetingEbConflictOperations
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QNPIY5R6.js";
|
|
22
23
|
import {
|
|
23
24
|
meetingEbScheduleOperations
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-AQOPPNTR.js";
|
|
25
26
|
import {
|
|
26
27
|
ebRoomRecommendOperation,
|
|
27
28
|
recommendRooms,
|
|
28
29
|
rememberFrequentRoom
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XR5BGFNT.js";
|
|
30
31
|
import {
|
|
31
32
|
cacheScopeSuffix,
|
|
32
33
|
readCache,
|
|
33
34
|
writeCache
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-U2DWV6JC.js";
|
|
35
36
|
import {
|
|
36
37
|
meetingEnvOperations,
|
|
37
38
|
meetingStateDir,
|
|
38
39
|
resolveMeetingEnvMode
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-I3BFBBP2.js";
|
|
40
41
|
import {
|
|
41
42
|
EB_BASE,
|
|
42
43
|
EB_ENDPOINTS,
|
|
@@ -68,7 +69,7 @@ import {
|
|
|
68
69
|
toIdString,
|
|
69
70
|
verifyLease,
|
|
70
71
|
writeBody
|
|
71
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-CI2RF3AJ.js";
|
|
72
73
|
import {
|
|
73
74
|
CONTINUATION_TTL_SECONDS
|
|
74
75
|
} from "./chunk-7BDPM5ST.js";
|
|
@@ -2235,7 +2236,7 @@ var meetingAttachmentAttach = {
|
|
|
2235
2236
|
if (mode === "append" && existingIds.length === 0) {
|
|
2236
2237
|
existingIds.push(...beforeIds);
|
|
2237
2238
|
}
|
|
2238
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2239
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
2239
2240
|
const list = getMeetingOperation2("meeting.eb.meeting.list");
|
|
2240
2241
|
let fileId = incomingFileId;
|
|
2241
2242
|
let name = String(args.name ?? "").trim();
|
|
@@ -2323,7 +2324,7 @@ function textOf(value) {
|
|
|
2323
2324
|
return value === void 0 || value === null ? "" : String(value);
|
|
2324
2325
|
}
|
|
2325
2326
|
async function readMinute(env, id) {
|
|
2326
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2327
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
2327
2328
|
const detail = getMeetingOperation2("meeting.eb.minute.detail");
|
|
2328
2329
|
const result = await detail.handler({ id }, env);
|
|
2329
2330
|
const row = result?.data?.data;
|
|
@@ -2406,7 +2407,7 @@ var meetingMinuteWriteContent = {
|
|
|
2406
2407
|
} else {
|
|
2407
2408
|
statusReason = "\u4EC5\u6E05\u7A7A\u5185\u5BB9\uFF0C\u672A\u6539\u72B6\u6001";
|
|
2408
2409
|
}
|
|
2409
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2410
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
2410
2411
|
const prepare = getMeetingOperation2("meeting.eb.minute.update.prepare");
|
|
2411
2412
|
const apply = getMeetingOperation2("meeting.eb.minute.update.apply");
|
|
2412
2413
|
const prepared = await prepare.handler({ id, mt_id: mtId, ...patch }, env);
|
|
@@ -2422,8 +2423,8 @@ var meetingMinuteWriteContent = {
|
|
|
2422
2423
|
let minuteDoc = null;
|
|
2423
2424
|
if (args.with_doc !== false) {
|
|
2424
2425
|
try {
|
|
2425
|
-
const { buildMinuteDocx } = await import("./minute-doc-
|
|
2426
|
-
const { meetingStateDir: meetingStateDir2 } = await import("./env-
|
|
2426
|
+
const { buildMinuteDocx } = await import("./minute-doc-JXH3MNC7.js");
|
|
2427
|
+
const { meetingStateDir: meetingStateDir2 } = await import("./env-LQBLL3MZ.js");
|
|
2427
2428
|
const { mkdir: mkdir4, writeFile: writeFile4 } = await import("node:fs/promises");
|
|
2428
2429
|
const { join: join3 } = await import("node:path");
|
|
2429
2430
|
const subject = textOf(after.mt_minutes_subject).trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
|
|
@@ -2460,7 +2461,7 @@ var meetingMinuteWriteContent = {
|
|
|
2460
2461
|
}
|
|
2461
2462
|
if (args.with_doc !== false) {
|
|
2462
2463
|
try {
|
|
2463
|
-
const { ensureMinuteDoc } = await import("./minute-doc-
|
|
2464
|
+
const { ensureMinuteDoc } = await import("./minute-doc-JXH3MNC7.js");
|
|
2464
2465
|
const better = await ensureMinuteDoc(env, {
|
|
2465
2466
|
id,
|
|
2466
2467
|
mtId,
|
|
@@ -2831,7 +2832,7 @@ var meetingMinuteFromGroupChat = {
|
|
|
2831
2832
|
const mtId = textOf2(args.mt_id).trim();
|
|
2832
2833
|
if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
|
|
2833
2834
|
const pipeline = ["text", "minutes", "document"].includes(args.pipeline) ? args.pipeline : "text";
|
|
2834
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
2835
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
2835
2836
|
const ctx = env.ctx;
|
|
2836
2837
|
let stepStart = Date.now();
|
|
2837
2838
|
const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
|
|
@@ -2925,7 +2926,7 @@ var meetingMinuteFromGroupChat = {
|
|
|
2925
2926
|
try {
|
|
2926
2927
|
const { readFile: readFile4 } = await import("node:fs/promises");
|
|
2927
2928
|
const buffer = await readFile4(file);
|
|
2928
|
-
const { extractText } = await import("./attachment-content-
|
|
2929
|
+
const { extractText } = await import("./attachment-content-TP6WDNC6.js");
|
|
2929
2930
|
const extracted = extractText(buffer, file, "");
|
|
2930
2931
|
if (extracted.text.trim()) {
|
|
2931
2932
|
extraSections.push(`\u3010\u6750\u6599\uFF1A${file.split(/[\\/]/).pop() ?? file}\u3011
|
|
@@ -3100,8 +3101,8 @@ ${groupTranscript}` : ""
|
|
|
3100
3101
|
if (args.with_doc !== false) {
|
|
3101
3102
|
const docStarted = Date.now();
|
|
3102
3103
|
try {
|
|
3103
|
-
const { buildMinuteDocx } = await import("./minute-doc-
|
|
3104
|
-
const { meetingStateDir: meetingStateDir2 } = await import("./env-
|
|
3104
|
+
const { buildMinuteDocx } = await import("./minute-doc-JXH3MNC7.js");
|
|
3105
|
+
const { meetingStateDir: meetingStateDir2 } = await import("./env-LQBLL3MZ.js");
|
|
3105
3106
|
const { mkdir: mkdir4, writeFile: writeFile4 } = await import("node:fs/promises");
|
|
3106
3107
|
const { join: join3 } = await import("node:path");
|
|
3107
3108
|
const body = textOf2(row.parse_content) || textOf2(row.minutes_content) || transcript;
|
|
@@ -3288,7 +3289,7 @@ var meetingDecisionNotifyGroup = {
|
|
|
3288
3289
|
const warnings = [];
|
|
3289
3290
|
const mtId = textOf3(args.mt_id).trim();
|
|
3290
3291
|
if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
|
|
3291
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
3292
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
3292
3293
|
const ctx = env.ctx;
|
|
3293
3294
|
const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
|
|
3294
3295
|
{ mt_id: mtId, pageNo: 1, pageSize: 1 },
|
|
@@ -3590,7 +3591,7 @@ var meetingPipelineRun = {
|
|
|
3590
3591
|
const needsConfirm = level === "tasks" || level === "notify";
|
|
3591
3592
|
const confirmed = args.confirm === true;
|
|
3592
3593
|
const executedLevel = needsConfirm && !confirmed ? "document" : level;
|
|
3593
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
3594
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
3594
3595
|
const ctx = env.ctx;
|
|
3595
3596
|
let stepStart = Date.now();
|
|
3596
3597
|
const reuseMinuteId = textOf4(args.minuteId).trim();
|
|
@@ -3962,7 +3963,7 @@ function formatTimeRange(start, end) {
|
|
|
3962
3963
|
}
|
|
3963
3964
|
async function loadAgendaFromTopics(env, mtId) {
|
|
3964
3965
|
try {
|
|
3965
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
3966
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
3966
3967
|
const operation = getMeetingOperation2("meeting.eb.topic.list");
|
|
3967
3968
|
const result = await operation.handler({ mt_id: mtId, pageNo: 1, pageSize: 200 }, env);
|
|
3968
3969
|
const rows = result.data?.rows ?? [];
|
|
@@ -4113,7 +4114,7 @@ async function supplementRowFromDetail(row, mtId, env) {
|
|
|
4113
4114
|
const missing = DETAIL_FALLBACK_KEYS.filter((key) => isBlank(row[key]));
|
|
4114
4115
|
if (missing.length === 0) return { row, filled: [] };
|
|
4115
4116
|
try {
|
|
4116
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
4117
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
4117
4118
|
const detailOperation = getMeetingOperation2("meeting.eb.meeting.detail");
|
|
4118
4119
|
const result = await detailOperation.handler({ id: mtId }, env);
|
|
4119
4120
|
const flat = result?.data?.data ?? result?.data ?? {};
|
|
@@ -4287,7 +4288,7 @@ var meetingInvitationRender = {
|
|
|
4287
4288
|
};
|
|
4288
4289
|
dataSource = "payload";
|
|
4289
4290
|
} else {
|
|
4290
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
4291
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
4291
4292
|
const listOperation = getMeetingOperation2("meeting.eb.meeting.list");
|
|
4292
4293
|
try {
|
|
4293
4294
|
const listed = await listOperation.handler({ mt_id: mtId, pageNo: 1, pageSize: 1 }, env);
|
|
@@ -4631,7 +4632,7 @@ var meetingInvitationPublish = {
|
|
|
4631
4632
|
"\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"
|
|
4632
4633
|
);
|
|
4633
4634
|
}
|
|
4634
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
4635
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
4635
4636
|
const render = getMeetingOperation2("meeting.invitation.render");
|
|
4636
4637
|
const rendered = await render.handler(
|
|
4637
4638
|
{
|
|
@@ -4663,7 +4664,7 @@ var meetingInvitationPublish = {
|
|
|
4663
4664
|
folder_type: String(args.folder_type ?? DEFAULT_FOLDER_TYPE),
|
|
4664
4665
|
author_id: authorId
|
|
4665
4666
|
};
|
|
4666
|
-
const { executeCaizhilianOperation } = await import("./operations-
|
|
4667
|
+
const { executeCaizhilianOperation } = await import("./operations-6NXJ7RTE.js");
|
|
4667
4668
|
const { createCaizhilianHost } = await import("./host-TTSGY5NZ.js");
|
|
4668
4669
|
const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
|
|
4669
4670
|
const caizhilianEnv = {
|
|
@@ -5346,7 +5347,7 @@ var meetingSummaryGet = {
|
|
|
5346
5347
|
const mtId = textOf5(args.mt_id).trim();
|
|
5347
5348
|
if (!mtId) throw meetingValidationError("mt_id_required", "\u5FC5\u987B\u63D0\u4F9B\u4F1A\u8BAE id\uFF08mt_id\uFF09");
|
|
5348
5349
|
const ctx = env.ctx;
|
|
5349
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
5350
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
5350
5351
|
const warnings = [];
|
|
5351
5352
|
const timings = {};
|
|
5352
5353
|
const include = Array.isArray(args.include) && args.include.length > 0 ? args.include.filter((item) => ALL_SECTIONS.includes(item)) : ALL_SECTIONS;
|
|
@@ -5667,7 +5668,7 @@ var MT_STATUS_OVER = "8";
|
|
|
5667
5668
|
var CANCELLED_MARK_DELAY_MS = 800;
|
|
5668
5669
|
async function isCancelledMeeting(env, mtId) {
|
|
5669
5670
|
try {
|
|
5670
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
5671
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
5671
5672
|
const listed = await getMeetingOperation2("meeting.eb.meeting.list").handler(
|
|
5672
5673
|
// withCount:false —— 这里只要一行状态,不必额外请求 count(少一次往返,也便于测试替身)
|
|
5673
5674
|
{ mt_id: mtId, pageNo: 1, pageSize: 1, withCount: false },
|
|
@@ -5712,7 +5713,7 @@ async function resolveDecisionPeople(env, input, ownerId) {
|
|
|
5712
5713
|
}
|
|
5713
5714
|
let nameToId = /* @__PURE__ */ new Map();
|
|
5714
5715
|
if (nameTokens.size > 0) {
|
|
5715
|
-
const { resolveMemberIdsByName } = await import("./schedule-
|
|
5716
|
+
const { resolveMemberIdsByName } = await import("./schedule-DEFAO2RY.js");
|
|
5716
5717
|
nameToId = await resolveMemberIdsByName(env, [...nameTokens]).catch(() => /* @__PURE__ */ new Map());
|
|
5717
5718
|
}
|
|
5718
5719
|
const unresolved = [];
|
|
@@ -5769,7 +5770,34 @@ function normalizeDecisionRows(input) {
|
|
|
5769
5770
|
throw meetingValidationError("invalid_detail", "detail1 \u5FC5\u987B\u662F\u6570\u7EC4\uFF0C\u6BCF\u4E2A\u5143\u7D20\u4E3A\u4E00\u6761\u51B3\u8BAE\u660E\u7EC6", { node: "detail1" });
|
|
5770
5771
|
}
|
|
5771
5772
|
return input.map((row, index) => {
|
|
5772
|
-
const source = row && typeof row === "object" ? row : {};
|
|
5773
|
+
const source = row && typeof row === "object" ? { ...row } : {};
|
|
5774
|
+
const pick = (...names) => names.map((name) => source[name]).find((value) => value !== void 0 && value !== null && String(value).trim() !== "");
|
|
5775
|
+
if (source.decision_title === void 0) {
|
|
5776
|
+
const title = pick("title", "task", "task_title", "decisionTitle");
|
|
5777
|
+
if (title !== void 0) source.decision_title = title;
|
|
5778
|
+
}
|
|
5779
|
+
if (source.executors === void 0) {
|
|
5780
|
+
const executors = pick("executor", "owner", "assignee");
|
|
5781
|
+
if (executors !== void 0) source.executors = Array.isArray(executors) ? executors.join(",") : executors;
|
|
5782
|
+
}
|
|
5783
|
+
if (source.begin_datetime === void 0) {
|
|
5784
|
+
const begin = pick("start", "begin", "start_time", "startTime");
|
|
5785
|
+
if (begin !== void 0) source.begin_datetime = begin;
|
|
5786
|
+
}
|
|
5787
|
+
if (source.end_datetime === void 0) {
|
|
5788
|
+
const end = pick("end", "due", "deadline", "end_time", "endTime");
|
|
5789
|
+
if (end !== void 0) source.end_datetime = end;
|
|
5790
|
+
}
|
|
5791
|
+
if (source.rummager === void 0) {
|
|
5792
|
+
const checker = pick("checker", "reviewer");
|
|
5793
|
+
if (checker !== void 0) source.rummager = checker;
|
|
5794
|
+
}
|
|
5795
|
+
for (const key of ["begin_datetime", "end_datetime"]) {
|
|
5796
|
+
const raw = String(source[key] ?? "").trim();
|
|
5797
|
+
if (raw === "") continue;
|
|
5798
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(raw)) source[key] = raw + " 09:00";
|
|
5799
|
+
else source[key] = raw.replace("T", " ").slice(0, 16);
|
|
5800
|
+
}
|
|
5773
5801
|
return {
|
|
5774
5802
|
// 明细序号与两个状态字段给默认值:调用方通常不关心,缺了会让列表顺序不稳/状态为空。
|
|
5775
5803
|
sort_number: String(index + 1),
|
|
@@ -6294,6 +6322,21 @@ function pickFirst(row, keys) {
|
|
|
6294
6322
|
for (const key of keys) {
|
|
6295
6323
|
const value = row[key];
|
|
6296
6324
|
if (value === void 0 || value === null) continue;
|
|
6325
|
+
if (Array.isArray(value)) {
|
|
6326
|
+
const first = value.find((item) => item !== void 0 && item !== null && String(item).trim() !== "");
|
|
6327
|
+
if (first === void 0) continue;
|
|
6328
|
+
if (typeof first === "object") {
|
|
6329
|
+
const nested = asRecord(first);
|
|
6330
|
+
if (nested) {
|
|
6331
|
+
const inner = pickFirst(nested, keys) || pickFirst(nested, ["id", "name"]);
|
|
6332
|
+
if (inner) return inner;
|
|
6333
|
+
}
|
|
6334
|
+
continue;
|
|
6335
|
+
}
|
|
6336
|
+
const text2 = String(first).trim();
|
|
6337
|
+
if (text2 !== "") return text2;
|
|
6338
|
+
continue;
|
|
6339
|
+
}
|
|
6297
6340
|
if (typeof value === "object") {
|
|
6298
6341
|
const nested = asRecord(value);
|
|
6299
6342
|
if (nested) {
|
|
@@ -6714,7 +6757,7 @@ var deleteMany = {
|
|
|
6714
6757
|
if (args.confirm !== true) {
|
|
6715
6758
|
throw meetingValidationError("confirmation_required", "\u6279\u91CF\u5220\u9664\u4E0D\u53EF\u6062\u590D\uFF0C\u5FC5\u987B\u4F20 confirm=true");
|
|
6716
6759
|
}
|
|
6717
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
6760
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
6718
6761
|
const listOp = getMeetingOperation2("meeting.eb.decisionTask.list");
|
|
6719
6762
|
const prepareOp = getMeetingOperation2("meeting.eb.decisionTask.delete.prepare");
|
|
6720
6763
|
const applyOp = getMeetingOperation2("meeting.eb.decisionTask.delete.apply");
|
|
@@ -6800,6 +6843,114 @@ var deleteMany = {
|
|
|
6800
6843
|
};
|
|
6801
6844
|
var meetingEbDecisionTaskBatchOperations = [deleteMany];
|
|
6802
6845
|
|
|
6846
|
+
// src/shortcuts/meeting/operations/eb/decision-task-reassign.ts
|
|
6847
|
+
function fieldId(value) {
|
|
6848
|
+
if (Array.isArray(value)) {
|
|
6849
|
+
const first = value[0];
|
|
6850
|
+
return String(first?.id ?? "").trim();
|
|
6851
|
+
}
|
|
6852
|
+
if (value && typeof value === "object") return String(value.id ?? "").trim();
|
|
6853
|
+
return String(value ?? "").trim();
|
|
6854
|
+
}
|
|
6855
|
+
async function resolveEmployeeId(env, token) {
|
|
6856
|
+
const value = String(token ?? "").trim();
|
|
6857
|
+
if (/^\d{8,}$/.test(value)) return { id: value, name: value };
|
|
6858
|
+
const { hrmEmployeeOperations } = await import("./employee-DR5Y64TI.js");
|
|
6859
|
+
const query = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.query");
|
|
6860
|
+
if (!query) throw meetingValidationError("employee_query_unavailable", "\u65E0\u6CD5\u89E3\u6790\u59D3\u540D\uFF1A\u5458\u5DE5\u67E5\u8BE2\u64CD\u4F5C\u4E0D\u53EF\u7528");
|
|
6861
|
+
const found = await query.handler({ keyword: value, pageSize: 20 }, env);
|
|
6862
|
+
const rows = found?.data?.rows ?? [];
|
|
6863
|
+
const exact = rows.filter((row) => String(row.name ?? "").trim() === value);
|
|
6864
|
+
if (exact.length === 1) return { id: String(exact[0].id), name: value };
|
|
6865
|
+
if (rows.length === 1) return { id: String(rows[0].id), name: String(rows[0].name ?? value) };
|
|
6866
|
+
throw meetingValidationError(
|
|
6867
|
+
exact.length > 1 ? "employee_ambiguous" : "employee_not_found",
|
|
6868
|
+
exact.length > 1 ? `\u59D3\u540D\u300C${value}\u300D\u547D\u4E2D\u591A\u4EBA\uFF0C\u8BF7\u6539\u7528\u5458\u5DE5 id` : `\u672A\u627E\u5230\u5458\u5DE5\u300C${value}\u300D`,
|
|
6869
|
+
{ candidates: (exact.length > 1 ? exact : rows).slice(0, 10).map((row) => ({ id: row.id, name: row.name })) }
|
|
6870
|
+
);
|
|
6871
|
+
}
|
|
6872
|
+
var reassign = {
|
|
6873
|
+
name: "meeting.eb.decisionTask.reassign",
|
|
6874
|
+
resource: "eb",
|
|
6875
|
+
method: "meeting.eb.decisionTask.reassign",
|
|
6876
|
+
action: "meeting.eb.decisionTask.reassign",
|
|
6877
|
+
summary: "\u6539\u6D3E\u51B3\u8BAE\u4EFB\u52A1\u6267\u884C\u4EBA\uFF08\u5EFA\u65B0\u4EFB\u52A1+\u5220\u65E7\u4EFB\u52A1\uFF1Bupdate \u63A5\u53E3\u6539\u4E0D\u4E86\u6267\u884C\u4EBA\uFF09",
|
|
6878
|
+
capability: "eb.decisionTask",
|
|
6879
|
+
risk: "high-risk-write",
|
|
6880
|
+
requiresConfirmation: true,
|
|
6881
|
+
inputSchema: {
|
|
6882
|
+
type: "object",
|
|
6883
|
+
additionalProperties: false,
|
|
6884
|
+
properties: {
|
|
6885
|
+
confirm: { type: "boolean", description: "\u53EF\u7701\u7565\uFF08\u9ED8\u8BA4\u6267\u884C\uFF09\uFF1B\u4F20 false \u963B\u6B62" },
|
|
6886
|
+
mt_id: { type: "string", minLength: 1 },
|
|
6887
|
+
to_executor: { type: "string", minLength: 1, description: "\u65B0\u6267\u884C\u4EBA\uFF1A\u59D3\u540D\u6216\u5458\u5DE5 id" },
|
|
6888
|
+
from_executor: { type: "string", description: "\u53EA\u6539\u6D3E\u539F\u6267\u884C\u4EBA\u662F\u6B64\u4EBA\uFF08\u59D3\u540D/id\uFF09\u7684\u4EFB\u52A1\uFF1B\u7701\u7565=\u5168\u90E8" },
|
|
6889
|
+
ids: { type: "array", items: { type: "string" }, description: "\u53EA\u6539\u6307\u5B9A\u4EFB\u52A1 id" }
|
|
6890
|
+
},
|
|
6891
|
+
required: ["mt_id", "to_executor"]
|
|
6892
|
+
},
|
|
6893
|
+
handler: async (args, env) => {
|
|
6894
|
+
if (args.confirm === false) throw meetingValidationError("confirmation_required", "confirm=false\uFF0C\u672A\u6267\u884C");
|
|
6895
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
6896
|
+
const mtId = String(args.mt_id ?? "").trim();
|
|
6897
|
+
const target = await resolveEmployeeId(env, String(args.to_executor ?? ""));
|
|
6898
|
+
const from = String(args.from_executor ?? "").trim();
|
|
6899
|
+
const fromId = from === "" ? "" : (await resolveEmployeeId(env, from)).id;
|
|
6900
|
+
const onlyIds = new Set((args.ids ?? []).map((id) => String(id).trim()).filter((id) => id !== ""));
|
|
6901
|
+
const listOp = getMeetingOperation2("meeting.eb.decisionTask.list");
|
|
6902
|
+
const listed = await listOp.handler({ mt_id: mtId, all: true }, env);
|
|
6903
|
+
const rows = (listed?.data?.rows ?? []).map((row) => row?.mainTable ?? row).filter((row) => onlyIds.size === 0 || onlyIds.has(String(row?.id ?? ""))).filter((row) => fromId === "" || fieldId(row?.executors) === fromId);
|
|
6904
|
+
const createPrepare = getMeetingOperation2("meeting.eb.decisionTask.create.prepare");
|
|
6905
|
+
const createApply = getMeetingOperation2("meeting.eb.decisionTask.create.apply");
|
|
6906
|
+
const deletePrepare = getMeetingOperation2("meeting.eb.decisionTask.delete.prepare");
|
|
6907
|
+
const deleteApply = getMeetingOperation2("meeting.eb.decisionTask.delete.apply");
|
|
6908
|
+
const created = [];
|
|
6909
|
+
const failed = [];
|
|
6910
|
+
for (const row of rows) {
|
|
6911
|
+
const oldId = String(row?.id ?? "").trim();
|
|
6912
|
+
const title = String(row?.decision_title ?? "").trim();
|
|
6913
|
+
try {
|
|
6914
|
+
const prepared = await createPrepare.handler(
|
|
6915
|
+
{
|
|
6916
|
+
mt_id: mtId,
|
|
6917
|
+
relate_decision: fieldId(row?.relate_decision),
|
|
6918
|
+
decision_title: title,
|
|
6919
|
+
executors: target.id,
|
|
6920
|
+
rummager: fieldId(row?.rummager) || target.id,
|
|
6921
|
+
begin_datetime: String(row?.begin_datetime ?? ""),
|
|
6922
|
+
end_datetime: String(row?.end_datetime ?? ""),
|
|
6923
|
+
detail1: [{ executor: target.id, finish_status: "0", finish_date: "" }]
|
|
6924
|
+
},
|
|
6925
|
+
env
|
|
6926
|
+
);
|
|
6927
|
+
const applied = await createApply.handler(
|
|
6928
|
+
{ confirm: true, continuation: prepared?.data?.continuation },
|
|
6929
|
+
env
|
|
6930
|
+
);
|
|
6931
|
+
const newId = String((applied?.data?.dataIds ?? [])[0] ?? "").trim();
|
|
6932
|
+
if (!newId) throw new Error("\u521B\u5EFA\u672A\u8FD4\u56DE id");
|
|
6933
|
+
const delPrepared = await deletePrepare.handler({ id: oldId }, env);
|
|
6934
|
+
await deleteApply.handler({ confirm: true, continuation: delPrepared?.data?.continuation }, env);
|
|
6935
|
+
created.push({ oldId, newId, title });
|
|
6936
|
+
} catch (error) {
|
|
6937
|
+
failed.push({ id: oldId, title, error: String(error?.message ?? error).slice(0, 160) });
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
return meetingSuccess("meeting.eb.decisionTask.reassign", {
|
|
6941
|
+
status: failed.length === 0 ? "COMPLETE" : created.length > 0 ? "PARTIAL" : "FAILED",
|
|
6942
|
+
mtId,
|
|
6943
|
+
toExecutor: target,
|
|
6944
|
+
matched: rows.length,
|
|
6945
|
+
reassigned: created.length,
|
|
6946
|
+
created,
|
|
6947
|
+
failed,
|
|
6948
|
+
hint: "\u56DE\u67E5 decisionTask.list \u770B executors \u662F\u5426\u4E3A\u65B0\u4EBA\uFF1B\u65E7\u4EFB\u52A1\u5DF2\u5220\u9664"
|
|
6949
|
+
});
|
|
6950
|
+
}
|
|
6951
|
+
};
|
|
6952
|
+
var meetingEbDecisionTaskReassignOperations = [reassign];
|
|
6953
|
+
|
|
6803
6954
|
// src/shortcuts/meeting/operations/eb/index.ts
|
|
6804
6955
|
var ebAutoRoomPreflight = async (context) => {
|
|
6805
6956
|
const { extras } = context;
|
|
@@ -6887,7 +7038,7 @@ var ebAutoInvitationAfterWrite = async (context) => {
|
|
|
6887
7038
|
const mtId = String(context.dataIds?.[0] ?? "").trim();
|
|
6888
7039
|
if (!isCreate || !enabled || !mtId) return association;
|
|
6889
7040
|
try {
|
|
6890
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
7041
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
6891
7042
|
const render = getMeetingOperation2("meeting.invitation.render");
|
|
6892
7043
|
const result = await render.handler({ mtId }, context.env);
|
|
6893
7044
|
return { ...association ?? {}, invitation: result?.data ?? null };
|
|
@@ -6923,7 +7074,7 @@ var ebOperationsWithLinks = ebBaseOperations.map((operation) => {
|
|
|
6923
7074
|
const raw = String(args.member).trim();
|
|
6924
7075
|
let uid = /^\d+$/.test(raw) ? raw : "";
|
|
6925
7076
|
if (!uid) {
|
|
6926
|
-
const { resolveMemberIdsByName } = await import("./schedule-
|
|
7077
|
+
const { resolveMemberIdsByName } = await import("./schedule-DEFAO2RY.js");
|
|
6927
7078
|
const map = await resolveMemberIdsByName(env, [raw]).catch(() => /* @__PURE__ */ new Map());
|
|
6928
7079
|
uid = String(map.get(raw) ?? "");
|
|
6929
7080
|
}
|
|
@@ -6962,7 +7113,7 @@ var ebOperationsWithMinuteDoc = ebOperationsWithLinks.map((operation) => {
|
|
|
6962
7113
|
if (!String(nextArgs.mt_minutes_subject ?? "").trim() && nextArgs.mt_id) {
|
|
6963
7114
|
let meetingName = "";
|
|
6964
7115
|
try {
|
|
6965
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
7116
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
6966
7117
|
const detailOp = getMeetingOperation2("meeting.eb.meeting.detail");
|
|
6967
7118
|
const detail = await detailOp.handler({ id: String(nextArgs.mt_id) }, env);
|
|
6968
7119
|
const row = detail?.data?.data ?? {};
|
|
@@ -6982,8 +7133,8 @@ var ebOperationsWithMinuteDoc = ebOperationsWithLinks.map((operation) => {
|
|
|
6982
7133
|
handler: async (args, env) => {
|
|
6983
7134
|
const result = await operation.handler(args, env);
|
|
6984
7135
|
try {
|
|
6985
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
6986
|
-
const { ensureMinuteDoc } = await import("./minute-doc-
|
|
7136
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
7137
|
+
const { ensureMinuteDoc } = await import("./minute-doc-JXH3MNC7.js");
|
|
6987
7138
|
const minuteId = String((result?.data?.dataIds ?? [])[0] ?? "").trim();
|
|
6988
7139
|
if (minuteId) {
|
|
6989
7140
|
const detail = await getMeetingOperation2("meeting.eb.minute.detail").handler({ id: minuteId }, env);
|
|
@@ -7012,6 +7163,7 @@ var meetingEbOperations = [
|
|
|
7012
7163
|
...decisionPublishAliases,
|
|
7013
7164
|
...minuteCreateAliases,
|
|
7014
7165
|
...meetingEbDecisionTaskBatchOperations,
|
|
7166
|
+
...meetingEbDecisionTaskReassignOperations,
|
|
7015
7167
|
...meetingEbScheduleOperations,
|
|
7016
7168
|
...meetingEbCrmOperations,
|
|
7017
7169
|
...meetingEbCreateFlowOperations,
|
|
@@ -7104,7 +7256,7 @@ var composeOutcome = {
|
|
|
7104
7256
|
if (args.confirm === false) {
|
|
7105
7257
|
throw meetingValidationError("confirmation_required", "\u4F20\u4E86 confirm=false\uFF0C\u5DF2\u963B\u6B62\u5199\u5165");
|
|
7106
7258
|
}
|
|
7107
|
-
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-
|
|
7259
|
+
const { getMeetingOperation: getMeetingOperation2 } = await import("./registry-WZCCBI5L.js");
|
|
7108
7260
|
let mtId = String(args.mt_id ?? "").trim();
|
|
7109
7261
|
if (!mtId) {
|
|
7110
7262
|
const listOp2 = getMeetingOperation2("meeting.eb.meeting.list");
|
|
@@ -7220,9 +7372,12 @@ var composeOutcome = {
|
|
|
7220
7372
|
{ confirm: true, continuation: decisionPrepared?.data?.continuation },
|
|
7221
7373
|
env
|
|
7222
7374
|
);
|
|
7375
|
+
const urlMap = await meetingUrlMap(env, [mtId]);
|
|
7376
|
+
const meetingUrl = urlMap.get(mtId) ?? "";
|
|
7223
7377
|
return meetingSuccess("meeting.outcome.compose", {
|
|
7224
7378
|
status: "COMPLETE",
|
|
7225
7379
|
mtId,
|
|
7380
|
+
...meetingUrl ? { meetingUrl } : {},
|
|
7226
7381
|
minuteId,
|
|
7227
7382
|
minuteDoc,
|
|
7228
7383
|
minutesStatus: "2",
|
|
@@ -7271,7 +7426,19 @@ function buildRegistry() {
|
|
|
7271
7426
|
if (registry.has(definition.name)) {
|
|
7272
7427
|
throw new Error(`duplicate meeting operation: ${definition.name}`);
|
|
7273
7428
|
}
|
|
7274
|
-
|
|
7429
|
+
const original = definition.handler;
|
|
7430
|
+
registry.set(definition.name, {
|
|
7431
|
+
...definition,
|
|
7432
|
+
handler: async (args, env) => {
|
|
7433
|
+
const startedAt = Date.now();
|
|
7434
|
+
const result = await original(args, env);
|
|
7435
|
+
if (args?.debugTimings === true && result && typeof result === "object") {
|
|
7436
|
+
const marks = { ...env?.__meetingTimings ?? {} };
|
|
7437
|
+
result.data = { ...result.data ?? {}, timings: { ...marks, totalMs: Date.now() - startedAt } };
|
|
7438
|
+
}
|
|
7439
|
+
return result;
|
|
7440
|
+
}
|
|
7441
|
+
});
|
|
7275
7442
|
}
|
|
7276
7443
|
return registry;
|
|
7277
7444
|
}
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-WMRNO6IU.js";
|
|
6
6
|
import {
|
|
7
7
|
meetingStateDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I3BFBBP2.js";
|
|
9
9
|
import {
|
|
10
10
|
SCHEMA_ID,
|
|
11
11
|
meetingSuccess,
|
|
12
12
|
meetingValidationError,
|
|
13
13
|
schemaOf
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CI2RF3AJ.js";
|
|
15
15
|
|
|
16
16
|
// src/shortcuts/meeting/operations/attachment-content.ts
|
|
17
17
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
meetingValidationError,
|
|
13
13
|
queryBody,
|
|
14
14
|
toIdCsv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CI2RF3AJ.js";
|
|
16
16
|
|
|
17
17
|
// src/shortcuts/meeting/operations/eb/conflict.ts
|
|
18
18
|
var ACTIVE_MT_STATUS = "1,2,8,9";
|
|
@@ -296,7 +296,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
|
|
|
296
296
|
const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
|
|
297
297
|
const nameLike = items.filter((item) => !/^\d+$/u.test(item));
|
|
298
298
|
if (nameLike.length > 0) {
|
|
299
|
-
const { resolveMemberIdsByName } = await import("./schedule-
|
|
299
|
+
const { resolveMemberIdsByName } = await import("./schedule-DEFAO2RY.js");
|
|
300
300
|
const idsByName = await resolveMemberIdsByName(env, nameLike);
|
|
301
301
|
const resolved = items.map((item) => idsByName.get(item) ?? item);
|
|
302
302
|
payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
|
|
@@ -429,7 +429,7 @@ var ebConflictRoom = {
|
|
|
429
429
|
let addressId = String(args.address ?? "").trim();
|
|
430
430
|
let resolvedRoom = null;
|
|
431
431
|
if (!addressId && String(args.room_name ?? "").trim()) {
|
|
432
|
-
const { resolveAddressRoom } = await import("./create-flow-
|
|
432
|
+
const { resolveAddressRoom } = await import("./create-flow-JHQSA6JF.js");
|
|
433
433
|
const resolved = await resolveAddressRoom(env, String(args.room_name));
|
|
434
434
|
if (!resolved?.id) {
|
|
435
435
|
throw meetingValidationError(
|
|
@@ -639,7 +639,7 @@ async function findCommonFreeSlots(env, input) {
|
|
|
639
639
|
const scheduleItems = [];
|
|
640
640
|
if (includeSchedule) {
|
|
641
641
|
try {
|
|
642
|
-
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-
|
|
642
|
+
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-DEFAO2RY.js");
|
|
643
643
|
const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
|
|
644
644
|
const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
|
|
645
645
|
const flow = await runScheduleConflictFlow(env, {
|
|
@@ -2,7 +2,7 @@ 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-I3BFBBP2.js";
|
|
6
6
|
|
|
7
7
|
// src/shortcuts/meeting/operations/eb/cache.ts
|
|
8
8
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -1898,7 +1898,12 @@ function buildMultipart(fields, file) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
if (file) {
|
|
1900
1900
|
const mime = MIME_BY_EXT[extname(file.meta.name).toLowerCase()] || "application/octet-stream";
|
|
1901
|
-
|
|
1901
|
+
const bytes = new Uint8Array(
|
|
1902
|
+
file.meta.content.buffer,
|
|
1903
|
+
file.meta.content.byteOffset,
|
|
1904
|
+
file.meta.content.byteLength
|
|
1905
|
+
);
|
|
1906
|
+
form.append(file.field, new Blob([bytes], { type: mime }), file.meta.name);
|
|
1902
1907
|
}
|
|
1903
1908
|
return form;
|
|
1904
1909
|
}
|
|
@@ -2078,6 +2083,14 @@ var FOLDER_TYPES = ["company", "privy", "sys"];
|
|
|
2078
2083
|
var MARKDOWN_ALLOWED_EXT = [".md", ".markdown"];
|
|
2079
2084
|
var CREATE_DETAIL_PATH = "/api/doc/document/createDetail";
|
|
2080
2085
|
var MAX_UPLOAD_WORKERS = 8;
|
|
2086
|
+
var MAX_UPLOAD_WORKERS_CAP = 32;
|
|
2087
|
+
function uploadMaxWorkers() {
|
|
2088
|
+
const raw = process.env.WEAVER_CAIZHILIAN_UPLOAD_MAX_WORKERS;
|
|
2089
|
+
if (raw === void 0) return MAX_UPLOAD_WORKERS;
|
|
2090
|
+
const parsed = Number(raw);
|
|
2091
|
+
if (!Number.isInteger(parsed) || parsed < 1) return MAX_UPLOAD_WORKERS;
|
|
2092
|
+
return Math.min(parsed, MAX_UPLOAD_WORKERS_CAP);
|
|
2093
|
+
}
|
|
2081
2094
|
var FIELD_MAP = {
|
|
2082
2095
|
name: { filed: "name", argKey: "name", allowEmpty: false },
|
|
2083
2096
|
keywords: { filed: "keywords", argKey: "keywords", allowEmpty: true },
|
|
@@ -2493,8 +2506,18 @@ async function planCreateByUpload(args, env, action) {
|
|
|
2493
2506
|
sharers: JSON.stringify(sharers),
|
|
2494
2507
|
extraParameters: "{}"
|
|
2495
2508
|
};
|
|
2509
|
+
const settledMetas = await mapWithConcurrency(filePaths, uploadMaxWorkers(), async (filePath) => {
|
|
2510
|
+
try {
|
|
2511
|
+
return { ok: true, meta: await readFileMetadata(filePath) };
|
|
2512
|
+
} catch (error) {
|
|
2513
|
+
return { ok: false, error };
|
|
2514
|
+
}
|
|
2515
|
+
});
|
|
2496
2516
|
const metas = [];
|
|
2497
|
-
for (const
|
|
2517
|
+
for (const item of settledMetas) {
|
|
2518
|
+
if (item.ok) metas.push(item.meta);
|
|
2519
|
+
else throw item.error;
|
|
2520
|
+
}
|
|
2498
2521
|
return {
|
|
2499
2522
|
filePaths,
|
|
2500
2523
|
folderId,
|
|
@@ -2579,7 +2602,7 @@ var createByUploadHandler = {
|
|
|
2579
2602
|
upload: {
|
|
2580
2603
|
path: "/api/file/module/upload",
|
|
2581
2604
|
extra_result_fields: ["docId"],
|
|
2582
|
-
max_workers:
|
|
2605
|
+
max_workers: uploadMaxWorkers(),
|
|
2583
2606
|
deferred_to_apply: true
|
|
2584
2607
|
}
|
|
2585
2608
|
},
|
|
@@ -2596,7 +2619,7 @@ var createByUploadHandler = {
|
|
|
2596
2619
|
return caizhilianSuccess(action, data, { batch: false }, plan.warnings);
|
|
2597
2620
|
}
|
|
2598
2621
|
const warnings = [...plan.warnings];
|
|
2599
|
-
const results = await mapWithConcurrency(plan.metas,
|
|
2622
|
+
const results = await mapWithConcurrency(plan.metas, uploadMaxWorkers(), async (meta, index) => {
|
|
2600
2623
|
try {
|
|
2601
2624
|
return await uploadOneDocument(env, meta, plan, action);
|
|
2602
2625
|
} catch (error) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
cacheScopeSuffix,
|
|
5
5
|
readCache,
|
|
6
6
|
writeCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U2DWV6JC.js";
|
|
8
8
|
import {
|
|
9
9
|
EB_BASE,
|
|
10
10
|
SCHEMA_DATETIME_MINUTE,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
meetingSuccess,
|
|
14
14
|
queryBody,
|
|
15
15
|
schemaOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CI2RF3AJ.js";
|
|
17
17
|
|
|
18
18
|
// src/shortcuts/meeting/operations/eb/usage-cache.ts
|
|
19
19
|
var USAGE_TTL_MS = 5 * 60 * 1e3;
|
|
@@ -88,7 +88,7 @@ async function clearCache(env, key) {
|
|
|
88
88
|
try {
|
|
89
89
|
const { rm } = await import("node:fs/promises");
|
|
90
90
|
const { join } = await import("node:path");
|
|
91
|
-
const { meetingStateDir } = await import("./env-
|
|
91
|
+
const { meetingStateDir } = await import("./env-LQBLL3MZ.js");
|
|
92
92
|
await rm(join(meetingStateDir(env.ctx), "cache", `${key}.json`), { force: true });
|
|
93
93
|
} catch {
|
|
94
94
|
}
|
|
@@ -221,7 +221,7 @@ async function loadFrequentRooms(env, options = {}) {
|
|
|
221
221
|
const counts = /* @__PURE__ */ new Map();
|
|
222
222
|
let requests = 0;
|
|
223
223
|
try {
|
|
224
|
-
const { getMeetingOperation } = await import("./registry-
|
|
224
|
+
const { getMeetingOperation } = await import("./registry-WZCCBI5L.js");
|
|
225
225
|
const listOp = getMeetingOperation("meeting.eb.meeting.list");
|
|
226
226
|
let seen = 0;
|
|
227
227
|
let total = 0;
|