weaver-work-cli 0.1.57 → 0.1.58

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 (67) hide show
  1. package/dist/chunks/{attachment-content-QGM5MLQE.js → attachment-content-TP6WDNC6.js} +3 -3
  2. package/dist/chunks/{caizhilian-QJ4FLSQJ.js → caizhilian-5NM4X5HG.js} +1 -1
  3. package/dist/chunks/{chunk-7EBV7Q3R.js → chunk-2FHP4PYS.js} +50 -27
  4. package/dist/chunks/{chunk-DVR2EDUU.js → chunk-6YWHRXEQ.js} +17 -1
  5. package/dist/chunks/{chunk-FDAJC7R4.js → chunk-AQOPPNTR.js} +2 -2
  6. package/dist/chunks/{chunk-6DVL5IN5.js → chunk-CI2RF3AJ.js} +7 -4
  7. package/dist/chunks/{chunk-WHJIUKJW.js → chunk-FM7B5BIR.js} +206 -39
  8. package/dist/chunks/{chunk-L2LMBFG5.js → chunk-I3BFBBP2.js} +1 -1
  9. package/dist/chunks/{chunk-6MS3RLPO.js → chunk-MQBMMJUV.js} +2 -2
  10. package/dist/chunks/{chunk-XU3FL3AW.js → chunk-QNPIY5R6.js} +4 -4
  11. package/dist/chunks/{chunk-AHJZIMCX.js → chunk-U2DWV6JC.js} +1 -1
  12. package/dist/chunks/{chunk-WMB3SMXI.js → chunk-WINR2Q6K.js} +27 -4
  13. package/dist/chunks/{chunk-UI66EMOR.js → chunk-XR5BGFNT.js} +4 -4
  14. package/dist/chunks/{chunk-TJUAGZU7.js → chunk-ZHPCNM2S.js} +6 -6
  15. package/dist/chunks/{conflict-VAFFPUY3.js → conflict-Y3ESXYIA.js} +2 -2
  16. package/dist/chunks/{create-flow-TVYE3IOH.js → create-flow-JHQSA6JF.js} +6 -6
  17. package/dist/chunks/{data-WVICO3DT.js → data-ZVS3BWPT.js} +3 -5
  18. package/dist/chunks/{env-BVVFIN4P.js → env-LQBLL3MZ.js} +2 -2
  19. package/dist/chunks/{factory-RCQ36LLE.js → factory-X7PN6B3B.js} +1 -1
  20. package/dist/chunks/{group-chat-YFZDUUY3.js → group-chat-PPFY7SPV.js} +3 -3
  21. package/dist/chunks/{lazy-dispatch-JHGFCKJN.js → lazy-dispatch-GCA6HDOB.js} +1 -1
  22. package/dist/chunks/{meeting-JOHV4RH3.js → meeting-GMRQZFJP.js} +16 -12
  23. package/dist/chunks/{minute-doc-JLS4KMFZ.js → minute-doc-JXH3MNC7.js} +5 -5
  24. package/dist/chunks/{operations-ZPWBMYKE.js → operations-6NXJ7RTE.js} +1 -1
  25. package/dist/chunks/{registry-LITYOH2W.js → registry-WZCCBI5L.js} +10 -10
  26. package/dist/chunks/{room-recommend-62MECG4J.js → room-recommend-CKU5NF2E.js} +4 -4
  27. package/dist/chunks/{schedule-6QRXIBGU.js → schedule-DEFAO2RY.js} +4 -4
  28. package/dist/index.js +5 -5
  29. package/dist/internal/e10/auth/commands.js +29 -1
  30. package/dist/shortcuts/caizhilian/operations/files.js +4 -1
  31. package/dist/shortcuts/caizhilian/operations/handlers/document.js +33 -4
  32. package/dist/shortcuts/data/index.js +0 -1
  33. package/dist/shortcuts/data/manifest.js +1 -1
  34. package/dist/shortcuts/data/operations/module.js +2 -3
  35. package/dist/shortcuts/meeting/host.js +6 -1
  36. package/dist/shortcuts/meeting/minute-doc.js +3 -2
  37. package/dist/shortcuts/meeting/operations/compose-outcome.js +4 -0
  38. package/dist/shortcuts/meeting/operations/eb/create-flow.js +29 -3
  39. package/dist/shortcuts/meeting/operations/eb/crm-search.js +20 -0
  40. package/dist/shortcuts/meeting/operations/eb/decision-task-reassign.js +113 -0
  41. package/dist/shortcuts/meeting/operations/eb/decision.js +41 -1
  42. package/dist/shortcuts/meeting/operations/eb/factory.js +4 -4
  43. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  44. package/dist/shortcuts/meeting/operations/eb-fallback.js +3 -0
  45. package/dist/shortcuts/meeting/operations/registry.js +14 -1
  46. package/dist/shortcuts/meeting/operations/shared.js +4 -0
  47. package/docs/data.md +1 -1
  48. package/docs/e10-auth.md +5 -0
  49. package/package.json +1 -1
  50. package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
  51. package/skills/weaver-e10-caizhilian/references/document.md +1 -1
  52. package/skills/weaver-e10-caizhilian/references/source-manifest.json +2 -2
  53. package/skills/weaver-e10-data/references/config-center.md +0 -1
  54. package/skills/weaver-e10-jucailin/SKILL.md +6 -6
  55. package/skills/weaver-e10-jucailin/references/recruit-read.md +3 -2
  56. package/skills/weaver-e10-jucailin/references/recruit-stage-ops.md +1 -1
  57. package/skills/weaver-e10-jucailin/references/recruit-write.md +15 -8
  58. package/skills/weaver-e10-jucailin/references/safety-boundaries.md +3 -1
  59. package/skills/weaver-e10-meeting/SKILL.md +14 -4
  60. package/skills/weaver-e10-recruit-stage/SKILL.md +42 -14
  61. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +61 -20
  62. package/skills/weaver-e10-recruit-stage/lib/recruit-resume-photo.py +194 -0
  63. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +5 -4
  64. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +4 -5
  65. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +1 -10
  66. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +25 -6
  67. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +3 -2
@@ -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-L2LMBFG5.js";
5
+ } from "./chunk-I3BFBBP2.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError,
9
9
  schemaOf
10
- } from "./chunk-6DVL5IN5.js";
10
+ } from "./chunk-CI2RF3AJ.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-TVYE3IOH.js");
162
+ const { resolveAddressRoom } = await import("./create-flow-JHQSA6JF.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-RCQ36LLE.js");
204
+ const { EB_BASE, ebBusinessSuccess, writeBody } = await import("./factory-X7PN6B3B.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-LITYOH2W.js");
222
+ const { getMeetingOperation } = await import("./registry-WZCCBI5L.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-LITYOH2W.js");
270
+ const { getMeetingOperation } = await import("./registry-WZCCBI5L.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-XU3FL3AW.js";
11
- import "./chunk-6DVL5IN5.js";
10
+ } from "./chunk-QNPIY5R6.js";
11
+ import "./chunk-CI2RF3AJ.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-7EBV7Q3R.js";
26
- import "./chunk-XU3FL3AW.js";
27
- import "./chunk-UI66EMOR.js";
28
- import "./chunk-AHJZIMCX.js";
29
- import "./chunk-L2LMBFG5.js";
30
- import "./chunk-6DVL5IN5.js";
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";
31
31
  import "./chunk-7BDPM5ST.js";
32
32
  import "./chunk-UG5G54VL.js";
33
33
  import "./chunk-BUSC6UAE.js";
@@ -1780,7 +1780,6 @@ async function moduleCall(input, host) {
1780
1780
  let group = typeof input.group === "string" ? input.group : "";
1781
1781
  const confType = typeof input.type === "string" && input.type ? input.type : "api";
1782
1782
  const timeoutMs = Math.max(1, Number(input.timeout || "60") || 60) * 1e3;
1783
- const limit = input.limit === void 0 || input.limit === true ? 50 : Number(input.limit) || 0;
1784
1783
  const fields = typeof input.fields === "string" && input.fields ? readListArg(input.fields).split(",").map((item) => item.trim()).filter(Boolean) : null;
1785
1784
  let record;
1786
1785
  let attrs;
@@ -1956,7 +1955,7 @@ async function moduleCall(input, host) {
1956
1955
  const out = { ok: true, api_name: apiName, http: status, via: payload.via, ...tipFields(tips) };
1957
1956
  let projected = null;
1958
1957
  if (rows !== null) {
1959
- const shown = limit > 0 ? rows.slice(0, limit) : rows;
1958
+ const shown = rows;
1960
1959
  projected = fields ? shown.map((row) => {
1961
1960
  const picked = {};
1962
1961
  if (row && typeof row === "object") {
@@ -1974,7 +1973,7 @@ async function moduleCall(input, host) {
1974
1973
  if (flags.length) out.flags = flags;
1975
1974
  const lines = [`== ${apiName} ==`, `${effMethod} ${apiPath} \u2192 HTTP ${status}\uFF08via=${payload.via}\uFF09`];
1976
1975
  if (rows !== null) {
1977
- lines.push(`rows=${rows.length}${total !== null && total !== void 0 ? ` / total=${total}` : ""}${limit > 0 && rows.length > limit ? `\uFF08\u5DF2\u622A\u65AD\u5230 ${limit} \u884C\uFF09` : ""}`);
1976
+ lines.push(`rows=${rows.length}${total !== null && total !== void 0 ? ` / total=${total}` : ""}`);
1978
1977
  lines.push(renderTable("", projected));
1979
1978
  } else {
1980
1979
  lines.push(JSON.stringify(payload.value, null, 1));
@@ -2289,7 +2288,6 @@ var INPUT_SCHEMAS = {
2289
2288
  "header",
2290
2289
  "headers",
2291
2290
  "method",
2292
- "limit",
2293
2291
  "fields",
2294
2292
  "raw",
2295
2293
  "show_params",
@@ -2541,7 +2539,7 @@ var dataShortcut = {
2541
2539
  await run(ctx, "data.scene.search", toInput(options), false);
2542
2540
  }));
2543
2541
  const moduleCommand = data.command("module").description("\u6A21\u5757\u914D\u7F6E\u63A5\u53E3\u8C03\u7528\uFF08\u914D\u7F6E\u4E2D\u5FC3\u9A71\u52A8\uFF09");
2544
- moduleCommand.command("call").description("\u6309 confAttrs \u7EC4\u53C2\u5E76\u8C03\u7528\u63A5\u53E3\uFF08\u5DF2\u786E\u5B9A\u6A21\u5757 + \u63A5\u53E3\u4E4B\u540E\u7528\uFF09").option("--conf-key <key>", "confKey").option("--group <module>", "\u6A21\u5757\u552F\u4E00\u6807\u8BC6\uFF0C\u5982 WORKFLOW / EHR / DOCUMENT").option("--type <confType>", "confType\uFF0C\u9ED8\u8BA4 api").option("--conf-file <path>", "\u672C\u5730 confAttrs \u6587\u4EF6\uFF08\u8DF3\u8FC7\u914D\u7F6E\u8BFB\u53D6\uFF09").option("--args <json|@file>", "\u4E1A\u52A1\u53C2\u6570\uFF08JSON \u5BF9\u8C61\uFF09").option("--query <k=v&k2=v2>", "\u4E1A\u52A1\u53C2\u6570\uFF08query \u4E32\uFF0C\u4E0E --args \u5408\u5E76\uFF09").option("--header <k: v>", "\u989D\u5916\u8BF7\u6C42\u5934\uFF08\u5355\u4E2A\uFF09").option("--headers <json|@file>", "\u989D\u5916\u8BF7\u6C42\u5934\uFF08JSON \u5BF9\u8C61\uFF09").option("--method <GET|POST|FORM>", "\u63D0\u4EA4\u65B9\u5F0F\uFF0C\u9ED8\u8BA4\u53D6 confAttrs.http_method").option("--limit <n>", "\u884C\u6570\u4E0A\u9650\uFF0C\u9ED8\u8BA4 50\uFF1B0 = \u4E0D\u622A\u65AD").option("--fields <a,b|@f>", "\u53EA\u4FDD\u7559\u8FD9\u4E9B\u884C\u5B57\u6BB5").option("--raw", "\u539F\u6837\u8F93\u51FA\u54CD\u5E94\u4F53").option("--show-params", "\u53EA\u6253\u5370\u5165/\u51FA\u53C2\u8BF4\u660E\uFF0C\u4E0D\u8C03\u63A5\u53E3").option("--full", "--show-params \u65F6\u56DE\u663E\u5B8C\u6574 request_example").option("--with-example", "\u540C --full").option("--no-example", "--show-params \u65F6\u5F3A\u5236\u7701\u7565 request_example").option("--dry-run", "\u53EA\u7EC4\u88C5\u8BF7\u6C42\u4E0D\u53D1\u9001\uFF08\u51ED\u636E\u8131\u654F\uFF09").option("--timeout <sec>", "\u8D85\u65F6\u79D2\u6570\uFF0C\u9ED8\u8BA4 60").action(action(async (ctx, options) => {
2542
+ moduleCommand.command("call").description("\u6309 confAttrs \u7EC4\u53C2\u5E76\u8C03\u7528\u63A5\u53E3\uFF08\u5DF2\u786E\u5B9A\u6A21\u5757 + \u63A5\u53E3\u4E4B\u540E\u7528\uFF09").option("--conf-key <key>", "confKey").option("--group <module>", "\u6A21\u5757\u552F\u4E00\u6807\u8BC6\uFF0C\u5982 WORKFLOW / EHR / DOCUMENT").option("--type <confType>", "confType\uFF0C\u9ED8\u8BA4 api").option("--conf-file <path>", "\u672C\u5730 confAttrs \u6587\u4EF6\uFF08\u8DF3\u8FC7\u914D\u7F6E\u8BFB\u53D6\uFF09").option("--args <json|@file>", "\u4E1A\u52A1\u53C2\u6570\uFF08JSON \u5BF9\u8C61\uFF09").option("--query <k=v&k2=v2>", "\u4E1A\u52A1\u53C2\u6570\uFF08query \u4E32\uFF0C\u4E0E --args \u5408\u5E76\uFF09").option("--header <k: v>", "\u989D\u5916\u8BF7\u6C42\u5934\uFF08\u5355\u4E2A\uFF09").option("--headers <json|@file>", "\u989D\u5916\u8BF7\u6C42\u5934\uFF08JSON \u5BF9\u8C61\uFF09").option("--method <GET|POST|FORM>", "\u63D0\u4EA4\u65B9\u5F0F\uFF0C\u9ED8\u8BA4\u53D6 confAttrs.http_method").option("--fields <a,b|@f>", "\u53EA\u4FDD\u7559\u8FD9\u4E9B\u884C\u5B57\u6BB5").option("--raw", "\u539F\u6837\u8F93\u51FA\u54CD\u5E94\u4F53").option("--show-params", "\u53EA\u6253\u5370\u5165/\u51FA\u53C2\u8BF4\u660E\uFF0C\u4E0D\u8C03\u63A5\u53E3").option("--full", "--show-params \u65F6\u56DE\u663E\u5B8C\u6574 request_example").option("--with-example", "\u540C --full").option("--no-example", "--show-params \u65F6\u5F3A\u5236\u7701\u7565 request_example").option("--dry-run", "\u53EA\u7EC4\u88C5\u8BF7\u6C42\u4E0D\u53D1\u9001\uFF08\u51ED\u636E\u8131\u654F\uFF09").option("--timeout <sec>", "\u8D85\u65F6\u79D2\u6570\uFF0C\u9ED8\u8BA4 60").action(action(async (ctx, options) => {
2545
2543
  await run(ctx, "data.module.call", toInput(options), false);
2546
2544
  }));
2547
2545
  const attend = data.command("attend").description("\u8003\u52E4 REST \u63A5\u53E3");
@@ -6,8 +6,8 @@ import {
6
6
  meetingStateDir,
7
7
  readCache,
8
8
  resolveMeetingEnvMode
9
- } from "./chunk-L2LMBFG5.js";
10
- import "./chunk-6DVL5IN5.js";
9
+ } from "./chunk-I3BFBBP2.js";
10
+ import "./chunk-CI2RF3AJ.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-6DVL5IN5.js";
15
+ } from "./chunk-CI2RF3AJ.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-TJUAGZU7.js";
10
- import "./chunk-L2LMBFG5.js";
11
- import "./chunk-6DVL5IN5.js";
9
+ } from "./chunk-ZHPCNM2S.js";
10
+ import "./chunk-I3BFBBP2.js";
11
+ import "./chunk-CI2RF3AJ.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";
@@ -5,7 +5,7 @@ import {
5
5
  createProgram,
6
6
  registerCommands,
7
7
  toCommandMetadata
8
- } from "./chunk-DVR2EDUU.js";
8
+ } from "./chunk-6YWHRXEQ.js";
9
9
  import "./chunk-2IGZUMNG.js";
10
10
  import "./chunk-FMNCSYIG.js";
11
11
  import "./chunk-AJ62BGAW.js";
@@ -3,20 +3,20 @@ const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  getMeetingOperation,
5
5
  meetingOperationDefinitions
6
- } from "./chunk-WHJIUKJW.js";
7
- import "./chunk-6MS3RLPO.js";
6
+ } from "./chunk-FM7B5BIR.js";
7
+ import "./chunk-MQBMMJUV.js";
8
8
  import "./chunk-WMRNO6IU.js";
9
- import "./chunk-TJUAGZU7.js";
10
- import "./chunk-7EBV7Q3R.js";
11
- import "./chunk-XU3FL3AW.js";
12
- import "./chunk-FDAJC7R4.js";
13
- import "./chunk-UI66EMOR.js";
14
- import "./chunk-AHJZIMCX.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";
15
15
  import {
16
16
  degradeMeetingEnvToStandard,
17
17
  meetingStateDir,
18
18
  readCache
19
- } from "./chunk-L2LMBFG5.js";
19
+ } from "./chunk-I3BFBBP2.js";
20
20
  import {
21
21
  MeetingCliError,
22
22
  asObject,
@@ -24,7 +24,7 @@ import {
24
24
  meetingAuthError,
25
25
  meetingNetworkError,
26
26
  meetingValidationError
27
- } from "./chunk-6DVL5IN5.js";
27
+ } from "./chunk-CI2RF3AJ.js";
28
28
  import {
29
29
  reportPlatformError
30
30
  } from "./chunk-6N4JPNFL.js";
@@ -298,7 +298,8 @@ function createMeetingHost(ctx, dependencies = {}) {
298
298
  exitCode: 1
299
299
  });
300
300
  }
301
- throw new MeetingCliError("api", "business_error", message, {
301
+ const typeMismatchHint = /接口类型不一致/.test(message) ? "\uFF1BEB \u5E94\u7528\u91CC\u8BE5\u52A8\u4F5C\u6D41\u7C7B\u578B\u4E0E\u8C03\u7528\u65B9\u5F0F\u4E0D\u7B26\uFF1Aupdate \u7C7B\u63A5\u53E3\u9700\u914D\u6210\u300C\u4FEE\u6539\u6570\u636E\u300D\uFF0Ccreate \u7C7B\u9700\u914D\u6210\u300C\u65B0\u5EFA\u6570\u636E\u300D" : "";
302
+ throw new MeetingCliError("api", "business_error", `${message}${typeMismatchHint}`, {
302
303
  code,
303
304
  details: { code, message },
304
305
  exitCode: 1
@@ -420,7 +421,10 @@ var NO_FALLBACK_SUBTYPES = /* @__PURE__ */ new Set([
420
421
  "flow_not_launchable",
421
422
  "target_changed",
422
423
  "env_unavailable",
423
- "env_fallback"
424
+ "env_fallback",
425
+ // 服务端业务错(如「update_meeting_sign_info接口类型不一致」):参数/配置问题,
426
+ // 换标准版不可能解决,只会让调用方白跑一轮并掩盖真实错误。
427
+ "business_error"
424
428
  ]);
425
429
  function describe(error) {
426
430
  if (error instanceof MeetingCliError) {
@@ -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-LITYOH2W.js");
69
- const { meetingStateDir } = await import("./env-BVVFIN4P.js");
68
+ const { getMeetingOperation } = await import("./registry-WZCCBI5L.js");
69
+ const { meetingStateDir } = await import("./env-LQBLL3MZ.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}`;
@@ -78,7 +78,7 @@ async function ensureMinuteDoc(env, input) {
78
78
  });
79
79
  const dir = join(meetingStateDir(env.ctx), "minute-docs");
80
80
  await mkdir(dir, { recursive: true });
81
- const filePath = join(dir, `${id}.docx`);
81
+ const filePath = join(dir, `${fileName}.docx`);
82
82
  await writeFile(filePath, buf);
83
83
  const upload = await getMeetingOperation("meeting.attachment.upload").handler(
84
84
  { file: filePath, name: `${fileName}.docx`, module: "meeting", refId: mtId },
@@ -89,7 +89,7 @@ async function ensureMinuteDoc(env, input) {
89
89
  let docId = "";
90
90
  let docError = "";
91
91
  try {
92
- const { executeCaizhilianOperation } = await import("./operations-ZPWBMYKE.js");
92
+ const { executeCaizhilianOperation } = await import("./operations-6NXJ7RTE.js");
93
93
  const { createCaizhilianHost } = await import("./host-TTSGY5NZ.js");
94
94
  const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
95
95
  const caizhilianEnv = {
@@ -128,7 +128,7 @@ async function ensureMinuteDoc(env, input) {
128
128
  id,
129
129
  mt_id: mtId,
130
130
  doc_file: fileId,
131
- ...docId ? { mt_minutes: JSON.stringify([{ id: docId, name: `${fileName}.docx` }]) } : {},
131
+ ...docId ? { mt_minutes: docId } : {},
132
132
  file_type: "0",
133
133
  minutes_status: "2"
134
134
  },
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  executeCaizhilianOperation
5
- } from "./chunk-WMB3SMXI.js";
5
+ } from "./chunk-WINR2Q6K.js";
6
6
  import "./chunk-VMCCRWFO.js";
7
7
  import "./chunk-P5GQRWDC.js";
8
8
  import "./chunk-7BDPM5ST.js";
@@ -4,17 +4,17 @@ import {
4
4
  getMeetingOperation,
5
5
  hasMeetingOperation,
6
6
  meetingOperationDefinitions
7
- } from "./chunk-WHJIUKJW.js";
8
- import "./chunk-6MS3RLPO.js";
7
+ } from "./chunk-FM7B5BIR.js";
8
+ import "./chunk-MQBMMJUV.js";
9
9
  import "./chunk-WMRNO6IU.js";
10
- import "./chunk-TJUAGZU7.js";
11
- import "./chunk-7EBV7Q3R.js";
12
- import "./chunk-XU3FL3AW.js";
13
- import "./chunk-FDAJC7R4.js";
14
- import "./chunk-UI66EMOR.js";
15
- import "./chunk-AHJZIMCX.js";
16
- import "./chunk-L2LMBFG5.js";
17
- import "./chunk-6DVL5IN5.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";
18
18
  import "./chunk-7BDPM5ST.js";
19
19
  import "./chunk-SHYQUBY3.js";
20
20
  import "./chunk-UG5G54VL.js";
@@ -7,10 +7,10 @@ import {
7
7
  loadRooms,
8
8
  recommendRooms,
9
9
  rememberFrequentRoom
10
- } from "./chunk-UI66EMOR.js";
11
- import "./chunk-AHJZIMCX.js";
12
- import "./chunk-L2LMBFG5.js";
13
- import "./chunk-6DVL5IN5.js";
10
+ } from "./chunk-XR5BGFNT.js";
11
+ import "./chunk-U2DWV6JC.js";
12
+ import "./chunk-I3BFBBP2.js";
13
+ import "./chunk-CI2RF3AJ.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-FDAJC7R4.js";
12
- import "./chunk-AHJZIMCX.js";
13
- import "./chunk-L2LMBFG5.js";
14
- import "./chunk-6DVL5IN5.js";
11
+ } from "./chunk-AQOPPNTR.js";
12
+ import "./chunk-U2DWV6JC.js";
13
+ import "./chunk-I3BFBBP2.js";
14
+ import "./chunk-CI2RF3AJ.js";
15
15
  import "./chunk-7BDPM5ST.js";
16
16
  import "./chunk-UG5G54VL.js";
17
17
  import "./chunk-BUSC6UAE.js";
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  firstPositionalToken,
8
8
  registerCommands,
9
9
  toCommandMetadata
10
- } from "./chunks/chunk-DVR2EDUU.js";
10
+ } from "./chunks/chunk-6YWHRXEQ.js";
11
11
  import "./chunks/chunk-2IGZUMNG.js";
12
12
  import "./chunks/chunk-FMNCSYIG.js";
13
13
  import "./chunks/chunk-AJ62BGAW.js";
@@ -31,7 +31,7 @@ function lazyShortcut(definition) {
31
31
  placeholder.allowExcessArguments(true);
32
32
  placeholder.helpOption(false);
33
33
  placeholder.action(async () => {
34
- const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-JHGFCKJN.js");
34
+ const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-GCA6HDOB.js");
35
35
  await dispatchLazyShortcut(definition, shortcutMetadata());
36
36
  });
37
37
  }
@@ -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-JOHV4RH3.js")).meetingShortcut
94
+ load: async () => (await import("./chunks/meeting-GMRQZFJP.js")).meetingShortcut
95
95
  }),
96
96
  lazyShortcut({
97
97
  name: "okr",
@@ -151,7 +151,7 @@ var builtinShortcuts = [
151
151
  lazyShortcut({
152
152
  name: "caizhilian",
153
153
  description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
154
- load: async () => (await import("./chunks/caizhilian-QJ4FLSQJ.js")).caizhilianShortcut
154
+ load: async () => (await import("./chunks/caizhilian-5NM4X5HG.js")).caizhilianShortcut
155
155
  }),
156
156
  lazyShortcut({
157
157
  name: "contract",
@@ -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-WVICO3DT.js")).dataShortcut
174
+ load: async () => (await import("./chunks/data-ZVS3BWPT.js")).dataShortcut
175
175
  })
176
176
  ];
177
177
  function shortcutMetadata() {
@@ -327,7 +327,33 @@ function openUrlWithSystemHandler(url) {
327
327
  });
328
328
  });
329
329
  }
330
- export function buildE10AuthorizeUrl(baseUrl, redirectUri, agentType) {
330
+ /**
331
+ * 统一认证页面的推广渠道标识(`promotionKeyword`)。
332
+ *
333
+ * 该参数由 E10 侧用于统计「登录从哪个智能体入口发起」,因此取值必须是稳定的小写标识:
334
+ * 千问的宿主 key 是 `qwen`、小 e 的 `agentType` 是 `XiaoE`,但关键字统一写
335
+ * `qianwen` / `xiaoe`。未命中规则的(含终端默认的 `weaver-work-cli`)不下发该参数,
336
+ * 避免把 `weaverworkcli` 这类内部名当成渠道写进统计。
337
+ *
338
+ * 别名同时收中文:各业务 skill 让 Agent 传的是「当前智能体名称」,实际常写成「豆包」「千问」。
339
+ * 新增智能体时在这里补一条规则即可。
340
+ */
341
+ const PROMOTION_KEYWORD_RULES = [
342
+ { keyword: 'xiaoe', aliases: ['xiaoe', '小e', '智能小e'] },
343
+ { keyword: 'workbuddy', aliases: ['workbuddy'] },
344
+ { keyword: 'codex', aliases: ['codex', 'openaicodex'] },
345
+ { keyword: 'doubao', aliases: ['doubao', '豆包', '豆包办公'] },
346
+ { keyword: 'qianwen', aliases: ['qwen', 'qianwen', 'qwenwork', '千问', '通义千问', '千问办公'] },
347
+ ];
348
+ /** 把 `agentType` 归一化成 `promotionKeyword`;无法归类时返回空串(调用方不下发该参数)。 */
349
+ export function resolvePromotionKeyword(agentType) {
350
+ const normalized = normalizeAgentAlias(agentType);
351
+ if (!normalized)
352
+ return '';
353
+ const matched = PROMOTION_KEYWORD_RULES.find(({ aliases }) => aliases.some((alias) => normalized.startsWith(alias)));
354
+ return matched ? matched.keyword : '';
355
+ }
356
+ export function buildE10AuthorizeUrl(baseUrl, redirectUri, agentType, promotionKeyword = resolvePromotionKeyword(agentType)) {
331
357
  const authorizeParams = new URLSearchParams({
332
358
  redirect_uri: redirectUri,
333
359
  response_type: 'code',
@@ -335,6 +361,8 @@ export function buildE10AuthorizeUrl(baseUrl, redirectUri, agentType) {
335
361
  agent_type: agentType,
336
362
  from: agentType,
337
363
  });
364
+ if (promotionKeyword)
365
+ authorizeParams.set('promotionKeyword', promotionKeyword);
338
366
  return `${baseUrl}/papi/sso/oauth2.0/authorize?${authorizeParams.toString()}`;
339
367
  }
340
368
  /** Node's HTTP parser exposes the first unread bytes when TLS is sent to an HTTP listener. */
@@ -121,7 +121,10 @@ export function buildMultipart(fields, file) {
121
121
  }
122
122
  if (file) {
123
123
  const mime = MIME_BY_EXT[extname(file.meta.name).toLowerCase()] || 'application/octet-stream';
124
- form.append(file.field, new Blob([new Uint8Array(file.meta.content)], { type: mime }), file.meta.name);
124
+ // Buffer 底层恒为普通 ArrayBuffer(fs.readFile 不给 SharedArrayBuffer),
125
+ // 取零拷贝视图作为 Blob 分片,避免整块内容的多余拷贝。
126
+ const bytes = new Uint8Array(file.meta.content.buffer, file.meta.content.byteOffset, file.meta.content.byteLength);
127
+ form.append(file.field, new Blob([bytes], { type: mime }), file.meta.name);
125
128
  }
126
129
  return form;
127
130
  }
@@ -22,6 +22,22 @@ const MARKDOWN_ALLOWED_EXT = ['.md', '.markdown'];
22
22
  const CREATE_DETAIL_PATH = '/api/doc/document/createDetail';
23
23
  /** 源 CreateDocumentByUploadPlugin.MAX_UPLOAD_WORKERS。 */
24
24
  const MAX_UPLOAD_WORKERS = 8;
25
+ /** 并发上限保护值:环境变量给得过大时夹取,避免并发风暴打爆服务端。 */
26
+ const MAX_UPLOAD_WORKERS_CAP = 32;
27
+ /**
28
+ * 批量上传与文件元数据读取的并发上限。
29
+ * 默认 8(与源插件 ThreadPoolExecutor(min(8, n)) 一致);
30
+ * 可用环境变量 WEAVER_CAIZHILIAN_UPLOAD_MAX_WORKERS 微调(1~32),非法值回落默认。
31
+ */
32
+ function uploadMaxWorkers() {
33
+ const raw = process.env.WEAVER_CAIZHILIAN_UPLOAD_MAX_WORKERS;
34
+ if (raw === undefined)
35
+ return MAX_UPLOAD_WORKERS;
36
+ const parsed = Number(raw);
37
+ if (!Number.isInteger(parsed) || parsed < 1)
38
+ return MAX_UPLOAD_WORKERS;
39
+ return Math.min(parsed, MAX_UPLOAD_WORKERS_CAP);
40
+ }
25
41
  /** 源 UpdateDocFieldPlugin._FIELD_MAP:field -> (filed, arg_key, allow_empty)。 */
26
42
  const FIELD_MAP = {
27
43
  name: { filed: 'name', argKey: 'name', allowEmpty: false },
@@ -472,9 +488,22 @@ async function planCreateByUpload(args, env, action) {
472
488
  sharers: JSON.stringify(sharers),
473
489
  extraParameters: '{}',
474
490
  };
491
+ // 并行读文件元数据(重叠本地 I/O);错误仍按输入顺序抛出,与串行版语义一致。
492
+ const settledMetas = await mapWithConcurrency(filePaths, uploadMaxWorkers(), async (filePath) => {
493
+ try {
494
+ return { ok: true, meta: await readFileMetadata(filePath) };
495
+ }
496
+ catch (error) {
497
+ return { ok: false, error };
498
+ }
499
+ });
475
500
  const metas = [];
476
- for (const filePath of filePaths)
477
- metas.push(await readFileMetadata(filePath));
501
+ for (const item of settledMetas) {
502
+ if (item.ok)
503
+ metas.push(item.meta);
504
+ else
505
+ throw item.error;
506
+ }
478
507
  return {
479
508
  filePaths,
480
509
  folderId,
@@ -557,7 +586,7 @@ const createByUploadHandler = {
557
586
  upload: {
558
587
  path: '/api/file/module/upload',
559
588
  extra_result_fields: ['docId'],
560
- max_workers: MAX_UPLOAD_WORKERS,
589
+ max_workers: uploadMaxWorkers(),
561
590
  deferred_to_apply: true,
562
591
  },
563
592
  }, lease, plan.warnings);
@@ -571,7 +600,7 @@ const createByUploadHandler = {
571
600
  return caizhilianSuccess(action, data, { batch: false }, plan.warnings);
572
601
  }
573
602
  const warnings = [...plan.warnings];
574
- const results = await mapWithConcurrency(plan.metas, MAX_UPLOAD_WORKERS, async (meta, index) => {
603
+ const results = await mapWithConcurrency(plan.metas, uploadMaxWorkers(), async (meta, index) => {
575
604
  try {
576
605
  return await uploadOneDocument(env, meta, plan, action);
577
606
  }
@@ -398,7 +398,6 @@ export const dataShortcut = {
398
398
  .option('--header <k: v>', '额外请求头(单个)')
399
399
  .option('--headers <json|@file>', '额外请求头(JSON 对象)')
400
400
  .option('--method <GET|POST|FORM>', '提交方式,默认取 confAttrs.http_method')
401
- .option('--limit <n>', '行数上限,默认 50;0 = 不截断')
402
401
  .option('--fields <a,b|@f>', '只保留这些行字段')
403
402
  .option('--raw', '原样输出响应体')
404
403
  .option('--show-params', '只打印入/出参说明,不调接口')
@@ -54,7 +54,7 @@ const INPUT_SCHEMAS = {
54
54
  required: [],
55
55
  optional: [
56
56
  'conf_key', 'group', 'type', 'conf_file', 'args', 'query', 'header', 'headers',
57
- 'method', 'limit', 'fields', 'raw', 'show_params', 'full', 'with_example', 'no_example',
57
+ 'method', 'fields', 'raw', 'show_params', 'full', 'with_example', 'no_example',
58
58
  'dry_run', 'timeout',
59
59
  ],
60
60
  },
@@ -136,7 +136,6 @@ export async function moduleCall(input, host) {
136
136
  let group = typeof input.group === 'string' ? input.group : '';
137
137
  const confType = typeof input.type === 'string' && input.type ? input.type : 'api';
138
138
  const timeoutMs = Math.max(1, Number(input.timeout || '60') || 60) * 1000;
139
- const limit = input.limit === undefined || input.limit === true ? 50 : (Number(input.limit) || 0);
140
139
  const fields = typeof input.fields === 'string' && input.fields
141
140
  ? readListArg(input.fields).split(',').map((item) => item.trim()).filter(Boolean)
142
141
  : null;
@@ -341,7 +340,7 @@ export async function moduleCall(input, host) {
341
340
  const out = { ok: true, api_name: apiName, http: status, via: payload.via, ...tipFields(tips) };
342
341
  let projected = null;
343
342
  if (rows !== null) {
344
- const shown = limit > 0 ? rows.slice(0, limit) : rows;
343
+ const shown = rows;
345
344
  projected = fields
346
345
  ? shown.map((row) => {
347
346
  const picked = {};
@@ -364,7 +363,7 @@ export async function moduleCall(input, host) {
364
363
  out.flags = flags;
365
364
  const lines = [`== ${apiName} ==`, `${effMethod} ${apiPath} → HTTP ${status}(via=${payload.via})`];
366
365
  if (rows !== null) {
367
- lines.push(`rows=${rows.length}${total !== null && total !== undefined ? ` / total=${total}` : ''}${limit > 0 && rows.length > limit ? `(已截断到 ${limit} 行)` : ''}`);
366
+ lines.push(`rows=${rows.length}${total !== null && total !== undefined ? ` / total=${total}` : ''}`);
368
367
  lines.push(renderTable('', projected));
369
368
  }
370
369
  else {
@@ -209,7 +209,12 @@ export function createMeetingHost(ctx, dependencies = {}) {
209
209
  exitCode: 1,
210
210
  });
211
211
  }
212
- throw new MeetingCliError('api', 'business_error', message, {
212
+ // 「接口类型不一致」是 EB 侧动作流类型配错(如 update 接口配成"新建数据"),
213
+ // 不是参数问题:直接给可执行提示,省得调用方反复试参数。
214
+ const typeMismatchHint = /接口类型不一致/.test(message)
215
+ ? ';EB 应用里该动作流类型与调用方式不符:update 类接口需配成「修改数据」,create 类需配成「新建数据」'
216
+ : '';
217
+ throw new MeetingCliError('api', 'business_error', `${message}${typeMismatchHint}`, {
213
218
  code,
214
219
  details: { code, message },
215
220
  exitCode: 1,
@@ -93,7 +93,8 @@ export async function ensureMinuteDoc(env, input) {
93
93
  });
94
94
  const dir = join(meetingStateDir(env.ctx), 'minute-docs');
95
95
  await mkdir(dir, { recursive: true });
96
- const filePath = join(dir, `${id}.docx`);
96
+ // 文档名取 basename(file_path):文件名必须是「纪要标题」,不能是 <id>.docx
97
+ const filePath = join(dir, `${fileName}.docx`);
97
98
  await writeFile(filePath, buf);
98
99
  const upload = await getMeetingOperation('meeting.attachment.upload').handler({ file: filePath, name: `${fileName}.docx`, module: 'meeting', refId: mtId }, env);
99
100
  const fileId = String(upload?.data?.fileId ?? '').trim();
@@ -135,7 +136,7 @@ export async function ensureMinuteDoc(env, input) {
135
136
  id,
136
137
  mt_id: mtId,
137
138
  doc_file: fileId,
138
- ...(docId ? { mt_minutes: JSON.stringify([{ id: docId, name: `${fileName}.docx` }]) } : {}),
139
+ ...(docId ? { mt_minutes: docId } : {}),
139
140
  file_type: '0',
140
141
  minutes_status: '2',
141
142
  }, env);
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { meetingSuccess } from './types.js';
9
9
  import { meetingValidationError } from '../errors.js';
10
+ import { meetingUrlMap } from './eb/meeting-link.js';
10
11
  const composeOutcome = {
11
12
  name: 'meeting.outcome.compose',
12
13
  resource: 'outcome',
@@ -159,9 +160,12 @@ const composeOutcome = {
159
160
  detail1: details,
160
161
  }, env);
161
162
  const decisionApplied = await publishApply.handler({ confirm: true, continuation: decisionPrepared?.data?.continuation }, env);
163
+ const urlMap = await meetingUrlMap(env, [mtId]);
164
+ const meetingUrl = urlMap.get(mtId) ?? '';
162
165
  return meetingSuccess('meeting.outcome.compose', {
163
166
  status: 'COMPLETE',
164
167
  mtId,
168
+ ...(meetingUrl ? { meetingUrl } : {}),
165
169
  minuteId,
166
170
  minuteDoc,
167
171
  minutesStatus: '2',