weaver-work-cli 0.1.29 → 0.1.32
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.
- package/dist/chunks/archive-UMGX72K6.js +2537 -0
- package/dist/chunks/archive-oa-N2IYBLF3.js +1317 -0
- package/dist/chunks/asset-GLEGKFG5.js +2109 -0
- package/dist/chunks/attachment-content-AQNX5N3S.js +23 -0
- package/dist/chunks/blog-E44OTVDA.js +2157 -0
- package/dist/chunks/caizhilian-DQUFZXZL.js +10087 -0
- package/dist/chunks/calendar-JKPIRKFD.js +1195 -0
- package/dist/chunks/chunk-2GA5ZIQL.js +1615 -0
- package/dist/chunks/chunk-4YC43QQ4.js +403 -0
- package/dist/chunks/chunk-6EFWDL7Y.js +161 -0
- package/dist/chunks/chunk-6RKD4DRZ.js +5556 -0
- package/dist/chunks/chunk-AJ62BGAW.js +29 -0
- package/dist/chunks/chunk-BUSC6UAE.js +43 -0
- package/dist/chunks/chunk-C6R3B2ML.js +358 -0
- package/dist/chunks/chunk-CVZ2JOSW.js +62 -0
- package/dist/chunks/chunk-DW6AUUKS.js +508 -0
- package/dist/chunks/chunk-E4Z23GHM.js +6962 -0
- package/dist/chunks/chunk-EG6ZU444.js +654 -0
- package/dist/chunks/chunk-EZALDOQH.js +383 -0
- package/dist/chunks/chunk-FMPJJYYI.js +106 -0
- package/dist/chunks/chunk-G2JSIUWF.js +769 -0
- package/dist/chunks/chunk-G3QJULO2.js +387 -0
- package/dist/chunks/chunk-GCG2NMWR.js +703 -0
- package/dist/chunks/chunk-GPMFD4RD.js +75 -0
- package/dist/chunks/chunk-H6XSTSLM.js +2357 -0
- package/dist/chunks/chunk-H7J4DC5R.js +464 -0
- package/dist/chunks/chunk-IURUFGZK.js +477 -0
- package/dist/chunks/chunk-LUSPKZKY.js +53 -0
- package/dist/chunks/chunk-NIAJ5ZCG.js +73 -0
- package/dist/chunks/chunk-NOODWMCL.js +584 -0
- package/dist/chunks/chunk-OOUTBLZ4.js +51 -0
- package/dist/chunks/chunk-P26ZWSKU.js +73 -0
- package/dist/chunks/chunk-QWY6PGL6.js +3472 -0
- package/dist/chunks/chunk-WKI2FBIQ.js +15606 -0
- package/dist/chunks/chunk-WSKBSQ2U.js +231 -0
- package/dist/chunks/chunk-YLCYX7LE.js +371 -0
- package/dist/chunks/chunk-YRVDW4WN.js +205 -0
- package/dist/chunks/chunk-ZEDWSH32.js +68 -0
- package/dist/chunks/continuation-2CKSBLA6.js +11 -0
- package/dist/chunks/continuation-HZIZRZBX.js +13 -0
- package/dist/chunks/continuation-NLECEJPX.js +11 -0
- package/dist/chunks/ebuilder-form-V5FG2EHC.js +2276 -0
- package/dist/chunks/ehr-HMFY6VIL.js +5241 -0
- package/dist/chunks/employee-SAK2QYXX.js +11 -0
- package/dist/chunks/esb-ZYSVB7SG.js +141 -0
- package/dist/chunks/fna-B7RKPAZD.js +1444 -0
- package/dist/chunks/host-45WED2KK.js +21 -0
- package/dist/chunks/host-I4Z6BFYX.js +23 -0
- package/dist/chunks/host-KNZ52LJZ.js +17 -0
- package/dist/chunks/host-OCH2BCCV.js +19 -0
- package/dist/chunks/hrm-2KAZGUHI.js +244 -0
- package/dist/chunks/im-ACJJWH4U.js +252 -0
- package/dist/chunks/invoice-ZK3WCX2U.js +5179 -0
- package/dist/chunks/jiuchuanhui-5PQD3IL2.js +1940 -0
- package/dist/chunks/lazy-dispatch-JQXBW3GM.js +28 -0
- package/dist/chunks/mail-S2HDDXO2.js +2695 -0
- package/dist/chunks/meeting-QVN3I37L.js +504 -0
- package/dist/chunks/msg-parse-4GSQ2WTO.js +41 -0
- package/dist/chunks/okr-QNG4VC2Q.js +2482 -0
- package/dist/chunks/plan-A25EMW6U.js +2025 -0
- package/dist/chunks/project-G6XV66DZ.js +1361 -0
- package/dist/chunks/registry-2VLUAESA.js +14 -0
- package/dist/chunks/registry-7C5UMIPL.js +19 -0
- package/dist/chunks/registry-DC6KR3NH.js +18 -0
- package/dist/chunks/registry-NYPYMZXG.js +16 -0
- package/dist/chunks/registry-TI3CIUXF.js +19 -0
- package/dist/chunks/room-recommend-WRTHO6Y2.js +20 -0
- package/dist/chunks/schedule-KFIITGSK.js +24 -0
- package/dist/chunks/state-Y2XBP6YE.js +15 -0
- package/dist/chunks/workflow-DJ7SYWAF.js +245 -0
- package/dist/cmd/argv.js +45 -0
- package/dist/cmd/docs/index.js +3 -3
- package/dist/cmd/lazy-dispatch.js +20 -0
- package/dist/cmd/root.js +2 -4
- package/dist/cmd/setup/index.js +2 -2
- package/dist/cmd/skills/index.js +2 -2
- package/dist/core/package-paths.js +61 -0
- package/dist/index.js +163 -7
- package/dist/internal/e10/auth/xiaoe.js +3 -3
- package/dist/internal/e10/request-runtime.js +18 -62
- package/dist/internal/skills/detector.js +2 -2
- package/dist/shortcuts/contract/data/performance-catalog.js +1306 -0
- package/dist/shortcuts/contract/host.js +91 -35
- package/dist/shortcuts/contract/index.js +213 -0
- package/dist/shortcuts/contract/manifest.js +928 -0
- package/dist/shortcuts/contract/ooxml/docx.js +295 -0
- package/dist/shortcuts/contract/ooxml/xlsx.js +221 -0
- package/dist/shortcuts/contract/ooxml/zip.js +158 -0
- package/dist/shortcuts/contract/operations/assistant.js +1156 -0
- package/dist/shortcuts/contract/operations/clause-library.js +522 -0
- package/dist/shortcuts/contract/operations/compare.js +193 -0
- package/dist/shortcuts/contract/operations/credit-page.js +34 -0
- package/dist/shortcuts/contract/operations/flow.js +98 -0
- package/dist/shortcuts/contract/operations/page.js +66 -0
- package/dist/shortcuts/contract/operations/performance.js +733 -0
- package/dist/shortcuts/contract/operations/quote.js +557 -0
- package/dist/shortcuts/contract/operations/recommend.js +78 -0
- package/dist/shortcuts/contract/operations/registry.js +18 -0
- package/dist/shortcuts/contract/operations/review.js +83 -0
- package/dist/shortcuts/contract/operations/shared.js +37 -0
- package/dist/shortcuts/contract/operations/upload.js +108 -0
- package/dist/shortcuts/contract/operations/write.js +3 -2
- package/dist/shortcuts/index.js +140 -40
- package/dist/shortcuts/invoice/manifest.js +34 -11
- package/dist/shortcuts/invoice/operations/reim-auto.js +9 -0
- package/dist/shortcuts/invoice/operations/reim.js +81 -5
- package/dist/shortcuts/invoice/operations/shared.js +12 -5
- package/dist/shortcuts/meeting/host.js +45 -3
- package/dist/shortcuts/meeting/invitation/docx.js +442 -0
- package/dist/shortcuts/meeting/operations/attachment-content.js +418 -0
- package/dist/shortcuts/meeting/operations/attachment.js +442 -0
- package/dist/shortcuts/meeting/operations/eb/cache.js +57 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +343 -28
- package/dist/shortcuts/meeting/operations/eb/conflict.js +372 -11
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +710 -0
- package/dist/shortcuts/meeting/operations/eb/decision.js +47 -1
- package/dist/shortcuts/meeting/operations/eb/factory.js +129 -11
- package/dist/shortcuts/meeting/operations/eb/index.js +122 -2
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +378 -0
- package/dist/shortcuts/meeting/operations/eb/room-summary.js +84 -0
- package/dist/shortcuts/meeting/operations/eb/schedule.js +450 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +576 -0
- package/dist/shortcuts/meeting/operations/invitation.js +458 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +266 -0
- package/dist/shortcuts/meeting/operations/pipeline.js +489 -0
- package/dist/shortcuts/meeting/operations/qrcode.js +131 -0
- package/dist/shortcuts/meeting/operations/receipts.js +1 -1
- package/dist/shortcuts/meeting/operations/registry.js +18 -0
- package/dist/shortcuts/meeting/operations/summary.js +276 -0
- package/dist/shortcuts/meeting/operations/task-notify.js +325 -0
- package/dist/shortcuts/meeting/operations.js +42 -1
- package/dist/shortcuts/meeting/qr/encoder.js +427 -0
- package/dist/shortcuts/meeting/qr/render.js +103 -0
- package/dist/shortcuts/workflow/operations/form.js +17 -5
- package/docs/contract.md +39 -4
- package/docs/invoice.md +5 -5
- package/package.json +3 -2
- package/scripts/bundle.mjs +63 -0
- package/skill-template/business-info.json +25 -4
- package/skill-template/domains/jinchengda.md +16 -3
- package/skill-template/domains/yepiaotong.md +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +111 -31
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +7 -13
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +150 -0
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +87 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +111 -0
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +0 -15
- package/skills/weaver-e10-jinchengda/references/contract-clause-reference-save.md +0 -13
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +50 -0
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +4 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +74 -0
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +84 -0
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +29 -0
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +28 -0
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +2 -21
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +0 -24
- package/skills/weaver-e10-jinchengda/references/contract-signing-subjects.md +0 -15
- package/skills/weaver-e10-jinchengda/references/contract-subject-create.md +0 -17
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +70 -0
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +0 -15
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +0 -15
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +1168 -152
- package/skills/weaver-e10-meeting/SKILL.md +493 -17
- package/skills/weaver-e10-meeting/references/meeting-change.md +4 -4
- package/skills/weaver-e10-meeting/references/meeting-create.md +6 -6
- package/skills/weaver-e10-meeting/references/meeting-eb.md +503 -27
- package/skills/weaver-e10-meeting/references/meeting-invitation.md +113 -0
- package/skills/weaver-e10-meeting/references/meeting-lifecycle.md +6 -6
- package/skills/weaver-e10-meeting/references/meeting-minute-file.md +425 -0
- package/skills/weaver-e10-meeting/references/meeting-queries.md +4 -4
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +15 -15
- package/skills/weaver-e10-meeting/references/meeting-verification.md +19 -11
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-yepiaotong/SKILL.md +9 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +6 -5
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +14 -11
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +97 -56
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +84 -60
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +142 -105
- package/skills/weaver-e10-yepiaotong/references/reim-matching-rules.md +53 -194
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +7 -7
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +164 -72
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +6 -0
- package/templates/meeting/invitation.docx +0 -0
package/dist/index.js
CHANGED
|
@@ -1,11 +1,167 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
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-6RKD4DRZ.js";
|
|
11
|
+
import "./chunks/chunk-EG6ZU444.js";
|
|
12
|
+
import "./chunks/chunk-AJ62BGAW.js";
|
|
13
|
+
import "./chunks/chunk-H7J4DC5R.js";
|
|
14
|
+
import "./chunks/chunk-DW6AUUKS.js";
|
|
15
|
+
import "./chunks/chunk-2GA5ZIQL.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-JQXBW3GM.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-ZK3WCX2U.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-HMFY6VIL.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-UMGX72K6.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-N2IYBLF3.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-JKPIRKFD.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-B7RKPAZD.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-2KAZGUHI.js")).hrmShortcut
|
|
73
|
+
}),
|
|
74
|
+
lazyShortcut({
|
|
75
|
+
name: "mail",
|
|
76
|
+
description: "\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406 CLI",
|
|
77
|
+
load: async () => (await import("./chunks/mail-S2HDDXO2.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-QVN3I37L.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-QNG4VC2Q.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-A25EMW6U.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-ZYSVB7SG.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-V5FG2EHC.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-5PQD3IL2.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-GLEGKFG5.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-ACJJWH4U.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-G6XV66DZ.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-DJ7SYWAF.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-E44OTVDA.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-DQUFZXZL.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
|
-
|
|
9
|
-
|
|
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 {
|
|
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 =
|
|
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
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
|
8
|
+
return packagePath('tools', PACKAGED_DETECTOR_NAME);
|
|
9
9
|
}
|
|
10
10
|
function detectorScriptPath(detectorDir) {
|
|
11
11
|
return join(detectorDir, 'scripts', 'validate_skill.py');
|