weaver-work-cli 0.1.44 → 0.1.45

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 (179) hide show
  1. package/README.md +9 -5
  2. package/dist/chunks/{archive-P6TBQGKL.js → archive-ZQ4A4TV6.js} +388 -44
  3. package/dist/chunks/{archive-oa-7TQ2NXOH.js → archive-oa-BBDP7AKJ.js} +2 -2
  4. package/dist/chunks/{asset-3ELRG37G.js → asset-ZOJVBWZH.js} +2 -2
  5. package/dist/chunks/{asset-idle-WIGMUFMD.js → asset-idle-XGB5IPGT.js} +2 -2
  6. package/dist/chunks/{attachment-content-E3276UOV.js → attachment-content-CE3GMWTS.js} +3 -3
  7. package/dist/chunks/{blog-C5NMZAAC.js → blog-QSHLZSFW.js} +2 -2
  8. package/dist/chunks/caizhilian-KCQYFH72.js +204 -0
  9. package/dist/chunks/{calendar-FI2WNSBO.js → calendar-DLGMRJQA.js} +2 -2
  10. package/dist/chunks/{chunk-CWYGFU5B.js → chunk-3WBIQLMB.js} +2 -2
  11. package/dist/chunks/{chunk-PUQS5MWL.js → chunk-3YV7PKRL.js} +1 -1
  12. package/dist/chunks/{chunk-PC7VKEB5.js → chunk-3ZMAQQ3W.js} +161 -33
  13. package/dist/chunks/{chunk-GM6J7Q4B.js → chunk-4EXOIQDI.js} +40 -10
  14. package/dist/chunks/{chunk-ETNJSKMM.js → chunk-6NXT4ICB.js} +148 -21
  15. package/dist/chunks/chunk-762M5XJS.js +215 -0
  16. package/dist/chunks/{chunk-GAMZLAG2.js → chunk-77YP6I52.js} +1 -1
  17. package/dist/chunks/{chunk-WSF4NNMR.js → chunk-CZNZKOHR.js} +2 -2
  18. package/dist/chunks/{chunk-Z7VYWPZV.js → chunk-DGMYACGJ.js} +1 -1
  19. package/dist/chunks/{chunk-TA7FXXJD.js → chunk-DLY5GUXX.js} +1 -1
  20. package/dist/chunks/{chunk-BCVYBYYT.js → chunk-GR76ZDDX.js} +2 -2
  21. package/dist/chunks/{chunk-GRDRG6HP.js → chunk-HFXK54M4.js} +2 -2
  22. package/dist/chunks/{chunk-XNIK66I4.js → chunk-JB34OE7R.js} +790 -77
  23. package/dist/chunks/{chunk-QVSWRLLU.js → chunk-JWWTI63L.js} +55 -5
  24. package/dist/chunks/{chunk-FRZKBMSW.js → chunk-LGKWL4OH.js} +176 -39
  25. package/dist/chunks/{chunk-XHK4MDR5.js → chunk-LRCPNDZA.js} +38 -6
  26. package/dist/chunks/{chunk-OF4S23UB.js → chunk-LXFVWZLM.js} +4 -4
  27. package/dist/chunks/{chunk-D4ADSZ7H.js → chunk-O6CMPO65.js} +24 -1
  28. package/dist/chunks/{chunk-N4M2DDFE.js → chunk-OAE3AZBQ.js} +11 -11
  29. package/dist/chunks/chunk-P5GQRWDC.js +60 -0
  30. package/dist/chunks/{caizhilian-5XSM2DFP.js → chunk-PGO4ILMQ.js} +41 -521
  31. package/dist/chunks/{chunk-HIT4Y6OI.js → chunk-T4MWQAQB.js} +7 -5
  32. package/dist/chunks/{chunk-F4E4EM35.js → chunk-TGAGQV4I.js} +2 -2
  33. package/dist/chunks/{chunk-UFIT2UU3.js → chunk-U6R6FZHD.js} +168 -14
  34. package/dist/chunks/{chunk-FAZTGX7S.js → chunk-VIMCY4DI.js} +5 -5
  35. package/dist/chunks/chunk-VRPH24IC.js +76 -0
  36. package/dist/chunks/{chunk-3YBDYOC4.js → chunk-YIKSL36S.js} +2 -2
  37. package/dist/chunks/{chunk-IAZ3UPY6.js → chunk-Z6UUBY37.js} +2 -2
  38. package/dist/chunks/{conflict-ARLSZJ6V.js → conflict-IYJETSGT.js} +2 -2
  39. package/dist/chunks/continuation-GW6PRWK3.js +12 -0
  40. package/dist/chunks/{contract-DNIIW5VJ.js → contract-3QLAGYQL.js} +5793 -4591
  41. package/dist/chunks/{cowork-GMLRGVIW.js → cowork-3ACICHDQ.js} +2 -2
  42. package/dist/chunks/{create-flow-J22BO65E.js → create-flow-7JLC7UID.js} +6 -6
  43. package/dist/chunks/{ebuilder-form-ANV2FHYV.js → ebuilder-form-GWDTKEI2.js} +5 -5
  44. package/dist/chunks/{ehr-GSTGAIY3.js → ehr-MYRDCHZ4.js} +121 -49
  45. package/dist/chunks/{employee-22BGJ3QS.js → employee-NOHNXC46.js} +1 -1
  46. package/dist/chunks/{env-BX3VRFS7.js → env-3MBHAWBL.js} +2 -2
  47. package/dist/chunks/{esb-ATAIASX2.js → esb-4BQHNP5C.js} +4 -4
  48. package/dist/chunks/{factory-PETTFME6.js → factory-TZEVU4DU.js} +1 -1
  49. package/dist/chunks/{fna-YEKBSFSX.js → fna-ZVB2IILI.js} +2 -2
  50. package/dist/chunks/{group-chat-BFVXAYFX.js → group-chat-KL3HFKRM.js} +3 -3
  51. package/dist/chunks/{host-WIKN2EJ5.js → host-3TNBMDTR.js} +3 -3
  52. package/dist/chunks/host-7NTIBSPK.js +25 -0
  53. package/dist/chunks/{host-SZGV4UNT.js → host-7OWWPLM4.js} +3 -3
  54. package/dist/chunks/{host-HRBXEPDQ.js → host-G3VU7SDW.js} +3 -3
  55. package/dist/chunks/{host-LR55CTHP.js → host-M4XP5URR.js} +3 -3
  56. package/dist/chunks/{host-SUOY6VYQ.js → host-TUOIOEMC.js} +3 -3
  57. package/dist/chunks/{hrm-NRDO4W5G.js → hrm-UNKCCCGP.js} +5 -5
  58. package/dist/chunks/{im-IQ2HN23S.js → im-NJB7ZYMH.js} +3 -3
  59. package/dist/chunks/{invoice-MNRW76PP.js → invoice-OQP3TMKQ.js} +3 -3
  60. package/dist/chunks/{jiuchuanhui-DTRBAX4N.js → jiuchuanhui-ASFZBMPU.js} +2 -2
  61. package/dist/chunks/{lazy-dispatch-ZVWAI25B.js → lazy-dispatch-UH6HGK2I.js} +4 -4
  62. package/dist/chunks/{mail-ZVAUXOJA.js → mail-M3HJF5ER.js} +2 -2
  63. package/dist/chunks/{meeting-FEVPZ67S.js → meeting-C67EHQ4Z.js} +12 -12
  64. package/dist/chunks/{okr-SDH3E5RA.js → okr-EVX7FB5G.js} +2 -2
  65. package/dist/chunks/operations-J7PUIVWZ.js +15 -0
  66. package/dist/chunks/{plan-E35JFDI7.js → plan-2QJQEPBO.js} +2 -2
  67. package/dist/chunks/{project-73QXBAB2.js → project-XELELW2T.js} +2 -2
  68. package/dist/chunks/{reception-UWZVACBN.js → reception-5WITA44R.js} +2 -2
  69. package/dist/chunks/{recruit-stage-4MAOCKFY.js → recruit-stage-AHY5QAMF.js} +450 -117
  70. package/dist/chunks/{registry-JDUS4E7D.js → registry-AQVGHUM6.js} +2 -2
  71. package/dist/chunks/{registry-KNKSCJNT.js → registry-QJCZ2GVG.js} +4 -4
  72. package/dist/chunks/{registry-PO7SI256.js → registry-VWXWPVAG.js} +2 -2
  73. package/dist/chunks/{registry-IM5G23LS.js → registry-XPWPGHYE.js} +10 -10
  74. package/dist/chunks/{room-recommend-H7KLXA5R.js → room-recommend-CNWE5WQK.js} +6 -4
  75. package/dist/chunks/{schedule-ESZIBAUO.js → schedule-YYNYBQIE.js} +4 -4
  76. package/dist/chunks/{workflow-CWJFJLQU.js → workflow-BSYT5TGL.js} +6 -4
  77. package/dist/index.js +30 -30
  78. package/dist/internal/e10/auth/commands.js +32 -0
  79. package/dist/internal/e10/auth/error-log.js +156 -26
  80. package/dist/internal/e10/auth/xiaoe.js +176 -13
  81. package/dist/internal/e10/context.js +12 -1
  82. package/dist/shortcuts/archive/operations/borrow-list.js +105 -14
  83. package/dist/shortcuts/archive/operations/flow-url.js +182 -22
  84. package/dist/shortcuts/archive/operations/getPageUrl.js +75 -0
  85. package/dist/shortcuts/archive/operations/prelib.js +33 -4
  86. package/dist/shortcuts/archive/operations/shared.js +52 -0
  87. package/dist/shortcuts/contract/host.js +111 -4
  88. package/dist/shortcuts/contract/index.js +19 -0
  89. package/dist/shortcuts/contract/manifest.js +125 -0
  90. package/dist/shortcuts/contract/ooxml/clause-insert.js +249 -0
  91. package/dist/shortcuts/contract/operations/clause-insert.js +56 -0
  92. package/dist/shortcuts/contract/operations/customer.js +192 -0
  93. package/dist/shortcuts/contract/operations/file-download.js +75 -0
  94. package/dist/shortcuts/contract/operations/flow.js +44 -2
  95. package/dist/shortcuts/contract/operations/form-info.js +162 -62
  96. package/dist/shortcuts/contract/operations/registry.js +8 -0
  97. package/dist/shortcuts/contract/operations/review.js +116 -1
  98. package/dist/shortcuts/contract/operations/summary.js +177 -0
  99. package/dist/shortcuts/contract/operations/upload.js +64 -4
  100. package/dist/shortcuts/contract/upload-cache.js +104 -0
  101. package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +4 -2
  102. package/dist/shortcuts/ehr/operations/recruit-position.js +136 -35
  103. package/dist/shortcuts/ehr/operations/recruit-write.js +17 -18
  104. package/dist/shortcuts/ehr/operations/recruit.js +17 -5
  105. package/dist/shortcuts/hrm/operations/employee.js +29 -1
  106. package/dist/shortcuts/meeting/operations/eb/create-flow.js +182 -58
  107. package/dist/shortcuts/meeting/operations/eb/draft-memory.js +56 -0
  108. package/dist/shortcuts/meeting/operations/eb/factory.js +58 -3
  109. package/dist/shortcuts/meeting/operations/eb/person-cache.js +2 -2
  110. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +47 -5
  111. package/dist/shortcuts/meeting/operations/invitation-publish.js +132 -0
  112. package/dist/shortcuts/meeting/operations/registry.js +2 -0
  113. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +86 -16
  114. package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +6 -4
  115. package/dist/shortcuts/recruit-stage/operations/jd-create.js +208 -56
  116. package/dist/shortcuts/recruit-stage/operations/resume-import.js +42 -16
  117. package/dist/shortcuts/recruit-stage/shared.js +161 -18
  118. package/dist/shortcuts/workflow/index.js +2 -0
  119. package/dist/shortcuts/workflow/operations/read.js +8 -3
  120. package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +92 -5
  121. package/dist/shortcuts/workflow/operations/todoSmartConvert/priorityExpr.js +509 -0
  122. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoListRows.js +22 -1
  123. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +32 -6
  124. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +57 -11
  125. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +165 -52
  126. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +57 -14
  127. package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +44 -18
  128. package/docs/contract.md +1 -0
  129. package/docs/e10-auth.md +4 -2
  130. package/docs/todo-smart-convert/data-contract.md +7 -0
  131. package/package.json +1 -1
  132. package/skill-template/domains/jinchengda.md +2 -0
  133. package/skills/weaver-e10-jinchengda/SKILL.md +198 -205
  134. package/skills/weaver-e10-jinchengda/references/contract-action-card.md +759 -0
  135. package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +250 -0
  136. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +146 -7
  137. package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +178 -0
  138. package/skills/weaver-e10-jinchengda/references/contract-command-index.md +75 -0
  139. package/skills/weaver-e10-jinchengda/references/contract-compare-report-template.html +137 -0
  140. package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +163 -0
  141. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +52 -3
  142. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +92 -5
  143. package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +602 -0
  144. package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +209 -0
  145. package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +126 -0
  146. package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +312 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +555 -0
  148. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +47 -12
  149. package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +469 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +154 -1
  151. package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +224 -0
  152. package/skills/weaver-e10-jinchengda/references/orchestration.md +355 -0
  153. package/skills/weaver-e10-jucailin/references/recruit-create.md +5 -3
  154. package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -2
  155. package/skills/weaver-e10-meeting/SKILL.md +57 -9
  156. package/skills/weaver-e10-recruit-stage/SKILL.md +11 -6
  157. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +10 -2
  158. package/skills/weaver-e10-recruit-stage/references/position-templates.md +3 -1
  159. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +13 -1
  160. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +19 -18
  161. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +27 -14
  162. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +7 -1
  163. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +4 -2
  164. package/skills/weaver-e10-wenshuding/SKILL.md +17 -7
  165. package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +28 -0
  166. package/skills/weaver-e10-wenshuding/references/archive-flow.md +24 -8
  167. package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +3 -0
  168. package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +4 -0
  169. package/skills/weaver-e10-wenshuding/references/archive-search.md +3 -1
  170. package/skills/weaver-e10-workflow/SKILL.md +19 -17
  171. package/skills/weaver-e10-workflow/aigroup/default.json +10 -6
  172. package/skills/weaver-e10-workflow/references/todo-smart-convert.md +36 -3
  173. package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
  174. package/skills/weaver-e10-workflow/references/workflow-query.md +9 -6
  175. package/skills/weaver-e10-workflow/tools/todo-summary.cjs +152 -1
  176. package/skills/weaver-e10-yimiaoban/SKILL.md +17 -5
  177. package/skills/weaver-e10-yimiaoban/references/msg-write.md +30 -0
  178. package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +72 -0
  179. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +7 -7
@@ -11,11 +11,11 @@ import {
11
11
  createE10RequestRuntime,
12
12
  isE10SessionExpiredResponse,
13
13
  requireE10Session
14
- } from "./chunk-ETNJSKMM.js";
14
+ } from "./chunk-6NXT4ICB.js";
15
15
  import {
16
16
  E10_SESSION_EXPIRED_MESSAGE,
17
17
  getActiveProfile
18
- } from "./chunk-UFIT2UU3.js";
18
+ } from "./chunk-U6R6FZHD.js";
19
19
  import {
20
20
  CliError,
21
21
  isCliError,
@@ -10,11 +10,11 @@ import {
10
10
  createE10RequestRuntime,
11
11
  isE10SessionExpiredResponse,
12
12
  requireE10Session
13
- } from "./chunk-ETNJSKMM.js";
13
+ } from "./chunk-6NXT4ICB.js";
14
14
  import {
15
15
  E10_SESSION_EXPIRED_MESSAGE,
16
16
  getActiveProfile
17
- } from "./chunk-UFIT2UU3.js";
17
+ } from "./chunk-U6R6FZHD.js";
18
18
  import {
19
19
  CliError,
20
20
  isCliError,
@@ -8,11 +8,11 @@ import {
8
8
  createE10RequestRuntime,
9
9
  isE10SessionExpiredResponse,
10
10
  requireE10Session
11
- } from "./chunk-ETNJSKMM.js";
11
+ } from "./chunk-6NXT4ICB.js";
12
12
  import {
13
13
  E10_SESSION_EXPIRED_MESSAGE,
14
14
  getActiveProfile
15
- } from "./chunk-UFIT2UU3.js";
15
+ } from "./chunk-U6R6FZHD.js";
16
16
  import {
17
17
  CliError,
18
18
  isCliError,
@@ -8,9 +8,9 @@ import {
8
8
  looksLikeFileId,
9
9
  meetingAttachmentContentOperations,
10
10
  parseFileIdList
11
- } from "./chunk-CWYGFU5B.js";
12
- import "./chunk-GAMZLAG2.js";
13
- import "./chunk-QVSWRLLU.js";
11
+ } from "./chunk-3WBIQLMB.js";
12
+ import "./chunk-77YP6I52.js";
13
+ import "./chunk-JWWTI63L.js";
14
14
  import "./chunk-7BDPM5ST.js";
15
15
  import "./chunk-UG5G54VL.js";
16
16
  import "./chunk-BUSC6UAE.js";
@@ -10,11 +10,11 @@ import {
10
10
  createE10RequestRuntime,
11
11
  isE10SessionExpiredResponse,
12
12
  requireE10Session
13
- } from "./chunk-ETNJSKMM.js";
13
+ } from "./chunk-6NXT4ICB.js";
14
14
  import {
15
15
  E10_SESSION_EXPIRED_MESSAGE,
16
16
  getActiveProfile
17
- } from "./chunk-UFIT2UU3.js";
17
+ } from "./chunk-U6R6FZHD.js";
18
18
  import {
19
19
  CliError,
20
20
  isCliError,
@@ -0,0 +1,204 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ caizhilianManifest,
5
+ caizhilianOperationDefinitions,
6
+ executeCaizhilianOperation
7
+ } from "./chunk-PGO4ILMQ.js";
8
+ import {
9
+ createCaizhilianHost
10
+ } from "./chunk-762M5XJS.js";
11
+ import {
12
+ createCaizhilianContinuationSigner
13
+ } from "./chunk-VRPH24IC.js";
14
+ import {
15
+ caizhilianValidationError
16
+ } from "./chunk-P5GQRWDC.js";
17
+ import {
18
+ reportPlatformError
19
+ } from "./chunk-6N4JPNFL.js";
20
+ import "./chunk-7BDPM5ST.js";
21
+ import "./chunk-6NXT4ICB.js";
22
+ import "./chunk-U6R6FZHD.js";
23
+ import {
24
+ isCliError,
25
+ toErrorEnvelope
26
+ } from "./chunk-UG5G54VL.js";
27
+ import "./chunk-BUSC6UAE.js";
28
+
29
+ // src/shortcuts/caizhilian/index.ts
30
+ import { readFile } from "node:fs/promises";
31
+ function asOptions(value) {
32
+ return value && typeof value === "object" && !Array.isArray(value) ? value : {};
33
+ }
34
+ async function readStdin() {
35
+ const chunks = [];
36
+ for await (const chunk of process.stdin) {
37
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
38
+ }
39
+ return Buffer.concat(chunks).toString("utf8");
40
+ }
41
+ function stripBom(value) {
42
+ return value.replace(/^\uFEFF+/, "");
43
+ }
44
+ function parseJsonInput(raw, label) {
45
+ try {
46
+ const parsed = JSON.parse(stripBom(raw));
47
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
48
+ throw new Error("input must be an object");
49
+ }
50
+ return parsed;
51
+ } catch {
52
+ throw caizhilianValidationError("input_invalid", `${label} \u4E0D\u662F\u5408\u6CD5 JSON \u5BF9\u8C61`);
53
+ }
54
+ }
55
+ async function inputFrom(options, extra = {}) {
56
+ const opts = asOptions(options);
57
+ let input = {};
58
+ if (opts.input && opts.inputJson) {
59
+ throw caizhilianValidationError("input_conflict", "\u4E0D\u80FD\u540C\u65F6\u4F20 --input \u548C --input-json");
60
+ }
61
+ if (opts.inputJson) {
62
+ input = parseJsonInput(String(opts.inputJson), "--input-json");
63
+ }
64
+ if (opts.input) {
65
+ let raw;
66
+ try {
67
+ raw = stripBom(opts.input === "-" ? await readStdin() : await readFile(String(opts.input), "utf8"));
68
+ } catch {
69
+ throw caizhilianValidationError("input_unreadable", `\u65E0\u6CD5\u8BFB\u53D6 --input\uFF1A${String(opts.input)}`);
70
+ }
71
+ input = parseJsonInput(raw, "--input");
72
+ }
73
+ return {
74
+ ...input,
75
+ ...Object.fromEntries(Object.entries(extra).filter(([, value]) => value !== void 0 && value !== ""))
76
+ };
77
+ }
78
+ function successEnvelope(operation, result) {
79
+ return {
80
+ schemaVersion: 1,
81
+ ok: true,
82
+ operation,
83
+ data: result.data === void 0 ? null : result.data,
84
+ ...result.meta ? { meta: result.meta } : {},
85
+ warnings: result.warnings ?? []
86
+ };
87
+ }
88
+ function failureEnvelope(error) {
89
+ const structured = error;
90
+ return {
91
+ schemaVersion: 1,
92
+ ok: false,
93
+ ...structured?.partialData === void 0 ? {} : { data: structured.partialData },
94
+ error: toErrorEnvelope(error)
95
+ };
96
+ }
97
+ async function executeAndPrint(ctx, operation, input) {
98
+ try {
99
+ const result = await executeCaizhilianOperation(operation, input, {
100
+ ctx,
101
+ host: createCaizhilianHost(ctx),
102
+ continuation: createCaizhilianContinuationSigner(ctx)
103
+ });
104
+ ctx.output.write(successEnvelope(operation, result), { json: true });
105
+ } catch (error) {
106
+ reportPlatformError(error);
107
+ console.error(JSON.stringify(failureEnvelope(error), null, 2));
108
+ process.exitCode = isCliError(error) ? error.exitCode : 1 /* GeneralError */;
109
+ }
110
+ }
111
+ function operationsCatalog() {
112
+ const groups = /* @__PURE__ */ new Map();
113
+ for (const definition of caizhilianOperationDefinitions()) {
114
+ const list = groups.get(definition.resource) ?? [];
115
+ list.push({
116
+ name: definition.name,
117
+ summary: definition.summary,
118
+ risk: definition.risk,
119
+ ...definition.requiresConfirmation ? { requiresConfirmation: true } : {},
120
+ sourceOperation: definition.sourceOperation
121
+ });
122
+ groups.set(definition.resource, list);
123
+ }
124
+ return {
125
+ schemaVersion: 1,
126
+ ok: true,
127
+ module: caizhilianManifest.name,
128
+ sourceSkill: caizhilianManifest.sourceSkill,
129
+ total: caizhilianOperationDefinitions().length,
130
+ groups: [...groups.entries()].map(([resource, operations]) => ({ resource, operations })),
131
+ withheldOperations: caizhilianManifest.withheldOperations
132
+ };
133
+ }
134
+ function withJsonInputOptions(command) {
135
+ return command.option("--input <path>", "JSON input file, or - for stdin").option("--input-json <json>", "inline JSON input object");
136
+ }
137
+ var caizhilianShortcut = {
138
+ name: "caizhilian",
139
+ description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
140
+ category: "shortcut",
141
+ register({ program, action }) {
142
+ const caizhilian = program.command("caizhilian").description("\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\u6587\u6863\u4E2D\u5FC3\uFF08\u6587\u6863/\u6587\u4EF6\u5939/\u6743\u9650\u5171\u4EAB/\u6807\u7B7E/\u53C2\u4E0E\u4EBA/\u9644\u4EF6/\u5C01\u9762/\u6587\u6863\u6BD4\u5BF9\uFF09");
143
+ caizhilian.command("schema").description("Print caizhilian operation manifest for agents").action(
144
+ action((ctx) => {
145
+ ctx.output.write(caizhilianManifest, { json: true });
146
+ })
147
+ );
148
+ caizhilian.command("operations").description("List caizhilian operations grouped by resource").action(
149
+ action((ctx) => {
150
+ ctx.output.write(operationsCatalog(), { json: true });
151
+ })
152
+ );
153
+ withJsonInputOptions(
154
+ caizhilian.command("run").description("Run a caizhilian operation with JSON input").argument("<operation>", "operation name, e.g. caizhilian.document.search / caizhilian.tag.add.apply").option("--continuation <token>", "prepare \u8FD4\u56DE\u7684\u786E\u8BA4\u7968\u636E\uFF08apply \u5FC5\u586B\uFF09").option("--yes", "confirm the write operation\uFF08apply \u5FC5\u586B\uFF09")
155
+ ).action(
156
+ action(async (ctx, operation, options) => {
157
+ const opts = asOptions(options);
158
+ await executeAndPrint(
159
+ ctx,
160
+ String(operation),
161
+ await inputFrom(options, {
162
+ continuation: opts.continuation,
163
+ confirm: opts.yes === true ? true : void 0
164
+ })
165
+ );
166
+ })
167
+ );
168
+ withJsonInputOptions(
169
+ caizhilian.command("search").description("\u68C0\u7D22\u6587\u6863\uFF08caizhilian.document.search \u8584\u5305\u88C5\uFF09").option("--keywords <kw>", "\u68C0\u7D22\u5173\u952E\u8BCD").option("--folder-id <id>", "\u6587\u4EF6\u5939 ID\uFF1A100=\u7CFB\u7EDF\uFF0C200=\u516C\u5171\uFF0C300=\u4E2A\u4EBA").option("--page-no <n>", "\u9875\u7801\uFF081-indexed\uFF09").option("--page-size <n>", "\u6BCF\u9875\u6761\u6570")
170
+ ).action(
171
+ action(async (ctx, options) => {
172
+ const opts = asOptions(options);
173
+ await executeAndPrint(
174
+ ctx,
175
+ "caizhilian.document.search",
176
+ await inputFrom(options, {
177
+ keywords: opts.keywords,
178
+ folder_id: opts.folderId,
179
+ page_no: opts.pageNo,
180
+ page_size: opts.pageSize
181
+ })
182
+ );
183
+ })
184
+ );
185
+ withJsonInputOptions(
186
+ caizhilian.command("get").description("\u67E5\u8BE2\u6587\u6863\u8BE6\u60C5\uFF08caizhilian.document.get \u8584\u5305\u88C5\uFF09").option("--doc-id <id>", "\u6587\u6863 ID\uFF08\u5FC5\u586B\uFF09")
187
+ ).action(
188
+ action(async (ctx, options) => {
189
+ const opts = asOptions(options);
190
+ await executeAndPrint(ctx, "caizhilian.document.get", await inputFrom(options, { doc_id: opts.docId }));
191
+ })
192
+ );
193
+ caizhilian.command("health").description("\u91C7\u77E5\u8FDE\u63A5\u53E3\u8FDE\u901A\u6027\u4E0E\u767B\u5F55\u6001\u81EA\u68C0\uFF08caizhilian.system.health \u8584\u5305\u88C5\uFF09").action(
194
+ action(async (ctx) => {
195
+ await executeAndPrint(ctx, "caizhilian.system.health", {});
196
+ })
197
+ );
198
+ }
199
+ };
200
+ export {
201
+ caizhilianShortcut,
202
+ inputFrom,
203
+ successEnvelope
204
+ };
@@ -12,11 +12,11 @@ import {
12
12
  createE10RequestRuntime,
13
13
  isE10SessionExpiredResponse,
14
14
  requireE10Session
15
- } from "./chunk-ETNJSKMM.js";
15
+ } from "./chunk-6NXT4ICB.js";
16
16
  import {
17
17
  E10_SESSION_EXPIRED_MESSAGE,
18
18
  getActiveProfile
19
- } from "./chunk-UFIT2UU3.js";
19
+ } from "./chunk-U6R6FZHD.js";
20
20
  import {
21
21
  CliError,
22
22
  isCliError,
@@ -2,13 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-GAMZLAG2.js";
5
+ } from "./chunk-77YP6I52.js";
6
6
  import {
7
7
  SCHEMA_ID,
8
8
  meetingSuccess,
9
9
  meetingValidationError,
10
10
  schemaOf
11
- } from "./chunk-QVSWRLLU.js";
11
+ } from "./chunk-JWWTI63L.js";
12
12
 
13
13
  // src/shortcuts/meeting/operations/attachment-content.ts
14
14
  import { mkdir, writeFile } from "node:fs/promises";
@@ -14,7 +14,7 @@ import {
14
14
  toNumber,
15
15
  toPositiveInt,
16
16
  toStringIdList
17
- } from "./chunk-D4ADSZ7H.js";
17
+ } from "./chunk-O6CMPO65.js";
18
18
  import {
19
19
  hrmValidationError
20
20
  } from "./chunk-56EZERK4.js";