weaver-work-cli 0.1.38 → 0.1.39
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/README.md +4 -2
- package/dist/chunks/{archive-PDV724YK.js → archive-ENZYBBME.js} +556 -66
- package/dist/chunks/{archive-oa-4XE4MNXQ.js → archive-oa-YWLEC5V4.js} +2 -2
- package/dist/chunks/{asset-PDL2QE2N.js → asset-OOV6DWPA.js} +2 -2
- package/dist/chunks/asset-idle-RE632MY5.js +670 -0
- package/dist/chunks/{attachment-content-MDDGOE5E.js → attachment-content-RWN2FCLL.js} +3 -3
- package/dist/chunks/{blog-UYR3EUXW.js → blog-PEPOJAL7.js} +2 -2
- package/dist/chunks/{caizhilian-LG2X5NMF.js → caizhilian-WYIQDVPJ.js} +2 -2
- package/dist/chunks/{calendar-FG4BAZHE.js → calendar-CIARBAOX.js} +2 -2
- package/dist/chunks/{chunk-6FTTSA45.js → chunk-36DIFZAH.js} +2 -2
- package/dist/chunks/{chunk-UJJD4QWF.js → chunk-BJGXMFGD.js} +2 -2
- package/dist/chunks/{chunk-ELYDWBZJ.js → chunk-CQHGNCK2.js} +1 -1
- package/dist/chunks/{chunk-XJY7G4DD.js → chunk-EINRJHQ3.js} +3 -3
- package/dist/chunks/{chunk-UZZBA6PV.js → chunk-EZGFHJFW.js} +28 -6
- package/dist/chunks/{chunk-NI6GIPIM.js → chunk-F2EQXUEE.js} +438 -387
- package/dist/chunks/{chunk-VRYHGG6O.js → chunk-GVPJZXJ2.js} +3 -3
- package/dist/chunks/{chunk-IZUDA353.js → chunk-HJYVHXUQ.js} +1 -1
- package/dist/chunks/{chunk-KKRL3REV.js → chunk-I2HB737U.js} +2 -2
- package/dist/chunks/{chunk-NR6RKXPA.js → chunk-K3RUEEOL.js} +4 -2
- package/dist/chunks/{chunk-6LTFIFLM.js → chunk-KTCB5R5H.js} +2 -2
- package/dist/chunks/{chunk-J7USS3ED.js → chunk-L4N7B7ZD.js} +4 -4
- package/dist/chunks/{chunk-CORFRD7Q.js → chunk-MUQUHKPG.js} +2 -2
- package/dist/chunks/{chunk-DMV2TOMH.js → chunk-NLK2RZKG.js} +46 -46
- package/dist/chunks/{chunk-JSMFPO43.js → chunk-P2DAISYW.js} +1 -1
- package/dist/chunks/{chunk-GGJFMNJM.js → chunk-T7JDJJ7H.js} +3 -3
- package/dist/chunks/{chunk-OJQUJZQF.js → chunk-XXJOSZTQ.js} +2 -0
- package/dist/chunks/{chunk-Z32KWY6G.js → chunk-YS5DPN4T.js} +1 -1
- package/dist/chunks/{chunk-EG6ZU444.js → chunk-ZUX3P6BQ.js} +10 -5
- package/dist/chunks/{chunk-FUWVHMVV.js → chunk-ZXRNHZTE.js} +2 -2
- package/dist/chunks/{conflict-BQZEQ4SP.js → conflict-DRMDOL56.js} +2 -2
- package/dist/chunks/{contract-XIRAFTEV.js → contract-73MERZWN.js} +2 -2
- package/dist/chunks/{cowork-BLG62BL2.js → cowork-HNGBPD7A.js} +2 -2
- package/dist/chunks/{ebuilder-form-NUKG5QW4.js → ebuilder-form-OY6DVNRK.js} +3 -3
- package/dist/chunks/{ehr-2STW5ILH.js → ehr-RAQNEQO7.js} +2 -2
- package/dist/chunks/{esb-UUDQUNKY.js → esb-6XV7C7YV.js} +4 -4
- package/dist/chunks/{fna-6RCY4NU5.js → fna-XTSRB7G7.js} +2 -2
- package/dist/chunks/{host-RHM3NPXV.js → host-3F5UM5GN.js} +3 -3
- package/dist/chunks/{host-EJZFROU3.js → host-A7J6GDUP.js} +3 -3
- package/dist/chunks/{host-FWDOSRH5.js → host-VGPVP7YF.js} +3 -3
- package/dist/chunks/{host-7RXEDMAH.js → host-YAQAPYNP.js} +3 -3
- package/dist/chunks/{host-UFF33TWJ.js → host-YMBXWFWX.js} +3 -3
- package/dist/chunks/{hrm-PKJ6ELSH.js → hrm-TLHKC545.js} +3 -3
- package/dist/chunks/{im-YJAXS7CO.js → im-YOUCFMUK.js} +3 -3
- package/dist/chunks/{invoice-HWVSXGX6.js → invoice-WNBS2B4C.js} +3 -3
- package/dist/chunks/{jiuchuanhui-L7VKILZB.js → jiuchuanhui-XABWS5RN.js} +2 -2
- package/dist/chunks/{lazy-dispatch-NMYEIHRH.js → lazy-dispatch-NLZ5UQQI.js} +5 -5
- package/dist/chunks/{mail-B42RRU7G.js → mail-LRYMBFNL.js} +2 -2
- package/dist/chunks/{meeting-CFYVBJSS.js → meeting-ESXL6MFI.js} +10 -10
- package/dist/chunks/{okr-GCLF6V7W.js → okr-EOV65SSF.js} +2 -2
- package/dist/chunks/{plan-ZVL7GBRI.js → plan-YFPVKW6Y.js} +2 -2
- package/dist/chunks/{project-4YWAAE2K.js → project-MDVZUYQW.js} +2 -2
- package/dist/chunks/{registry-EP4VTHZS.js → registry-QCLZEDAP.js} +8 -8
- package/dist/chunks/{registry-FRJ6H7BT.js → registry-VT5Y2HLA.js} +4 -4
- package/dist/chunks/{registry-SG2PGVCF.js → registry-YX4CSEMD.js} +3 -3
- package/dist/chunks/{room-recommend-R3JVUUAC.js → room-recommend-L3MWH4JW.js} +4 -4
- package/dist/chunks/{schedule-NIJBTYDO.js → schedule-UASAVDVD.js} +4 -4
- package/dist/chunks/{workflow-BB24DFBY.js → workflow-KDGIUCNW.js} +9 -6
- package/dist/core/output.js +16 -6
- package/dist/index.js +33 -28
- package/dist/internal/e10/auth/messages.js +1 -0
- package/dist/internal/e10/auth-recovery.js +13 -6
- package/dist/internal/e10/context.js +16 -3
- package/dist/internal/e10/request-runtime.js +3 -1
- package/dist/shortcuts/archive/host.js +2 -0
- package/dist/shortcuts/archive/manifest.js +1 -1
- package/dist/shortcuts/archive/operations/borrow-list.js +13 -1
- package/dist/shortcuts/archive/operations/flow-url.js +1 -1
- package/dist/shortcuts/archive/operations/prelib.js +472 -0
- package/dist/shortcuts/archive/operations/registry.js +2 -0
- package/dist/shortcuts/archive/operations/upload.js +1 -1
- package/dist/shortcuts/asset-idle/errors.js +44 -0
- package/dist/shortcuts/asset-idle/host.js +161 -0
- package/dist/shortcuts/asset-idle/index.js +114 -0
- package/dist/shortcuts/asset-idle/manifest.js +159 -0
- package/dist/shortcuts/asset-idle/operations/idle.js +47 -0
- package/dist/shortcuts/asset-idle/operations/registry.js +33 -0
- package/dist/shortcuts/asset-idle/operations/shared.js +142 -0
- package/dist/shortcuts/asset-idle/operations/types.js +9 -0
- package/dist/shortcuts/asset-idle/operations.js +15 -0
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/workflow/host.js +3 -0
- package/dist/shortcuts/workflow/index.js +1 -1
- package/dist/shortcuts/workflow/operations/form.js +46 -171
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +77 -26
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupStore.js +6 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +59 -117
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +44 -7
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +37 -29
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +20 -6
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +22 -18
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +34 -10
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +9 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +110 -20
- package/docs/_catalog.md +3 -0
- package/docs/asset-idle.md +45 -0
- package/docs/e10-auth.md +1 -1
- package/docs/todo-smart-convert/subgroup-rules.md +1 -1
- package/package.json +1 -1
- package/scripts/package-skill.mjs +2 -0
- package/skill-template/business-info.json +14 -1
- package/skill-template/domains/asset-idle.md +13 -0
- package/skill-template/domains/wenshuding.md +3 -0
- package/skills/weaver-e10-archive-oa/SKILL.md +1 -0
- package/skills/weaver-e10-archive-oa/references/my-borrow.md +49 -0
- package/skills/weaver-e10-asset-idle/SKILL.md +73 -0
- package/skills/weaver-e10-asset-idle/references/idle-list.md +62 -0
- package/skills/weaver-e10-asset-idle/references/idle-stats-and-charts.md +65 -0
- package/skills/weaver-e10-asset-idle/references/source-manifest.json +193 -0
- package/skills/weaver-e10-asset-idle/references/widget-style.md +205 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +29 -11
- package/skills/weaver-e10-caizhilian/references/auth-and-install.md +12 -0
- package/skills/weaver-e10-caizhilian/references/files.md +1 -1
- package/skills/weaver-e10-caizhilian/references/setting-encrypt.md +1 -1
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +45 -45
- package/skills/weaver-e10-cowork/SKILL.md +2 -0
- package/skills/weaver-e10-jucailin/SKILL.md +2 -0
- package/skills/weaver-e10-jucailin/references/recruit-read.md +2 -0
- package/skills/weaver-e10-jucailin/references/recruit-write.md +1 -1
- package/skills/weaver-e10-mail/SKILL.md +3 -0
- package/skills/weaver-e10-shared/SKILL.md +5 -5
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +3 -3
- package/skills/weaver-e10-wenshuding/SKILL.md +29 -6
- package/skills/weaver-e10-wenshuding/references/archive-borrow-list.md +14 -0
- package/skills/weaver-e10-wenshuding/references/archive-download.md +2 -0
- package/skills/weaver-e10-wenshuding/references/archive-flow.md +1 -1
- package/skills/weaver-e10-wenshuding/references/archive-prelib-arrange.md +76 -0
- package/skills/weaver-e10-wenshuding/references/archive-prelib-list.md +107 -0
- package/skills/weaver-e10-wenshuding/references/archive-prelib-open.md +59 -0
- package/skills/weaver-e10-wenshuding/references/archive-upload.md +4 -1
- package/skills/weaver-e10-wenshuding/references/source-manifest.json +108 -65
- package/skills/weaver-e10-workflow/SKILL.md +5 -2
- package/skills/weaver-e10-workflow/aigroup/default.json +154 -19
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +59 -27
- package/skills/weaver-e10-workflow/tools/todo-serve.cjs +113 -25
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +292 -42
package/dist/index.js
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
firstPositionalToken,
|
|
8
8
|
registerCommands,
|
|
9
9
|
toCommandMetadata
|
|
10
|
-
} from "./chunks/chunk-
|
|
11
|
-
import "./chunks/chunk-
|
|
10
|
+
} from "./chunks/chunk-GVPJZXJ2.js";
|
|
11
|
+
import "./chunks/chunk-ZUX3P6BQ.js";
|
|
12
12
|
import "./chunks/chunk-AJ62BGAW.js";
|
|
13
|
-
import "./chunks/chunk-
|
|
14
|
-
import "./chunks/chunk-
|
|
15
|
-
import "./chunks/chunk-
|
|
13
|
+
import "./chunks/chunk-ZXRNHZTE.js";
|
|
14
|
+
import "./chunks/chunk-EZGFHJFW.js";
|
|
15
|
+
import "./chunks/chunk-XXJOSZTQ.js";
|
|
16
16
|
import "./chunks/chunk-LUSPKZKY.js";
|
|
17
17
|
import "./chunks/chunk-BUSC6UAE.js";
|
|
18
18
|
|
|
@@ -29,7 +29,7 @@ function lazyShortcut(definition) {
|
|
|
29
29
|
placeholder.allowExcessArguments(true);
|
|
30
30
|
placeholder.helpOption(false);
|
|
31
31
|
placeholder.action(async () => {
|
|
32
|
-
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-
|
|
32
|
+
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-NLZ5UQQI.js");
|
|
33
33
|
await dispatchLazyShortcut(definition, shortcutMetadata());
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -39,112 +39,117 @@ var builtinShortcuts = [
|
|
|
39
39
|
lazyShortcut({
|
|
40
40
|
name: "invoice",
|
|
41
41
|
description: "E10 \u4E1A\u7968\u901A\u53D1\u7968\u7BA1\u7406 CLI",
|
|
42
|
-
load: async () => (await import("./chunks/invoice-
|
|
42
|
+
load: async () => (await import("./chunks/invoice-WNBS2B4C.js")).invoiceShortcut
|
|
43
43
|
}),
|
|
44
44
|
lazyShortcut({
|
|
45
45
|
name: "ehr",
|
|
46
46
|
description: "\u6CDB\u5FAEE10\u805A\u624D\u6797\uFF08\u4EBA\u4E8B/\u51FA\u52E4/\u85AA\u916C\uFF09CLI",
|
|
47
|
-
load: async () => (await import("./chunks/ehr-
|
|
47
|
+
load: async () => (await import("./chunks/ehr-RAQNEQO7.js")).ehrShortcut
|
|
48
48
|
}),
|
|
49
49
|
lazyShortcut({
|
|
50
50
|
name: "cowork",
|
|
51
51
|
description: "\u6CDB\u5FAEE10\u534F\u4F5C\u533A\uFF08\u534F\u4F5C\u4E8B\u9879/\u8BA8\u8BBA/\u5BA1\u6279/\u5171\u4EAB\u6743\u9650\uFF09CLI",
|
|
52
|
-
load: async () => (await import("./chunks/cowork-
|
|
52
|
+
load: async () => (await import("./chunks/cowork-HNGBPD7A.js")).coworkShortcut
|
|
53
53
|
}),
|
|
54
54
|
lazyShortcut({
|
|
55
55
|
name: "archive",
|
|
56
56
|
description: "E10 \u6587\u4E66\u5B9A\u6863\u6848\u7BA1\u7406 CLI",
|
|
57
|
-
load: async () => (await import("./chunks/archive-
|
|
57
|
+
load: async () => (await import("./chunks/archive-ENZYBBME.js")).archiveShortcut
|
|
58
58
|
}),
|
|
59
59
|
lazyShortcut({
|
|
60
60
|
name: "archive-oa",
|
|
61
61
|
description: "E10 \u6863\u6848\u5B9A\u4F4D\u4E0E OA \u5546\u52A1\u5408\u540C\u501F\u9605 CLI",
|
|
62
|
-
load: async () => (await import("./chunks/archive-oa-
|
|
62
|
+
load: async () => (await import("./chunks/archive-oa-YWLEC5V4.js")).archiveOaShortcut
|
|
63
63
|
}),
|
|
64
64
|
lazyShortcut({
|
|
65
65
|
name: "calendar",
|
|
66
66
|
description: "\u6CDB\u5FAEE10\u65E5\u7A0B\u7BA1\u7406 CLI\uFF08\u521B\u5EFA/\u67E5\u8BE2/\u66F4\u65B0/\u5220\u9664/\u5B57\u5178\uFF09",
|
|
67
|
-
load: async () => (await import("./chunks/calendar-
|
|
67
|
+
load: async () => (await import("./chunks/calendar-CIARBAOX.js")).calendarShortcut
|
|
68
68
|
}),
|
|
69
69
|
lazyShortcut({
|
|
70
70
|
name: "fna",
|
|
71
71
|
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",
|
|
72
|
-
load: async () => (await import("./chunks/fna-
|
|
72
|
+
load: async () => (await import("./chunks/fna-XTSRB7G7.js")).fnaShortcut
|
|
73
73
|
}),
|
|
74
74
|
lazyShortcut({
|
|
75
75
|
name: "hrm",
|
|
76
76
|
description: "\u6CDB\u5FAEE10\u7EC4\u7EC7\u7BA1\u7406\uFF08\u5458\u5DE5/\u7EC4\u7EC7/\u5C97\u4F4D\u67E5\u8BE2\uFF09CLI",
|
|
77
|
-
load: async () => (await import("./chunks/hrm-
|
|
77
|
+
load: async () => (await import("./chunks/hrm-TLHKC545.js")).hrmShortcut
|
|
78
78
|
}),
|
|
79
79
|
lazyShortcut({
|
|
80
80
|
name: "mail",
|
|
81
81
|
description: "\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406 CLI",
|
|
82
|
-
load: async () => (await import("./chunks/mail-
|
|
82
|
+
load: async () => (await import("./chunks/mail-LRYMBFNL.js")).mailShortcut
|
|
83
83
|
}),
|
|
84
84
|
lazyShortcut({
|
|
85
85
|
name: "meeting",
|
|
86
86
|
description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
|
|
87
|
-
load: async () => (await import("./chunks/meeting-
|
|
87
|
+
load: async () => (await import("./chunks/meeting-ESXL6MFI.js")).meetingShortcut
|
|
88
88
|
}),
|
|
89
89
|
lazyShortcut({
|
|
90
90
|
name: "okr",
|
|
91
91
|
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",
|
|
92
|
-
load: async () => (await import("./chunks/okr-
|
|
92
|
+
load: async () => (await import("./chunks/okr-EOV65SSF.js")).okrShortcut
|
|
93
93
|
}),
|
|
94
94
|
lazyShortcut({
|
|
95
95
|
name: "plan",
|
|
96
96
|
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",
|
|
97
|
-
load: async () => (await import("./chunks/plan-
|
|
97
|
+
load: async () => (await import("./chunks/plan-YFPVKW6Y.js")).planShortcut
|
|
98
98
|
}),
|
|
99
99
|
lazyShortcut({
|
|
100
100
|
name: "esb",
|
|
101
101
|
description: "\u6CDB\u5FAEE10 ESB \u4E2D\u5FC3\u81EA\u5B9A\u4E49\u89E6\u53D1\u52A8\u4F5C\u6D41 CLI",
|
|
102
|
-
load: async () => (await import("./chunks/esb-
|
|
102
|
+
load: async () => (await import("./chunks/esb-6XV7C7YV.js")).esbShortcut
|
|
103
103
|
}),
|
|
104
104
|
lazyShortcut({
|
|
105
105
|
name: "ebuilder-form",
|
|
106
106
|
description: "\u6CDB\u5FAEE10 eBuilder \u8868\u5355\u83DC\u5355\u3001\u5217\u8868\u548C\u8868\u5355\u6570\u636E CLI",
|
|
107
|
-
load: async () => (await import("./chunks/ebuilder-form-
|
|
107
|
+
load: async () => (await import("./chunks/ebuilder-form-OY6DVNRK.js")).ebuilderFormShortcut
|
|
108
108
|
}),
|
|
109
109
|
lazyShortcut({
|
|
110
110
|
name: "jiuchuanhui",
|
|
111
111
|
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",
|
|
112
|
-
load: async () => (await import("./chunks/jiuchuanhui-
|
|
112
|
+
load: async () => (await import("./chunks/jiuchuanhui-XABWS5RN.js")).jiuchuanhuiShortcut
|
|
113
113
|
}),
|
|
114
114
|
lazyShortcut({
|
|
115
115
|
name: "asset",
|
|
116
116
|
description: "E10 \u8D44\u4EA7\u7BA1\u7406\uFF08\u8D44\u7BA1\u5BB6\uFF09CLI",
|
|
117
|
-
load: async () => (await import("./chunks/asset-
|
|
117
|
+
load: async () => (await import("./chunks/asset-OOV6DWPA.js")).assetShortcut
|
|
118
|
+
}),
|
|
119
|
+
lazyShortcut({
|
|
120
|
+
name: "asset-idle",
|
|
121
|
+
description: "E10 \u95F2\u7F6E\u8D44\u4EA7\u5224\u5B9A\u7ED3\u679C\u67E5\u8BE2 CLI\uFF08\u5206\u9875\u83B7\u53D6/\u805A\u5408\u7EDF\u8BA1\uFF09",
|
|
122
|
+
load: async () => (await import("./chunks/asset-idle-RE632MY5.js")).assetIdleShortcut
|
|
118
123
|
}),
|
|
119
124
|
lazyShortcut({
|
|
120
125
|
name: "im",
|
|
121
126
|
description: "\u6CDB\u5FAEE10\u6613\u79D2\u529E\uFF08\u5373\u65F6\u901A\u8BAF\uFF09CLI",
|
|
122
|
-
load: async () => (await import("./chunks/im-
|
|
127
|
+
load: async () => (await import("./chunks/im-YOUCFMUK.js")).imShortcut
|
|
123
128
|
}),
|
|
124
129
|
lazyShortcut({
|
|
125
130
|
name: "project",
|
|
126
131
|
description: "\u6CDB\u5FAEE10\u4E8B\u4E95\u7136\u9879\u76EE\u7BA1\u7406 CLI\uFF08\u9879\u76EE/\u4EFB\u52A1\u67E5\u8BE2\u4E0E\u786E\u8BA4\u5199\u5165\uFF09",
|
|
127
|
-
load: async () => (await import("./chunks/project-
|
|
132
|
+
load: async () => (await import("./chunks/project-MDVZUYQW.js")).projectShortcut
|
|
128
133
|
}),
|
|
129
134
|
lazyShortcut({
|
|
130
135
|
name: "workflow",
|
|
131
136
|
description: "\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B CLI\uFF08\u67E5\u8BE2/\u67E5\u770B/\u64CD\u4F5C/\u6279\u91CF/\u53D1\u8D77/\u4FEE\u6539\uFF09",
|
|
132
|
-
load: async () => (await import("./chunks/workflow-
|
|
137
|
+
load: async () => (await import("./chunks/workflow-KDGIUCNW.js")).workflowShortcut
|
|
133
138
|
}),
|
|
134
139
|
lazyShortcut({
|
|
135
140
|
name: "blog",
|
|
136
141
|
description: "\u6CDB\u5FAEE10\u5DE5\u4F5C\u65E5\u62A5 CLI\uFF08\u67E5\u8BE2/\u53D1\u5E03/\u7F16\u8F91/\u8BC4\u8BBA/\u70B9\u8D5E/\u63D0\u9192/\u5BFC\u51FA\uFF09",
|
|
137
|
-
load: async () => (await import("./chunks/blog-
|
|
142
|
+
load: async () => (await import("./chunks/blog-PEPOJAL7.js")).blogShortcut
|
|
138
143
|
}),
|
|
139
144
|
lazyShortcut({
|
|
140
145
|
name: "caizhilian",
|
|
141
146
|
description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
|
|
142
|
-
load: async () => (await import("./chunks/caizhilian-
|
|
147
|
+
load: async () => (await import("./chunks/caizhilian-WYIQDVPJ.js")).caizhilianShortcut
|
|
143
148
|
}),
|
|
144
149
|
lazyShortcut({
|
|
145
150
|
name: "contract",
|
|
146
151
|
description: "\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406 CLI",
|
|
147
|
-
load: async () => (await import("./chunks/contract-
|
|
152
|
+
load: async () => (await import("./chunks/contract-73MERZWN.js")).contractShortcut
|
|
148
153
|
})
|
|
149
154
|
];
|
|
150
155
|
function shortcutMetadata() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export const E10_REAUTH_GUIDANCE = '请结合当前宿主环境选择合适的登录方式,恢复登录后重试原请求。';
|
|
2
2
|
export const E10_AUTH_REQUIRED_MESSAGE = `E10 登录态不可用。${E10_REAUTH_GUIDANCE}`;
|
|
3
|
+
export const E10_XIAOE_RECOVERY_FAILED_MESSAGE = 'E10 登录态不可用。已尝试小 e 自动重新获取登录信息,但未取得可用登录态。请在小 e 中恢复登录后重试。';
|
|
3
4
|
export const E10_SESSION_EXPIRED_MESSAGE = `E10 登录态已失效,本次操作已停止。${E10_REAUTH_GUIDANCE}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isXiaoERuntimeAgent } from '../../core/runtime-agent.js';
|
|
2
|
-
import { getActiveProfile } from './auth/session.js';
|
|
3
|
-
import { hasXiaoEEnv, tryXiaoEUnifiedLogin } from './auth/xiaoe.js';
|
|
2
|
+
import { getActiveProfile, readProfileConfig } from './auth/session.js';
|
|
3
|
+
import { hasXiaoEEnv, resolveXiaoEPreferredBaseUrl, tryXiaoEUnifiedLogin } from './auth/xiaoe.js';
|
|
4
4
|
const AUTH_REQUIRED_CODES = new Set(['-2', '401']);
|
|
5
5
|
const AUTH_REQUIRED_MARKERS = [
|
|
6
6
|
'未登录',
|
|
@@ -225,8 +225,10 @@ export function canAutomaticallyRecoverXiaoE(ctx, currentSession) {
|
|
|
225
225
|
|| isXiaoERuntimeAgent(currentSession?.agentType);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
|
-
* Silently
|
|
229
|
-
*
|
|
228
|
+
* Silently recover a stale or missing XiaoE session. Without a local session,
|
|
229
|
+
* current runtime evidence is required before obtaining credentials.
|
|
230
|
+
* Concurrent requests for the same profile/base URL share one credential
|
|
231
|
+
* exchange, so a burst of 401 responses
|
|
230
232
|
* does not start a burst of login attempts.
|
|
231
233
|
*/
|
|
232
234
|
export async function recoverXiaoEAuthSession(ctx, currentSession) {
|
|
@@ -234,7 +236,12 @@ export async function recoverXiaoEAuthSession(ctx, currentSession) {
|
|
|
234
236
|
return null;
|
|
235
237
|
const options = globalOptions(ctx);
|
|
236
238
|
const profile = options.profile || getActiveProfile();
|
|
237
|
-
const
|
|
239
|
+
const config = readProfileConfig(profile);
|
|
240
|
+
const baseUrl = resolveXiaoEPreferredBaseUrl({
|
|
241
|
+
explicitBaseUrl: currentSession?.getBaseUrl() || options.baseUrl,
|
|
242
|
+
profileBaseUrl: config.baseUrl,
|
|
243
|
+
env: ctx.env,
|
|
244
|
+
});
|
|
238
245
|
const key = `${profile}\n${baseUrl}`;
|
|
239
246
|
const existing = recoveryInFlight.get(key);
|
|
240
247
|
if (existing)
|
|
@@ -246,7 +253,7 @@ export async function recoverXiaoEAuthSession(ctx, currentSession) {
|
|
|
246
253
|
profileBaseUrl: baseUrl,
|
|
247
254
|
allowBundledEnvScript: true,
|
|
248
255
|
allowTokenScript: true,
|
|
249
|
-
tenantKeyFallback: currentSession.tenantKey,
|
|
256
|
+
tenantKeyFallback: currentSession?.tenantKey || config.tenantKey,
|
|
250
257
|
profileHint: profile,
|
|
251
258
|
// Intentionally no logger: transparent recovery must not leak an
|
|
252
259
|
// intermediate "login" step into agent stdout/stderr or JSON output.
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { CliError, ExitCode } from '../../core/errors.js';
|
|
2
|
-
import { E10_AUTH_REQUIRED_MESSAGE } from './auth/messages.js';
|
|
2
|
+
import { E10_AUTH_REQUIRED_MESSAGE, E10_XIAOE_RECOVERY_FAILED_MESSAGE } from './auth/messages.js';
|
|
3
3
|
import { E10AuthSession } from './auth/session.js';
|
|
4
4
|
import { E10ApiClient } from './client.js';
|
|
5
|
-
import { recoverXiaoEAuthSession } from './auth-recovery.js';
|
|
5
|
+
import { canAutomaticallyRecoverXiaoE, recoverXiaoEAuthSession } from './auth-recovery.js';
|
|
6
6
|
export async function getE10Session(ctx, load = {}) {
|
|
7
7
|
const options = ctx.getGlobalOptions();
|
|
8
8
|
return E10AuthSession.fromOptions(options, ctx.cwd, load);
|
|
9
9
|
}
|
|
10
10
|
export async function requireE10Session(ctx, load = {}) {
|
|
11
|
-
|
|
11
|
+
let session = await getE10Session(ctx, load);
|
|
12
|
+
if (!session && canAutomaticallyRecoverXiaoE(ctx)) {
|
|
13
|
+
// Read-only probes use getE10Session; only a command requiring a session
|
|
14
|
+
// may establish one from the current XiaoE host's credentials.
|
|
15
|
+
session = await recoverXiaoEAuthSession(ctx).catch(() => null);
|
|
16
|
+
if (!session) {
|
|
17
|
+
throw Object.assign(new CliError(E10_XIAOE_RECOVERY_FAILED_MESSAGE, ExitCode.AuthError), {
|
|
18
|
+
type: 'authentication',
|
|
19
|
+
subtype: 'xiaoe_credential_unavailable',
|
|
20
|
+
retryable: false,
|
|
21
|
+
stage: 'xiaoe_unified_login',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
12
25
|
if (!session) {
|
|
13
26
|
throw new CliError(E10_AUTH_REQUIRED_MESSAGE, ExitCode.AuthError);
|
|
14
27
|
}
|
|
@@ -201,6 +201,7 @@ export class E10RequestRuntime {
|
|
|
201
201
|
timeoutMs: request.timeoutMs || DEFAULT_TIMEOUT_MS,
|
|
202
202
|
responseType: request.responseType || 'json',
|
|
203
203
|
bigIntStrings: request.bigIntStrings ?? DEFAULT_BIG_INT_STRINGS,
|
|
204
|
+
followRedirects: request.followRedirects === true,
|
|
204
205
|
};
|
|
205
206
|
}
|
|
206
207
|
sessionContext() {
|
|
@@ -270,7 +271,8 @@ export class E10RequestRuntime {
|
|
|
270
271
|
const init = {
|
|
271
272
|
method: request.method,
|
|
272
273
|
headers,
|
|
273
|
-
|
|
274
|
+
// 文件下载允许跟随重定向(302 → 文件服务);其余请求保持 manual 以便识别登录跳转
|
|
275
|
+
redirect: request.followRedirects ? 'follow' : 'manual',
|
|
274
276
|
};
|
|
275
277
|
if (request.streamBody) {
|
|
276
278
|
init.body = request.streamBody;
|
|
@@ -135,6 +135,8 @@ export function createArchiveHost(ctx, dependencies = {}) {
|
|
|
135
135
|
formData: multipart,
|
|
136
136
|
headers: { 'X-Requested-With': 'XMLHttpRequest', ...extraHeaders },
|
|
137
137
|
timeoutMs,
|
|
138
|
+
// 下载接口常 302 重定向到文件服务/CDN,需跟随,避免被误判为登录失效
|
|
139
|
+
followRedirects: true,
|
|
138
140
|
})
|
|
139
141
|
: await rt.requestJson({
|
|
140
142
|
module: 'archive',
|
|
@@ -25,7 +25,7 @@ export const archiveManifest = {
|
|
|
25
25
|
rules: [
|
|
26
26
|
'写操作(*.apply)必须先执行同名的 prepare 拿到 continuation,再带 confirm=true 执行 apply;CLI 用 --yes 表示确认。',
|
|
27
27
|
'借阅单下载为异步任务:apply 会轮询打包进度,完成后把 zip 保存到当前用户的「下载」目录(可用 output 指定路径)。',
|
|
28
|
-
'发起借阅/续借只返回流程创建页 URL,CLI
|
|
28
|
+
'发起借阅/续借只返回流程创建页 URL,CLI 不自动打开浏览器;应以 Markdown 超链接(a 标签)返回,由客户端决定打开方式。',
|
|
29
29
|
'借阅车/借阅单列表优先自定义接口,接口未发布时自动回退 ebuilder 列表链路,回退时行的字段更少(提供 fields/display)。',
|
|
30
30
|
],
|
|
31
31
|
operations: archiveOperations,
|
|
@@ -194,7 +194,19 @@ const borrowListDetail = {
|
|
|
194
194
|
}
|
|
195
195
|
const session = await host.getSession();
|
|
196
196
|
const detail = await fetchBorrowDetail(host, session.userId, String(dataId));
|
|
197
|
-
|
|
197
|
+
// 档案题名补可点击链接:arcDangan.id 形如 {档案ID}_{表单ID},拼成与全文检索一致的 archiveView
|
|
198
|
+
const root = String(session?.baseUrl ?? '').replace(/\/+$/, '');
|
|
199
|
+
const details = detail.details.map((item) => ({
|
|
200
|
+
...item,
|
|
201
|
+
arcDangan: item.arcDangan.map((arc) => {
|
|
202
|
+
const [arcId, arcFormId = ''] = String(arc.id ?? '').split('_');
|
|
203
|
+
if (!arcId || !arcFormId)
|
|
204
|
+
return arc;
|
|
205
|
+
const viewPath = `/sp/custom/archive/archiveView?arcId=${arcId}&arcFormId=${arcFormId}`;
|
|
206
|
+
return { ...arc, viewPath, url: root ? `${root}${viewPath}` : viewPath };
|
|
207
|
+
}),
|
|
208
|
+
}));
|
|
209
|
+
return archiveSuccess('archive.borrow-list.detail', { ...detail, details }, { count: details.length });
|
|
198
210
|
},
|
|
199
211
|
};
|
|
200
212
|
export const borrowListOperations = [borrowListList, borrowListDetail];
|
|
@@ -67,7 +67,7 @@ function flowResult(action, baseUrl, workflowId, params, extra = {}) {
|
|
|
67
67
|
workflowId,
|
|
68
68
|
url: buildFlowUrl(baseUrl, workflowId, params),
|
|
69
69
|
params,
|
|
70
|
-
hint: 'CLI
|
|
70
|
+
hint: 'CLI 不自动打开浏览器,也不要执行 open/start 自动打开;请把 url 以 Markdown 超链接(a 标签)返回,由客户端决定打开方式',
|
|
71
71
|
}, { wrote: true });
|
|
72
72
|
}
|
|
73
73
|
const flowBorrowCarPrepare = {
|