weaver-work-cli 0.1.70 → 0.1.73

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 (263) hide show
  1. package/dist/chunks/{archive-VUTREF3P.js → archive-THZV4ND4.js} +22 -5
  2. package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-PQ23OLEV.js} +17 -5
  3. package/dist/chunks/{asset-45U6TY7I.js → asset-RGPROZYH.js} +22 -5
  4. package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-Z2PDX7NA.js} +15 -5
  5. package/dist/chunks/{attachment-content-DMU7KNZ7.js → attachment-content-R3RPVOYE.js} +3 -3
  6. package/dist/chunks/{blog-5AML4WMG.js → blog-7U3QZPIF.js} +25 -5
  7. package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-3AB42GCV.js} +22 -8
  8. package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-KINM64E4.js} +15 -5
  9. package/dist/chunks/{chunk-EHH363SP.js → chunk-2CHGUYMG.js} +4 -4
  10. package/dist/chunks/{chunk-GWM5TLIK.js → chunk-2XED2FKY.js} +34 -34
  11. package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
  12. package/dist/chunks/{chunk-QYDSTYGG.js → chunk-4BXR6CNB.js} +3 -3
  13. package/dist/chunks/{chunk-KDOJW5LH.js → chunk-4I26YMBY.js} +1 -1
  14. package/dist/chunks/{chunk-X6PMJQGO.js → chunk-4YXAK6OA.js} +19 -8
  15. package/dist/chunks/{chunk-HG6INLH6.js → chunk-54ST55IJ.js} +28 -7
  16. package/dist/chunks/{chunk-DSBV4GRK.js → chunk-6HT73VOI.js} +3 -3
  17. package/dist/chunks/{chunk-4W6BSNIL.js → chunk-7QFVXP2X.js} +6 -6
  18. package/dist/chunks/{chunk-I5XB4MZT.js → chunk-AMAPQVBT.js} +95 -65
  19. package/dist/chunks/{chunk-L2A3COWV.js → chunk-BWYVS62Z.js} +4 -4
  20. package/dist/chunks/{chunk-UPVAQJKS.js → chunk-DRUND2PJ.js} +130 -79
  21. package/dist/chunks/{chunk-LJE7RZNC.js → chunk-F4HM25K4.js} +1 -1
  22. package/dist/chunks/{chunk-T24EBWAZ.js → chunk-GAMGDNTF.js} +48 -21
  23. package/dist/chunks/{chunk-H2NRTGZR.js → chunk-GWJLAF6B.js} +3 -3
  24. package/dist/chunks/{chunk-XIBMZEDB.js → chunk-IBSJJGXL.js} +2 -2
  25. package/dist/chunks/{chunk-VZUH3LKI.js → chunk-ICP53R52.js} +167 -157
  26. package/dist/chunks/{chunk-LRKKKO5A.js → chunk-IU6UB2TD.js} +3 -4
  27. package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
  28. package/dist/chunks/{chunk-727VKJQK.js → chunk-JMJBPP4B.js} +2 -2
  29. package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-L7TYG5SN.js} +3 -3
  30. package/dist/chunks/{chunk-HAORST2G.js → chunk-LLCMOZ5L.js} +11 -11
  31. package/dist/chunks/{chunk-U3OO3IZF.js → chunk-NUP4RYZK.js} +20 -7
  32. package/dist/chunks/{chunk-IVCOZCAW.js → chunk-PAFOLIYQ.js} +1 -1
  33. package/dist/chunks/{chunk-LSVA7QA6.js → chunk-R3MK2RBN.js} +3 -1
  34. package/dist/chunks/{chunk-GFOFUH6O.js → chunk-TV46Q4NY.js} +52 -51
  35. package/dist/chunks/chunk-WM33BSIL.js +136 -0
  36. package/dist/chunks/{chunk-7CINV2BU.js → chunk-XZBYRYWX.js} +2 -2
  37. package/dist/chunks/{chunk-E7VWE2XI.js → chunk-ZWLWXHJC.js} +3 -3
  38. package/dist/chunks/{conflict-YW5BULJ3.js → conflict-VPAR7E6F.js} +2 -2
  39. package/dist/chunks/{contract-3PMHUASH.js → contract-DDXAO2DZ.js} +48 -5
  40. package/dist/chunks/{cowork-FZBTTBYX.js → cowork-34QCHMDD.js} +37 -8
  41. package/dist/chunks/{create-flow-5OBS3B3V.js → create-flow-52PU2OBI.js} +6 -6
  42. package/dist/chunks/{data-2YZ6A6TL.js → data-CLQ62QGD.js} +99 -184
  43. package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-W5R7Q22S.js} +17 -7
  44. package/dist/chunks/{ehr-MNPR4TE5.js → ehr-LCNAVMK5.js} +67 -17
  45. package/dist/chunks/{entry-mode-L65OWPFM.js → entry-mode-6Z3ZV3DE.js} +3 -3
  46. package/dist/chunks/{env-XW7LYIME.js → env-RDKWAARB.js} +2 -2
  47. package/dist/chunks/{esb-GSB5QCEX.js → esb-ANKPUU65.js} +17 -7
  48. package/dist/chunks/{factory-MHFZZAGH.js → factory-434B7RAT.js} +1 -1
  49. package/dist/chunks/{fna-XBSNUS2V.js → fna-AKBSG5HI.js} +15 -5
  50. package/dist/chunks/{group-chat-EEOLO5NM.js → group-chat-PROTW22R.js} +3 -3
  51. package/dist/chunks/{host-NVDG3NC6.js → host-5R2SNFWD.js} +4 -4
  52. package/dist/chunks/{host-2UMNXX5H.js → host-7FJW4E7R.js} +4 -4
  53. package/dist/chunks/{host-XVWBOSEN.js → host-CGXUFQO4.js} +4 -4
  54. package/dist/chunks/{host-R7BP3CTI.js → host-PDJAKCT7.js} +6 -4
  55. package/dist/chunks/{host-SYPCA63D.js → host-WO4L5G5I.js} +4 -4
  56. package/dist/chunks/{host-BD44ASOD.js → host-XIYG4F4B.js} +4 -4
  57. package/dist/chunks/{hrm-FZUDJAND.js → hrm-WGODDTEH.js} +15 -6
  58. package/dist/chunks/{im-F5NENPD7.js → im-YKTKAJU3.js} +16 -6
  59. package/dist/chunks/{invoice-DS6FLU55.js → invoice-PVYCCCVM.js} +27 -6
  60. package/dist/chunks/{jiuchuanhui-JCBUR563.js → jiuchuanhui-RKOQW7BY.js} +19 -6
  61. package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-DW45AFQ5.js} +6 -6
  62. package/dist/chunks/{mail-ZEOSANEJ.js → mail-BNB5S4NW.js} +116 -97
  63. package/dist/chunks/{meeting-PCD5EPBF.js → meeting-O2KDJH66.js} +29 -16
  64. package/dist/chunks/{minute-doc-WTZJVCHG.js → minute-doc-JUCG56GY.js} +4 -4
  65. package/dist/chunks/{okr-OZUMTMCL.js → okr-LWFGWOE7.js} +15 -5
  66. package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
  67. package/dist/chunks/{operations-UTUWFJTX.js → operations-532PN5OB.js} +5 -5
  68. package/dist/chunks/{performance-SMVTPK6T.js → performance-7W5COCFU.js} +92 -7
  69. package/dist/chunks/{plan-C2NENH42.js → plan-ZVY3IYTL.js} +15 -5
  70. package/dist/chunks/{project-FAJ2P3UR.js → project-SA62B7MH.js} +18 -5
  71. package/dist/chunks/{reception-NH6MJFPR.js → reception-NGIONPQ3.js} +128 -49
  72. package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-WOSN6MGP.js} +1264 -197
  73. package/dist/chunks/{registry-FTPUUHWC.js → registry-N7P3W2RD.js} +5 -5
  74. package/dist/chunks/{registry-3B3OAJYX.js → registry-R72GWXOG.js} +4 -4
  75. package/dist/chunks/{registry-ZQ7OONCB.js → registry-RIQ67ZT7.js} +12 -12
  76. package/dist/chunks/{room-recommend-73NBN3RU.js → room-recommend-KCGIVUFR.js} +4 -4
  77. package/dist/chunks/{schedule-SDBOBBUQ.js → schedule-6UP27HQ4.js} +4 -4
  78. package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-DDOQSPRB.js} +19 -6
  79. package/dist/chunks/{workflow-OWHWLAOX.js → workflow-V5ALD6QZ.js} +22 -8
  80. package/dist/cmd/auth/index.js +23 -0
  81. package/dist/cmd/e10/index.js +2 -1
  82. package/dist/cmd/index.js +2 -0
  83. package/dist/core/manifest-view.js +207 -0
  84. package/dist/core/output.js +42 -8
  85. package/dist/index.js +35 -35
  86. package/dist/internal/e10/auth/crypto.js +18 -8
  87. package/dist/internal/e10/auth/error-log.js +1 -2
  88. package/dist/internal/e10/auth/messages.js +2 -3
  89. package/dist/internal/e10/auth/xiaoe.js +1 -1
  90. package/dist/internal/e10/tls-policy.js +61 -13
  91. package/dist/shortcuts/archive/index.js +11 -2
  92. package/dist/shortcuts/archive/operations/download.js +1 -0
  93. package/dist/shortcuts/archive/operations/flow-url.js +3 -0
  94. package/dist/shortcuts/archive/operations/prelib.js +2 -0
  95. package/dist/shortcuts/archive/operations/upload.js +1 -0
  96. package/dist/shortcuts/archive-oa/index.js +11 -2
  97. package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
  98. package/dist/shortcuts/asset/index.js +11 -2
  99. package/dist/shortcuts/asset/manifest.js +7 -0
  100. package/dist/shortcuts/asset-idle/index.js +11 -2
  101. package/dist/shortcuts/blog/index.js +11 -2
  102. package/dist/shortcuts/blog/manifest.js +10 -0
  103. package/dist/shortcuts/caizhilian/host.js +20 -4
  104. package/dist/shortcuts/caizhilian/index.js +12 -2
  105. package/dist/shortcuts/caizhilian/manifest.js +4 -25
  106. package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
  107. package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
  108. package/dist/shortcuts/calendar/index.js +11 -2
  109. package/dist/shortcuts/contract/index.js +11 -2
  110. package/dist/shortcuts/contract/manifest.js +32 -0
  111. package/dist/shortcuts/contract/operations/write.js +3 -0
  112. package/dist/shortcuts/cowork/index.js +21 -5
  113. package/dist/shortcuts/cowork/manifest.js +3 -0
  114. package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
  115. package/dist/shortcuts/cowork/operations/item-write.js +3 -0
  116. package/dist/shortcuts/cowork/operations/member-write.js +2 -0
  117. package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
  118. package/dist/shortcuts/cowork/operations/review-write.js +1 -0
  119. package/dist/shortcuts/data/errors.js +16 -29
  120. package/dist/shortcuts/data/host.js +16 -7
  121. package/dist/shortcuts/data/index.js +12 -41
  122. package/dist/shortcuts/data/manifest.js +5 -44
  123. package/dist/shortcuts/data/operations/attend.js +2 -2
  124. package/dist/shortcuts/data/operations/conf.js +0 -88
  125. package/dist/shortcuts/data/operations/ds.js +4 -4
  126. package/dist/shortcuts/data/operations/index.js +1 -5
  127. package/dist/shortcuts/data/operations/module.js +40 -14
  128. package/dist/shortcuts/data/operations/query.js +2 -2
  129. package/dist/shortcuts/ebuilder-form/index.js +11 -2
  130. package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
  131. package/dist/shortcuts/ehr/index.js +11 -2
  132. package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
  133. package/dist/shortcuts/ehr/operations/recruit-position.js +4 -3
  134. package/dist/shortcuts/ehr/operations/recruit-short-cache.js +6 -2
  135. package/dist/shortcuts/ehr/operations/recruit-write.js +3 -3
  136. package/dist/shortcuts/ehr/operations/recruit.js +206 -82
  137. package/dist/shortcuts/ehr/operations/shared.js +31 -0
  138. package/dist/shortcuts/esb/index.js +11 -2
  139. package/dist/shortcuts/esb/manifest.js +2 -0
  140. package/dist/shortcuts/fna/index.js +11 -2
  141. package/dist/shortcuts/hrm/index.js +11 -1
  142. package/dist/shortcuts/im/index.js +11 -2
  143. package/dist/shortcuts/invoice/index.js +11 -2
  144. package/dist/shortcuts/invoice/manifest.js +8 -0
  145. package/dist/shortcuts/jiuchuanhui/index.js +15 -1
  146. package/dist/shortcuts/jiuchuanhui/manifest.js +2 -0
  147. package/dist/shortcuts/mail/errors.js +14 -0
  148. package/dist/shortcuts/mail/index.js +23 -6
  149. package/dist/shortcuts/mail/manifest.js +11 -4
  150. package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
  151. package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
  152. package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
  153. package/dist/shortcuts/mail/operations/mail-read.js +7 -25
  154. package/dist/shortcuts/mail/operations/mail-send.js +12 -12
  155. package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
  156. package/dist/shortcuts/mail/operations/mail-template.js +10 -10
  157. package/dist/shortcuts/meeting/index.js +11 -2
  158. package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
  159. package/dist/shortcuts/okr/index.js +11 -2
  160. package/dist/shortcuts/performance/index.js +62 -3
  161. package/dist/shortcuts/performance/scheme-validate.js +7 -0
  162. package/dist/shortcuts/performance/shared.js +40 -2
  163. package/dist/shortcuts/plan/index.js +11 -2
  164. package/dist/shortcuts/project/index.js +11 -2
  165. package/dist/shortcuts/project/operations/write.js +3 -0
  166. package/dist/shortcuts/reception/constants.js +22 -0
  167. package/dist/shortcuts/reception/index.js +15 -2
  168. package/dist/shortcuts/reception/manifest.js +17 -3
  169. package/dist/shortcuts/reception/operations/ask.js +3 -0
  170. package/dist/shortcuts/reception/operations/doc.js +24 -11
  171. package/dist/shortcuts/reception/operations/docrender.js +18 -1
  172. package/dist/shortcuts/reception/operations/render-assets.js +93 -22
  173. package/dist/shortcuts/recruit-stage/context.js +12 -6
  174. package/dist/shortcuts/recruit-stage/index.js +22 -3
  175. package/dist/shortcuts/recruit-stage/manifest.js +2 -0
  176. package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +19 -10
  177. package/dist/shortcuts/recruit-stage/operations/jd-create.js +487 -38
  178. package/dist/shortcuts/recruit-stage/operations/list.js +72 -1
  179. package/dist/shortcuts/recruit-stage/operations/profile.js +194 -0
  180. package/dist/shortcuts/recruit-stage/operations/registry.js +20 -2
  181. package/dist/shortcuts/recruit-stage/operations/resume-import.js +258 -63
  182. package/dist/shortcuts/recruit-stage/operations/search.js +226 -27
  183. package/dist/shortcuts/recruit-stage/operations/shortlist.js +122 -0
  184. package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
  185. package/dist/shortcuts/recruit-stage/shared.js +158 -4
  186. package/dist/shortcuts/smart-extract/index.js +11 -2
  187. package/dist/shortcuts/smart-extract/manifest.js +1 -0
  188. package/dist/shortcuts/smart-extract/operations/save.js +2 -0
  189. package/dist/shortcuts/workflow/index.js +21 -1
  190. package/dist/shortcuts/workflow/operations/form.js +36 -2
  191. package/dist/shortcuts/workflow/operations/read.js +2 -2
  192. package/dist/shortcuts/workflow/operations/write.js +1 -1
  193. package/docs/caizhilian.md +1 -1
  194. package/docs/contract.md +1 -0
  195. package/docs/data.md +22 -22
  196. package/docs/e10-auth.md +41 -33
  197. package/docs/ehr.md +2 -0
  198. package/docs/reception.md +4 -3
  199. package/package.json +1 -1
  200. package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
  201. package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
  202. package/scripts/pysite/sitecustomize.py +41 -0
  203. package/skill-template/domains/data.md +4 -4
  204. package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
  205. package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
  206. package/skills/weaver-e10-cowork/SKILL.md +3 -1
  207. package/skills/weaver-e10-data/SKILL.md +12 -16
  208. package/skills/weaver-e10-data/references/config-center.md +6 -7
  209. package/skills/weaver-e10-data/references/datasource.md +1 -1
  210. package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
  211. package/skills/weaver-e10-jiuchuanhui/SKILL.md +6 -4
  212. package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
  213. package/skills/weaver-e10-jiuchuanhui/references/customer.md +18 -8
  214. package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
  215. package/skills/weaver-e10-jucailin/SKILL.md +7 -3
  216. package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
  217. package/skills/weaver-e10-jucailin/references/recruit-output-links.md +33 -0
  218. package/skills/weaver-e10-jucailin/references/recruit-write.md +2 -0
  219. package/skills/weaver-e10-mail/SKILL.md +4 -1
  220. package/skills/weaver-e10-mail/references/mail-read.md +4 -2
  221. package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
  222. package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
  223. package/skills/weaver-e10-performance/SKILL.md +8 -6
  224. package/skills/weaver-e10-reception-flow/SKILL.md +97 -41
  225. package/skills/weaver-e10-reception-flow/references/guide.md +3 -1
  226. package/skills/weaver-e10-recruit-stage/SKILL.md +557 -75
  227. package/skills/weaver-e10-recruit-stage/agents/openai.yaml +67 -44
  228. package/skills/weaver-e10-recruit-stage/lib/interview-conflict.mjs +279 -0
  229. package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +198 -0
  230. package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +697 -0
  231. package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +507 -0
  232. package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
  233. package/skills/weaver-e10-recruit-stage/references/position-templates.md +19 -18
  234. package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +19 -18
  235. package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +1 -1
  236. package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +1 -1
  237. package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +15 -2
  238. package/skills/weaver-e10-recruit-stage/references/recruit-failure-fallback.md +37 -0
  239. package/skills/weaver-e10-recruit-stage/references/recruit-interview-not-attended.md +4 -4
  240. package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +64 -28
  241. package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +43 -2
  242. package/skills/weaver-e10-recruit-stage/references/recruit-maint.md +41 -0
  243. package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +4 -4
  244. package/skills/weaver-e10-recruit-stage/references/recruit-my-positions.md +2 -2
  245. package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +25 -7
  246. package/skills/weaver-e10-recruit-stage/references/recruit-platform-compat.md +51 -0
  247. package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +63 -0
  248. package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +4 -4
  249. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import-batch.md +2 -2
  250. package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +58 -33
  251. package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +4 -4
  252. package/skills/weaver-e10-recruit-stage/references/recruit-search-by-tag.md +5 -5
  253. package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +2 -2
  254. package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +11 -10
  255. package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +2 -2
  256. package/skills/weaver-e10-recruit-stage/references/recruit-utterance-glossary.md +2 -2
  257. package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +106 -0
  258. package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +325 -0
  259. package/skills/weaver-e10-recruit-stage/templates/match-report.html +265 -0
  260. package/skills/weaver-e10-shared/SKILL.md +22 -1
  261. package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
  262. package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
  263. package/skills/weaver-e10-jucailin/references/source-manifest.json +0 -152
@@ -0,0 +1,136 @@
1
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
+ const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-UG5G54VL.js";
6
+
7
+ // src/core/manifest-view.ts
8
+ var OPERATION_SUMMARY_MAX_CHARS = 40;
9
+ var MANIFEST_LIST_COMPACT_PATHS = ["operations", "withheldOperations"];
10
+ var MAX_SUGGESTIONS = 8;
11
+ function domainOf(manifest) {
12
+ if (typeof manifest.name === "string" && manifest.name !== "") return manifest.name;
13
+ if (typeof manifest.module === "string" && manifest.module !== "") return manifest.module;
14
+ return "";
15
+ }
16
+ function clip(text, max) {
17
+ const value = typeof text === "string" ? text : text === void 0 || text === null ? "" : String(text);
18
+ return value.length > max ? `${value.slice(0, max)}\u2026` : value;
19
+ }
20
+ function toListEntry(operation) {
21
+ const entry = { name: operation.name };
22
+ entry.summary = clip(operation.summary, OPERATION_SUMMARY_MAX_CHARS);
23
+ if (typeof operation.risk === "string") entry.risk = operation.risk;
24
+ if (operation.requiresConfirmation === true) entry.requiresConfirmation = true;
25
+ return entry;
26
+ }
27
+ function operationsOf(manifest) {
28
+ if (!Array.isArray(manifest.operations)) return [];
29
+ return manifest.operations.filter(
30
+ (item) => Boolean(item) && typeof item === "object" && !Array.isArray(item)
31
+ );
32
+ }
33
+ function namesOf(manifest) {
34
+ return operationsOf(manifest).map((item) => String(item?.name ?? "")).filter((name) => name !== "");
35
+ }
36
+ function findOperation(manifest, wanted) {
37
+ const operations = operationsOf(manifest);
38
+ const domain = domainOf(manifest);
39
+ const exact = operations.find((item) => String(item?.name ?? "") === wanted);
40
+ if (exact) return exact;
41
+ if (domain) {
42
+ const prefixed = operations.find((item) => String(item?.name ?? "") === `${domain}.${wanted}`);
43
+ if (prefixed) return prefixed;
44
+ }
45
+ const suffixed = operations.filter((item) => String(item?.name ?? "").endsWith(`.${wanted}`));
46
+ return suffixed.length === 1 ? suffixed[0] : void 0;
47
+ }
48
+ function suggestionsOf(manifest, wanted) {
49
+ const needle = wanted.toLowerCase();
50
+ const all = namesOf(manifest);
51
+ const contains = all.filter((name) => name.toLowerCase().includes(needle));
52
+ const tail = all.filter((name) => {
53
+ const last = name.split(".").pop() ?? "";
54
+ return !contains.includes(name) && last.toLowerCase().includes(needle);
55
+ });
56
+ return [...contains, ...tail].slice(0, MAX_SUGGESTIONS);
57
+ }
58
+ function schemaHintOf(manifest) {
59
+ const domain = domainOf(manifest) || "<domain>";
60
+ return `\u672C\u6E05\u5355\u53EA\u542B name/summary/risk\u3002\u53D6\u5355\u4E2A\u64CD\u4F5C\u7684\u5B8C\u6574\u5165\u53C2\u5951\u7EA6\uFF08\u542B inputSchema\uFF09\uFF1Aweaver-work-cli ${domain} schema --operation <name>`;
61
+ }
62
+ function operationHintOf(manifest) {
63
+ const domain = domainOf(manifest) || "<domain>";
64
+ return `\u8981\u770B\u5168\u90E8\u64CD\u4F5C\u6E05\u5355\uFF1Aweaver-work-cli ${domain} schema --list`;
65
+ }
66
+ function schemaOptionsOf(value) {
67
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
68
+ const holder = value;
69
+ return {
70
+ list: holder.list === true,
71
+ full: holder.full === true,
72
+ operation: holder.operation === void 0 || holder.operation === null ? void 0 : String(holder.operation)
73
+ };
74
+ }
75
+ function manifestView(manifest, options = {}) {
76
+ const wanted = String(options.operation ?? "").trim();
77
+ if (wanted !== "") {
78
+ const hit = findOperation(manifest, wanted);
79
+ if (!hit) {
80
+ const suggestions = suggestionsOf(manifest, wanted);
81
+ const tail = suggestions.length > 0 ? `\u53EF\u7528\u64CD\u4F5C\uFF08\u8FD1\u4F3C\u5339\u914D\uFF09\uFF1A${suggestions.join(", ")}\u3002\u5148\u7528 --list \u770B\u5168\u91CF\u6E05\u5355\u3002` : "\u5148\u7528 --list \u770B\u5168\u91CF\u6E05\u5355\u3002";
82
+ throw new CliError(
83
+ `\u672A\u77E5\u64CD\u4F5C ${wanted}\uFF08\u57DF ${domainOf(manifest)} \u5171 ${operationsOf(manifest).length} \u4E2A\u64CD\u4F5C\uFF09\u3002${tail}`,
84
+ 2 /* UsageError */
85
+ );
86
+ }
87
+ const domain2 = domainOf(manifest);
88
+ return {
89
+ schemaVersion: 1,
90
+ ok: true,
91
+ ...domain2 ? { module: domain2 } : {},
92
+ ...typeof manifest.title === "string" ? { title: manifest.title } : {},
93
+ ...typeof manifest.sourceSkill === "string" ? { sourceSkill: manifest.sourceSkill } : {},
94
+ operation: hit,
95
+ operationHint: operationHintOf(manifest)
96
+ };
97
+ }
98
+ if (options.full === true) return manifest;
99
+ if (options.list !== true) return manifest;
100
+ const operations = operationsOf(manifest);
101
+ const withheld = Array.isArray(manifest.withheldOperations) ? manifest.withheldOperations : [];
102
+ const domain = domainOf(manifest);
103
+ return {
104
+ schemaVersion: 1,
105
+ ok: true,
106
+ ...domain !== "" ? { module: domain } : {},
107
+ ...typeof manifest.title === "string" ? { title: manifest.title } : {},
108
+ ...typeof manifest.version === "string" || typeof manifest.version === "number" ? { version: manifest.version } : {},
109
+ ...typeof manifest.sourceSkill === "string" ? { sourceSkill: manifest.sourceSkill } : {},
110
+ ...Array.isArray(manifest.capabilities) ? { capabilities: manifest.capabilities } : {},
111
+ // count 与 total 相等是常态;分成两个键是为了让模型一眼看出"这份清单没被截断"。
112
+ total: operations.length,
113
+ count: operations.length,
114
+ schemaHint: schemaHintOf(manifest),
115
+ operations: operations.map(toListEntry),
116
+ // 被禁用的操作必须也在清单里:模型看到 `mail.delete.batch` 存在于清单才不会再去找它。
117
+ //
118
+ // `withheldCount` 一起回:各域 SKILL.md 明确要模型"看 withheldCount 与 withheldOperations 条数
119
+ // 是否一致来判断有没有被截",漏掉这个键会让那段指引失效。`--list` 保证全量,所以这里
120
+ // 直接用数组长度,天然自洽(不取 manifest 里的预置值,避免两者口径不一致)。
121
+ // 值为 0 也要回(招聘域当前就是 0),否则模型找不到字段会以为输出残缺。
122
+ ...manifest.withheldCount !== void 0 || withheld.length > 0 ? { withheldCount: withheld.length } : {},
123
+ ...withheld.length > 0 ? {
124
+ withheldOperations: withheld.map((item) => {
125
+ const record = item ?? {};
126
+ return { name: record.name, reason: clip(record.reason, 80) };
127
+ })
128
+ } : {}
129
+ };
130
+ }
131
+
132
+ export {
133
+ MANIFEST_LIST_COMPACT_PATHS,
134
+ schemaOptionsOf,
135
+ manifestView
136
+ };
@@ -2,11 +2,11 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
4
  meetingStateDir
5
- } from "./chunk-LJE7RZNC.js";
5
+ } from "./chunk-F4HM25K4.js";
6
6
  import {
7
7
  meetingSuccess,
8
8
  meetingValidationError
9
- } from "./chunk-KDOJW5LH.js";
9
+ } from "./chunk-4I26YMBY.js";
10
10
 
11
11
  // src/shortcuts/meeting/operations/eb/entry-mode.ts
12
12
  import { join, dirname } from "node:path";
@@ -9,13 +9,13 @@ import {
9
9
  createE10RequestRuntime,
10
10
  isE10AuthenticationRequired,
11
11
  requireE10Session
12
- } from "./chunk-LRKKKO5A.js";
12
+ } from "./chunk-IU6UB2TD.js";
13
13
  import {
14
14
  E10_SESSION_EXPIRED_MESSAGE
15
- } from "./chunk-GTAFCAVP.js";
15
+ } from "./chunk-IZCQU5D5.js";
16
16
  import {
17
17
  getActiveProfile
18
- } from "./chunk-I5XB4MZT.js";
18
+ } from "./chunk-AMAPQVBT.js";
19
19
 
20
20
  // src/shortcuts/workflow/host.ts
21
21
  var DEFAULT_TIMEOUT_MS = 3e4;
@@ -7,8 +7,8 @@ import {
7
7
  findCommonFreeSlots,
8
8
  meetingEbConflictOperations,
9
9
  runEbConflictCheck
10
- } from "./chunk-4W6BSNIL.js";
11
- import "./chunk-KDOJW5LH.js";
10
+ } from "./chunk-7QFVXP2X.js";
11
+ import "./chunk-4I26YMBY.js";
12
12
  import "./chunk-7BDPM5ST.js";
13
13
  import "./chunk-UG5G54VL.js";
14
14
  import "./chunk-BUSC6UAE.js";
@@ -1,5 +1,10 @@
1
1
  import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
+ import {
4
+ MANIFEST_LIST_COMPACT_PATHS,
5
+ manifestView,
6
+ schemaOptionsOf
7
+ } from "./chunk-WM33BSIL.js";
3
8
  import {
4
9
  reportPlatformError
5
10
  } from "./chunk-MD5CW4B6.js";
@@ -12,13 +17,13 @@ import {
12
17
  createE10RequestRuntime,
13
18
  isE10SessionExpiredResponse,
14
19
  requireE10Session
15
- } from "./chunk-LRKKKO5A.js";
20
+ } from "./chunk-IU6UB2TD.js";
16
21
  import {
17
22
  E10_SESSION_EXPIRED_MESSAGE
18
- } from "./chunk-GTAFCAVP.js";
23
+ } from "./chunk-IZCQU5D5.js";
19
24
  import {
20
25
  getActiveProfile
21
- } from "./chunk-I5XB4MZT.js";
26
+ } from "./chunk-AMAPQVBT.js";
22
27
  import {
23
28
  CliError,
24
29
  isCliError,
@@ -565,6 +570,7 @@ function assistantWrite(name, fixed, properties, required) {
565
570
  {
566
571
  name: `${name}.prepare`,
567
572
  risk: "read-before-write",
573
+ requiresConfirmation: true,
568
574
  auth: AUTH,
569
575
  fixed,
570
576
  inputSchema: readSchema(properties, required)
@@ -572,6 +578,7 @@ function assistantWrite(name, fixed, properties, required) {
572
578
  {
573
579
  name: `${name}.apply`,
574
580
  risk: "high-risk-write",
581
+ requiresConfirmation: true,
575
582
  auth: AUTH,
576
583
  fixed,
577
584
  inputSchema: readSchema(
@@ -1576,6 +1583,7 @@ var contractOperations = [
1576
1583
  {
1577
1584
  name: "contract.clause.reference.save.prepare",
1578
1585
  risk: "read-before-write",
1586
+ requiresConfirmation: true,
1579
1587
  auth: AUTH,
1580
1588
  fixed: { writeMethod: "POST", path: "/api/ebd/contract/clauseReference/saveData", referenceObjType: 1 },
1581
1589
  inputSchema: readSchema({
@@ -1589,6 +1597,7 @@ var contractOperations = [
1589
1597
  {
1590
1598
  name: "contract.clause.reference.save.apply",
1591
1599
  risk: "high-risk-write",
1600
+ requiresConfirmation: true,
1592
1601
  auth: AUTH,
1593
1602
  fixed: { writeMethod: "POST", path: "/api/ebd/contract/clauseReference/saveData", referenceObjType: 1 },
1594
1603
  inputSchema: readSchema({
@@ -1667,6 +1676,7 @@ var contractOperations = [
1667
1676
  {
1668
1677
  name: "contract.subject.create.prepare",
1669
1678
  risk: "read-before-write",
1679
+ requiresConfirmation: true,
1670
1680
  auth: AUTH,
1671
1681
  fixed: {
1672
1682
  writeMethod: "POST",
@@ -1690,6 +1700,7 @@ var contractOperations = [
1690
1700
  {
1691
1701
  name: "contract.subject.create.apply",
1692
1702
  risk: "high-risk-write",
1703
+ requiresConfirmation: true,
1693
1704
  auth: AUTH,
1694
1705
  fixed: {
1695
1706
  writeMethod: "POST",
@@ -1758,6 +1769,7 @@ var contractOperations = [
1758
1769
  {
1759
1770
  name: "contract.request.create.prepare",
1760
1771
  risk: "read-before-write",
1772
+ requiresConfirmation: true,
1761
1773
  auth: AUTH,
1762
1774
  fixed: {
1763
1775
  writeMethod: "POST",
@@ -1780,6 +1792,7 @@ var contractOperations = [
1780
1792
  {
1781
1793
  name: "contract.request.create.apply",
1782
1794
  risk: "high-risk-write",
1795
+ requiresConfirmation: true,
1783
1796
  auth: AUTH,
1784
1797
  fixed: {
1785
1798
  writeMethod: "POST",
@@ -1804,6 +1817,7 @@ var contractOperations = [
1804
1817
  {
1805
1818
  name: "contract.request.save.prepare",
1806
1819
  risk: "read-before-write",
1820
+ requiresConfirmation: true,
1807
1821
  auth: AUTH,
1808
1822
  fixed: { writeMethod: "POST", path: "/api/workflow/core/paService/v1/saveFormData", userIdField: "userid" },
1809
1823
  inputSchema: readSchema({
@@ -1827,6 +1841,7 @@ var contractOperations = [
1827
1841
  {
1828
1842
  name: "contract.request.save.apply",
1829
1843
  risk: "high-risk-write",
1844
+ requiresConfirmation: true,
1830
1845
  auth: AUTH,
1831
1846
  fixed: { writeMethod: "POST", path: "/api/workflow/core/paService/v1/saveFormData", userIdField: "userid" },
1832
1847
  inputSchema: readSchema({
@@ -1852,6 +1867,7 @@ var contractOperations = [
1852
1867
  {
1853
1868
  name: "contract.request.submit.prepare",
1854
1869
  risk: "read-before-write",
1870
+ requiresConfirmation: true,
1855
1871
  auth: AUTH,
1856
1872
  fixed: {
1857
1873
  writeMethod: "POST",
@@ -1873,6 +1889,7 @@ var contractOperations = [
1873
1889
  {
1874
1890
  name: "contract.request.submit.apply",
1875
1891
  risk: "high-risk-write",
1892
+ requiresConfirmation: true,
1876
1893
  auth: AUTH,
1877
1894
  fixed: {
1878
1895
  writeMethod: "POST",
@@ -1896,6 +1913,7 @@ var contractOperations = [
1896
1913
  {
1897
1914
  name: "contract.request.supervise.prepare",
1898
1915
  risk: "read-before-write",
1916
+ requiresConfirmation: true,
1899
1917
  auth: AUTH,
1900
1918
  fixed: {
1901
1919
  writeMethod: "POST",
@@ -1932,6 +1950,7 @@ var contractOperations = [
1932
1950
  {
1933
1951
  name: "contract.request.supervise.apply",
1934
1952
  risk: "high-risk-write",
1953
+ requiresConfirmation: true,
1935
1954
  auth: AUTH,
1936
1955
  fixed: {
1937
1956
  writeMethod: "POST",
@@ -2285,6 +2304,7 @@ var contractOperations = [
2285
2304
  {
2286
2305
  name: "contract.clause.category.create.prepare",
2287
2306
  risk: "read-before-write",
2307
+ requiresConfirmation: true,
2288
2308
  auth: AUTH,
2289
2309
  fixed: { method: "POST", path: "/api/ebd/contract/tree/save", requiresPermission: "termComponent" },
2290
2310
  inputSchema: readSchema({
@@ -2298,6 +2318,7 @@ var contractOperations = [
2298
2318
  {
2299
2319
  name: "contract.clause.category.create.apply",
2300
2320
  risk: "high-risk-write",
2321
+ requiresConfirmation: true,
2301
2322
  auth: AUTH,
2302
2323
  fixed: { method: "POST", path: "/api/ebd/contract/tree/save", requiresPermission: "termComponent" },
2303
2324
  inputSchema: readSchema({
@@ -2313,6 +2334,7 @@ var contractOperations = [
2313
2334
  {
2314
2335
  name: "contract.clause.category.update.prepare",
2315
2336
  risk: "read-before-write",
2337
+ requiresConfirmation: true,
2316
2338
  auth: AUTH,
2317
2339
  fixed: { method: "POST", path: "/api/ebd/contract/tree/update", requiresPermission: "termComponent" },
2318
2340
  inputSchema: readSchema({
@@ -2327,6 +2349,7 @@ var contractOperations = [
2327
2349
  {
2328
2350
  name: "contract.clause.category.update.apply",
2329
2351
  risk: "high-risk-write",
2352
+ requiresConfirmation: true,
2330
2353
  auth: AUTH,
2331
2354
  fixed: { method: "POST", path: "/api/ebd/contract/tree/update", requiresPermission: "termComponent" },
2332
2355
  inputSchema: readSchema({
@@ -2343,6 +2366,7 @@ var contractOperations = [
2343
2366
  {
2344
2367
  name: "contract.clause.category.delete.prepare",
2345
2368
  risk: "read-before-write",
2369
+ requiresConfirmation: true,
2346
2370
  auth: AUTH,
2347
2371
  fixed: { method: "POST", path: "/api/ebd/contract/tree/deletebyid", requiresPermission: "termComponent", cascade: true },
2348
2372
  inputSchema: readSchema({ id: idString }, ["id"])
@@ -2350,6 +2374,7 @@ var contractOperations = [
2350
2374
  {
2351
2375
  name: "contract.clause.category.delete.apply",
2352
2376
  risk: "high-risk-write",
2377
+ requiresConfirmation: true,
2353
2378
  auth: AUTH,
2354
2379
  fixed: { method: "POST", path: "/api/ebd/contract/tree/deletebyid", requiresPermission: "termComponent", cascade: true },
2355
2380
  inputSchema: readSchema({
@@ -2389,6 +2414,7 @@ var contractOperations = [
2389
2414
  {
2390
2415
  name: "contract.clause.create.prepare",
2391
2416
  risk: "read-before-write",
2417
+ requiresConfirmation: true,
2392
2418
  auth: AUTH,
2393
2419
  fixed: { method: "POST", path: "/api/ebd/contract/clauseinfo/save", requiresPermission: "termComponent" },
2394
2420
  inputSchema: readSchema({
@@ -2408,6 +2434,7 @@ var contractOperations = [
2408
2434
  {
2409
2435
  name: "contract.clause.create.apply",
2410
2436
  risk: "high-risk-write",
2437
+ requiresConfirmation: true,
2411
2438
  auth: AUTH,
2412
2439
  fixed: { method: "POST", path: "/api/ebd/contract/clauseinfo/save", requiresPermission: "termComponent" },
2413
2440
  inputSchema: readSchema({
@@ -2429,6 +2456,7 @@ var contractOperations = [
2429
2456
  {
2430
2457
  name: "contract.clause.update.prepare",
2431
2458
  risk: "read-before-write",
2459
+ requiresConfirmation: true,
2432
2460
  auth: AUTH,
2433
2461
  fixed: { method: "POST", path: "/api/ebd/contract/clauseinfo/update", requiresPermission: "termComponent" },
2434
2462
  inputSchema: readSchema({
@@ -2447,6 +2475,7 @@ var contractOperations = [
2447
2475
  {
2448
2476
  name: "contract.clause.update.apply",
2449
2477
  risk: "high-risk-write",
2478
+ requiresConfirmation: true,
2450
2479
  auth: AUTH,
2451
2480
  fixed: { method: "POST", path: "/api/ebd/contract/clauseinfo/update", requiresPermission: "termComponent" },
2452
2481
  inputSchema: readSchema({
@@ -2467,6 +2496,7 @@ var contractOperations = [
2467
2496
  {
2468
2497
  name: "contract.clause.delete.prepare",
2469
2498
  risk: "read-before-write",
2499
+ requiresConfirmation: true,
2470
2500
  auth: AUTH,
2471
2501
  fixed: { method: "POST", path: "/api/ebd/contract/clauseinfo/deletebyid", requiresPermission: "termComponent" },
2472
2502
  inputSchema: readSchema({
@@ -2478,6 +2508,7 @@ var contractOperations = [
2478
2508
  {
2479
2509
  name: "contract.clause.delete.apply",
2480
2510
  risk: "high-risk-write",
2511
+ requiresConfirmation: true,
2481
2512
  auth: AUTH,
2482
2513
  fixed: { method: "POST", path: "/api/ebd/contract/clauseinfo/deletebyid", requiresPermission: "termComponent" },
2483
2514
  inputSchema: readSchema({
@@ -2491,6 +2522,7 @@ var contractOperations = [
2491
2522
  {
2492
2523
  name: "contract.clause.group.create.prepare",
2493
2524
  risk: "read-before-write",
2525
+ requiresConfirmation: true,
2494
2526
  auth: AUTH,
2495
2527
  fixed: { method: "POST", path: "/api/ebd/contract/clausegroup/save", requiresPermission: "termComponent" },
2496
2528
  inputSchema: readSchema({
@@ -2507,6 +2539,7 @@ var contractOperations = [
2507
2539
  {
2508
2540
  name: "contract.clause.group.create.apply",
2509
2541
  risk: "high-risk-write",
2542
+ requiresConfirmation: true,
2510
2543
  auth: AUTH,
2511
2544
  fixed: { method: "POST", path: "/api/ebd/contract/clausegroup/save", requiresPermission: "termComponent" },
2512
2545
  inputSchema: readSchema({
@@ -2525,6 +2558,7 @@ var contractOperations = [
2525
2558
  {
2526
2559
  name: "contract.clause.group.update.prepare",
2527
2560
  risk: "read-before-write",
2561
+ requiresConfirmation: true,
2528
2562
  auth: AUTH,
2529
2563
  fixed: { method: "POST", path: "/api/ebd/contract/clausegroup/update", requiresPermission: "termComponent" },
2530
2564
  inputSchema: readSchema({
@@ -2542,6 +2576,7 @@ var contractOperations = [
2542
2576
  {
2543
2577
  name: "contract.clause.group.update.apply",
2544
2578
  risk: "high-risk-write",
2579
+ requiresConfirmation: true,
2545
2580
  auth: AUTH,
2546
2581
  fixed: { method: "POST", path: "/api/ebd/contract/clausegroup/update", requiresPermission: "termComponent" },
2547
2582
  inputSchema: readSchema({
@@ -2561,6 +2596,7 @@ var contractOperations = [
2561
2596
  {
2562
2597
  name: "contract.clause.group.delete.prepare",
2563
2598
  risk: "read-before-write",
2599
+ requiresConfirmation: true,
2564
2600
  auth: AUTH,
2565
2601
  fixed: { method: "POST", path: "/api/ebd/contract/clausegroup/deletebyid", requiresPermission: "termComponent" },
2566
2602
  inputSchema: readSchema({
@@ -2571,6 +2607,7 @@ var contractOperations = [
2571
2607
  {
2572
2608
  name: "contract.clause.group.delete.apply",
2573
2609
  risk: "high-risk-write",
2610
+ requiresConfirmation: true,
2574
2611
  auth: AUTH,
2575
2612
  fixed: { method: "POST", path: "/api/ebd/contract/clausegroup/deletebyid", requiresPermission: "termComponent" },
2576
2613
  inputSchema: readSchema({
@@ -2808,6 +2845,7 @@ var ContractWritePrepareOperation = class {
2808
2845
  spec;
2809
2846
  async execute(input, { host, continuation }) {
2810
2847
  this.spec.validate?.(input);
2848
+ this.spec.body(input);
2811
2849
  const precheck = this.spec.precheck ? await this.spec.precheck(input, host) : void 0;
2812
2850
  const session = await host.getSession();
2813
2851
  const preview = this.spec.preview(input);
@@ -17908,8 +17946,13 @@ var contractShortcut = {
17908
17946
  return command;
17909
17947
  };
17910
17948
  const contract = program.command("contract").description("\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406");
17911
- contract.command("schema").description("Print contract operation manifest for agents").action(wrap((ctx) => {
17912
- ctx.output.write(contractManifest, { json: true });
17949
+ contract.command("schema").description("Print contract operation manifest for agents").option("--list", '\u53EA\u5217\u64CD\u4F5C\u6E05\u5355\uFF08name/summary/risk\uFF09\uFF0C\u5168\u91CF\u4E0D\u622A\u65AD\uFF1B\u5224\u65AD"\u6709\u6CA1\u6709\u67D0\u64CD\u4F5C"\u7528\u8FD9\u4E2A').option("--full", "\u6253\u5370\u5B8C\u6574 manifest\uFF08\u8D85 stdout \u9884\u7B97\u4F1A\u843D\u672C\u5730 ref\uFF0C\u7528 refs get \u5206\u9875\u53D6\uFF09").option("--operation <name>", "\u53EA\u8F93\u51FA\u5355\u4E2A\u64CD\u4F5C\u7684\u5B8C\u6574\u5951\u7EA6\uFF08\u542B inputSchema\uFF0C\u4F53\u79EF\u8FDC\u4F4E\u4E8E\u9884\u7B97\uFF09").action(wrap((ctx, options) => {
17950
+ const schema = schemaOptionsOf(options);
17951
+ ctx.output.write(manifestView(contractManifest, schema), {
17952
+ json: true,
17953
+ // 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
17954
+ ...schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}
17955
+ });
17913
17956
  }));
17914
17957
  const run = contract.command("run").description("Run a contract operation with JSON input").argument("<operation>", "operation name, e.g. contract.type.tree");
17915
17958
  for (const spec of JSON_INPUT_FLAGS) run.option(spec.flag, spec.description);
@@ -1,7 +1,13 @@
1
1
  import { createRequire as __esbuildCreateRequire } from 'node:module';
2
2
  const require = __esbuildCreateRequire(import.meta.url);
3
3
  import {
4
- reportPlatformError
4
+ MANIFEST_LIST_COMPACT_PATHS,
5
+ manifestView,
6
+ schemaOptionsOf
7
+ } from "./chunk-WM33BSIL.js";
8
+ import {
9
+ shouldReportPlatformError,
10
+ toPlatformError
5
11
  } from "./chunk-MD5CW4B6.js";
6
12
  import {
7
13
  CONTINUATION_TTL_MS
@@ -11,13 +17,13 @@ import {
11
17
  createE10RequestRuntime,
12
18
  isE10SessionExpiredResponse,
13
19
  requireE10Session
14
- } from "./chunk-LRKKKO5A.js";
20
+ } from "./chunk-IU6UB2TD.js";
15
21
  import {
16
22
  E10_SESSION_EXPIRED_MESSAGE
17
- } from "./chunk-GTAFCAVP.js";
23
+ } from "./chunk-IZCQU5D5.js";
18
24
  import {
19
25
  getActiveProfile
20
- } from "./chunk-I5XB4MZT.js";
26
+ } from "./chunk-AMAPQVBT.js";
21
27
  import {
22
28
  CliError,
23
29
  isCliError,
@@ -988,6 +994,7 @@ var itemCreatePrepare = {
988
994
  action: "cowork.item.create.prepare",
989
995
  summary: "\u65B0\u5EFA\u534F\u4F5C\u7684\u786E\u8BA4\u6458\u8981\uFF1A\u6821\u9A8C\u7248\u5757 id \u662F\u5426\u5728\u672C\u73AF\u5883\u771F\u5B9E\u5B58\u5728\u3001\u8D1F\u8D23\u4EBA\u9ED8\u8BA4\u4E3A\u5F53\u524D\u7528\u6237\u3001\u5F00\u5173\u9ED8\u8BA4\u5168\u5F00\uFF1B\u4E0D\u5199\u5165",
990
996
  risk: READ_BEFORE_WRITE,
997
+ requiresConfirmation: true,
991
998
  inputSchema: schemaOf({
992
999
  itemName: { type: "string", maxLength: 200, description: "\u534F\u4F5C\u4E3B\u9898" },
993
1000
  itemContent: { type: "string", maxLength: 2e4, description: "\u8BE6\u7EC6\u8BF4\u660E\uFF08\u7EAF\u6587\u672C\u6216 HTML\uFF0CCLI \u5185\u90E8\u6309\u63A5\u53E3\u8981\u6C42\u505A Base64 \u7F16\u7801\uFF09" },
@@ -1160,6 +1167,7 @@ var itemActionPrepare = {
1160
1167
  action: "cowork.item.action.prepare",
1161
1168
  summary: "\u534F\u4F5C\u7EA7\u52A8\u4F5C\u7684\u786E\u8BA4\u6458\u8981\uFF08\u5F53\u524D\u652F\u6301 end \u7ED3\u675F\u534F\u4F5C\uFF09\uFF1A\u5148\u8BFB\u8BE6\u60C5\u6821\u9A8C\u5B58\u5728\u4E0E canEnd\uFF0C\u4E0D\u5199\u5165",
1162
1169
  risk: READ_BEFORE_WRITE,
1170
+ requiresConfirmation: true,
1163
1171
  inputSchema: schemaOf({
1164
1172
  action: { type: "string", enum: [...ITEM_ACTIONS], description: "end=\u7ED3\u675F\u534F\u4F5C\uFF08\u4E0D\u53EF\u9006\uFF09" },
1165
1173
  id: { ...SCHEMA_ID, description: "\u534F\u4F5C id" }
@@ -1251,6 +1259,7 @@ var itemFlagPrepare = {
1251
1259
  action: "cowork.item.flag.prepare",
1252
1260
  summary: "\u534F\u4F5C\u6807\u8BB0\u52A8\u4F5C\u6458\u8981\uFF1Ahide=\u4ECE\u6211\u7684\u5217\u8868\u9690\u85CF / vote=\u6807\u8BB0\u6295\u7968\uFF1B\u5148\u8BFB\u8BE6\u60C5\u786E\u8BA4\u534F\u4F5C\u5B58\u5728\uFF0C\u4E0D\u5199\u5165",
1253
1261
  risk: READ_BEFORE_WRITE,
1262
+ requiresConfirmation: true,
1254
1263
  inputSchema: schemaOf({
1255
1264
  action: { type: "string", enum: [...ITEM_FLAGS], description: "hide \u9690\u85CF / vote \u6807\u8BB0\u6295\u7968" },
1256
1265
  id: { ...SCHEMA_ID, description: "\u534F\u4F5C id" }
@@ -1352,6 +1361,7 @@ var discussPublishPrepare = {
1352
1361
  action: "cowork.discuss.publish.prepare",
1353
1362
  summary: "\u53D1\u5E03/\u56DE\u590D\u8BA8\u8BBA\u7684\u786E\u8BA4\u6458\u8981\uFF1A\u5148\u8BFB\u534F\u4F5C\u8BE6\u60C5\u786E\u8BA4\u5B58\u5728\u5E76\u89E3\u6790\u7248\u5757 id\uFF0C\u4E0D\u5199\u5165",
1354
1363
  risk: READ_BEFORE_WRITE,
1364
+ requiresConfirmation: true,
1355
1365
  inputSchema: schemaOf({
1356
1366
  coworkId: { ...SCHEMA_ID, description: "\u534F\u4F5C id" },
1357
1367
  content: { type: "string", maxLength: 2e4, description: "\u8BA8\u8BBA\u5185\u5BB9\uFF08\u7EAF\u6587\u672C\uFF09" },
@@ -1485,6 +1495,7 @@ var discussActionPrepare = {
1485
1495
  action: "cowork.discuss.action.prepare",
1486
1496
  summary: "\u8BA8\u8BBA\u52A8\u4F5C\u6458\u8981\uFF08top \u7F6E\u9876 / untop \u53D6\u6D88\u7F6E\u9876 / delete \u5220\u9664 / approve \u5BA1\u6279\u901A\u8FC7\uFF09\uFF1A\u5728\u534F\u4F5C\u8BA8\u8BBA\u4E2D\u5B9A\u4F4D\u8BE5\u8BA8\u8BBA\u5E76\u56DE\u663E\u5185\u5BB9\uFF0C\u4E0D\u5199\u5165",
1487
1497
  risk: READ_BEFORE_WRITE,
1498
+ requiresConfirmation: true,
1488
1499
  inputSchema: schemaOf({
1489
1500
  action: { type: "string", enum: [...DISCUSS_ACTIONS], description: "top / untop / delete / approve" },
1490
1501
  coworkId: { ...SCHEMA_ID, description: "\u6240\u5C5E\u534F\u4F5C id\uFF08\u7528\u4E8E\u5B9A\u4F4D\u8BA8\u8BBA\uFF09" },
@@ -1630,6 +1641,7 @@ var memberActionPrepare = {
1630
1641
  action: "cowork.member.action.prepare",
1631
1642
  summary: "\u6210\u5458\u52A8\u4F5C\u6458\u8981\uFF1Ainvite \u9080\u8BF7 / rejoin \u91CD\u65B0\u52A0\u5165 / join \u7533\u8BF7\u52A0\u5165\uFF1B\u5148\u8BFB\u534F\u4F5C\u8BE6\u60C5\u786E\u8BA4\u5B58\u5728\uFF0C\u5E76\u63D0\u793A\u5DF2\u5728\u534F\u4F5C\u5185\u7684\u4EBA\u5458\uFF0C\u4E0D\u5199\u5165",
1632
1643
  risk: READ_BEFORE_WRITE,
1644
+ requiresConfirmation: true,
1633
1645
  inputSchema: schemaOf({
1634
1646
  action: { type: "string", enum: [...MEMBER_ACTIONS], description: "invite \u9080\u8BF7\u4ED6\u4EBA / rejoin \u91CD\u65B0\u52A0\u5165 / join \u7533\u8BF7\u52A0\u5165\uFF08\u6211\uFF09" },
1635
1647
  coworkId: { ...SCHEMA_ID, description: "\u534F\u4F5C id" },
@@ -1785,6 +1797,7 @@ var applyDecidePrepare = {
1785
1797
  action: "cowork.apply.decide.prepare",
1786
1798
  summary: "\u52A0\u5165\u7533\u8BF7\u5BA1\u6279\u6458\u8981\uFF08approve \u901A\u8FC7 / refuse \u62D2\u7EDD\uFF09\uFF1A\u5728\u5F85\u5BA1\u6279\u5217\u8868\u4E2D\u5B9A\u4F4D\u7533\u8BF7\u8BB0\u5F55\u5E76\u56DE\u663E\u7533\u8BF7\u4EBA\u4E0E\u534F\u4F5C\u4E3B\u9898\uFF0C\u4E0D\u5199\u5165",
1787
1799
  risk: READ_BEFORE_WRITE,
1800
+ requiresConfirmation: true,
1788
1801
  inputSchema: schemaOf({
1789
1802
  decision: { type: "string", enum: [...DECISIONS], description: "approve \u901A\u8FC7 / refuse \u62D2\u7EDD" },
1790
1803
  applyId: { ...SCHEMA_ID, description: "\u7533\u8BF7\u8BB0\u5F55 id\uFF08\u6765\u81EA cowork.list scope=approve\uFF09" },
@@ -1938,6 +1951,7 @@ function buildReviewOperations(domain) {
1938
1951
  action: prepareName,
1939
1952
  summary: `${spec.label}\u53F0\u7684\u52A8\u4F5C\u6458\u8981\uFF08approve \u901A\u8FC7 / delete \u5220\u9664\uFF09\uFF1A\u5148\u5728\u5F85\u5BA1\u5217\u8868\u4E2D\u5B9A\u4F4D\u8BB0\u5F55\u5E76\u56DE\u663E\u4E3B\u9898\uFF0C\u4E0D\u5199\u5165`,
1940
1953
  risk: READ_BEFORE_WRITE,
1954
+ requiresConfirmation: true,
1941
1955
  inputSchema: schemaOf({
1942
1956
  action: { type: "string", enum: [...REVIEW_ACTIONS], description: "approve \u901A\u8FC7 / delete \u5220\u9664" },
1943
1957
  id: { ...SCHEMA_ID, description: `\u8BB0\u5F55 id\uFF08\u6765\u81EA cowork.list \u7684 ${domain === "item" ? "itemApprove" : "discussApprove"} \u5217\u8868\uFF09` },
@@ -2057,6 +2071,7 @@ var permAddPrepare = {
2057
2071
  action: "cowork.permission.add.prepare",
2058
2072
  summary: "\u65B0\u589E\u5171\u4EAB\u5BF9\u8C61\u7684\u6458\u8981\uFF1A\u5148\u8BFB\u534F\u4F5C\u8BE6\u60C5\u4E0E\u73B0\u6709\u5171\u4EAB\u6743\u9650\u5217\u8868\uFF0C\u63D0\u793A\u8BE5\u4EBA\u5458\u662F\u5426\u5DF2\u5728\uFF0C\u4E0D\u5199\u5165",
2059
2073
  risk: READ_BEFORE_WRITE,
2074
+ requiresConfirmation: true,
2060
2075
  inputSchema: schemaOf({
2061
2076
  coworkId: { ...SCHEMA_ID, description: "\u534F\u4F5C id" },
2062
2077
  userId: { ...SCHEMA_ID, description: "\u88AB\u6388\u6743\u4EBA\u5458 id" },
@@ -2196,6 +2211,7 @@ var permRemovePrepare = {
2196
2211
  action: "cowork.permission.remove.prepare",
2197
2212
  summary: "\u5220\u9664\u5171\u4EAB\u5BF9\u8C61\u7684\u6458\u8981\uFF1A\u5148\u6309 pkId \u5728\u5171\u4EAB\u6743\u9650\u5217\u8868\u4E2D\u5B9A\u4F4D\u771F\u5B9E\u8BB0\u5F55\u5E76\u56DE\u663E\uFF0C\u4E0D\u5199\u5165",
2198
2213
  risk: READ_BEFORE_WRITE,
2214
+ requiresConfirmation: true,
2199
2215
  inputSchema: schemaOf({
2200
2216
  coworkId: { ...SCHEMA_ID, description: "\u534F\u4F5C id" },
2201
2217
  pkId: { ...SCHEMA_ID, description: "\u5171\u4EAB\u8BB0\u5F55 id\uFF08\u6765\u81EA cowork.permission.list \u7684\u884C id\uFF09" },
@@ -2386,6 +2402,9 @@ var coworkManifest = {
2386
2402
  sourceSkill: "weaver-e10-cowork",
2387
2403
  capabilities: ["cowork"],
2388
2404
  operations: buildOperations(),
2405
+ // 2026-11-27 审计 K-02 / G-10:schema 超预算会把 withheldOperations 一并截断,
2406
+ // 首屏必须先给出总数,模型才知道"边界之外还有多少条",再看明细或按 recovery 取全量。
2407
+ withheldCount: BROWSER_WITHHELD.length + PERMISSION_TABLE_WITHHELD.length + SEARCH_WITHHELD.length,
2389
2408
  withheldOperations: [
2390
2409
  ...BROWSER_WITHHELD.map((name) => ({
2391
2410
  name,
@@ -2497,8 +2516,13 @@ async function executeAndPrint(ctx, operation, input) {
2497
2516
  });
2498
2517
  ctx.output.write(successEnvelope(operation, result), { json: true });
2499
2518
  } catch (error) {
2500
- reportPlatformError(error);
2501
- console.error(JSON.stringify(failureEnvelope(error), null, 2));
2519
+ const env = failureEnvelope(error);
2520
+ if (shouldReportPlatformError(error)) {
2521
+ const pe = toPlatformError(error);
2522
+ console.error(JSON.stringify({ ...env, code: pe.code, message: pe.message }, null, 2));
2523
+ } else {
2524
+ console.error(JSON.stringify(env, null, 2));
2525
+ }
2502
2526
  process.exitCode = isCliError(error) ? error.exitCode : 1 /* GeneralError */;
2503
2527
  }
2504
2528
  }
@@ -2508,8 +2532,13 @@ var coworkShortcut = {
2508
2532
  category: "shortcut",
2509
2533
  register({ program, action }) {
2510
2534
  const cowork = program.command("cowork").description("\u6CDB\u5FAEE10\u534F\u4F5C\u533A\uFF08\u534F\u4F5C\u4E8B\u9879/\u8BA8\u8BBA/\u5BA1\u6279/\u5171\u4EAB\u6743\u9650\uFF09");
2511
- cowork.command("schema").description("Print cowork operation manifest for agents").action(action((ctx) => {
2512
- ctx.output.write(coworkManifest, { json: true });
2535
+ cowork.command("schema").description("Print cowork operation manifest for agents").option("--list", '\u53EA\u5217\u64CD\u4F5C\u6E05\u5355\uFF08name/summary/risk\uFF09\uFF0C\u5168\u91CF\u4E0D\u622A\u65AD\uFF1B\u5224\u65AD"\u6709\u6CA1\u6709\u67D0\u64CD\u4F5C"\u7528\u8FD9\u4E2A').option("--full", "\u6253\u5370\u5B8C\u6574 manifest\uFF08\u8D85 stdout \u9884\u7B97\u4F1A\u843D\u672C\u5730 ref\uFF0C\u7528 refs get \u5206\u9875\u53D6\uFF09").option("--operation <name>", "\u53EA\u8F93\u51FA\u5355\u4E2A\u64CD\u4F5C\u7684\u5B8C\u6574\u5951\u7EA6\uFF08\u542B inputSchema\uFF0C\u4F53\u79EF\u8FDC\u4F4E\u4E8E\u9884\u7B97\uFF09").action(action((ctx, options) => {
2536
+ const schema = schemaOptionsOf(options);
2537
+ ctx.output.write(manifestView(coworkManifest, schema), {
2538
+ json: true,
2539
+ // 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
2540
+ ...schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}
2541
+ });
2513
2542
  }));
2514
2543
  cowork.command("run").description("Run a cowork operation with JSON input").argument("<operation>", "operation name, e.g. cowork.list").option("--input <path>", "JSON input file, or - for stdin").option("--input-json <json>", "inline JSON input object").action(action(async (ctx, operation, options) => {
2515
2544
  await executeAndPrint(ctx, String(operation), await inputFrom(options));
@@ -28,12 +28,12 @@ import {
28
28
  resolveWorkflowId,
29
29
  shapeBrowserValues,
30
30
  shouldAutoPickFlow
31
- } from "./chunk-GWM5TLIK.js";
32
- import "./chunk-4W6BSNIL.js";
33
- import "./chunk-EHH363SP.js";
34
- import "./chunk-IVCOZCAW.js";
35
- import "./chunk-LJE7RZNC.js";
36
- import "./chunk-KDOJW5LH.js";
31
+ } from "./chunk-2XED2FKY.js";
32
+ import "./chunk-7QFVXP2X.js";
33
+ import "./chunk-2CHGUYMG.js";
34
+ import "./chunk-PAFOLIYQ.js";
35
+ import "./chunk-F4HM25K4.js";
36
+ import "./chunk-4I26YMBY.js";
37
37
  import "./chunk-7BDPM5ST.js";
38
38
  import "./chunk-UG5G54VL.js";
39
39
  import "./chunk-BUSC6UAE.js";