weaver-work-cli 0.1.59 → 0.1.60

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.
Files changed (34) hide show
  1. package/dist/chunks/{attachment-content-TP6WDNC6.js → attachment-content-I6WHKGR2.js} +3 -3
  2. package/dist/chunks/{chunk-MQBMMJUV.js → chunk-7U5YHCW7.js} +2 -2
  3. package/dist/chunks/{chunk-FM7B5BIR.js → chunk-BDBTZVYA.js} +44 -36
  4. package/dist/chunks/{chunk-I3BFBBP2.js → chunk-CPG6NLN4.js} +1 -1
  5. package/dist/chunks/{chunk-U2DWV6JC.js → chunk-HHH4K3YY.js} +1 -1
  6. package/dist/chunks/{chunk-2FHP4PYS.js → chunk-HMIIVM2L.js} +49 -25
  7. package/dist/chunks/chunk-JFKMPRZB.js +64 -0
  8. package/dist/chunks/{chunk-XR5BGFNT.js → chunk-P7RXQDCA.js} +10 -4
  9. package/dist/chunks/{chunk-QNPIY5R6.js → chunk-VLL6JOB4.js} +4 -4
  10. package/dist/chunks/{chunk-AQOPPNTR.js → chunk-VQWPQTEY.js} +2 -2
  11. package/dist/chunks/{chunk-CI2RF3AJ.js → chunk-XF7S6FQW.js} +1 -1
  12. package/dist/chunks/{chunk-ZHPCNM2S.js → chunk-YHSOCGKO.js} +6 -6
  13. package/dist/chunks/{conflict-Y3ESXYIA.js → conflict-QMDLS2EW.js} +2 -2
  14. package/dist/chunks/{create-flow-JHQSA6JF.js → create-flow-5ODJ7WJO.js} +6 -6
  15. package/dist/chunks/{data-ZVS3BWPT.js → data-LVDFIRNG.js} +0 -2
  16. package/dist/chunks/entry-mode-73BJML22.js +15 -0
  17. package/dist/chunks/{env-LQBLL3MZ.js → env-OHFS76HV.js} +2 -2
  18. package/dist/chunks/{factory-X7PN6B3B.js → factory-FRTA2LP4.js} +1 -1
  19. package/dist/chunks/{group-chat-PPFY7SPV.js → group-chat-KBFRPCR2.js} +3 -3
  20. package/dist/chunks/{meeting-GMRQZFJP.js → meeting-ARHVWK7G.js} +11 -10
  21. package/dist/chunks/{minute-doc-JXH3MNC7.js → minute-doc-547KSYKR.js} +2 -2
  22. package/dist/chunks/{registry-WZCCBI5L.js → registry-H5HQ5QNH.js} +11 -10
  23. package/dist/chunks/{room-recommend-CKU5NF2E.js → room-recommend-3UBROMZE.js} +4 -4
  24. package/dist/chunks/{schedule-DEFAO2RY.js → schedule-FTUQML6O.js} +4 -4
  25. package/dist/index.js +3 -3
  26. package/dist/shortcuts/data/operations/ds.js +0 -2
  27. package/dist/shortcuts/meeting/operations/eb/create-flow.js +32 -1
  28. package/dist/shortcuts/meeting/operations/eb/entry-mode.js +62 -0
  29. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  30. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +11 -0
  31. package/dist/shortcuts/meeting/operations/registry.js +4 -0
  32. package/package.json +1 -1
  33. package/skills/weaver-e10-meeting/SKILL.md +14 -3
  34. package/dist/chunks/{ebuilder-form-TWSXS5NA.js → ebuilder-form-7WA6X6ZI.js} +3 -3
@@ -0,0 +1,64 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ meetingStateDir
5
+ } from "./chunk-CPG6NLN4.js";
6
+ import {
7
+ meetingSuccess,
8
+ meetingValidationError
9
+ } from "./chunk-XF7S6FQW.js";
10
+
11
+ // src/shortcuts/meeting/operations/eb/entry-mode.ts
12
+ import { join, dirname } from "node:path";
13
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
14
+ var TTL_MS = 10 * 60 * 1e3;
15
+ async function entryFile(env) {
16
+ const session = await env.host.getSession();
17
+ const scope = String(session?.tenantKey || session?.baseUrl || "default").replace(/[^\w.-]+/g, "_");
18
+ return join(meetingStateDir(env.ctx), `entry-${scope}.json`);
19
+ }
20
+ async function readEntryChoice(env) {
21
+ try {
22
+ const raw = JSON.parse(readFileSync(await entryFile(env), "utf8"));
23
+ if (Date.now() - Number(raw?.at ?? 0) > TTL_MS) return null;
24
+ const choice = String(raw?.choice ?? "").trim();
25
+ return choice ? { choice, at: Number(raw.at), source: raw?.source } : null;
26
+ } catch {
27
+ return null;
28
+ }
29
+ }
30
+ var record = {
31
+ name: "meeting.entry.record",
32
+ resource: "eb",
33
+ method: "meeting.entry.record",
34
+ action: "meeting.entry.record",
35
+ summary: "\u8BB0\u5F55\u5EFA\u4F1A\u5165\u53E3\u9009\u62E9\uFF08assist / direct_form\uFF09\uFF0C\u4F9B create.flow.* \u5224\u65AD\u662F\u5426\u8FD8\u8981\u5F39\u5165\u53E3\u9009\u9879",
36
+ capability: "eb.meeting",
37
+ risk: "read-before-write",
38
+ requiresConfirmation: false,
39
+ inputSchema: {
40
+ type: "object",
41
+ additionalProperties: false,
42
+ properties: {
43
+ choice: { type: "string", enum: ["assist", "direct_form"] },
44
+ source: { type: "string", description: "\u8C01\u95EE\u7684\uFF1Aflow_tool / meeting_skill" }
45
+ },
46
+ required: ["choice"]
47
+ },
48
+ handler: async (args, env) => {
49
+ const choice = String(args.choice ?? "").trim();
50
+ if (choice !== "assist" && choice !== "direct_form") {
51
+ throw meetingValidationError("invalid_choice", "choice \u53EA\u80FD\u662F assist \u6216 direct_form");
52
+ }
53
+ const file = await entryFile(env);
54
+ mkdirSync(dirname(file), { recursive: true });
55
+ writeFileSync(file, JSON.stringify({ choice, at: Date.now(), source: String(args.source ?? "") }), "utf8");
56
+ return meetingSuccess("meeting.entry.record", { recorded: choice, ttlSeconds: TTL_MS / 1e3 });
57
+ }
58
+ };
59
+ var meetingEntryOperations = [record];
60
+
61
+ export {
62
+ readEntryChoice,
63
+ meetingEntryOperations
64
+ };
@@ -4,7 +4,7 @@ import {
4
4
  cacheScopeSuffix,
5
5
  readCache,
6
6
  writeCache
7
- } from "./chunk-U2DWV6JC.js";
7
+ } from "./chunk-HHH4K3YY.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-CI2RF3AJ.js";
16
+ } from "./chunk-XF7S6FQW.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-LQBLL3MZ.js");
91
+ const { meetingStateDir } = await import("./env-OHFS76HV.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-WZCCBI5L.js");
224
+ const { getMeetingOperation } = await import("./registry-H5HQ5QNH.js");
225
225
  const listOp = getMeetingOperation("meeting.eb.meeting.list");
226
226
  let seen = 0;
227
227
  let total = 0;
@@ -298,6 +298,7 @@ async function recommendRooms(env, input) {
298
298
  const usable = roomData.rooms.filter((room) => room.status === "0");
299
299
  let busyCount = 0;
300
300
  const candidates = [];
301
+ const purposeHitIds = /* @__PURE__ */ new Set();
301
302
  for (const room of usable) {
302
303
  const isBusy = busy.ids.has(room.id);
303
304
  if (isBusy) {
@@ -349,6 +350,7 @@ async function recommendRooms(env, input) {
349
350
  if (hostHit) {
350
351
  reasons.push(`\u5E26\u5BA2\u6237\u4F18\u5148\uFF1A${descHit ? `\u63CF\u8FF0\u542B\u300C${desc.slice(0, 30)}\u300D` : `\u540D\u79F0\u542B\u300C${hostHit[1]}\u300D`}`);
351
352
  score += 35;
353
+ if (!isBusy) purposeHitIds.add(room.id);
352
354
  }
353
355
  }
354
356
  if (isBusy) {
@@ -371,6 +373,10 @@ async function recommendRooms(env, input) {
371
373
  reasons
372
374
  });
373
375
  }
376
+ if (requirement.hasCustomer === true && purposeHitIds.size > 0) {
377
+ const preferred = candidates.filter((candidate) => purposeHitIds.has(candidate.id));
378
+ if (preferred.length > 0) candidates.splice(0, candidates.length, ...preferred);
379
+ }
374
380
  candidates.sort((left, right) => {
375
381
  if (right.score !== left.score) return right.score - left.score;
376
382
  const leftCap = left.capacity.max > 0 ? left.capacity.max : Number.MAX_SAFE_INTEGER;
@@ -12,7 +12,7 @@ import {
12
12
  meetingValidationError,
13
13
  queryBody,
14
14
  toIdCsv
15
- } from "./chunk-CI2RF3AJ.js";
15
+ } from "./chunk-XF7S6FQW.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-DEFAO2RY.js");
299
+ const { resolveMemberIdsByName } = await import("./schedule-FTUQML6O.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-JHQSA6JF.js");
432
+ const { resolveAddressRoom } = await import("./create-flow-5ODJ7WJO.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-DEFAO2RY.js");
642
+ const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-FTUQML6O.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, {
@@ -3,13 +3,13 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  readCache,
5
5
  writeCache
6
- } from "./chunk-U2DWV6JC.js";
6
+ } from "./chunk-HHH4K3YY.js";
7
7
  import {
8
8
  SCHEMA_DATETIME_MINUTE,
9
9
  meetingSuccess,
10
10
  meetingValidationError,
11
11
  schemaOf
12
- } from "./chunk-CI2RF3AJ.js";
12
+ } from "./chunk-XF7S6FQW.js";
13
13
 
14
14
  // src/shortcuts/meeting/operations/eb/schedule.ts
15
15
  var SCHEDULE_TYPE_PATH = "/api/ebuilder/form/formdata/v2/getFormDataList/queryAgendaType";
@@ -2335,7 +2335,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
2335
2335
  );
2336
2336
  }
2337
2337
  if (endpoint.interfacePk === "create_meeting") {
2338
- const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-Y3ESXYIA.js");
2338
+ const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-QMDLS2EW.js");
2339
2339
  assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2340
2340
  }
2341
2341
  const pkQuery = writePkQuery(endpoint, payload);
@@ -2,12 +2,12 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-I3BFBBP2.js";
5
+ } from "./chunk-CPG6NLN4.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError,
9
9
  schemaOf
10
- } from "./chunk-CI2RF3AJ.js";
10
+ } from "./chunk-XF7S6FQW.js";
11
11
 
12
12
  // src/shortcuts/meeting/operations/eb/group-chat.ts
13
13
  import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -159,7 +159,7 @@ async function triggerGroupFlow(env, input, meetingName, memberIds) {
159
159
  if (addressText === "[object Object]") addressText = "";
160
160
  if (addressText) {
161
161
  try {
162
- const { resolveAddressRoom } = await import("./create-flow-JHQSA6JF.js");
162
+ const { resolveAddressRoom } = await import("./create-flow-5ODJ7WJO.js");
163
163
  const room = await resolveAddressRoom(env, addressText);
164
164
  if (room?.name) addressText = room.name;
165
165
  } catch {
@@ -201,7 +201,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
201
201
  const group = String(groupId).trim();
202
202
  if (id === "" || group === "") return { ok: false, error: "\u6CA1\u6709\u4F1A\u8BAE id \u6216\u7FA4 id" };
203
203
  try {
204
- const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-X7PN6B3B.js");
204
+ const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-FRTA2LP4.js");
205
205
  const session = await env.host.getSession();
206
206
  await env.host.request({
207
207
  method: "POST",
@@ -219,7 +219,7 @@ async function bindGroupToMeeting(env, meetingId, groupId) {
219
219
  return { ok: false, error: String(error?.message ?? error).slice(0, 300) };
220
220
  }
221
221
  try {
222
- const { getMeetingOperation } = await import("./registry-WZCCBI5L.js");
222
+ const { getMeetingOperation } = await import("./registry-H5HQ5QNH.js");
223
223
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
224
224
  const read = await detail.handler({ id }, env);
225
225
  const main = read?.data?.data ?? read?.data?.main ?? {};
@@ -267,7 +267,7 @@ async function resolveMeetingByRequestId(env, requestId, sinceMs) {
267
267
  const target = String(requestId).trim();
268
268
  if (target === "") return null;
269
269
  try {
270
- const { getMeetingOperation } = await import("./registry-WZCCBI5L.js");
270
+ const { getMeetingOperation } = await import("./registry-H5HQ5QNH.js");
271
271
  const list = getMeetingOperation("meeting.eb.meeting.list");
272
272
  const detail = getMeetingOperation("meeting.eb.meeting.detail");
273
273
  const page = await list.handler({ pageSize: 30 }, env);
@@ -7,8 +7,8 @@ import {
7
7
  findCommonFreeSlots,
8
8
  meetingEbConflictOperations,
9
9
  runEbConflictCheck
10
- } from "./chunk-QNPIY5R6.js";
11
- import "./chunk-CI2RF3AJ.js";
10
+ } from "./chunk-VLL6JOB4.js";
11
+ import "./chunk-XF7S6FQW.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";
@@ -22,12 +22,12 @@ import {
22
22
  resolveWorkflowId,
23
23
  shapeBrowserValues,
24
24
  shouldAutoPickFlow
25
- } from "./chunk-2FHP4PYS.js";
26
- import "./chunk-QNPIY5R6.js";
27
- import "./chunk-XR5BGFNT.js";
28
- import "./chunk-U2DWV6JC.js";
29
- import "./chunk-I3BFBBP2.js";
30
- import "./chunk-CI2RF3AJ.js";
25
+ } from "./chunk-HMIIVM2L.js";
26
+ import "./chunk-VLL6JOB4.js";
27
+ import "./chunk-P7RXQDCA.js";
28
+ import "./chunk-HHH4K3YY.js";
29
+ import "./chunk-CPG6NLN4.js";
30
+ import "./chunk-XF7S6FQW.js";
31
31
  import "./chunk-7BDPM5ST.js";
32
32
  import "./chunk-UG5G54VL.js";
33
33
  import "./chunk-BUSC6UAE.js";
@@ -523,7 +523,6 @@ var DS_GROUPS = [
523
523
  [7, "OKR", "weaver-wr-goal-service", "goal"],
524
524
  [8, "\u6D41\u7A0B\u5217\u8868", "weaver-workflow-list-service", "workflow"],
525
525
  [9, "\u8003\u52E4", "weaver-attend-service", "attend"],
526
- [10, "CRM", "weaver-crm-service", "customer"],
527
526
  [11, "\u7EC4\u7EC7\u753B\u50CF", "weaver-portrait-service", "portrait"],
528
527
  [12, "\u5DE5\u4F5C\u6D41\u62A5\u544A", "weaver-workflow-report-serviceworkflow_report", "workflow"],
529
528
  [13, "\u7EE9\u6548", "weaver-wr-performance-service", "kpi"],
@@ -584,7 +583,6 @@ var DS_FIND_SEMANTIC_RULES = [
584
583
  { tag: "\u65E5\u62A5/\u5468\u62A5", re: /日报|周报|月报|年报|工作总结/, groups: ["weaver-blog-service", "weaver-wr-plan-service"] },
585
584
  { tag: "\u6587\u6863/\u9644\u4EF6", re: /文档|附件|文件夹|共享|资料/, groups: ["weaver-doc-servicedocument", "weaver-doc-service", "weaver-file-service"] },
586
585
  { tag: "\u9879\u76EE/\u4EFB\u52A1", re: /项目|任务|工时|里程碑|延期|验收/, groups: ["weaver-project-service", "weaver-project-servicetask"] },
587
- { tag: "\u5BA2\u6237/\u5546\u673A", re: /客户|商机|线索|联系人|公海|销售|CRM|营销/i, groups: ["weaver-crm-service", "weaver-crm-market-service"] },
588
586
  { tag: "\u4F1A\u8BAE/\u65E5\u7A0B", re: /会议|日程|日历|预约|会议室|预定/, groups: ["weaver-meeting-service", "weaver-calendar-service"] },
589
587
  { tag: "\u4EBA\u4E8B/\u62DB\u8058", re: /招聘|入职|离职|offer|人才|员工|人员|通讯录|调岗|组织/i, groups: ["weaver-recruit-service", "weaver-hr-service", "weaver-hrm-service"] },
590
588
  { tag: "\u85AA\u916C/\u7EE9\u6548", re: /薪酬|薪资|工资|社保|公积金|绩效|考核|KPI|OKR/i, groups: ["weaver-hrm-salary", "weaver-wr-performance-service", "weaver-wr-goal-service"] },
@@ -0,0 +1,15 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ meetingEntryOperations,
5
+ readEntryChoice
6
+ } from "./chunk-JFKMPRZB.js";
7
+ import "./chunk-CPG6NLN4.js";
8
+ import "./chunk-XF7S6FQW.js";
9
+ import "./chunk-7BDPM5ST.js";
10
+ import "./chunk-UG5G54VL.js";
11
+ import "./chunk-BUSC6UAE.js";
12
+ export {
13
+ meetingEntryOperations,
14
+ readEntryChoice
15
+ };
@@ -6,8 +6,8 @@ import {
6
6
  meetingStateDir,
7
7
  readCache,
8
8
  resolveMeetingEnvMode
9
- } from "./chunk-I3BFBBP2.js";
10
- import "./chunk-CI2RF3AJ.js";
9
+ } from "./chunk-CPG6NLN4.js";
10
+ import "./chunk-XF7S6FQW.js";
11
11
  import "./chunk-7BDPM5ST.js";
12
12
  import "./chunk-UG5G54VL.js";
13
13
  import "./chunk-BUSC6UAE.js";
@@ -12,7 +12,7 @@ import {
12
12
  requireConfirm,
13
13
  verifyLease,
14
14
  writeBody
15
- } from "./chunk-CI2RF3AJ.js";
15
+ } from "./chunk-XF7S6FQW.js";
16
16
  import "./chunk-7BDPM5ST.js";
17
17
  import "./chunk-UG5G54VL.js";
18
18
  import "./chunk-BUSC6UAE.js";
@@ -6,9 +6,9 @@ import {
6
6
  ensureMeetingGroupChat,
7
7
  meetingEbGroupChatOperations,
8
8
  savePendingForm
9
- } from "./chunk-ZHPCNM2S.js";
10
- import "./chunk-I3BFBBP2.js";
11
- import "./chunk-CI2RF3AJ.js";
9
+ } from "./chunk-YHSOCGKO.js";
10
+ import "./chunk-CPG6NLN4.js";
11
+ import "./chunk-XF7S6FQW.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";
@@ -3,20 +3,21 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  getMeetingOperation,
5
5
  meetingOperationDefinitions
6
- } from "./chunk-FM7B5BIR.js";
7
- import "./chunk-MQBMMJUV.js";
6
+ } from "./chunk-BDBTZVYA.js";
7
+ import "./chunk-7U5YHCW7.js";
8
8
  import "./chunk-WMRNO6IU.js";
9
- import "./chunk-ZHPCNM2S.js";
10
- import "./chunk-2FHP4PYS.js";
11
- import "./chunk-QNPIY5R6.js";
12
- import "./chunk-AQOPPNTR.js";
13
- import "./chunk-XR5BGFNT.js";
14
- import "./chunk-U2DWV6JC.js";
9
+ import "./chunk-YHSOCGKO.js";
10
+ import "./chunk-JFKMPRZB.js";
11
+ import "./chunk-HMIIVM2L.js";
12
+ import "./chunk-VLL6JOB4.js";
13
+ import "./chunk-VQWPQTEY.js";
14
+ import "./chunk-P7RXQDCA.js";
15
+ import "./chunk-HHH4K3YY.js";
15
16
  import {
16
17
  degradeMeetingEnvToStandard,
17
18
  meetingStateDir,
18
19
  readCache
19
- } from "./chunk-I3BFBBP2.js";
20
+ } from "./chunk-CPG6NLN4.js";
20
21
  import {
21
22
  MeetingCliError,
22
23
  asObject,
@@ -24,7 +25,7 @@ import {
24
25
  meetingAuthError,
25
26
  meetingNetworkError,
26
27
  meetingValidationError
27
- } from "./chunk-CI2RF3AJ.js";
28
+ } from "./chunk-XF7S6FQW.js";
28
29
  import {
29
30
  reportPlatformError
30
31
  } from "./chunk-6N4JPNFL.js";
@@ -65,8 +65,8 @@ async function ensureMinuteDoc(env, input) {
65
65
  const id = String(input.id ?? "").trim();
66
66
  const mtId = String(input.mtId ?? "").trim();
67
67
  if (!id || !mtId) return null;
68
- const { getMeetingOperation } = await import("./registry-WZCCBI5L.js");
69
- const { meetingStateDir } = await import("./env-LQBLL3MZ.js");
68
+ const { getMeetingOperation } = await import("./registry-H5HQ5QNH.js");
69
+ const { meetingStateDir } = await import("./env-OHFS76HV.js");
70
70
  const { mkdir, writeFile } = await import("node:fs/promises");
71
71
  const { join } = await import("node:path");
72
72
  const subject = String(input.subject ?? "").trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
@@ -4,17 +4,18 @@ import {
4
4
  getMeetingOperation,
5
5
  hasMeetingOperation,
6
6
  meetingOperationDefinitions
7
- } from "./chunk-FM7B5BIR.js";
8
- import "./chunk-MQBMMJUV.js";
7
+ } from "./chunk-BDBTZVYA.js";
8
+ import "./chunk-7U5YHCW7.js";
9
9
  import "./chunk-WMRNO6IU.js";
10
- import "./chunk-ZHPCNM2S.js";
11
- import "./chunk-2FHP4PYS.js";
12
- import "./chunk-QNPIY5R6.js";
13
- import "./chunk-AQOPPNTR.js";
14
- import "./chunk-XR5BGFNT.js";
15
- import "./chunk-U2DWV6JC.js";
16
- import "./chunk-I3BFBBP2.js";
17
- import "./chunk-CI2RF3AJ.js";
10
+ import "./chunk-YHSOCGKO.js";
11
+ import "./chunk-JFKMPRZB.js";
12
+ import "./chunk-HMIIVM2L.js";
13
+ import "./chunk-VLL6JOB4.js";
14
+ import "./chunk-VQWPQTEY.js";
15
+ import "./chunk-P7RXQDCA.js";
16
+ import "./chunk-HHH4K3YY.js";
17
+ import "./chunk-CPG6NLN4.js";
18
+ import "./chunk-XF7S6FQW.js";
18
19
  import "./chunk-7BDPM5ST.js";
19
20
  import "./chunk-SHYQUBY3.js";
20
21
  import "./chunk-UG5G54VL.js";
@@ -7,10 +7,10 @@ import {
7
7
  loadRooms,
8
8
  recommendRooms,
9
9
  rememberFrequentRoom
10
- } from "./chunk-XR5BGFNT.js";
11
- import "./chunk-U2DWV6JC.js";
12
- import "./chunk-I3BFBBP2.js";
13
- import "./chunk-CI2RF3AJ.js";
10
+ } from "./chunk-P7RXQDCA.js";
11
+ import "./chunk-HHH4K3YY.js";
12
+ import "./chunk-CPG6NLN4.js";
13
+ import "./chunk-XF7S6FQW.js";
14
14
  import "./chunk-7BDPM5ST.js";
15
15
  import "./chunk-UG5G54VL.js";
16
16
  import "./chunk-BUSC6UAE.js";
@@ -8,10 +8,10 @@ import {
8
8
  resolveMeetingScheduleTypeIds,
9
9
  resolveMemberIdsByName,
10
10
  runScheduleConflictFlow
11
- } from "./chunk-AQOPPNTR.js";
12
- import "./chunk-U2DWV6JC.js";
13
- import "./chunk-I3BFBBP2.js";
14
- import "./chunk-CI2RF3AJ.js";
11
+ } from "./chunk-VQWPQTEY.js";
12
+ import "./chunk-HHH4K3YY.js";
13
+ import "./chunk-CPG6NLN4.js";
14
+ import "./chunk-XF7S6FQW.js";
15
15
  import "./chunk-7BDPM5ST.js";
16
16
  import "./chunk-UG5G54VL.js";
17
17
  import "./chunk-BUSC6UAE.js";
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ var builtinShortcuts = [
91
91
  lazyShortcut({
92
92
  name: "meeting",
93
93
  description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
94
- load: async () => (await import("./chunks/meeting-GMRQZFJP.js")).meetingShortcut
94
+ load: async () => (await import("./chunks/meeting-ARHVWK7G.js")).meetingShortcut
95
95
  }),
96
96
  lazyShortcut({
97
97
  name: "okr",
@@ -111,7 +111,7 @@ var builtinShortcuts = [
111
111
  lazyShortcut({
112
112
  name: "ebuilder-form",
113
113
  description: "\u6CDB\u5FAEE10 eBuilder \u8868\u5355\u83DC\u5355\u3001\u5217\u8868\u548C\u8868\u5355\u6570\u636E CLI",
114
- load: async () => (await import("./chunks/ebuilder-form-TWSXS5NA.js")).ebuilderFormShortcut
114
+ load: async () => (await import("./chunks/ebuilder-form-7WA6X6ZI.js")).ebuilderFormShortcut
115
115
  }),
116
116
  lazyShortcut({
117
117
  name: "jiuchuanhui",
@@ -171,7 +171,7 @@ var builtinShortcuts = [
171
171
  lazyShortcut({
172
172
  name: "data",
173
173
  description: "\u6CDB\u5FAEE10\u6570\u636E\u52A9\u624B CLI\uFF08\u6570\u636E\u6E90\u67E5\u8BE2 / \u914D\u7F6E\u4E2D\u5FC3 / \u573A\u666F\u5B9A\u4F4D\uFF09",
174
- load: async () => (await import("./chunks/data-ZVS3BWPT.js")).dataShortcut
174
+ load: async () => (await import("./chunks/data-LVDFIRNG.js")).dataShortcut
175
175
  })
176
176
  ];
177
177
  function shortcutMetadata() {
@@ -15,7 +15,6 @@ const DS_GROUPS = [
15
15
  [7, 'OKR', 'weaver-wr-goal-service', 'goal'],
16
16
  [8, '流程列表', 'weaver-workflow-list-service', 'workflow'],
17
17
  [9, '考勤', 'weaver-attend-service', 'attend'],
18
- [10, 'CRM', 'weaver-crm-service', 'customer'],
19
18
  [11, '组织画像', 'weaver-portrait-service', 'portrait'],
20
19
  [12, '工作流报告', 'weaver-workflow-report-serviceworkflow_report', 'workflow'],
21
20
  [13, '绩效', 'weaver-wr-performance-service', 'kpi'],
@@ -76,7 +75,6 @@ const DS_FIND_SEMANTIC_RULES = [
76
75
  { tag: '日报/周报', re: /日报|周报|月报|年报|工作总结/, groups: ['weaver-blog-service', 'weaver-wr-plan-service'] },
77
76
  { tag: '文档/附件', re: /文档|附件|文件夹|共享|资料/, groups: ['weaver-doc-servicedocument', 'weaver-doc-service', 'weaver-file-service'] },
78
77
  { tag: '项目/任务', re: /项目|任务|工时|里程碑|延期|验收/, groups: ['weaver-project-service', 'weaver-project-servicetask'] },
79
- { tag: '客户/商机', re: /客户|商机|线索|联系人|公海|销售|CRM|营销/i, groups: ['weaver-crm-service', 'weaver-crm-market-service'] },
80
78
  { tag: '会议/日程', re: /会议|日程|日历|预约|会议室|预定/, groups: ['weaver-meeting-service', 'weaver-calendar-service'] },
81
79
  { tag: '人事/招聘', re: /招聘|入职|离职|offer|人才|员工|人员|通讯录|调岗|组织/i, groups: ['weaver-recruit-service', 'weaver-hr-service', 'weaver-hrm-service'] },
82
80
  { tag: '薪酬/绩效', re: /薪酬|薪资|工资|社保|公积金|绩效|考核|KPI|OKR/i, groups: ['weaver-hrm-salary', 'weaver-wr-performance-service', 'weaver-wr-goal-service'] },
@@ -1311,6 +1311,36 @@ const ebMeetingCreateFlowPrepare = {
1311
1311
  }, { required: ['mt_name'] }),
1312
1312
  handler: async (args, env) => {
1313
1313
  // 预检各阶段耗时(debugTimings:true 时随结果返回)
1314
+ // 发起流程优先:明确要"发起/创建流程"时不做预检与推荐,只填单。
1315
+ const skipPreflight = args.skipPreflight === true;
1316
+ // 上游流程工具已让用户选过「直接发起表单」时,模型会带 entryMode=direct_form,等价于 skipPreflight。
1317
+ if (args.entryMode === 'direct_form') {
1318
+ args = { ...args, skipPreflight: true };
1319
+ }
1320
+ // 会话内入口标记:流程工具已问过时,这里不再弹入口选项。
1321
+ let entryResolved = String(args.entryMode ?? '').trim();
1322
+ if (!entryResolved) {
1323
+ const { readEntryChoice } = await import('./entry-mode.js');
1324
+ const mark = await readEntryChoice(env).catch(() => null);
1325
+ if (mark?.choice)
1326
+ entryResolved = mark.choice;
1327
+ }
1328
+ if (entryResolved)
1329
+ args = { ...args, entryMode: entryResolved };
1330
+ env.__entryResolved = entryResolved || undefined;
1331
+ if (entryResolved === 'direct_form')
1332
+ args = { ...args, skipPreflight: true };
1333
+ if (args.skipPreflight === true) {
1334
+ // 直接发起流程:仍要推荐会议室(自动选最优),但不弹时段/房间候选、不等待确认。
1335
+ const hasAddress = String(args.address ?? args.customize_address ?? '').trim() !== '';
1336
+ args = {
1337
+ ...args,
1338
+ timeConfirmed: true,
1339
+ autoRoom: true,
1340
+ enrich: true,
1341
+ ...(hasAddress ? { roomConfirmed: true } : {}),
1342
+ };
1343
+ }
1314
1344
  const marks = (env.__meetingTimings ??= {});
1315
1345
  const mark = (key, from) => { marks[key] = (marks[key] ?? 0) + (Date.now() - from); };
1316
1346
  // ⚠️ 2026-10-30 顺序调整:**先确认四要素(名称 / 时间 / 参会人 / 地点),最后才定流程**。
@@ -1488,7 +1518,7 @@ const ebMeetingCreateFlowPrepare = {
1488
1518
  if (Number.isFinite(startMs))
1489
1519
  endText = formatMinute(new Date(startMs + duration * 60000));
1490
1520
  }
1491
- if (!beginHasTime || !timeConfirmed) {
1521
+ if (!skipPreflight && (!beginHasTime || !timeConfirmed)) {
1492
1522
  const day = /^\d{4}-\d{2}-\d{2}/.test(beginText)
1493
1523
  ? beginText.slice(0, 10)
1494
1524
  : (String(args.dateFrom ?? '').trim().slice(0, 10) || tomorrowIso());
@@ -2617,6 +2647,7 @@ const ebMeetingCreateFlowPrepare = {
2617
2647
  }).catch(() => undefined);
2618
2648
  return meetingSuccess('meeting.eb.meeting.create.flow.prepare', {
2619
2649
  status: 'AWAITING_CONFIRMATION',
2650
+ ...(entryResolved ? { entryResolved } : {}),
2620
2651
  preview: {
2621
2652
  workflowId,
2622
2653
  workflowCandidates: candidates,
@@ -0,0 +1,62 @@
1
+ /**
2
+ * 建会入口选择记录:解决"流程工具已经问过、会议 skill 又问一遍"的重复询问。
3
+ *
4
+ * 谁先问谁落标记(按租户 + 登录人,10 分钟过期):
5
+ * - 流程工具返回 choice 后:meeting.entry.record {choice:"assist"}
6
+ * - 会议 skill 收到 assist 时先读标记:命中就不再弹入口选项
7
+ * 直接调用会议 skill(没经过工具)时没有标记,仍由 skill 问一次。
8
+ */
9
+ import { join, dirname } from 'node:path';
10
+ import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
11
+ import { meetingSuccess } from '../types.js';
12
+ import { meetingValidationError } from '../../errors.js';
13
+ import { meetingStateDir } from '../env.js';
14
+ const TTL_MS = 10 * 60 * 1000;
15
+ async function entryFile(env) {
16
+ const session = await env.host.getSession();
17
+ const scope = String(session?.tenantKey || session?.baseUrl || 'default').replace(/[^\w.-]+/g, '_');
18
+ return join(meetingStateDir(env.ctx), `entry-${scope}.json`);
19
+ }
20
+ /** 读取当前会话的入口选择;过期或无记录返回 null。 */
21
+ export async function readEntryChoice(env) {
22
+ try {
23
+ const raw = JSON.parse(readFileSync(await entryFile(env), 'utf8'));
24
+ if (Date.now() - Number(raw?.at ?? 0) > TTL_MS)
25
+ return null;
26
+ const choice = String(raw?.choice ?? '').trim();
27
+ return choice ? { choice, at: Number(raw.at), source: raw?.source } : null;
28
+ }
29
+ catch {
30
+ return null;
31
+ }
32
+ }
33
+ const record = {
34
+ name: 'meeting.entry.record',
35
+ resource: 'eb',
36
+ method: 'meeting.entry.record',
37
+ action: 'meeting.entry.record',
38
+ summary: '记录建会入口选择(assist / direct_form),供 create.flow.* 判断是否还要弹入口选项',
39
+ capability: 'eb.meeting',
40
+ risk: 'read-before-write',
41
+ requiresConfirmation: false,
42
+ inputSchema: {
43
+ type: 'object',
44
+ additionalProperties: false,
45
+ properties: {
46
+ choice: { type: 'string', enum: ['assist', 'direct_form'] },
47
+ source: { type: 'string', description: '谁问的:flow_tool / meeting_skill' },
48
+ },
49
+ required: ['choice'],
50
+ },
51
+ handler: async (args, env) => {
52
+ const choice = String(args.choice ?? '').trim();
53
+ if (choice !== 'assist' && choice !== 'direct_form') {
54
+ throw meetingValidationError('invalid_choice', 'choice 只能是 assist 或 direct_form');
55
+ }
56
+ const file = await entryFile(env);
57
+ mkdirSync(dirname(file), { recursive: true });
58
+ writeFileSync(file, JSON.stringify({ choice, at: Date.now(), source: String(args.source ?? '') }), 'utf8');
59
+ return meetingSuccess('meeting.entry.record', { recorded: choice, ttlSeconds: TTL_MS / 1000 });
60
+ },
61
+ };
62
+ export const meetingEntryOperations = [record];
@@ -12,6 +12,7 @@ import { meetingEbGroupChatOperations } from './group-chat.js';
12
12
  import { attachMeetingUrls } from './meeting-link.js';
13
13
  import { meetingEbDecisionTaskBatchOperations } from './decision-task-batch.js';
14
14
  import { meetingEbDecisionTaskReassignOperations } from './decision-task-reassign.js';
15
+ import { meetingEntryOperations } from './entry-mode.js';
15
16
  /**
16
17
  * 会议 EB 版(eBuilder)operations。
17
18
  *
@@ -299,6 +300,7 @@ export const meetingEbOperations = [
299
300
  ...minuteCreateAliases,
300
301
  ...meetingEbDecisionTaskBatchOperations,
301
302
  ...meetingEbDecisionTaskReassignOperations,
303
+ ...meetingEntryOperations,
302
304
  ...meetingEbScheduleOperations,
303
305
  ...meetingEbCrmOperations,
304
306
  ...meetingEbCreateFlowOperations,