weaver-work-cli 0.1.29 → 0.1.31

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 (185) hide show
  1. package/dist/chunks/archive-U766FTFH.js +2537 -0
  2. package/dist/chunks/archive-oa-DMWEKX3L.js +1317 -0
  3. package/dist/chunks/asset-TCR7VDEV.js +2109 -0
  4. package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
  5. package/dist/chunks/blog-EVZWGDVM.js +2157 -0
  6. package/dist/chunks/caizhilian-JOWS6SL5.js +10087 -0
  7. package/dist/chunks/calendar-5WNCV66Q.js +1195 -0
  8. package/dist/chunks/chunk-2DUV44UX.js +15606 -0
  9. package/dist/chunks/chunk-324YPTC2.js +1607 -0
  10. package/dist/chunks/chunk-65QMVWHS.js +231 -0
  11. package/dist/chunks/chunk-6V7ZLF34.js +387 -0
  12. package/dist/chunks/chunk-AC7KJWC5.js +358 -0
  13. package/dist/chunks/chunk-AJ62BGAW.js +29 -0
  14. package/dist/chunks/chunk-BUSC6UAE.js +43 -0
  15. package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
  16. package/dist/chunks/chunk-D4LTJSJD.js +477 -0
  17. package/dist/chunks/chunk-EG6ZU444.js +654 -0
  18. package/dist/chunks/chunk-EZALDOQH.js +383 -0
  19. package/dist/chunks/chunk-FMPJJYYI.js +106 -0
  20. package/dist/chunks/chunk-G2JSIUWF.js +769 -0
  21. package/dist/chunks/chunk-GCG2NMWR.js +703 -0
  22. package/dist/chunks/chunk-GPMFD4RD.js +75 -0
  23. package/dist/chunks/chunk-H3WDBYJW.js +508 -0
  24. package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
  25. package/dist/chunks/chunk-J7RJTZSV.js +5556 -0
  26. package/dist/chunks/chunk-LUSPKZKY.js +53 -0
  27. package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
  28. package/dist/chunks/chunk-NOODWMCL.js +584 -0
  29. package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
  30. package/dist/chunks/chunk-P26ZWSKU.js +73 -0
  31. package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
  32. package/dist/chunks/chunk-R2IJAK7T.js +464 -0
  33. package/dist/chunks/chunk-R7O5PUWO.js +205 -0
  34. package/dist/chunks/chunk-RCGYCOMG.js +6962 -0
  35. package/dist/chunks/chunk-VZTXRG6X.js +403 -0
  36. package/dist/chunks/chunk-WHD4XMRP.js +161 -0
  37. package/dist/chunks/chunk-YLCYX7LE.js +371 -0
  38. package/dist/chunks/chunk-ZEDWSH32.js +68 -0
  39. package/dist/chunks/continuation-2CKSBLA6.js +11 -0
  40. package/dist/chunks/continuation-HZIZRZBX.js +13 -0
  41. package/dist/chunks/continuation-NLECEJPX.js +11 -0
  42. package/dist/chunks/ebuilder-form-NJ4YK6CC.js +2276 -0
  43. package/dist/chunks/ehr-MMYN36VA.js +5241 -0
  44. package/dist/chunks/employee-SAK2QYXX.js +11 -0
  45. package/dist/chunks/esb-HIWHOU7Q.js +141 -0
  46. package/dist/chunks/fna-KBACQTA5.js +1444 -0
  47. package/dist/chunks/host-3OHS5QUX.js +21 -0
  48. package/dist/chunks/host-IG6KEH5Q.js +19 -0
  49. package/dist/chunks/host-KQL5N4HO.js +23 -0
  50. package/dist/chunks/host-LLSZQCWR.js +17 -0
  51. package/dist/chunks/hrm-LYEC67ZQ.js +244 -0
  52. package/dist/chunks/im-RN2UKAEU.js +252 -0
  53. package/dist/chunks/invoice-EEPHLAF6.js +5179 -0
  54. package/dist/chunks/jiuchuanhui-WVVZYSJE.js +1940 -0
  55. package/dist/chunks/lazy-dispatch-MDOFFL2S.js +28 -0
  56. package/dist/chunks/mail-LNQLTF6L.js +2695 -0
  57. package/dist/chunks/meeting-XSD3BDVQ.js +504 -0
  58. package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
  59. package/dist/chunks/okr-TMWTIU2K.js +2482 -0
  60. package/dist/chunks/plan-A2FSFA7T.js +2025 -0
  61. package/dist/chunks/project-T26QLBQF.js +1361 -0
  62. package/dist/chunks/registry-2VLUAESA.js +14 -0
  63. package/dist/chunks/registry-JCFEYXOE.js +18 -0
  64. package/dist/chunks/registry-NYPYMZXG.js +16 -0
  65. package/dist/chunks/registry-Q7OQJ3SU.js +19 -0
  66. package/dist/chunks/registry-ZJMJVWFA.js +19 -0
  67. package/dist/chunks/room-recommend-UR4ZDZS6.js +20 -0
  68. package/dist/chunks/schedule-5L2PM4M6.js +24 -0
  69. package/dist/chunks/state-Y2XBP6YE.js +15 -0
  70. package/dist/chunks/workflow-TR6PG2SL.js +245 -0
  71. package/dist/cmd/argv.js +45 -0
  72. package/dist/cmd/docs/index.js +3 -3
  73. package/dist/cmd/lazy-dispatch.js +20 -0
  74. package/dist/cmd/root.js +2 -4
  75. package/dist/cmd/setup/index.js +2 -2
  76. package/dist/cmd/skills/index.js +2 -2
  77. package/dist/core/package-paths.js +47 -0
  78. package/dist/index.js +163 -7
  79. package/dist/internal/e10/auth/xiaoe.js +3 -3
  80. package/dist/internal/e10/request-runtime.js +18 -62
  81. package/dist/internal/skills/detector.js +2 -2
  82. package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
  83. package/dist/shortcuts/contract/host.js +91 -35
  84. package/dist/shortcuts/contract/index.js +213 -0
  85. package/dist/shortcuts/contract/manifest.js +928 -0
  86. package/dist/shortcuts/contract/ooxml/docx.js +295 -0
  87. package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
  88. package/dist/shortcuts/contract/ooxml/zip.js +158 -0
  89. package/dist/shortcuts/contract/operations/assistant.js +1156 -0
  90. package/dist/shortcuts/contract/operations/clause-library.js +522 -0
  91. package/dist/shortcuts/contract/operations/compare.js +193 -0
  92. package/dist/shortcuts/contract/operations/credit-page.js +34 -0
  93. package/dist/shortcuts/contract/operations/flow.js +98 -0
  94. package/dist/shortcuts/contract/operations/page.js +66 -0
  95. package/dist/shortcuts/contract/operations/performance.js +733 -0
  96. package/dist/shortcuts/contract/operations/quote.js +557 -0
  97. package/dist/shortcuts/contract/operations/recommend.js +78 -0
  98. package/dist/shortcuts/contract/operations/registry.js +18 -0
  99. package/dist/shortcuts/contract/operations/review.js +83 -0
  100. package/dist/shortcuts/contract/operations/shared.js +37 -0
  101. package/dist/shortcuts/contract/operations/upload.js +108 -0
  102. package/dist/shortcuts/contract/operations/write.js +3 -2
  103. package/dist/shortcuts/index.js +140 -40
  104. package/dist/shortcuts/invoice/manifest.js +34 -11
  105. package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
  106. package/dist/shortcuts/invoice/operations/reim.js +81 -5
  107. package/dist/shortcuts/invoice/operations/shared.js +12 -5
  108. package/dist/shortcuts/meeting/host.js +45 -3
  109. package/dist/shortcuts/meeting/invitation/docx.js +442 -0
  110. package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
  111. package/dist/shortcuts/meeting/operations/attachment.js +442 -0
  112. package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
  113. package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
  114. package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
  115. package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
  116. package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
  117. package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
  118. package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
  119. package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
  120. package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
  121. package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
  122. package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
  123. package/dist/shortcuts/meeting/operations/invitation.js +458 -0
  124. package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
  125. package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
  126. package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
  127. package/dist/shortcuts/meeting/operations/receipts.js +1 -1
  128. package/dist/shortcuts/meeting/operations/registry.js +18 -0
  129. package/dist/shortcuts/meeting/operations/summary.js +276 -0
  130. package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
  131. package/dist/shortcuts/meeting/operations.js +42 -1
  132. package/dist/shortcuts/meeting/qr/encoder.js +427 -0
  133. package/dist/shortcuts/meeting/qr/render.js +103 -0
  134. package/dist/shortcuts/workflow/operations/form.js +17 -5
  135. package/docs/contract.md +39 -4
  136. package/docs/invoice.md +5 -5
  137. package/package.json +3 -2
  138. package/scripts/bundle.mjs +63 -0
  139. package/skill-template/business-info.json +25 -4
  140. package/skill-template/domains/jinchengda.md +16 -3
  141. package/skill-template/domains/yepiaotong.md +1 -1
  142. package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
  143. package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
  144. package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
  145. package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
  146. package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
  147. package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
  148. package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
  149. package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
  150. package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
  151. package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
  152. package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
  153. package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
  154. package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
  155. package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
  156. package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
  157. package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
  158. package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
  159. package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
  160. package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
  161. package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
  162. package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
  163. package/skills/weaver-e10-meeting/SKILL.md +493 -17
  164. package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
  165. package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
  166. package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
  167. package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
  168. package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
  169. package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
  170. package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
  171. package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
  172. package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
  173. package/skills/weaver-e10-meeting.zip +0 -0
  174. package/skills/weaver-e10-yepiaotong/SKILL.md +9 -5
  175. package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
  176. package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
  177. package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
  178. package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
  179. package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
  180. package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
  181. package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
  182. package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
  183. package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
  184. package/skills/weaver-e10-yepiaotong/references/source-manifest.json +6 -0
  185. package/templates/meeting/invitation.docx +0 -0
package/dist/index.js CHANGED
@@ -1,11 +1,167 @@
1
1
  #!/usr/bin/env node
2
- import { builtinCommands } from './cmd/index.js';
3
- import { createProgram } from './cmd/root.js';
4
- import { registerCommands } from './cmd/register.js';
5
- import { builtinShortcuts } from './shortcuts/index.js';
6
- const { program, ctx } = createProgram();
2
+ import { createRequire as __esbuildCreateRequire } from 'node:module';
3
+ const require = __esbuildCreateRequire(import.meta.url);
4
+ import {
5
+ builtinCommands,
6
+ createProgram,
7
+ firstPositionalToken,
8
+ registerCommands,
9
+ toCommandMetadata
10
+ } from "./chunks/chunk-J7RJTZSV.js";
11
+ import "./chunks/chunk-EG6ZU444.js";
12
+ import "./chunks/chunk-AJ62BGAW.js";
13
+ import "./chunks/chunk-R2IJAK7T.js";
14
+ import "./chunks/chunk-H3WDBYJW.js";
15
+ import "./chunks/chunk-324YPTC2.js";
16
+ import "./chunks/chunk-LUSPKZKY.js";
17
+ import "./chunks/chunk-BUSC6UAE.js";
18
+
19
+ // src/shortcuts/index.ts
20
+ function lazyShortcut(definition) {
21
+ return {
22
+ name: definition.name,
23
+ description: definition.description,
24
+ category: "shortcut",
25
+ load: definition.load,
26
+ register({ program: program2 }) {
27
+ const placeholder = program2.command(definition.name).description(definition.description);
28
+ placeholder.allowUnknownOption(true);
29
+ placeholder.allowExcessArguments(true);
30
+ placeholder.helpOption(false);
31
+ placeholder.action(async () => {
32
+ const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-MDOFFL2S.js");
33
+ await dispatchLazyShortcut(definition, shortcutMetadata());
34
+ });
35
+ }
36
+ };
37
+ }
38
+ var builtinShortcuts = [
39
+ lazyShortcut({
40
+ name: "invoice",
41
+ description: "E10 \u4E1A\u7968\u901A\u53D1\u7968\u7BA1\u7406 CLI",
42
+ load: async () => (await import("./chunks/invoice-EEPHLAF6.js")).invoiceShortcut
43
+ }),
44
+ lazyShortcut({
45
+ name: "ehr",
46
+ description: "\u6CDB\u5FAEE10\u805A\u624D\u6797\uFF08\u4EBA\u4E8B/\u51FA\u52E4/\u85AA\u916C\uFF09CLI",
47
+ load: async () => (await import("./chunks/ehr-MMYN36VA.js")).ehrShortcut
48
+ }),
49
+ lazyShortcut({
50
+ name: "archive",
51
+ description: "E10 \u6587\u4E66\u5B9A\u6863\u6848\u7BA1\u7406 CLI",
52
+ load: async () => (await import("./chunks/archive-U766FTFH.js")).archiveShortcut
53
+ }),
54
+ lazyShortcut({
55
+ name: "archive-oa",
56
+ description: "E10 \u6863\u6848\u5B9A\u4F4D\u4E0E OA \u5546\u52A1\u5408\u540C\u501F\u9605 CLI",
57
+ load: async () => (await import("./chunks/archive-oa-DMWEKX3L.js")).archiveOaShortcut
58
+ }),
59
+ lazyShortcut({
60
+ name: "calendar",
61
+ description: "\u6CDB\u5FAEE10\u65E5\u7A0B\u7BA1\u7406 CLI\uFF08\u521B\u5EFA/\u67E5\u8BE2/\u66F4\u65B0/\u5220\u9664/\u5B57\u5178\uFF09",
62
+ load: async () => (await import("./chunks/calendar-5WNCV66Q.js")).calendarShortcut
63
+ }),
64
+ lazyShortcut({
65
+ name: "fna",
66
+ description: "\u6CDB\u5FAEE10\u9F50\u4E1A\u6210\u8D39\u63A7\u4E2D\u5FC3\uFF08\u9884\u7B97/\u8D39\u7528\u4E2D\u5FC3/\u501F\u6B3E\u7BA1\u7406/\u53D1\u7968\u6838\u9500\uFF09CLI",
67
+ load: async () => (await import("./chunks/fna-KBACQTA5.js")).fnaShortcut
68
+ }),
69
+ lazyShortcut({
70
+ name: "hrm",
71
+ description: "\u6CDB\u5FAEE10\u7EC4\u7EC7\u7BA1\u7406\uFF08\u5458\u5DE5/\u7EC4\u7EC7/\u5C97\u4F4D\u67E5\u8BE2\uFF09CLI",
72
+ load: async () => (await import("./chunks/hrm-LYEC67ZQ.js")).hrmShortcut
73
+ }),
74
+ lazyShortcut({
75
+ name: "mail",
76
+ description: "\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406 CLI",
77
+ load: async () => (await import("./chunks/mail-LNQLTF6L.js")).mailShortcut
78
+ }),
79
+ lazyShortcut({
80
+ name: "meeting",
81
+ description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
82
+ load: async () => (await import("./chunks/meeting-XSD3BDVQ.js")).meetingShortcut
83
+ }),
84
+ lazyShortcut({
85
+ name: "okr",
86
+ description: "\u6CDB\u5FAEE10 OKR \u76EE\u6807\u7BA1\u7406 CLI\uFF08\u76EE\u6807\u67E5\u8BE2/\u65B0\u5EFA/\u7F16\u8F91\u3001\u5173\u952E\u6210\u679C\u3001\u76EE\u6807\u5BF9\u9F50\u3001\u8BC4\u8BBA\uFF09",
87
+ load: async () => (await import("./chunks/okr-TMWTIU2K.js")).okrShortcut
88
+ }),
89
+ lazyShortcut({
90
+ name: "plan",
91
+ description: "\u6CDB\u5FAEE10\u8BA1\u5212\u62A5\u544A CLI\uFF08\u67E5\u8BE2/\u65B0\u5EFA/\u4FEE\u6539/\u53D1\u5E03/\u64A4\u56DE/\u63D0\u4EA4\u63D0\u9192/\u8BC4\u8BBA\uFF09",
92
+ load: async () => (await import("./chunks/plan-A2FSFA7T.js")).planShortcut
93
+ }),
94
+ lazyShortcut({
95
+ name: "esb",
96
+ description: "\u6CDB\u5FAEE10 ESB \u4E2D\u5FC3\u81EA\u5B9A\u4E49\u89E6\u53D1\u52A8\u4F5C\u6D41 CLI",
97
+ load: async () => (await import("./chunks/esb-HIWHOU7Q.js")).esbShortcut
98
+ }),
99
+ lazyShortcut({
100
+ name: "ebuilder-form",
101
+ description: "\u6CDB\u5FAEE10 eBuilder \u8868\u5355\u83DC\u5355\u3001\u5217\u8868\u548C\u8868\u5355\u6570\u636E CLI",
102
+ load: async () => (await import("./chunks/ebuilder-form-NJ4YK6CC.js")).ebuilderFormShortcut
103
+ }),
104
+ lazyShortcut({
105
+ name: "jiuchuanhui",
106
+ description: "\u6CDB\u5FAEE10\u4E5D\u6C1A\u6C47\u8425\u9500\u7BA1\u7406 CLI\uFF08\u5BA2\u6237/\u8054\u7CFB\u4EBA/\u5546\u673A/\u7EBF\u7D22/\u8054\u7CFB\u8BA1\u5212/\u516C\u6D77\uFF09",
107
+ load: async () => (await import("./chunks/jiuchuanhui-WVVZYSJE.js")).jiuchuanhuiShortcut
108
+ }),
109
+ lazyShortcut({
110
+ name: "asset",
111
+ description: "E10 \u8D44\u4EA7\u7BA1\u7406\uFF08\u8D44\u7BA1\u5BB6\uFF09CLI",
112
+ load: async () => (await import("./chunks/asset-TCR7VDEV.js")).assetShortcut
113
+ }),
114
+ lazyShortcut({
115
+ name: "im",
116
+ description: "\u6CDB\u5FAEE10\u6613\u79D2\u529E\uFF08\u5373\u65F6\u901A\u8BAF\uFF09CLI",
117
+ load: async () => (await import("./chunks/im-RN2UKAEU.js")).imShortcut
118
+ }),
119
+ lazyShortcut({
120
+ name: "project",
121
+ description: "\u6CDB\u5FAEE10\u4E8B\u4E95\u7136\u9879\u76EE\u7BA1\u7406 CLI\uFF08\u9879\u76EE/\u4EFB\u52A1\u67E5\u8BE2\u4E0E\u786E\u8BA4\u5199\u5165\uFF09",
122
+ load: async () => (await import("./chunks/project-T26QLBQF.js")).projectShortcut
123
+ }),
124
+ lazyShortcut({
125
+ name: "workflow",
126
+ description: "\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B CLI\uFF08\u67E5\u8BE2/\u67E5\u770B/\u64CD\u4F5C/\u6279\u91CF/\u53D1\u8D77/\u4FEE\u6539\uFF09",
127
+ load: async () => (await import("./chunks/workflow-TR6PG2SL.js")).workflowShortcut
128
+ }),
129
+ lazyShortcut({
130
+ name: "blog",
131
+ description: "\u6CDB\u5FAEE10\u5DE5\u4F5C\u65E5\u62A5 CLI\uFF08\u67E5\u8BE2/\u53D1\u5E03/\u7F16\u8F91/\u8BC4\u8BBA/\u70B9\u8D5E/\u63D0\u9192/\u5BFC\u51FA\uFF09",
132
+ load: async () => (await import("./chunks/blog-EVZWGDVM.js")).blogShortcut
133
+ }),
134
+ lazyShortcut({
135
+ name: "caizhilian",
136
+ description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
137
+ load: async () => (await import("./chunks/caizhilian-JOWS6SL5.js")).caizhilianShortcut
138
+ })
139
+ ];
140
+ function shortcutMetadata() {
141
+ return builtinShortcuts;
142
+ }
143
+ async function loadShortcuts(names) {
144
+ const wanted = new Set(names);
145
+ const hits = builtinShortcuts.filter((shortcut) => wanted.has(shortcut.name));
146
+ return Promise.all(hits.map((shortcut) => shortcut.load()));
147
+ }
148
+ async function loadAllShortcuts() {
149
+ return Promise.all(builtinShortcuts.map((shortcut) => shortcut.load()));
150
+ }
151
+
152
+ // src/index.ts
153
+ var BUILTIN_NAMES = new Set(builtinCommands.map((command) => command.name));
154
+ async function selectShortcuts(wanted) {
155
+ if (!wanted) return builtinShortcuts;
156
+ if (builtinShortcuts.some((shortcut) => shortcut.name === wanted)) return loadShortcuts([wanted]);
157
+ if (BUILTIN_NAMES.has(wanted)) return builtinShortcuts;
158
+ return loadAllShortcuts();
159
+ }
160
+ var { program, ctx } = createProgram();
7
161
  await registerCommands(program, ctx, [
8
- ...builtinCommands,
9
- ...builtinShortcuts,
162
+ ...builtinCommands,
163
+ ...await selectShortcuts(firstPositionalToken(process.argv.slice(2)))
10
164
  ]);
165
+ ctx.commands = toCommandMetadata([...builtinCommands, ...shortcutMetadata()]);
166
+ ctx.modules = ctx.commands;
11
167
  await program.parseAsync();
@@ -1,9 +1,9 @@
1
1
  import { execFile } from 'node:child_process';
2
2
  import { accessSync, constants as fsConstants, existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
3
3
  import { homedir } from 'node:os';
4
- import { dirname, join, resolve } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
4
+ import { join } from 'node:path';
6
5
  import { CliError, ExitCode } from '../../../core/errors.js';
6
+ import { packagePath } from '../../../core/package-paths.js';
7
7
  import { isXiaoERuntime, isXiaoERuntimeAgent } from '../../../core/runtime-agent.js';
8
8
  import { buildE10CookieHeader, E10AuthSession, extractRawSetCookie, extractSessionTicket, profileNameFromUrl, readTeamsCheckUserInfo, saveAuthFile, saveProfileConfig, setActiveProfile, } from './session.js';
9
9
  export const DEFAULT_E10_BASE_URL = 'https://www.e-cology.com.cn';
@@ -335,7 +335,7 @@ function xiaoETokenScriptPath(env = process.env) {
335
335
  return xiaoETokenScriptCandidatePaths(env).find((path) => existsSync(path)) || '';
336
336
  }
337
337
  export function xiaoEBundledEnvScriptPath() {
338
- const scriptPath = resolve(dirname(fileURLToPath(import.meta.url)), '../../../../scripts/xiaoe_env.py');
338
+ const scriptPath = packagePath('scripts', 'xiaoe_env.py');
339
339
  return existsSync(scriptPath) ? scriptPath : '';
340
340
  }
341
341
  export function hasXiaoETokenScript(env = process.env, allowLocalDiscovery = true) {
@@ -271,69 +271,25 @@ export class E10RequestRuntime {
271
271
  export function parseJsonPreservingBigInts(text) {
272
272
  return JSON.parse(quoteLargeJsonIntegers(text));
273
273
  }
274
+ const LONG_INTEGER_MIN_DIGITS = 16;
275
+ // 一趟扫描把 JSON 拆成「字符串字面量」与「数字」两类 token:字符串整体跳过,
276
+ // 数字只在它是纯整数且位数够长时补引号。逐字符拼串在 MB 级响应上要 100 ms 以上,
277
+ // 正则在同样数据上是一个量级的差别,且不会因为字符串里的引号/数字误判。
278
+ const JSON_STRING_OR_NUMBER = /"(?:[^"\\]|\\.)*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g;
279
+ const LONG_DIGIT_RUN = /\d{16}/;
274
280
  function quoteLargeJsonIntegers(text) {
275
- let output = '';
276
- let i = 0;
277
- let inString = false;
278
- let escaped = false;
279
- while (i < text.length) {
280
- const char = text[i];
281
- if (inString) {
282
- output += char;
283
- if (escaped) {
284
- escaped = false;
285
- }
286
- else if (char === '\\') {
287
- escaped = true;
288
- }
289
- else if (char === '"') {
290
- inString = false;
291
- }
292
- i += 1;
293
- continue;
294
- }
295
- if (char === '"') {
296
- inString = true;
297
- output += char;
298
- i += 1;
299
- continue;
300
- }
301
- if (char === '-' || (char >= '0' && char <= '9')) {
302
- const start = i;
303
- if (char === '-')
304
- i += 1;
305
- const digitStart = i;
306
- while (i < text.length && text[i] >= '0' && text[i] <= '9')
307
- i += 1;
308
- if (digitStart === i) {
309
- output += text.slice(start, i);
310
- continue;
311
- }
312
- if (text[i] === '.' || text[i] === 'e' || text[i] === 'E') {
313
- if (text[i] === '.') {
314
- i += 1;
315
- while (i < text.length && text[i] >= '0' && text[i] <= '9')
316
- i += 1;
317
- }
318
- if (text[i] === 'e' || text[i] === 'E') {
319
- i += 1;
320
- if (text[i] === '+' || text[i] === '-')
321
- i += 1;
322
- while (i < text.length && text[i] >= '0' && text[i] <= '9')
323
- i += 1;
324
- }
325
- output += text.slice(start, i);
326
- continue;
327
- }
328
- const rawNumber = text.slice(start, i);
329
- const digitCount = rawNumber.startsWith('-') ? rawNumber.length - 1 : rawNumber.length;
330
- output += digitCount >= 16 ? `"${rawNumber}"` : rawNumber;
331
- continue;
332
- }
333
- output += char;
334
- i += 1;
335
- }
336
- return output;
281
+ // 没有连续 16 位数字时不可能存在需要改写的大整数,直接交给 JSON.parse,
282
+ // 省掉一整趟扫描与字符串重建(大多数响应走这条快路)。
283
+ if (!LONG_DIGIT_RUN.test(text))
284
+ return text;
285
+ return text.replace(JSON_STRING_OR_NUMBER, (token) => {
286
+ if (token.charCodeAt(0) === 0x22 /* " */)
287
+ return token;
288
+ if (token.includes('.') || token.includes('e') || token.includes('E'))
289
+ return token;
290
+ const digitCount = token.charCodeAt(0) === 0x2d /* - */ ? token.length - 1 : token.length;
291
+ return digitCount >= LONG_INTEGER_MIN_DIGITS ? `"${token}"` : token;
292
+ });
337
293
  }
338
294
  export function createE10RequestRuntime(ctx, session, dependencies = {}) {
339
295
  return new E10RequestRuntime(ctx, session, dependencies);
@@ -1,11 +1,11 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join, resolve } from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
3
  import { CliError, ExitCode } from '../../core/errors.js';
4
+ import { packagePath } from '../../core/package-paths.js';
5
5
  export const PACKAGED_DETECTOR_VERSION = '1.0.13';
6
6
  export const PACKAGED_DETECTOR_NAME = `weaver-skill-detector-${PACKAGED_DETECTOR_VERSION}`;
7
7
  export function packagedDetectorDir() {
8
- return fileURLToPath(new URL(`../../../tools/${PACKAGED_DETECTOR_NAME}/`, import.meta.url));
8
+ return packagePath('tools', PACKAGED_DETECTOR_NAME);
9
9
  }
10
10
  function detectorScriptPath(detectorDir) {
11
11
  return join(detectorDir, 'scripts', 'validate_skill.py');