weaver-work-cli 0.1.47 → 0.1.48
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/{archive-oa-BBDP7AKJ.js → archive-oa-EDJDU3V4.js} +454 -5
- package/dist/chunks/{attachment-content-MCXQBD6N.js → attachment-content-4KSNBPRO.js} +3 -3
- package/dist/chunks/{chunk-J2VEB5K3.js → chunk-2BQESR2U.js} +2 -2
- package/dist/chunks/{chunk-727FH2NI.js → chunk-2IGZUMNG.js} +15 -2
- package/dist/chunks/{chunk-76H3IKH6.js → chunk-5B5JXTY2.js} +35 -35
- package/dist/chunks/{chunk-Q4OYAQYH.js → chunk-72MI3MBX.js} +4 -0
- package/dist/chunks/{chunk-4RWS2YYL.js → chunk-BCACE6VV.js} +2 -2
- package/dist/chunks/{chunk-AD46OMQK.js → chunk-EFOUMXIX.js} +119 -44
- package/dist/chunks/{chunk-IRMIEDXN.js → chunk-FEP6ELMR.js} +1 -1
- package/dist/chunks/{chunk-LIEQJIGM.js → chunk-GR76ZDDX.js} +0 -3
- package/dist/chunks/{chunk-JB34OE7R.js → chunk-NBEWUR7L.js} +1 -1
- package/dist/chunks/{chunk-6V5ZPKHV.js → chunk-NK74RE5F.js} +2 -2
- package/dist/chunks/{chunk-GSZTA43P.js → chunk-OCYRVZGN.js} +2 -2
- package/dist/chunks/{chunk-OXHHJWNC.js → chunk-PSPOFLSU.js} +1 -1
- package/dist/chunks/{chunk-6AXKWFKG.js → chunk-R2HHLJNN.js} +4 -4
- package/dist/chunks/{chunk-PSOMGA3U.js → chunk-SVFG6EMV.js} +35 -6
- package/dist/chunks/{chunk-IP4CWQCF.js → chunk-WMSAWAWZ.js} +8 -8
- package/dist/chunks/{conflict-H7EHQXYY.js → conflict-APGSD5E7.js} +2 -2
- package/dist/chunks/{contract-3QLAGYQL.js → contract-N6P2HIIE.js} +425 -187
- package/dist/chunks/{create-flow-VRVJEOBX.js → create-flow-5TXFOC7X.js} +6 -6
- package/dist/chunks/{ehr-SH2LM3NK.js → ehr-XI4BIVR2.js} +16 -5
- package/dist/chunks/{env-66FPSJDV.js → env-B6GKA2J3.js} +2 -2
- package/dist/chunks/{factory-UH2TZBVA.js → factory-MFCKLUT6.js} +1 -1
- package/dist/chunks/{group-chat-CAKMMV7K.js → group-chat-YE7WIBFO.js} +3 -3
- package/dist/chunks/{im-NJB7ZYMH.js → im-3RCNL5GT.js} +107 -1
- package/dist/chunks/{invoice-UEAHSYAE.js → invoice-FXWH5GPO.js} +2 -71
- package/dist/chunks/{lazy-dispatch-25XGTXLM.js → lazy-dispatch-XSAHDK6Z.js} +3 -3
- package/dist/chunks/{meeting-VTBFW4HI.js → meeting-RYZV2JTQ.js} +10 -10
- package/dist/chunks/{reception-5WITA44R.js → reception-VL6TKVAW.js} +480 -26
- package/dist/chunks/{recruit-stage-CAKZTUA7.js → recruit-stage-ERZD3ZNB.js} +52 -16
- package/dist/chunks/{registry-JVQBLFQ5.js → registry-22O6UG4I.js} +10 -10
- package/dist/chunks/{registry-AQVGHUM6.js → registry-7VZ6YJUF.js} +2 -2
- package/dist/chunks/{registry-PVUZQDDQ.js → registry-BUTEDK3C.js} +1 -1
- package/dist/chunks/{room-recommend-5U55FMXZ.js → room-recommend-IMZPJMYB.js} +4 -4
- package/dist/chunks/{schedule-IDETODCA.js → schedule-SPPAHER2.js} +4 -4
- package/dist/chunks/{workflow-BSYT5TGL.js → workflow-WVEFJ6KC.js} +2 -2
- package/dist/core/refs.js +19 -2
- package/dist/index.js +14 -14
- package/dist/shortcuts/archive-oa/constants.js +42 -0
- package/dist/shortcuts/archive-oa/host.js +2 -2
- package/dist/shortcuts/archive-oa/index.js +38 -0
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +117 -3
- package/dist/shortcuts/archive-oa/operations/my-borrow-contract.js +271 -0
- package/dist/shortcuts/archive-oa/operations/registry.js +5 -3
- package/dist/shortcuts/contract/index.js +9 -1
- package/dist/shortcuts/contract/manifest.js +14 -2
- package/dist/shortcuts/contract/operations/card.js +231 -0
- package/dist/shortcuts/contract/operations/registry.js +2 -0
- package/dist/shortcuts/contract/operations/review.js +16 -5
- package/dist/shortcuts/contract/operations/summary.js +25 -17
- package/dist/shortcuts/ehr/operations/recruit-write.js +22 -5
- package/dist/shortcuts/ehr/recruit-stage/operations/interview-arrange.js +17 -8
- package/dist/shortcuts/ehr/recruit-stage/shared.js +33 -8
- package/dist/shortcuts/im/index.js +128 -0
- package/dist/shortcuts/im/operations/session.js +6 -0
- package/dist/shortcuts/invoice/host.js +0 -3
- package/dist/shortcuts/invoice/manifest.js +0 -1
- package/dist/shortcuts/invoice/operations/reim-subsidy.js +1 -71
- package/dist/shortcuts/meeting/operations/eb/conflict.js +26 -3
- package/dist/shortcuts/meeting/operations/eb/continuation-alias.js +63 -0
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +71 -12
- package/dist/shortcuts/meeting/operations/eb/factory.js +5 -3
- package/dist/shortcuts/reception/host.js +33 -1
- package/dist/shortcuts/reception/index.js +19 -0
- package/dist/shortcuts/reception/manifest.js +53 -1
- package/dist/shortcuts/reception/operations/ask.js +18 -0
- package/dist/shortcuts/reception/operations/compose.js +113 -3
- package/dist/shortcuts/reception/operations/leads.js +245 -0
- package/dist/shortcuts/reception/operations/markdown.js +22 -0
- package/dist/shortcuts/reception/operations/registry.js +2 -0
- package/dist/shortcuts/reception/operations/render.js +36 -3
- package/dist/shortcuts/reception/operations/restaurant-rooms.js +118 -0
- package/dist/shortcuts/reception/operations/restaurant.js +251 -0
- package/dist/shortcuts/reception/operations/restaurantrooms.js +42 -0
- package/dist/shortcuts/reception/operations/schedule.js +7 -1
- package/dist/shortcuts/reception/upload.js +22 -6
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +17 -8
- package/dist/shortcuts/recruit-stage/shared.js +42 -14
- package/docs/archive-oa.md +4 -2
- package/package.json +1 -1
- package/skill-template/domains/archive-oa.md +2 -1
- package/skill-template/master-skill-template.md +1 -0
- package/skill-template/skill-template.md +1 -0
- package/skills/weaver-e10-archive-oa/SKILL.md +33 -6
- package/skills/weaver-e10-archive-oa/references/borrow-car.md +32 -7
- package/skills/weaver-e10-archive-oa/references/contract-search.md +32 -0
- package/skills/weaver-e10-archive-oa/references/disabled-capabilities.md +1 -1
- package/skills/weaver-e10-archive-oa/references/my-borrow-contract.md +97 -0
- package/skills/weaver-e10-archive-oa/references/my-borrow.md +6 -1
- package/skills/weaver-e10-archive-oa/references/qys-contract-search.md +22 -0
- package/skills/weaver-e10-calendar/SKILL.md +1 -1
- package/skills/weaver-e10-calendar/references/calendar-query.md +1 -1
- package/skills/weaver-e10-calendar/references/calendar-write.md +9 -9
- package/skills/weaver-e10-cowork/SKILL.md +9 -6
- package/skills/weaver-e10-jinchengda/SKILL.md +10 -7
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +17 -0
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +263 -35
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +8 -5
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +175 -22
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +124 -19
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +6 -0
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +178 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +7 -7
- package/skills/weaver-e10-jinchengda/scripts/plan_actions.py +279 -0
- package/skills/weaver-e10-jinchengda/scripts/render_action_card.py +450 -0
- package/skills/weaver-e10-jinchengda/scripts/render_risk_report.py +358 -0
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +505 -0
- package/skills/weaver-e10-jucailin/SKILL.md +7 -4
- package/skills/weaver-e10-jucailin/references/recruit-create.md +3 -2
- package/skills/weaver-e10-jucailin/references/recruit-read.md +2 -1
- package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +3 -3
- package/skills/weaver-e10-jucailin/references/safety-boundaries.md +30 -2
- package/skills/weaver-e10-mail/SKILL.md +17 -4
- package/skills/weaver-e10-meeting/SKILL.md +94 -409
- package/skills/weaver-e10-meeting/references/create-flow.md +188 -0
- package/skills/weaver-e10-meeting/references/create-guardrails.md +234 -0
- package/skills/weaver-e10-meeting/references/pitfalls.md +40 -0
- package/skills/weaver-e10-reception-flow/SKILL.md +62 -18
- package/skills/weaver-e10-reception-flow/data/fields-snapshot.json +628 -26
- package/skills/weaver-e10-reception-flow/references/fields-snapshot.md +96 -26
- package/skills/weaver-e10-reception-flow/scripts/render.py +81 -2
- package/skills/weaver-e10-recruit-stage/SKILL.md +45 -12
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +58 -8
- package/skills/weaver-e10-recruit-stage/references/position-templates.md +5 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +40 -11
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +16 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +1 -1
- package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +127 -0
- package/skills/weaver-e10-shijingran/SKILL.md +6 -2
- package/skills/weaver-e10-shijingran/references/source-manifest.json +5 -4
- package/skills/weaver-e10-workflow/SKILL.md +1 -1
- package/skills/weaver-e10-yepiaotong/SKILL.md +8 -4
- package/skills/weaver-e10-yepiaotong/references/invoice-issuing-workflow.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +1 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +2 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +32 -0
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +3 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +11 -11
- package/dist/chunks/{ebuilder-form-GWDTKEI2.js → ebuilder-form-I5ZIX4WO.js} +3 -3
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-README.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-SKILL.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-openai.yaml +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-position-templates.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-arrange-interview.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-capability-check.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-check-install.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-detail-process.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-edit-interview-feedback.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-create.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-jd-template.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-candidate.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-list-interview.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-match-candidates.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-output-links.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-creator.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resolve-metadata.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-import.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-resume-parse.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-search-candidate.md +0 -0
- /package/{skills → docs/legacy}/weaver-e10-jucailin/archive/LEGACY-recruit-urge-feedback.md +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
fetchEbAppSettings,
|
|
5
|
+
findCommonFreeSlots
|
|
6
|
+
} from "./chunk-SVFG6EMV.js";
|
|
3
7
|
import {
|
|
4
8
|
dayOf,
|
|
5
9
|
filterUsages,
|
|
@@ -8,16 +12,12 @@ import {
|
|
|
8
12
|
loadDayUsages,
|
|
9
13
|
loadRooms,
|
|
10
14
|
recommendRooms
|
|
11
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-R2HHLJNN.js";
|
|
12
16
|
import {
|
|
13
17
|
cacheScopeSuffix,
|
|
14
18
|
readCache,
|
|
15
19
|
writeCache
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
fetchEbAppSettings,
|
|
19
|
-
findCommonFreeSlots
|
|
20
|
-
} from "./chunk-PSOMGA3U.js";
|
|
20
|
+
} from "./chunk-PSPOFLSU.js";
|
|
21
21
|
import {
|
|
22
22
|
EB_BASE,
|
|
23
23
|
SCHEMA_DATETIME_MINUTE,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
meetingValidationError,
|
|
27
27
|
schemaOf,
|
|
28
28
|
writeBody
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-NK74RE5F.js";
|
|
30
30
|
import {
|
|
31
31
|
CONTINUATION_TTL_MS,
|
|
32
32
|
CONTINUATION_TTL_SECONDS
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
|
|
35
35
|
// src/shortcuts/meeting/operations/eb/create-flow.ts
|
|
36
36
|
import { existsSync } from "node:fs";
|
|
37
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
38
|
-
import { homedir } from "node:os";
|
|
37
|
+
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
38
|
+
import { homedir as homedir2 } from "node:os";
|
|
39
39
|
import { resolve } from "node:path";
|
|
40
40
|
|
|
41
41
|
// src/shortcuts/meeting/operations/eb/flow-memory.ts
|
|
@@ -124,6 +124,51 @@ async function clearMeetingDraft(env, mtName) {
|
|
|
124
124
|
await writeCache(env, key, all);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
// src/shortcuts/meeting/operations/eb/continuation-alias.ts
|
|
128
|
+
import { randomBytes } from "node:crypto";
|
|
129
|
+
import { mkdir, readFile, writeFile, readdir, stat, unlink } from "node:fs/promises";
|
|
130
|
+
import { homedir } from "node:os";
|
|
131
|
+
import { join } from "node:path";
|
|
132
|
+
function storeDir() {
|
|
133
|
+
return join(homedir(), ".weaver-work-cli", "meeting", "state", "continuations");
|
|
134
|
+
}
|
|
135
|
+
async function saveContinuationAlias(token, ttlMs) {
|
|
136
|
+
const id = randomBytes(4).toString("hex");
|
|
137
|
+
const dir = storeDir();
|
|
138
|
+
await mkdir(dir, { recursive: true });
|
|
139
|
+
await writeFile(join(dir, `${id}.json`), JSON.stringify({ token, exp: Date.now() + ttlMs }), "utf8");
|
|
140
|
+
void pruneExpired(dir);
|
|
141
|
+
return id;
|
|
142
|
+
}
|
|
143
|
+
async function resolveContinuationAlias(id) {
|
|
144
|
+
const text = String(id ?? "").trim();
|
|
145
|
+
if (!/^[0-9a-f]{8}$/u.test(text)) return null;
|
|
146
|
+
try {
|
|
147
|
+
const raw = await readFile(join(storeDir(), `${text}.json`), "utf8");
|
|
148
|
+
const parsed = JSON.parse(raw);
|
|
149
|
+
if (!parsed.token || Number(parsed.exp ?? 0) <= Date.now()) return null;
|
|
150
|
+
return parsed.token;
|
|
151
|
+
} catch {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
async function pruneExpired(dir) {
|
|
156
|
+
try {
|
|
157
|
+
const names = await readdir(dir);
|
|
158
|
+
const now = Date.now();
|
|
159
|
+
for (const name of names) {
|
|
160
|
+
if (!name.endsWith(".json")) continue;
|
|
161
|
+
const full = join(dir, name);
|
|
162
|
+
try {
|
|
163
|
+
const info = await stat(full);
|
|
164
|
+
if (now - info.mtimeMs > 24 * 60 * 60 * 1e3) await unlink(full);
|
|
165
|
+
} catch {
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
127
172
|
// src/shortcuts/meeting/operations/eb/person-cache.ts
|
|
128
173
|
var PERSON_TTL_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
129
174
|
var BATCH_MAX = 100;
|
|
@@ -228,7 +273,7 @@ function workflowEnv(env) {
|
|
|
228
273
|
async function loadCreateForm(env, workflowId) {
|
|
229
274
|
const { createWorkflowHost } = await import("./host-TUOIOEMC.js");
|
|
230
275
|
const { createWorkflowContinuationSigner } = await import("./continuation-HFW2YT5S.js");
|
|
231
|
-
const { getWorkflowOperation } = await import("./registry-
|
|
276
|
+
const { getWorkflowOperation } = await import("./registry-7VZ6YJUF.js");
|
|
232
277
|
const wfEnv = {
|
|
233
278
|
...workflowEnv(env),
|
|
234
279
|
host: createWorkflowHost(env.ctx),
|
|
@@ -333,7 +378,7 @@ async function resolveAddressRoom(env, input) {
|
|
|
333
378
|
const text = String(input ?? "").trim();
|
|
334
379
|
if (!text) return null;
|
|
335
380
|
const ref = parseRoomRef(text);
|
|
336
|
-
const { loadRooms: loadRooms2 } = await import("./room-recommend-
|
|
381
|
+
const { loadRooms: loadRooms2 } = await import("./room-recommend-IMZPJMYB.js");
|
|
337
382
|
let rooms = [];
|
|
338
383
|
try {
|
|
339
384
|
rooms = (await loadRooms2(env, {})).rooms;
|
|
@@ -342,6 +387,15 @@ async function resolveAddressRoom(env, input) {
|
|
|
342
387
|
}
|
|
343
388
|
const hit = (ref.id ? rooms.find((room) => room.id === ref.id) : void 0) ?? (ref.name ? rooms.find((room) => room.name === ref.name) : void 0);
|
|
344
389
|
if (hit) return { id: hit.id, name: hit.name, status: hit.status, statusText: hit.statusText };
|
|
390
|
+
const keyword = (ref.name ?? text).trim();
|
|
391
|
+
if (keyword) {
|
|
392
|
+
const loose = rooms.filter((room) => room.name.includes(keyword));
|
|
393
|
+
if (loose.length === 1) {
|
|
394
|
+
const only = loose[0];
|
|
395
|
+
return { id: only.id, name: only.name, status: only.status, statusText: only.statusText };
|
|
396
|
+
}
|
|
397
|
+
if (loose.length > 1) return null;
|
|
398
|
+
}
|
|
345
399
|
if (ref.id) return { id: ref.id, name: ref.name ?? "", status: "unknown" };
|
|
346
400
|
return null;
|
|
347
401
|
}
|
|
@@ -355,7 +409,7 @@ async function resolveRoomValue(env, input) {
|
|
|
355
409
|
const ref = parseRoomRef(text);
|
|
356
410
|
if (ref.id) {
|
|
357
411
|
try {
|
|
358
|
-
const { getMeetingOperation } = await import("./registry-
|
|
412
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
359
413
|
const detail = await getMeetingOperation("meeting.eb.room.detail").handler({ id: ref.id }, env);
|
|
360
414
|
const main = detail?.data?.mainTable ?? detail?.data?.data?.mainTable ?? {};
|
|
361
415
|
const name = String(main.room_name ?? "").trim() || ref.name || "";
|
|
@@ -467,7 +521,7 @@ async function shapeBrowserValues(env, values) {
|
|
|
467
521
|
const nameOnly = rows.filter((row) => row.id === "" && row.name !== "");
|
|
468
522
|
if (nameOnly.length > 0) {
|
|
469
523
|
try {
|
|
470
|
-
const { getMeetingOperation } = await import("./registry-
|
|
524
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
471
525
|
const search = getMeetingOperation("meeting.eb.crm.search");
|
|
472
526
|
for (const row of nameOnly) {
|
|
473
527
|
const found = await search.handler({ keyword: row.name, limit: 5 }, env).catch(() => null);
|
|
@@ -661,7 +715,7 @@ async function resolveAutoCrmDetailRows(env, raw) {
|
|
|
661
715
|
const missing = [];
|
|
662
716
|
if (entries.length > 0) {
|
|
663
717
|
try {
|
|
664
|
-
const { getMeetingOperation } = await import("./registry-
|
|
718
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
665
719
|
const search = getMeetingOperation("meeting.eb.crm.search");
|
|
666
720
|
for (const entry of entries) {
|
|
667
721
|
if (entry.contacts.length > 0) continue;
|
|
@@ -827,7 +881,7 @@ function renderFormPreview(fields, main) {
|
|
|
827
881
|
}
|
|
828
882
|
function flowFieldCacheDir(env) {
|
|
829
883
|
const configured = env?.ctx?.config?.path?.();
|
|
830
|
-
const root = configured ? resolve(String(configured), "..") : process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(
|
|
884
|
+
const root = configured ? resolve(String(configured), "..") : process.env.WEAVER_WORK_CLI_HOME || process.env.WORK_CLI_HOME || resolve(homedir2(), ".weaver-work-cli");
|
|
831
885
|
return resolve(root, "meeting", "cache");
|
|
832
886
|
}
|
|
833
887
|
function flowFieldCacheFile(env, workflowId) {
|
|
@@ -837,7 +891,7 @@ async function readFlowFieldMap(env, workflowId) {
|
|
|
837
891
|
try {
|
|
838
892
|
const file = flowFieldCacheFile(env, workflowId);
|
|
839
893
|
if (!existsSync(file)) return {};
|
|
840
|
-
const parsed = JSON.parse(await
|
|
894
|
+
const parsed = JSON.parse(await readFile2(file, "utf8"));
|
|
841
895
|
return parsed && typeof parsed.mapping === "object" && parsed.mapping ? parsed.mapping : {};
|
|
842
896
|
} catch {
|
|
843
897
|
return {};
|
|
@@ -847,14 +901,14 @@ async function writeFlowFieldMap(env, workflowId, workflowName, mapping) {
|
|
|
847
901
|
if (Object.keys(mapping).length === 0) return;
|
|
848
902
|
try {
|
|
849
903
|
const file = flowFieldCacheFile(env, workflowId);
|
|
850
|
-
await
|
|
904
|
+
await mkdir2(resolve(file, ".."), { recursive: true });
|
|
851
905
|
const cache = {
|
|
852
906
|
workflowId,
|
|
853
907
|
...workflowName ? { workflowName } : {},
|
|
854
908
|
savedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
855
909
|
mapping
|
|
856
910
|
};
|
|
857
|
-
await
|
|
911
|
+
await writeFile2(file, JSON.stringify(cache, null, 2), "utf8");
|
|
858
912
|
} catch {
|
|
859
913
|
}
|
|
860
914
|
}
|
|
@@ -920,8 +974,8 @@ function shouldAutoPickFlow(args) {
|
|
|
920
974
|
async function sendInvitationToGroup(env, groupId, filePath, warnings) {
|
|
921
975
|
const started = Date.now();
|
|
922
976
|
try {
|
|
923
|
-
const { buildImEnv } = await import("./group-chat-
|
|
924
|
-
const { getImOperation } = await import("./registry-
|
|
977
|
+
const { buildImEnv } = await import("./group-chat-YE7WIBFO.js");
|
|
978
|
+
const { getImOperation } = await import("./registry-BUTEDK3C.js");
|
|
925
979
|
const imEnv = await buildImEnv(env);
|
|
926
980
|
const prepared = await getImOperation("im.msg.send.group.prepare").handler(
|
|
927
981
|
{ groupId, file: filePath },
|
|
@@ -1033,13 +1087,15 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1033
1087
|
description: "\u7ED3\u675F\u65F6\u95F4\uFF08yyyy-MM-dd HH:mm\uFF09\uFF1B\u4E0D\u4F20\u5219\u6309 durationMinutes \u4ECE\u5F00\u59CB\u65F6\u95F4\u63A8\u7B97\uFF08\u9ED8\u8BA4 60 \u5206\u949F\uFF09"
|
|
1034
1088
|
},
|
|
1035
1089
|
mt_desc: { type: "string", description: "\u4F1A\u8BAE\u5185\u5BB9/\u8BF4\u660E" },
|
|
1090
|
+
equipments: { type: "string", description: "\u8BBE\u5907\u8981\u6C42\u5173\u952E\u8BCD\uFF08\u6295\u5F71/\u89C6\u9891/\u767D\u677F\u7B49\uFF09\uFF1A\u53C2\u4E0E\u4F1A\u8BAE\u5BA4\u63A8\u8350\u7B5B\u9009\uFF1B\u7528\u6237\u6CA1\u8BF4\u5C31\u4E0D\u4F20" },
|
|
1036
1091
|
agenda: { type: "string", description: "\u9080\u8BF7\u51FD\u8BAE\u7A0B\uFF08AI \u6309\u4F1A\u8BAE\u540D\u79F0+\u5185\u5BB9\u5206\u6790\u540E\u751F\u6210\uFF09\uFF1A\u6BCF\u884C\u300C\u8BAE\u7A0B\u5B89\u6392|\u8BAE\u7A0B\u5185\u5BB9|\u8BAE\u7A0B\u65F6\u95F4\u300D\uFF0C\u6362\u884C\u5206\u9694\uFF1B\u4E0D\u4F20\u5219\u7528\u4F1A\u8BAE\u8BAE\u9898\u6216\u6A21\u677F\u793A\u4F8B\u884C" },
|
|
1037
1092
|
address: { type: "string", description: '\u4F1A\u8BAE\u5BA4\uFF08\u540D\u79F0\u6216 id\uFF09\uFF1B\u4E5F\u53EF\u76F4\u63A5\u5199\u697C\u5C42\uFF08"\u4E00\u697C/1F/3\u5C42"\uFF09\uFF0CCLI \u4F1A\u6309\u697C\u5C42\u7ED9\u5019\u9009' },
|
|
1038
1093
|
floor: { type: "number", description: "\u697C\u5C42\uFF081=\u4E00\u697C\uFF09\uFF1A\u548C address \u4E8C\u9009\u4E00\uFF0C\u6309\u540D\u79F0\u63A8\u65AD\u697C\u5C42\u8FC7\u6EE4\u5019\u9009\uFF08120\u4F1A\u8BAE\u5BA4=1\u697C\u30011007=10\u697C\uFF09" },
|
|
1039
1094
|
askRoom: { type: "boolean", description: "\u9ED8\u8BA4 false\uFF1A\u4E0D\u6307\u5B9A\u5730\u70B9\u65F6 CLI \u76F4\u63A5\u6309\u63A8\u8350\u7B97\u6CD5\u5B9A\u4E00\u95F4\uFF1B\u4F20 true \u624D\u8FD4\u56DE\u5019\u9009\u8BA9\u7528\u6237\u6311" },
|
|
1040
1095
|
customize_address: { type: "string", description: "\u81EA\u5B9A\u4E49\u4F1A\u8BAE\u5730\u70B9" },
|
|
1041
1096
|
hrm_members: { type: "string", description: "\u53C2\u4F1A\u4EBA\u5458\uFF08\u9017\u53F7\u5206\u9694\u5458\u5DE5 id \u6216\u59D3\u540D\uFF0C\u6309\u6D41\u7A0B\u8868\u5355\u8981\u6C42\uFF09" },
|
|
1042
|
-
total_member: { type: "number", description: "\u53C2\u4F1A\u4EBA\u6570" },
|
|
1097
|
+
total_member: { type: "number", description: "\u53C2\u4F1A\u4EBA\u6570\uFF08\u7528\u6237\u76F4\u63A5\u8BF4\u603B\u6570\u65F6\u624D\u4F20\uFF09" },
|
|
1098
|
+
our_member_count: { type: "number", description: '\u6211\u65B9\u58F0\u660E\u4EBA\u6570\uFF08\u7528\u6237\u8BF4"\u6211\u4EEC\u4E5F 3 \u4E2A\u4EBA"\u4F46\u6CA1\u7ED9\u59D3\u540D\u65F6\u4F20 3\uFF09\uFF1ACLI \u4F1A\u4E0E crm_member_count \u76F8\u52A0\u4F5C\u4E3A\u53C2\u4F1A\u4EBA\u6570' },
|
|
1043
1099
|
crm_members: {
|
|
1044
1100
|
oneOf: [{ type: "string" }, { type: "array", items: { oneOf: [{ type: "string" }, { type: "object" }] } }],
|
|
1045
1101
|
description: "\u53C2\u4F1A\u5BA2\u6237\uFF1A**\u5FC5\u987B\u5E26\u5BA2\u6237\u540D\u79F0**\uFF0C\u5199\u6CD5 `[{id,name}]` \u6216\u300C\u5BA2\u6237\u540D(\u5BA2\u6237id)\u300D\u6216\u9017\u53F7\u5206\u9694\u7684\u8FD9\u4E24\u79CD\u3002\u5BA2\u6237\u5148\u4ECE `meeting.eb.crm.search` \u6309\u5BA2\u6237\u540D\u67E5\u51FA\uFF08\u5165\u53C2 custom_name\uFF0C\u51FA\u53C2 items[].customerId / name\uFF09\uFF0C\u8BE5\u67E5\u8BE2**\u4E00\u6B21\u53EA\u56DE\u9996\u4E2A\u5339\u914D** \u21D2 exact=false \u65F6\u5FC5\u987B\u5148\u8BA9\u7528\u6237\u786E\u8BA4\u5BA2\u6237\u540D\u518D\u5199\u8FD9\u4E2A\u5B57\u6BB5\u3002\u26D4 \u53EA\u7ED9 id \u4E0D\u7ED9\u540D\u79F0\u4F1A\u88AB\u62D2\u7EDD\uFF08\u5BA2\u6237\u6D4F\u89C8\u6309\u94AE\u6309\u540D\u79F0\u843D\u503C\uFF0C\u53EA\u7ED9 id \u4F1A\u9759\u9ED8\u5B58\u6210\u7A7A\uFF09"
|
|
@@ -1167,7 +1223,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1167
1223
|
}
|
|
1168
1224
|
}
|
|
1169
1225
|
const nameLike = rawMembers.filter((item) => !/^\d+$/.test(item));
|
|
1170
|
-
const nameToId = nameLike.length > 0 ? await import("./schedule-
|
|
1226
|
+
const nameToId = nameLike.length > 0 ? await import("./schedule-SPPAHER2.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
1171
1227
|
const memberIds = rawMembers.map((item) => nameToId.get(item) ?? item);
|
|
1172
1228
|
let timeConfirmed = args.timeConfirmed === true || slotConfirmed;
|
|
1173
1229
|
const draft = await loadMeetingDraft(env, String(args.mt_name ?? "")).catch(() => null);
|
|
@@ -1196,7 +1252,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1196
1252
|
if (!beginHasTime || !timeConfirmed) {
|
|
1197
1253
|
const day2 = /^\d{4}-\d{2}-\d{2}/.test(beginText) ? beginText.slice(0, 10) : String(args.dateFrom ?? "").trim().slice(0, 10) || tomorrowIso();
|
|
1198
1254
|
const duration = Number(args.durationMinutes) > 0 ? Math.round(Number(args.durationMinutes)) : 60;
|
|
1199
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1255
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
1200
1256
|
const suggested = await getMeetingOperation("meeting.eb.meeting.create.suggest").handler(
|
|
1201
1257
|
{
|
|
1202
1258
|
dateFrom: day2,
|
|
@@ -1278,7 +1334,14 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1278
1334
|
const declaredTotal = Number(args.total_member) > 0 ? Number(args.total_member) : null;
|
|
1279
1335
|
const callerToken = String(args.caller ?? "").trim();
|
|
1280
1336
|
const callerInMembers = callerToken !== "" && (rawMembers.includes(callerToken) || memberIds.includes(callerToken));
|
|
1281
|
-
const
|
|
1337
|
+
const declaredOurCount = Number(args.our_member_count) > 0 ? Number(args.our_member_count) : 0;
|
|
1338
|
+
const ourSideCount = declaredOurCount > 0 ? declaredOurCount : memberIds.length > 0 ? memberIds.length + (callerInMembers ? 0 : 1) : 0;
|
|
1339
|
+
const clientSideCount = Number(args.crm_member_count) > 0 ? Number(args.crm_member_count) : 0;
|
|
1340
|
+
const autoTotalMember = declaredTotal ?? (ourSideCount + clientSideCount > 0 ? ourSideCount + clientSideCount : null);
|
|
1341
|
+
if (autoTotalMember !== null && !(Number(args.total_member) > 0)) {
|
|
1342
|
+
args.total_member = autoTotalMember;
|
|
1343
|
+
}
|
|
1344
|
+
const roomMemberCount = autoTotalMember ?? void 0;
|
|
1282
1345
|
const crmMentionedInText = detectCrmMentionInText(
|
|
1283
1346
|
String(args.mt_name ?? ""),
|
|
1284
1347
|
String(args.mt_desc ?? ""),
|
|
@@ -1301,6 +1364,8 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1301
1364
|
...hasCustomer ? { hasCustomer: true } : {},
|
|
1302
1365
|
// 「一楼」这类楼层诉求:按楼层过滤候选(2026-11-06)
|
|
1303
1366
|
...floorHint !== null ? { floor: Number(floorHint) } : {},
|
|
1367
|
+
// ⛔ 设备诉求必须放在 requirement 里(顶层会被忽略,2026-11-09 踩到:传了投影仍推出没投影的房)
|
|
1368
|
+
...String(args.equipments ?? "").trim() ? { requirement: { equipmentsKeyword: String(args.equipments).trim() } } : {},
|
|
1304
1369
|
// 2026-11-03 用户批准松绑:不再每次强制重拉台账(省 ~1s + 2 请求)。
|
|
1305
1370
|
// 兜底在 recommendRooms 内部:24h 缓存凑不出候选时自动强制重拉一次再算;
|
|
1306
1371
|
// 代价是刚导入的会议室在缓存期可能按名称查不到(按 id 指定不受影响)。
|
|
@@ -1357,7 +1422,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1357
1422
|
usageFromCache: usageData.fromCache
|
|
1358
1423
|
};
|
|
1359
1424
|
}
|
|
1360
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1425
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
1361
1426
|
const result = await getMeetingOperation("meeting.eb.conflict.room").handler(
|
|
1362
1427
|
{ beginDatetime: beginText, endDatetime: endText, address: room.id },
|
|
1363
1428
|
env
|
|
@@ -1365,7 +1430,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1365
1430
|
return { room, ...result?.data ?? {} };
|
|
1366
1431
|
})().catch(noteFailure("\u4F1A\u8BAE\u5BA4**\u5360\u7528**\u68C0\u6D4B")) : Promise.resolve(null);
|
|
1367
1432
|
const conflictTask = cachedChecks ? Promise.resolve({ data: { conflicts: cachedChecks.memberConflicts } }) : enrich && beginText && endText && memberIds.length > 0 ? (async () => {
|
|
1368
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1433
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
1369
1434
|
return getMeetingOperation("meeting.eb.conflict.member").handler(
|
|
1370
1435
|
{ beginDatetime: beginText, endDatetime: endText, hrmMembers: memberIds.join(",") },
|
|
1371
1436
|
env
|
|
@@ -1434,7 +1499,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1434
1499
|
status: "NEEDS_SELECTION",
|
|
1435
1500
|
selectionType: "room",
|
|
1436
1501
|
ui: { component: "choice", multiple: false, recommendedKey: "R1" },
|
|
1437
|
-
message: floorHint !== null ? `\u300C${addressId}\u300D\u662F\u697C\u5C42\uFF0C\u4E0D\u662F\u623F\u95F4\u540D\uFF1B
|
|
1502
|
+
message: floorHint !== null ? `\u300C${addressId}\u300D\u662F\u697C\u5C42\uFF0C\u4E0D\u662F\u623F\u95F4\u540D\uFF1B` + (roomOptions.length > 0 ? `\u4E0B\u9762\u662F ${floorHint} \u697C\u5728\u8BE5\u65F6\u6BB5\u7A7A\u95F2\u7684\u4F1A\u8BAE\u5BA4\uFF0C\u8BF7\u9009\u4E00\u95F4` : `\u8BE5\u697C\u5C42\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u4F1A\u8BAE\u5BA4` + (String(args.equipments ?? "").trim() ? `\uFF08\u8BBE\u5907\u8981\u6C42\uFF1A${String(args.equipments)}\uFF1B\u8BE5\u5C42\u53F0\u8D26\u672A\u6807\u6CE8\u6B64\u8BBE\u5907\uFF09` : "") + "\uFF0C\u8BF7\u6539\u697C\u5C42 / \u53BB\u6389\u8BBE\u5907\u8981\u6C42 / \u6539\u65F6\u95F4") : `\u6CA1\u627E\u5230\u540D\u4E3A\u300C${addressId}\u300D\u7684\u4F1A\u8BAE\u5BA4\uFF08\u4F1A\u8BAE\u5BA4\u53F0\u8D26\u91CC\u6CA1\u6709\u8FD9\u4E2A\u540D\u5B57\uFF09\uFF0C\u672C\u6B21**\u6CA1\u6709\u63D0\u4EA4**\u3002` + (roomOptions.length > 0 ? `\u8BF7\u4ECE\u4E0B\u9762 ${roomOptions.length} \u4E2A\u5728\u8BE5\u65F6\u6BB5\u7A7A\u95F2\u7684\u4F1A\u8BAE\u5BA4\u91CC\u9009\u4E00\u95F4\uFF0C\u6216\u6838\u5BF9\u4E00\u4E0B\u4F1A\u8BAE\u5BA4\u540D\u79F0` : "\u8BE5\u65F6\u6BB5\u4E5F\u6CA1\u6709\u53EF\u7528\u7684\u7A7A\u95F2\u4F1A\u8BAE\u5BA4\uFF0C\u8BF7\u6539\u4F1A\u8BAE\u65F6\u95F4\u6216\u6539\u7EBF\u4E0A\u4F1A\u8BAE\uFF08allowNoRoom: true\uFF09"),
|
|
1438
1503
|
workflowPending: true,
|
|
1439
1504
|
options: roomOptions,
|
|
1440
1505
|
recommended: roomOptions[0]?.value ?? null,
|
|
@@ -1734,7 +1799,8 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1734
1799
|
await writeFlowFieldMap(env, workflowId, form.workflowName, resolvedFields);
|
|
1735
1800
|
let invitationDocInfo = null;
|
|
1736
1801
|
const inviteDocWarnings = [];
|
|
1737
|
-
|
|
1802
|
+
const hasLinkedCustomer = (Array.isArray(args.crm_members) ? args.crm_members.length > 0 : String(args.crm_members ?? "").trim() !== "") || Number(args.crm_member_count) > 0;
|
|
1803
|
+
if (args.invitation_doc !== false && hasLinkedCustomer) {
|
|
1738
1804
|
const inviteField = form.fields.find((field) => String(field?.name ?? "") === "\u9080\u8BF7\u51FD");
|
|
1739
1805
|
if (inviteField) {
|
|
1740
1806
|
const existing = main[String(inviteField.id)];
|
|
@@ -1748,7 +1814,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1748
1814
|
invitationDocInfo = { docId: cachedDoc.docId, name: cachedDoc.name };
|
|
1749
1815
|
} else {
|
|
1750
1816
|
try {
|
|
1751
|
-
const { getMeetingOperation } = await import("./registry-
|
|
1817
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
1752
1818
|
const publish = getMeetingOperation("meeting.invitation.publish");
|
|
1753
1819
|
const renderExtra = {};
|
|
1754
1820
|
if (String(args.guest_org ?? "").trim()) renderExtra.guest_org = String(args.guest_org).trim();
|
|
@@ -1975,6 +2041,8 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
1975
2041
|
})()
|
|
1976
2042
|
} } : {}
|
|
1977
2043
|
},
|
|
2044
|
+
// 没有客户时不生成邀请函(apply 里的两处生成点都看这个标记)
|
|
2045
|
+
hasCustomer: hasLinkedCustomer,
|
|
1978
2046
|
fingerprint: JSON.stringify({ workflowId, main, ...detailPayload ? { details: detailPayload } : {} })
|
|
1979
2047
|
},
|
|
1980
2048
|
CONTINUATION_TTL_MS
|
|
@@ -2035,6 +2103,7 @@ var ebMeetingCreateFlowPrepare = {
|
|
|
2035
2103
|
...Object.keys(decisions).length > 0 ? { decisions } : {}
|
|
2036
2104
|
},
|
|
2037
2105
|
continuation,
|
|
2106
|
+
continuationId: await saveContinuationAlias(continuation, CONTINUATION_TTL_MS).catch(() => null),
|
|
2038
2107
|
expiresInSeconds: CONTINUATION_TTL_SECONDS
|
|
2039
2108
|
},
|
|
2040
2109
|
warnings.length > 0 ? { warnings } : {}
|
|
@@ -2066,7 +2135,7 @@ async function patchMeetingCrmMembers(env, meetingId, ids, count, settleMsList =
|
|
|
2066
2135
|
});
|
|
2067
2136
|
};
|
|
2068
2137
|
const readBack = async () => {
|
|
2069
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2138
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
2070
2139
|
const detail = getMeetingOperation("meeting.eb.meeting.detail");
|
|
2071
2140
|
const read = await detail.handler({ id: String(meetingId).trim() }, env);
|
|
2072
2141
|
return String(read?.data?.data?.crm_members ?? "").trim();
|
|
@@ -2093,7 +2162,7 @@ async function renderPreInvitation(payload, env) {
|
|
|
2093
2162
|
const fields = payload?.invitationFields ?? {};
|
|
2094
2163
|
const started = Date.now();
|
|
2095
2164
|
try {
|
|
2096
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2165
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
2097
2166
|
const render = getMeetingOperation("meeting.invitation.render");
|
|
2098
2167
|
const rendered = await render.handler(
|
|
2099
2168
|
{
|
|
@@ -2140,7 +2209,8 @@ var ebMeetingCreateFlowApply = {
|
|
|
2140
2209
|
requiresConfirmation: true,
|
|
2141
2210
|
inputSchema: schemaOf(
|
|
2142
2211
|
{
|
|
2143
|
-
continuation: { type: "string", description: "prepare \u8FD4\u56DE\u7684\u786E\u8BA4\u7968\u636E\uFF08\
|
|
2212
|
+
continuation: { type: "string", description: "prepare \u8FD4\u56DE\u7684\u786E\u8BA4\u7968\u636E\uFF1B\u592A\u957F\u65F6\u53EF\u7528 continuationId \u4EE3\u66FF\uFF08\u4E8C\u9009\u4E00\uFF09" },
|
|
2213
|
+
continuationId: { type: "string", description: "prepare \u8FD4\u56DE\u7684 8 \u4F4D\u77ED\u53E5\u67C4\uFF1A\u4E0D\u60F3\u590D\u5236\u957F token \u65F6\u4F20\u8FD9\u4E2A" },
|
|
2144
2214
|
confirm: { type: "boolean", description: "\u5FC5\u987B\u663E\u5F0F\u4F20 true" },
|
|
2145
2215
|
submit_mode: {
|
|
2146
2216
|
type: "string",
|
|
@@ -2149,14 +2219,18 @@ var ebMeetingCreateFlowApply = {
|
|
|
2149
2219
|
},
|
|
2150
2220
|
waitSeconds: { type: "number", description: "\u63D0\u4EA4\u540E\u7B49\u5F85\u4F1A\u8BAE\u751F\u6210\u7684\u6700\u957F\u79D2\u6570\uFF08\u9ED8\u8BA4 60\uFF0C0 = \u4E0D\u7B49\u5F85\uFF09" }
|
|
2151
2221
|
},
|
|
2152
|
-
{ required: ["
|
|
2222
|
+
{ required: ["confirm"] }
|
|
2153
2223
|
),
|
|
2154
2224
|
handler: async (args, env) => {
|
|
2155
2225
|
if (args.confirm !== true) {
|
|
2156
2226
|
throw meetingValidationError("confirmation_required", "\u6D41\u7A0B\u5EFA\u4F1A\u5C5E\u4E8E\u9AD8\u5F71\u54CD\u5199\u64CD\u4F5C\uFF0C\u5FC5\u987B\u663E\u5F0F\u4F20 confirm=true");
|
|
2157
2227
|
}
|
|
2228
|
+
let continuationToken = String(args.continuation ?? "").trim();
|
|
2229
|
+
if (!continuationToken && String(args.continuationId ?? "").trim()) {
|
|
2230
|
+
continuationToken = String(await resolveContinuationAlias(String(args.continuationId)) ?? "");
|
|
2231
|
+
}
|
|
2158
2232
|
const lease = await env.continuation.verify(
|
|
2159
|
-
|
|
2233
|
+
continuationToken,
|
|
2160
2234
|
"meeting.eb.meeting.create.flow.apply"
|
|
2161
2235
|
);
|
|
2162
2236
|
const session = await env.host.getSession();
|
|
@@ -2166,7 +2240,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2166
2240
|
const payload = lease?.payload ?? {};
|
|
2167
2241
|
const { createWorkflowHost } = await import("./host-TUOIOEMC.js");
|
|
2168
2242
|
const { createWorkflowContinuationSigner } = await import("./continuation-HFW2YT5S.js");
|
|
2169
|
-
const { getWorkflowOperation } = await import("./registry-
|
|
2243
|
+
const { getWorkflowOperation } = await import("./registry-7VZ6YJUF.js");
|
|
2170
2244
|
const wfEnv = {
|
|
2171
2245
|
...workflowEnv(env),
|
|
2172
2246
|
host: createWorkflowHost(env.ctx),
|
|
@@ -2211,12 +2285,12 @@ var ebMeetingCreateFlowApply = {
|
|
|
2211
2285
|
if (!requestId) {
|
|
2212
2286
|
const submitStatus = String(submittedData.status ?? submitted?.status ?? "");
|
|
2213
2287
|
if (submitStatus === "BROWSER_FILL") {
|
|
2214
|
-
const pre = await renderPreInvitation(payload, env);
|
|
2288
|
+
const pre = payload?.hasCustomer === true ? await renderPreInvitation(payload, env) : { invitation: { skipped: true, reason: "no_customer" }, ms: 0 };
|
|
2215
2289
|
let groupChat2;
|
|
2216
2290
|
const groupPayload2 = payload?.groupChat;
|
|
2217
2291
|
if (groupPayload2) {
|
|
2218
2292
|
try {
|
|
2219
|
-
const { ensureMeetingGroupChat } = await import("./group-chat-
|
|
2293
|
+
const { ensureMeetingGroupChat } = await import("./group-chat-YE7WIBFO.js");
|
|
2220
2294
|
groupChat2 = {
|
|
2221
2295
|
...await ensureMeetingGroupChat(env, {
|
|
2222
2296
|
meetingName: String(payload.mtName ?? ""),
|
|
@@ -2232,7 +2306,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2232
2306
|
}
|
|
2233
2307
|
if (groupChat2 && groupChat2.ok) {
|
|
2234
2308
|
try {
|
|
2235
|
-
const { savePendingForm } = await import("./group-chat-
|
|
2309
|
+
const { savePendingForm } = await import("./group-chat-YE7WIBFO.js");
|
|
2236
2310
|
await savePendingForm(env, {
|
|
2237
2311
|
workflowId: String(payload.workflowId ?? ""),
|
|
2238
2312
|
workflowName: String(payload.workflowName ?? ""),
|
|
@@ -2299,7 +2373,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2299
2373
|
let meetingId = "";
|
|
2300
2374
|
const timings = { submitMs: Date.now() - submitStartedAt };
|
|
2301
2375
|
if (waitSeconds > 0) {
|
|
2302
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2376
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
2303
2377
|
const list = getMeetingOperation("meeting.eb.meeting.list");
|
|
2304
2378
|
const deadline = Date.now() + Math.min(waitSeconds, 30) * 1e3;
|
|
2305
2379
|
const pollStart = Date.now();
|
|
@@ -2349,7 +2423,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2349
2423
|
if (groupPayload) {
|
|
2350
2424
|
const groupStart = Date.now();
|
|
2351
2425
|
try {
|
|
2352
|
-
const { ensureMeetingGroupChat } = await import("./group-chat-
|
|
2426
|
+
const { ensureMeetingGroupChat } = await import("./group-chat-YE7WIBFO.js");
|
|
2353
2427
|
const group = await ensureMeetingGroupChat(env, {
|
|
2354
2428
|
meetingName: String(payload.mtName ?? ""),
|
|
2355
2429
|
beginDatetime: String(groupPayload.beginDatetime ?? ""),
|
|
@@ -2381,7 +2455,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2381
2455
|
if (meetingId) {
|
|
2382
2456
|
const invitationStart = Date.now();
|
|
2383
2457
|
try {
|
|
2384
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2458
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
2385
2459
|
const render = getMeetingOperation("meeting.invitation.render");
|
|
2386
2460
|
const rendered = await render.handler(
|
|
2387
2461
|
{
|
|
@@ -2401,7 +2475,7 @@ var ebMeetingCreateFlowApply = {
|
|
|
2401
2475
|
};
|
|
2402
2476
|
}
|
|
2403
2477
|
} else {
|
|
2404
|
-
const pre = await renderPreInvitation(payload, env);
|
|
2478
|
+
const pre = payload?.hasCustomer === true ? await renderPreInvitation(payload, env) : { invitation: { skipped: true, reason: "no_customer" }, ms: 0 };
|
|
2405
2479
|
invitation = pre.invitation;
|
|
2406
2480
|
timings.invitationMs = pre.ms;
|
|
2407
2481
|
warnings.push(
|
|
@@ -2468,6 +2542,7 @@ var ebMeetingCreateFlowQuick = {
|
|
|
2468
2542
|
description: "\u7ED3\u675F\u65F6\u95F4\uFF08yyyy-MM-dd HH:mm\uFF09\uFF1B\u4E0D\u4F20\u5219\u6309 durationMinutes \u4ECE\u5F00\u59CB\u65F6\u95F4\u63A8\u7B97\uFF08\u9ED8\u8BA4 60 \u5206\u949F\uFF09"
|
|
2469
2543
|
},
|
|
2470
2544
|
mt_desc: { type: "string", description: "\u4F1A\u8BAE\u5185\u5BB9/\u8BF4\u660E" },
|
|
2545
|
+
equipments: { type: "string", description: "\u8BBE\u5907\u8981\u6C42\u5173\u952E\u8BCD\uFF08\u6295\u5F71/\u89C6\u9891/\u767D\u677F\u7B49\uFF09\uFF1A\u53C2\u4E0E\u4F1A\u8BAE\u5BA4\u63A8\u8350\u7B5B\u9009\uFF1B\u7528\u6237\u6CA1\u8BF4\u5C31\u4E0D\u4F20" },
|
|
2471
2546
|
address: { type: "string", description: "\u4F1A\u8BAE\u5BA4\uFF08id \u6216\u540D\u79F0\uFF1B\u4E0D\u4F20\u5219\u8FD4\u56DE\u5019\u9009\u8BA9\u7528\u6237\u9009\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u51B3\u5B9A\uFF09" },
|
|
2472
2547
|
customize_address: { type: "string", description: "\u81EA\u5B9A\u4E49\u4F1A\u8BAE\u5730\u70B9" },
|
|
2473
2548
|
hrm_members: { type: "string", description: "\u53C2\u4F1A\u4EBA\u5458 id\uFF0C\u9017\u53F7\u5206\u9694" },
|
|
@@ -2552,7 +2627,7 @@ var ebMeetingCreateFlowQuick = {
|
|
|
2552
2627
|
`\u4F1A\u8BAE\u540D\u79F0/\u5185\u5BB9\u91CC\u63D0\u5230\u5BA2\u6237\u300C${crmMentioned}\u300D\uFF0C\u4F46\u6CA1\u4F20 crm_members \u2014\u2014 \u63D0\u4EA4\u540E\u300C\u53C2\u4F1A\u5BA2\u6237\u300D\u4F1A\u662F\u7A7A\u7684\u3002\u5148 meeting.eb.crm.search {"keyword":"${crmMentioned}"} \u62FF items[].customerId\uFF0C\u518D\u628A crm_members:[{"id":"<customerId>","name":"<\u5B8C\u6574\u5BA2\u6237\u540D>"}] \u4E00\u8D77\u4F20\uFF08\u5FC5\u987B\u5E26\u540D\u79F0\uFF0C\u53EA\u7ED9 id \u4F1A\u88AB\u9759\u9ED8\u5B58\u7A7A\uFF09\uFF1B\u786E\u5B9E\u4E0D\u9700\u8981\u586B\u53C2\u4F1A\u5BA2\u6237\u5C31\u4F20 crm_skip:true\u3002`
|
|
2553
2628
|
);
|
|
2554
2629
|
}
|
|
2555
|
-
const { getMeetingOperation } = await import("./registry-
|
|
2630
|
+
const { getMeetingOperation } = await import("./registry-22O6UG4I.js");
|
|
2556
2631
|
const prepareStartedAt = Date.now();
|
|
2557
2632
|
const { submit_mode: _submitMode, confirm: _confirm, ...prepareArgs } = args;
|
|
2558
2633
|
const prepared = await getMeetingOperation("meeting.eb.meeting.create.flow.prepare").handler(
|
|
@@ -2650,7 +2725,7 @@ var ebMeetingCreateSuggest = {
|
|
|
2650
2725
|
const topN = Math.max(1, Math.min(5, Number(args.topN) || 3));
|
|
2651
2726
|
const rawMembers = String(args.hrm_members ?? "").split(/[,;,;\s]+/).map((item) => item.trim()).filter((item) => item !== "");
|
|
2652
2727
|
const nameLike = rawMembers.filter((item) => !/^\d+$/.test(item));
|
|
2653
|
-
const nameToId = nameLike.length > 0 ? await import("./schedule-
|
|
2728
|
+
const nameToId = nameLike.length > 0 ? await import("./schedule-SPPAHER2.js").then((m) => m.resolveMemberIdsByName(env, nameLike)).catch(() => /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2654
2729
|
const memberIds = rawMembers.map((item) => nameToId.get(item) ?? item);
|
|
2655
2730
|
const unresolved = rawMembers.filter((item) => nameToId.get(item) === void 0 && !/^\d+$/.test(item));
|
|
2656
2731
|
const selfId = await env.host.getSession().then((s) => String(s?.userId ?? "")).catch(() => "");
|
|
@@ -1944,7 +1944,7 @@ function buildReadOperation(endpoint) {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
if (fallback) {
|
|
1946
1946
|
pageWarnings.push(
|
|
1947
|
-
`\
|
|
1947
|
+
rows.length > 0 ? `\u5DF2\u547D\u4E2D ${rows.length} \u6761\uFF08\u670D\u52A1\u7AEF\u7CBE\u786E\u5339\u914D 0 \u6761\uFF0CCLI \u81EA\u52A8\u7FFB\u9875\u626B\u63CF ${fallback.scanned} \u6761 / ${fallback.pages} \u9875\u540E\u6309\u300C\u5305\u542B\u300D\u7B5B\u51FA\uFF09` : `\u672A\u547D\u4E2D\uFF1A\u670D\u52A1\u7AEF\u7CBE\u786E\u5339\u914D 0 \u6761\uFF0C\u4E14\u7FFB\u9875\u626B\u63CF ${fallback.scanned} \u6761\uFF08${fallback.pages} \u9875\uFF09\u540E\u6309\u300C\u5305\u542B\u300D\u4E5F\u6CA1\u627E\u5230 \u2014\u2014 \u8FD9\u4E2A\u540D\u79F0\u53EF\u80FD\u786E\u5B9E\u4E0D\u5B58\u5728`
|
|
1948
1948
|
);
|
|
1949
1949
|
}
|
|
1950
1950
|
return meetingSuccess(
|
|
@@ -2329,7 +2329,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
|
|
|
2329
2329
|
);
|
|
2330
2330
|
}
|
|
2331
2331
|
if (endpoint.interfacePk === "create_meeting") {
|
|
2332
|
-
const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-
|
|
2332
|
+
const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-APGSD5E7.js");
|
|
2333
2333
|
assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
|
|
2334
2334
|
}
|
|
2335
2335
|
const pkQuery = writePkQuery(endpoint, payload);
|
|
@@ -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-FEP6ELMR.js";
|
|
6
6
|
import {
|
|
7
7
|
SCHEMA_ID,
|
|
8
8
|
meetingSuccess,
|
|
9
9
|
meetingValidationError,
|
|
10
10
|
schemaOf
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NK74RE5F.js";
|
|
12
12
|
|
|
13
13
|
// src/shortcuts/meeting/operations/attachment-content.ts
|
|
14
14
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -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-FEP6ELMR.js";
|
|
6
6
|
|
|
7
7
|
// src/shortcuts/meeting/operations/eb/cache.ts
|
|
8
8
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
cacheScopeSuffix,
|
|
5
5
|
readCache,
|
|
6
6
|
writeCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PSPOFLSU.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-NK74RE5F.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-B6GKA2J3.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-22O6UG4I.js");
|
|
225
225
|
const listOp = getMeetingOperation("meeting.eb.meeting.list");
|
|
226
226
|
let seen = 0;
|
|
227
227
|
let total = 0;
|