weaver-work-cli 0.1.59 → 0.1.61

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 (124) hide show
  1. package/dist/chunks/{archive-4SQAVTIB.js → archive-S2VKZWQ3.js} +2 -2
  2. package/dist/chunks/{archive-oa-W2UEJ67L.js → archive-oa-HEDSIUUY.js} +2 -2
  3. package/dist/chunks/{asset-EGZEABBI.js → asset-HYH4W357.js} +2 -2
  4. package/dist/chunks/{asset-idle-EBUZBB6M.js → asset-idle-N7REBNGL.js} +2 -2
  5. package/dist/chunks/{attachment-content-TP6WDNC6.js → attachment-content-VYYA75FR.js} +3 -3
  6. package/dist/chunks/{blog-2YKMWOWI.js → blog-SLMZZICV.js} +2 -2
  7. package/dist/chunks/{caizhilian-5NM4X5HG.js → caizhilian-RV43KKBT.js} +4 -4
  8. package/dist/chunks/{calendar-H4QTJCUY.js → calendar-DMVZ4OLY.js} +2 -2
  9. package/dist/chunks/{chunk-QNPIY5R6.js → chunk-6XSSAUNW.js} +4 -4
  10. package/dist/chunks/{chunk-AQOPPNTR.js → chunk-BIA2NKUG.js} +4 -4
  11. package/dist/chunks/{chunk-VMCCRWFO.js → chunk-BQYX2UX5.js} +2 -2
  12. package/dist/chunks/{chunk-CI2RF3AJ.js → chunk-DTCQFTHW.js} +1 -1
  13. package/dist/chunks/{chunk-I3BFBBP2.js → chunk-E5YD5JWR.js} +1 -1
  14. package/dist/chunks/{chunk-PH7N4UFT.js → chunk-EGANE35F.js} +1 -1
  15. package/dist/chunks/{chunk-Z4IPY5GV.js → chunk-H6YOMI3U.js} +2 -2
  16. package/dist/chunks/{chunk-U2DWV6JC.js → chunk-ILALC2N6.js} +1 -1
  17. package/dist/chunks/{chunk-WINR2Q6K.js → chunk-KXJA42EA.js} +86 -19
  18. package/dist/chunks/{chunk-CQ4OVCKG.js → chunk-KY3R42RS.js} +2 -2
  19. package/dist/chunks/{chunk-WVH5ESDA.js → chunk-NRYDJN4J.js} +1 -1
  20. package/dist/chunks/{chunk-TGM7BWEH.js → chunk-P6TXQK75.js} +2 -2
  21. package/dist/chunks/{chunk-6YWHRXEQ.js → chunk-QBDXJS2W.js} +119 -9
  22. package/dist/chunks/{chunk-2IGZUMNG.js → chunk-SHX7XBYR.js} +180 -18
  23. package/dist/chunks/{chunk-XR5BGFNT.js → chunk-T2KVJFWJ.js} +10 -4
  24. package/dist/chunks/{chunk-FMNCSYIG.js → chunk-TEZHIB6T.js} +2 -2
  25. package/dist/chunks/{chunk-2FHP4PYS.js → chunk-UBGWIXU3.js} +116 -40
  26. package/dist/chunks/{chunk-5N222HK6.js → chunk-UBRWONP4.js} +2 -2
  27. package/dist/chunks/{chunk-MQBMMJUV.js → chunk-UQFPF4EX.js} +2 -2
  28. package/dist/chunks/{chunk-4GG72JAT.js → chunk-V2LASYKO.js} +2 -2
  29. package/dist/chunks/{chunk-FM7B5BIR.js → chunk-VBFBMM7G.js} +61 -53
  30. package/dist/chunks/{chunk-ZHPCNM2S.js → chunk-VNYOUAWV.js} +11 -11
  31. package/dist/chunks/{chunk-SFM3M2L3.js → chunk-WIWDVETN.js} +19 -3
  32. package/dist/chunks/{chunk-44KJ7WFA.js → chunk-XT77MP54.js} +2 -2
  33. package/dist/chunks/chunk-YI2YMW5N.js +111 -0
  34. package/dist/chunks/{conflict-Y3ESXYIA.js → conflict-GFJRS6I7.js} +2 -2
  35. package/dist/chunks/{contract-LLRKMLQQ.js → contract-U3ZGNRWB.js} +2 -2
  36. package/dist/chunks/{cowork-2RDFBZWB.js → cowork-EX7PKIDK.js} +2 -2
  37. package/dist/chunks/{create-flow-JHQSA6JF.js → create-flow-EJZD434E.js} +6 -6
  38. package/dist/chunks/{data-ZVS3BWPT.js → data-FOODGAMF.js} +278 -123
  39. package/dist/chunks/{ebuilder-form-TWSXS5NA.js → ebuilder-form-I2EOKODG.js} +5 -5
  40. package/dist/chunks/{ehr-52GBKNJR.js → ehr-TE4RFNID.js} +2 -2
  41. package/dist/chunks/entry-mode-ZOLSXEGX.js +19 -0
  42. package/dist/chunks/{env-LQBLL3MZ.js → env-TID5NFR6.js} +2 -2
  43. package/dist/chunks/{esb-HJSXCEOM.js → esb-7L6MHYLB.js} +4 -4
  44. package/dist/chunks/{factory-X7PN6B3B.js → factory-OG7BPMH5.js} +1 -1
  45. package/dist/chunks/{fna-OBACRT3J.js → fna-6V2ENR3Y.js} +2 -2
  46. package/dist/chunks/{group-chat-PPFY7SPV.js → group-chat-5DKPWIHL.js} +3 -3
  47. package/dist/chunks/{host-TTSGY5NZ.js → host-3DLYA54R.js} +3 -3
  48. package/dist/chunks/{host-KJT3G5D2.js → host-GOJHHTPY.js} +3 -3
  49. package/dist/chunks/{host-KOWUMNAY.js → host-OGBHL75G.js} +3 -3
  50. package/dist/chunks/{host-MFXRA2MY.js → host-ONZC6AE7.js} +3 -3
  51. package/dist/chunks/{host-W4JCNRFS.js → host-TJ5VVHM7.js} +3 -3
  52. package/dist/chunks/{host-2BKMPWDH.js → host-VTPAWDZV.js} +3 -3
  53. package/dist/chunks/{hrm-AK3WGBMN.js → hrm-2N7NFQDZ.js} +3 -3
  54. package/dist/chunks/{im-JZSBPO4Z.js → im-XCH47ZBN.js} +3 -3
  55. package/dist/chunks/{invoice-6XDMPCWB.js → invoice-XQRKMGNY.js} +3 -3
  56. package/dist/chunks/{jiuchuanhui-K4EQU6GK.js → jiuchuanhui-PL6DRPBM.js} +2 -2
  57. package/dist/chunks/{lazy-dispatch-GCA6HDOB.js → lazy-dispatch-UATEN7H7.js} +5 -5
  58. package/dist/chunks/{mail-IKVCQCVZ.js → mail-Q7Z4CQ4D.js} +2 -2
  59. package/dist/chunks/{meeting-GMRQZFJP.js → meeting-5E3BNARL.js} +13 -12
  60. package/dist/chunks/{minute-doc-JXH3MNC7.js → minute-doc-NXRE5C77.js} +4 -4
  61. package/dist/chunks/{okr-KV43FPPX.js → okr-3O3XNYOK.js} +2 -2
  62. package/dist/chunks/{operations-6NXJ7RTE.js → operations-EZWG72FH.js} +4 -4
  63. package/dist/chunks/performance-Y7CPNSOR.js +1295 -0
  64. package/dist/chunks/{plan-WOYR4WEG.js → plan-BLGPZF5M.js} +2 -2
  65. package/dist/chunks/{project-CQJKBUIL.js → project-6MZMLJMP.js} +2 -2
  66. package/dist/chunks/{reception-MPBU3JXC.js → reception-F2VT2X52.js} +2 -2
  67. package/dist/chunks/{recruit-stage-USTTRHOX.js → recruit-stage-4ETIBMIW.js} +2 -2
  68. package/dist/chunks/{registry-GURQG4ZV.js → registry-3FYSWV3U.js} +3 -3
  69. package/dist/chunks/{registry-SS5J2FZQ.js → registry-7RS74TCK.js} +4 -4
  70. package/dist/chunks/{registry-WZCCBI5L.js → registry-I4DVPDMU.js} +11 -10
  71. package/dist/chunks/{room-recommend-CKU5NF2E.js → room-recommend-GWCVKCXW.js} +4 -4
  72. package/dist/chunks/{schedule-DEFAO2RY.js → schedule-6AN63MJQ.js} +4 -4
  73. package/dist/chunks/{smart-extract-APX2PNIN.js → smart-extract-SR4SJJKN.js} +3 -3
  74. package/dist/chunks/{workflow-WMPW3WSB.js → workflow-KF7FA2UQ.js} +7 -7
  75. package/dist/cmd/refs/index.js +124 -4
  76. package/dist/core/output.js +199 -26
  77. package/dist/core/refs.js +36 -0
  78. package/dist/index.js +38 -33
  79. package/dist/internal/e10/auth/xiaoe.js +25 -3
  80. package/dist/shortcuts/caizhilian/operations/files.js +86 -15
  81. package/dist/shortcuts/data/index.js +12 -2
  82. package/dist/shortcuts/data/manifest.js +4 -2
  83. package/dist/shortcuts/data/operations/attribution.js +229 -0
  84. package/dist/shortcuts/data/operations/ds.js +87 -92
  85. package/dist/shortcuts/data/operations/index.js +3 -1
  86. package/dist/shortcuts/index.js +5 -0
  87. package/dist/shortcuts/meeting/operations/eb/create-flow.js +111 -12
  88. package/dist/shortcuts/meeting/operations/eb/entry-mode.js +116 -0
  89. package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
  90. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +11 -0
  91. package/dist/shortcuts/meeting/operations/registry.js +4 -0
  92. package/dist/shortcuts/performance/continuation.js +74 -0
  93. package/dist/shortcuts/performance/errors.js +65 -0
  94. package/dist/shortcuts/performance/host.js +105 -0
  95. package/dist/shortcuts/performance/index.js +109 -0
  96. package/dist/shortcuts/performance/manifest.js +30 -0
  97. package/dist/shortcuts/performance/operations/hrm-resolve.js +114 -0
  98. package/dist/shortcuts/performance/operations/registry.js +44 -0
  99. package/dist/shortcuts/performance/operations/scheme-detail.js +70 -0
  100. package/dist/shortcuts/performance/operations/scheme-draft.js +116 -0
  101. package/dist/shortcuts/performance/operations/scheme-publish.js +158 -0
  102. package/dist/shortcuts/performance/operations/types.js +32 -0
  103. package/dist/shortcuts/performance/scheme-validate.js +307 -0
  104. package/dist/shortcuts/performance/shared.js +158 -0
  105. package/docs/agent-io-channel-design.md +67 -3
  106. package/docs/data.md +2 -1
  107. package/package.json +1 -1
  108. package/scripts/xiaoe_env.py +6 -1
  109. package/skill-template/business-info.json +19 -0
  110. package/skill-template/domains/performance.md +18 -0
  111. package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
  112. package/skills/weaver-e10-data/references/datasource.md +2 -1
  113. package/skills/weaver-e10-meeting/SKILL.md +16 -3
  114. package/skills/weaver-e10-performance/SKILL.md +202 -0
  115. package/skills/weaver-e10-performance/agents/openai.yaml +74 -0
  116. package/skills/weaver-e10-performance/references/default-assembly.md +108 -0
  117. package/skills/weaver-e10-performance/references/entity-resolution.md +69 -0
  118. package/skills/weaver-e10-performance/references/enums-and-normalization.md +80 -0
  119. package/skills/weaver-e10-performance/references/examples.md +146 -0
  120. package/skills/weaver-e10-performance/references/extraction-guide.md +144 -0
  121. package/skills/weaver-e10-performance/references/scheme-edit-req-fields.md +185 -0
  122. package/skills/weaver-e10-performance/references/scheme-setting-page.md +62 -0
  123. package/skills/weaver-e10-performance/scripts/parse_appraisal_doc.py +483 -0
  124. package/skills/weaver-e10-shared/references/json-output-contract.md +5 -0
@@ -14,13 +14,13 @@ import {
14
14
  createE10RequestRuntime,
15
15
  isE10SessionExpiredResponse,
16
16
  requireE10Session
17
- } from "./chunk-WVH5ESDA.js";
17
+ } from "./chunk-NRYDJN4J.js";
18
18
  import {
19
19
  E10_SESSION_EXPIRED_MESSAGE,
20
20
  getActiveProfile,
21
21
  hasXiaoEEnv,
22
22
  writeWithRetry
23
- } from "./chunk-SFM3M2L3.js";
23
+ } from "./chunk-WIWDVETN.js";
24
24
  import "./chunk-SHYQUBY3.js";
25
25
  import {
26
26
  CliError,
@@ -11,11 +11,11 @@ import {
11
11
  createE10RequestRuntime,
12
12
  isE10SessionExpiredResponse,
13
13
  requireE10Session
14
- } from "./chunk-WVH5ESDA.js";
14
+ } from "./chunk-NRYDJN4J.js";
15
15
  import {
16
16
  E10_SESSION_EXPIRED_MESSAGE,
17
17
  getActiveProfile
18
- } from "./chunk-SFM3M2L3.js";
18
+ } from "./chunk-WIWDVETN.js";
19
19
  import "./chunk-SHYQUBY3.js";
20
20
  import {
21
21
  CliError,
@@ -10,11 +10,11 @@ import {
10
10
  createE10RequestRuntime,
11
11
  isE10SessionExpiredResponse,
12
12
  requireE10Session
13
- } from "./chunk-WVH5ESDA.js";
13
+ } from "./chunk-NRYDJN4J.js";
14
14
  import {
15
15
  E10_SESSION_EXPIRED_MESSAGE,
16
16
  getActiveProfile
17
- } from "./chunk-SFM3M2L3.js";
17
+ } from "./chunk-WIWDVETN.js";
18
18
  import "./chunk-SHYQUBY3.js";
19
19
  import {
20
20
  CliError,
@@ -8,11 +8,11 @@ import {
8
8
  createE10RequestRuntime,
9
9
  isE10SessionExpiredResponse,
10
10
  requireE10Session
11
- } from "./chunk-WVH5ESDA.js";
11
+ } from "./chunk-NRYDJN4J.js";
12
12
  import {
13
13
  E10_SESSION_EXPIRED_MESSAGE,
14
14
  getActiveProfile
15
- } from "./chunk-SFM3M2L3.js";
15
+ } from "./chunk-WIWDVETN.js";
16
16
  import "./chunk-SHYQUBY3.js";
17
17
  import {
18
18
  CliError,
@@ -8,10 +8,10 @@ import {
8
8
  looksLikeFileId,
9
9
  meetingAttachmentContentOperations,
10
10
  parseFileIdList
11
- } from "./chunk-MQBMMJUV.js";
11
+ } from "./chunk-UQFPF4EX.js";
12
12
  import "./chunk-WMRNO6IU.js";
13
- import "./chunk-I3BFBBP2.js";
14
- import "./chunk-CI2RF3AJ.js";
13
+ import "./chunk-E5YD5JWR.js";
14
+ import "./chunk-DTCQFTHW.js";
15
15
  import "./chunk-7BDPM5ST.js";
16
16
  import "./chunk-UG5G54VL.js";
17
17
  import "./chunk-BUSC6UAE.js";
@@ -10,11 +10,11 @@ import {
10
10
  createE10RequestRuntime,
11
11
  isE10SessionExpiredResponse,
12
12
  requireE10Session
13
- } from "./chunk-WVH5ESDA.js";
13
+ } from "./chunk-NRYDJN4J.js";
14
14
  import {
15
15
  E10_SESSION_EXPIRED_MESSAGE,
16
16
  getActiveProfile
17
- } from "./chunk-SFM3M2L3.js";
17
+ } from "./chunk-WIWDVETN.js";
18
18
  import "./chunk-SHYQUBY3.js";
19
19
  import {
20
20
  CliError,
@@ -4,10 +4,10 @@ import {
4
4
  caizhilianManifest,
5
5
  caizhilianOperationDefinitions,
6
6
  executeCaizhilianOperation
7
- } from "./chunk-WINR2Q6K.js";
7
+ } from "./chunk-KXJA42EA.js";
8
8
  import {
9
9
  createCaizhilianHost
10
- } from "./chunk-VMCCRWFO.js";
10
+ } from "./chunk-BQYX2UX5.js";
11
11
  import {
12
12
  createCaizhilianContinuationSigner
13
13
  } from "./chunk-VRPH24IC.js";
@@ -18,8 +18,8 @@ import {
18
18
  reportPlatformError
19
19
  } from "./chunk-6N4JPNFL.js";
20
20
  import "./chunk-7BDPM5ST.js";
21
- import "./chunk-WVH5ESDA.js";
22
- import "./chunk-SFM3M2L3.js";
21
+ import "./chunk-NRYDJN4J.js";
22
+ import "./chunk-WIWDVETN.js";
23
23
  import "./chunk-SHYQUBY3.js";
24
24
  import {
25
25
  isCliError,
@@ -12,11 +12,11 @@ import {
12
12
  createE10RequestRuntime,
13
13
  isE10SessionExpiredResponse,
14
14
  requireE10Session
15
- } from "./chunk-WVH5ESDA.js";
15
+ } from "./chunk-NRYDJN4J.js";
16
16
  import {
17
17
  E10_SESSION_EXPIRED_MESSAGE,
18
18
  getActiveProfile
19
- } from "./chunk-SFM3M2L3.js";
19
+ } from "./chunk-WIWDVETN.js";
20
20
  import "./chunk-SHYQUBY3.js";
21
21
  import {
22
22
  CliError,
@@ -12,7 +12,7 @@ import {
12
12
  meetingValidationError,
13
13
  queryBody,
14
14
  toIdCsv
15
- } from "./chunk-CI2RF3AJ.js";
15
+ } from "./chunk-DTCQFTHW.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-6AN63MJQ.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-EJZD434E.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-6AN63MJQ.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-ILALC2N6.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-DTCQFTHW.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";
@@ -110,9 +110,9 @@ async function runScheduleConflictFlow(env, input) {
110
110
  if (!employeeId) {
111
111
  throw meetingValidationError("schedule_employee_required", "\u53D6\u4E0D\u5230\u5F53\u524D\u767B\u5F55\u7528\u6237 id\uFF0C\u65E0\u6CD5\u89E6\u53D1 ESB \u65E5\u7A0B\u67E5\u8BE2");
112
112
  }
113
- const { createEsbHost } = await import("./host-KJT3G5D2.js");
113
+ const { createEsbHost } = await import("./host-GOJHHTPY.js");
114
114
  const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
115
- const { getEsbOperation } = await import("./registry-SS5J2FZQ.js");
115
+ const { getEsbOperation } = await import("./registry-7RS74TCK.js");
116
116
  const esbEnv = {
117
117
  ctx: env.ctx,
118
118
  host: createEsbHost(env.ctx),
@@ -11,11 +11,11 @@ import {
11
11
  createE10RequestRuntime,
12
12
  isE10SessionExpiredResponse,
13
13
  requireE10Session
14
- } from "./chunk-WVH5ESDA.js";
14
+ } from "./chunk-NRYDJN4J.js";
15
15
  import {
16
16
  E10_SESSION_EXPIRED_MESSAGE,
17
17
  getActiveProfile
18
- } from "./chunk-SFM3M2L3.js";
18
+ } from "./chunk-WIWDVETN.js";
19
19
 
20
20
  // src/shortcuts/caizhilian/host.ts
21
21
  var CAIZHILAN_TIMEOUT_MS = 12e3;
@@ -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-GFJRS6I7.js");
2339
2339
  assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
2340
2340
  }
2341
2341
  const pkQuery = writePkQuery(endpoint, payload);
@@ -5,7 +5,7 @@ import {
5
5
  ebBusinessSuccess,
6
6
  meetingSuccess,
7
7
  meetingValidationError
8
- } from "./chunk-CI2RF3AJ.js";
8
+ } from "./chunk-DTCQFTHW.js";
9
9
 
10
10
  // src/shortcuts/meeting/operations/env.ts
11
11
  import { existsSync } from "node:fs";
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  isEsbFlowUnavailable
5
- } from "./chunk-CQ4OVCKG.js";
5
+ } from "./chunk-KY3R42RS.js";
6
6
  import {
7
7
  esbValidationError
8
8
  } from "./chunk-TXUG266F.js";
@@ -11,11 +11,11 @@ import {
11
11
  createE10RequestRuntime,
12
12
  isE10SessionExpiredResponse,
13
13
  requireE10Session
14
- } from "./chunk-WVH5ESDA.js";
14
+ } from "./chunk-NRYDJN4J.js";
15
15
  import {
16
16
  E10_SESSION_EXPIRED_MESSAGE,
17
17
  getActiveProfile
18
- } from "./chunk-SFM3M2L3.js";
18
+ } from "./chunk-WIWDVETN.js";
19
19
 
20
20
  // src/shortcuts/hrm/host.ts
21
21
  function inferProfile(ctx) {
@@ -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-I3BFBBP2.js";
5
+ } from "./chunk-E5YD5JWR.js";
6
6
 
7
7
  // src/shortcuts/meeting/operations/eb/cache.ts
8
8
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -5,7 +5,7 @@ import {
5
5
  CAIZHILAN_TRANSFER_TIMEOUT_MS,
6
6
  caizhilianBusinessMessage,
7
7
  isCaizhilianBusinessSuccess
8
- } from "./chunk-VMCCRWFO.js";
8
+ } from "./chunk-BQYX2UX5.js";
9
9
  import {
10
10
  CaizhilianCliError,
11
11
  caizhilianAuthError,
@@ -1898,10 +1898,12 @@ function buildMultipart(fields, file) {
1898
1898
  }
1899
1899
  if (file) {
1900
1900
  const mime = MIME_BY_EXT[extname(file.meta.name).toLowerCase()] || "application/octet-stream";
1901
+ const start = file.start ?? 0;
1902
+ const size = file.size ?? file.meta.content.byteLength - start;
1901
1903
  const bytes = new Uint8Array(
1902
1904
  file.meta.content.buffer,
1903
- file.meta.content.byteOffset,
1904
- file.meta.content.byteLength
1905
+ file.meta.content.byteOffset + start,
1906
+ size
1905
1907
  );
1906
1908
  form.append(file.field, new Blob([bytes], { type: mime }), file.meta.name);
1907
1909
  }
@@ -1940,14 +1942,14 @@ async function uploadFileToServer(host, filePath, options = {}) {
1940
1942
  const moduleDto = asRecord2(preData.uploadModuleDto);
1941
1943
  const moduleFileId = moduleDto.fileid;
1942
1944
  if (isPositiveId(moduleFileId)) {
1943
- const result2 = {
1945
+ const result = {
1944
1946
  file_id: String(moduleFileId),
1945
1947
  name: moduleDto.name || meta.name,
1946
1948
  size: moduleDto.size || meta.size,
1947
1949
  ext_name: moduleDto.extName || ""
1948
1950
  };
1949
- for (const field of options.extraResultFields ?? []) result2[field] = moduleDto[field] ?? 0;
1950
- return result2;
1951
+ for (const field of options.extraResultFields ?? []) result[field] = moduleDto[field] ?? 0;
1952
+ return result;
1951
1953
  }
1952
1954
  const preUploadId = preData.preUploadId;
1953
1955
  const uploadType = preData.uploadType;
@@ -1959,22 +1961,87 @@ async function uploadFileToServer(host, filePath, options = {}) {
1959
1961
  preUploadId: String(preUploadId),
1960
1962
  uploadType: String(uploadType)
1961
1963
  };
1962
- const uploadResponse = await host.request({
1964
+ const uploadPath = options.uploadPath ?? "/api/file/module/upload";
1965
+ const operation = options.operation ?? "caizhilian.file.upload";
1966
+ const finalize = (data2) => {
1967
+ const result = {
1968
+ file_id: String(data2.fileid ?? ""),
1969
+ name: data2.name || meta.name,
1970
+ size: data2.size || meta.size,
1971
+ ext_name: data2.extName || ""
1972
+ };
1973
+ for (const field of options.extraResultFields ?? []) result[field] = data2[field] ?? 0;
1974
+ return result;
1975
+ };
1976
+ if (uploadType === "chunk") {
1977
+ return await uploadChunked({
1978
+ host,
1979
+ meta,
1980
+ uploadBody,
1981
+ uploadPath,
1982
+ operation,
1983
+ preData,
1984
+ finalize
1985
+ });
1986
+ }
1987
+ if (uploadType !== "common" && uploadType !== "second") {
1988
+ throw caizhilianValidationError("upload_type_invalid", `\u6587\u4EF6\u670D\u52A1\u8FD4\u56DE\u672A\u77E5\u4E0A\u4F20\u7B56\u7565: ${String(uploadType)}`);
1989
+ }
1990
+ const data = responseData(await host.request({
1963
1991
  method: "POST",
1964
- path: options.uploadPath ?? "/api/file/module/upload",
1992
+ path: uploadPath,
1965
1993
  multipart: buildMultipart(uploadBody, { field: "file", meta }),
1966
1994
  timeoutMs: TRANSFER_TIMEOUT_MS,
1967
- operation: options.operation ?? "caizhilian.file.upload"
1968
- });
1969
- const data = responseData(uploadResponse);
1970
- const result = {
1971
- file_id: String(data.fileid ?? ""),
1972
- name: data.name || meta.name,
1973
- size: data.size || meta.size,
1974
- ext_name: data.extName || ""
1975
- };
1976
- for (const field of options.extraResultFields ?? []) result[field] = data[field] ?? 0;
1977
- return result;
1995
+ operation
1996
+ }));
1997
+ return finalize(data);
1998
+ }
1999
+ async function uploadChunked(deps) {
2000
+ const { host, meta, uploadBody, uploadPath, operation, preData, finalize } = deps;
2001
+ const chunkDto = asRecord2(preData.chunkDto);
2002
+ const chunkMiB = Number(chunkDto.chunkSize);
2003
+ if (!Number.isSafeInteger(chunkMiB) || chunkMiB <= 0 || meta.size <= 0) {
2004
+ throw caizhilianValidationError("chunk_size_invalid", "\u5206\u7247\u4E0A\u4F20\u9700\u8981\u975E\u7A7A\u6587\u4EF6\u548C\u6B63\u6574\u6570 MiB \u5206\u7247\u5927\u5C0F");
2005
+ }
2006
+ const chunkSize = chunkMiB * 1024 * 1024;
2007
+ if (!Number.isSafeInteger(chunkSize) || chunkSize <= 0) {
2008
+ throw caizhilianValidationError("chunk_size_invalid", "\u5206\u7247\u5927\u5C0F\u5FC5\u987B\u662F\u6709\u6548\u7684\u6B63 MiB \u503C");
2009
+ }
2010
+ const count = Math.max(1, Math.ceil(meta.size / chunkSize));
2011
+ if (chunkDto.chunkCount !== void 0 && Number(chunkDto.chunkCount) !== count) {
2012
+ throw caizhilianValidationError("chunk_count_mismatch", "\u670D\u52A1\u7AEF\u5206\u7247\u6570\u91CF\u4E0E\u672C\u5730\u8BA1\u7B97\u4E0D\u4E00\u81F4");
2013
+ }
2014
+ for (let index = 0; index < count; index++) {
2015
+ const start = index * chunkSize;
2016
+ const size = Math.min(chunkSize, meta.size - start);
2017
+ const response = await host.request({
2018
+ method: "POST",
2019
+ path: uploadPath,
2020
+ multipart: buildMultipart(
2021
+ { ...uploadBody, chunk: index, chunks: count, uploadShardSize: String(size) },
2022
+ { field: "file", meta, start, size }
2023
+ ),
2024
+ timeoutMs: TRANSFER_TIMEOUT_MS,
2025
+ operation
2026
+ });
2027
+ const data = responseData(response);
2028
+ if (index === count - 1) {
2029
+ const result = finalize(data);
2030
+ if (!result.file_id) {
2031
+ throw caizhilianValidationError("upload_not_terminal", "\u5206\u7247\u4E0A\u4F20\u672A\u8FD4\u56DE\u975E\u7A7A\u6587\u4EF6 ID");
2032
+ }
2033
+ const reported = data.size;
2034
+ if (reported !== void 0 && reported !== null && reported !== "" && Number(reported) !== meta.size) {
2035
+ throw caizhilianValidationError("upload_size_mismatch", "\u670D\u52A1\u7AEF\u6587\u4EF6\u5927\u5C0F\u4E0E\u672C\u5730\u6587\u4EF6\u4E0D\u4E00\u81F4");
2036
+ }
2037
+ return result;
2038
+ }
2039
+ const earlyFileId = data.fileid ?? data.fileId;
2040
+ if (data.endChunk !== false || earlyFileId !== void 0 && earlyFileId !== null && String(earlyFileId) !== "") {
2041
+ throw caizhilianValidationError("chunk_terminal_early", "\u4E2D\u95F4\u5206\u7247\u7F3A\u5C11\u660E\u786E\u672A\u5B8C\u6210\u72B6\u6001\u6216\u63D0\u524D\u8FD4\u56DE\u6587\u4EF6 ID");
2042
+ }
2043
+ }
2044
+ throw caizhilianValidationError("upload_not_terminal", "\u5206\u7247\u4E0A\u4F20\u672A\u786E\u8BA4\u5B8C\u6210");
1978
2045
  }
1979
2046
  function asRecord2(value) {
1980
2047
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
@@ -14,11 +14,11 @@ import {
14
14
  createE10RequestRuntime,
15
15
  isE10SessionExpiredResponse,
16
16
  requireE10Session
17
- } from "./chunk-WVH5ESDA.js";
17
+ } from "./chunk-NRYDJN4J.js";
18
18
  import {
19
19
  E10_SESSION_EXPIRED_MESSAGE,
20
20
  getActiveProfile
21
- } from "./chunk-SFM3M2L3.js";
21
+ } from "./chunk-WIWDVETN.js";
22
22
 
23
23
  // src/shortcuts/esb/host.ts
24
24
  var ESB_PATHS = {
@@ -17,7 +17,7 @@ import {
17
17
  startFetchTiming,
18
18
  summarizeXiaoEFailureKind,
19
19
  tryXiaoEUnifiedLogin
20
- } from "./chunk-SFM3M2L3.js";
20
+ } from "./chunk-WIWDVETN.js";
21
21
  import {
22
22
  CliError,
23
23
  toErrorEnvelope
@@ -9,11 +9,11 @@ import {
9
9
  createE10RequestRuntime,
10
10
  isE10AuthenticationRequired,
11
11
  requireE10Session
12
- } from "./chunk-WVH5ESDA.js";
12
+ } from "./chunk-NRYDJN4J.js";
13
13
  import {
14
14
  E10_SESSION_EXPIRED_MESSAGE,
15
15
  getActiveProfile
16
- } from "./chunk-SFM3M2L3.js";
16
+ } from "./chunk-WIWDVETN.js";
17
17
 
18
18
  // src/shortcuts/workflow/host.ts
19
19
  var DEFAULT_TIMEOUT_MS = 3e4;
@@ -9,18 +9,20 @@ import {
9
9
  pickValue,
10
10
  pruneRefs,
11
11
  readRef,
12
+ readTextWindow,
13
+ readWindow,
12
14
  refMaxBytes,
13
15
  refMaxCount,
14
16
  resolveRefInput,
15
17
  resultThresholdBytes
16
- } from "./chunk-2IGZUMNG.js";
17
- import {
18
- Command,
19
- clearInvoiceTokenForSession
20
- } from "./chunk-FMNCSYIG.js";
18
+ } from "./chunk-SHX7XBYR.js";
21
19
  import {
22
20
  refsDir
23
21
  } from "./chunk-AJ62BGAW.js";
22
+ import {
23
+ Command,
24
+ clearInvoiceTokenForSession
25
+ } from "./chunk-TEZHIB6T.js";
24
26
  import {
25
27
  shouldReportPlatformError,
26
28
  toPlatformError
@@ -32,7 +34,7 @@ import {
32
34
  normalizeXiaoEAuthErrorLogLimit,
33
35
  readXiaoEAuthErrorLog,
34
36
  xiaoEAuthLogSecrets
35
- } from "./chunk-WVH5ESDA.js";
37
+ } from "./chunk-NRYDJN4J.js";
36
38
  import {
37
39
  E10AuthSession,
38
40
  XIAOE_AGENT_TYPE,
@@ -65,7 +67,7 @@ import {
65
67
  switchActiveProfile,
66
68
  tryXiaoEUnifiedLogin,
67
69
  upsertAgentHost
68
- } from "./chunk-SFM3M2L3.js";
70
+ } from "./chunk-WIWDVETN.js";
69
71
  import {
70
72
  packageFileUrl,
71
73
  packagePath
@@ -1487,12 +1489,120 @@ var refsCommand = {
1487
1489
  }
1488
1490
  ctx.output.write(record.envelope, { json: true, persist: false });
1489
1491
  }));
1490
- refs.command("get").description("Print one value from a persisted result by JSON path").argument("<refId>", "reference id").argument("<path>", "JSON path, e.g. data.items[0].fid").action(action((ctx, refId, path) => {
1492
+ refs.command("get").description("Print one value from a persisted result by JSON path (large arrays/text are paged)").argument("<refId>", "reference id").argument("<path>", "JSON path, e.g. data.items[0].fid").option("--offset <n>", "array start index, default 0").option("--limit <n>", "how many array items to print").option("--char-offset <n>", "text start position in Unicode characters, default 0").option("--char-limit <n>", "how many Unicode characters to print").action(action((ctx, refId, path, options) => {
1491
1493
  const id = String(refId ?? "").trim();
1492
1494
  const jsonPath = String(path ?? "").trim();
1493
1495
  if (!id || !jsonPath) throw new CliError("refId \u548C JSON \u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A", 2 /* UsageError */);
1496
+ const opts = asOptions2(options);
1497
+ const hasArrayWindow = opts.offset !== void 0 || opts.limit !== void 0;
1498
+ const hasTextWindow = opts.charOffset !== void 0 || opts.charLimit !== void 0;
1499
+ if (hasArrayWindow && hasTextWindow) {
1500
+ throw new CliError("\u6570\u7EC4\u5206\u9875\u53C2\u6570\u4E0E\u6587\u672C\u5206\u6BB5\u53C2\u6570\u4E0D\u80FD\u540C\u65F6\u4F7F\u7528", 2 /* UsageError */);
1501
+ }
1502
+ const offset = opts.offset === void 0 ? 0 : Number(opts.offset);
1503
+ const requestedLimit = opts.limit === void 0 ? void 0 : Number(opts.limit);
1504
+ const charOffset = opts.charOffset === void 0 ? 0 : Number(opts.charOffset);
1505
+ const requestedCharLimit = opts.charLimit === void 0 ? void 0 : Number(opts.charLimit);
1506
+ if (!Number.isInteger(offset) || offset < 0) {
1507
+ throw new CliError("--offset \u5FC5\u987B\u662F\u975E\u8D1F\u6574\u6570", 2 /* UsageError */);
1508
+ }
1509
+ if (requestedLimit !== void 0 && (!Number.isInteger(requestedLimit) || requestedLimit < 1)) {
1510
+ throw new CliError("--limit \u5FC5\u987B\u662F\u6B63\u6574\u6570", 2 /* UsageError */);
1511
+ }
1512
+ if (!Number.isInteger(charOffset) || charOffset < 0) {
1513
+ throw new CliError("--char-offset \u5FC5\u987B\u662F\u975E\u8D1F\u6574\u6570", 2 /* UsageError */);
1514
+ }
1515
+ if (requestedCharLimit !== void 0 && (!Number.isInteger(requestedCharLimit) || requestedCharLimit < 1)) {
1516
+ throw new CliError("--char-limit \u5FC5\u987B\u662F\u6B63\u6574\u6570", 2 /* UsageError */);
1517
+ }
1494
1518
  const record = readRef(ctx, id);
1495
- ctx.output.write(pickValue(record.envelope, jsonPath));
1519
+ const picked = pickValue(record.envelope, jsonPath);
1520
+ const configuredLimit = resultThresholdBytes(ctx);
1521
+ const displayLimit = configuredLimit > 0 ? configuredLimit : DEFAULT_RESULT_THRESHOLD_BYTES;
1522
+ if (typeof picked === "string") {
1523
+ if (hasArrayWindow) {
1524
+ throw new CliError("\u5B57\u7B26\u4E32\u8BF7\u4F7F\u7528 --char-offset / --char-limit \u5206\u6BB5\u8BFB\u53D6", 2 /* UsageError */);
1525
+ }
1526
+ const bytes2 = bytesOf(picked);
1527
+ if (!hasTextWindow && bytes2 <= displayLimit) {
1528
+ ctx.output.write(picked, { json: true, persist: false });
1529
+ return;
1530
+ }
1531
+ const totalChars = Array.from(picked).length;
1532
+ const perChar = totalChars > 0 ? Math.max(1, Math.ceil(bytes2 / totalChars)) : 1;
1533
+ const autoLimit2 = Math.max(1, Math.floor((displayLimit - 2048) / perChar));
1534
+ const pageOf2 = (size3) => {
1535
+ const window = readTextWindow(picked, charOffset, size3);
1536
+ const nextHint = window.hasMore ? `\u8FD8\u6709 ${window.totalChars - window.charOffset - window.returnedChars} \u5B57\u7B26\uFF1Arefs get ${id} ${jsonPath} --char-offset ${window.nextCharOffset} --char-limit ${size3}` : void 0;
1537
+ return {
1538
+ operation: "refs.get",
1539
+ path: jsonPath,
1540
+ unit: "chars",
1541
+ totalChars: window.totalChars,
1542
+ charOffset: window.charOffset,
1543
+ returnedChars: window.returnedChars,
1544
+ hasMore: window.hasMore,
1545
+ ...window.nextCharOffset === void 0 ? {} : { nextCharOffset: window.nextCharOffset },
1546
+ data: window.text,
1547
+ ...nextHint === void 0 ? {} : { largeOutputNotice: nextHint }
1548
+ };
1549
+ };
1550
+ let size2 = requestedCharLimit ?? autoLimit2;
1551
+ let page2 = pageOf2(size2);
1552
+ for (let round = 0; round < 8; round += 1) {
1553
+ const pageBytes = bytesOf(page2);
1554
+ if (pageBytes <= displayLimit || size2 <= 1) break;
1555
+ size2 = Math.max(1, Math.floor(size2 * displayLimit / pageBytes) - 1);
1556
+ page2 = pageOf2(size2);
1557
+ }
1558
+ ctx.output.write(page2, { json: true, persist: false });
1559
+ return;
1560
+ }
1561
+ if (hasTextWindow) {
1562
+ throw new CliError("--char-offset / --char-limit \u53EA\u80FD\u7528\u4E8E\u5B57\u7B26\u4E32\u5B57\u6BB5", 2 /* UsageError */);
1563
+ }
1564
+ if (!Array.isArray(picked)) {
1565
+ if (hasArrayWindow) {
1566
+ throw new CliError("--offset / --limit \u53EA\u80FD\u7528\u4E8E\u6570\u7EC4\u5B57\u6BB5", 2 /* UsageError */);
1567
+ }
1568
+ const bytes2 = bytesOf(picked);
1569
+ if (bytes2 > displayLimit) {
1570
+ throw new CliError(
1571
+ `${jsonPath} \u662F\u5355\u4E2A\u975E\u6587\u672C\u503C\uFF0C\u7EA6 ${bytes2} \u5B57\u8282\uFF0C\u8D85\u8FC7\u5355\u6B21\u8F93\u51FA\u9884\u7B97 ${displayLimit} \u5B57\u8282\u3002\u8BF7\u6539\u7528\u66F4\u7EC6\u7684 JSON \u8DEF\u5F84\u53D6\u503C\uFF0C\u6216\u8D70\u4E1A\u52A1\u547D\u4EE4\u7684\u5BFC\u51FA\u80FD\u529B\u3002`,
1572
+ 2 /* UsageError */
1573
+ );
1574
+ }
1575
+ ctx.output.write(picked, { json: true, persist: false });
1576
+ return;
1577
+ }
1578
+ const total = picked.length;
1579
+ const bytes = bytesOf(picked);
1580
+ const perItem = total > 0 ? Math.max(1, Math.ceil(bytes / total)) : 1;
1581
+ const autoLimit = Math.max(1, Math.floor((displayLimit - 2048) / perItem));
1582
+ const pageOf = (size2) => {
1583
+ const window = readWindow(picked, offset, size2);
1584
+ const nextHint = window.hasMore ? `\u8FD8\u6709 ${window.total - window.offset - window.returned} \u6761\uFF1Arefs get ${id} ${jsonPath} --offset ${window.nextOffset} --limit ${size2}` : void 0;
1585
+ return {
1586
+ operation: "refs.get",
1587
+ path: jsonPath,
1588
+ total: window.total,
1589
+ offset: window.offset,
1590
+ returned: window.returned,
1591
+ hasMore: window.hasMore,
1592
+ ...window.nextOffset === void 0 ? {} : { nextOffset: window.nextOffset },
1593
+ data: window.items,
1594
+ ...nextHint === void 0 ? {} : { largeOutputNotice: nextHint }
1595
+ };
1596
+ };
1597
+ let size = requestedLimit ?? (bytes > displayLimit ? autoLimit : Math.max(total - offset, 1));
1598
+ let page = pageOf(size);
1599
+ for (let round = 0; round < 4; round += 1) {
1600
+ const pageBytes = bytesOf(page);
1601
+ if (pageBytes <= displayLimit || size <= 1) break;
1602
+ size = Math.max(1, Math.floor(size * displayLimit / pageBytes) - 1);
1603
+ page = pageOf(size);
1604
+ }
1605
+ ctx.output.write(page, { json: true, persist: false });
1496
1606
  }));
1497
1607
  refs.command("prune").description("Prune persisted results").option("--older-than <duration>", "remove results created before this age, e.g. 7d").option("--all", "remove every persisted result").action(action((ctx, options) => {
1498
1608
  const opts = asOptions2(options);