weaver-work-cli 0.1.80 → 0.1.81
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 +3 -1
- package/dist/chunks/{archive-ENBSUMHV.js → archive-KVV4SM7J.js} +3 -3
- package/dist/chunks/{archive-oa-7BFPQ6M5.js → archive-oa-VRSPNLY4.js} +3 -3
- package/dist/chunks/{asset-V5SUD3PW.js → asset-JZ5MN6OL.js} +306 -10
- package/dist/chunks/{asset-idle-3CEL7WFX.js → asset-idle-B4SAL43V.js} +3 -3
- package/dist/chunks/{attachment-content-SHXZUE3N.js → attachment-content-7W4XQTA7.js} +3 -3
- package/dist/chunks/{blog-FLI4SS3P.js → blog-XCBM467O.js} +3 -3
- package/dist/chunks/{caizhilian-7WCTKCCP.js → caizhilian-NZVUKCZD.js} +5 -5
- package/dist/chunks/{calendar-G726HUUH.js → calendar-OVM2SGYJ.js} +3 -3
- package/dist/chunks/{chunk-XNN5PZTI.js → chunk-3WZMDOI3.js} +1 -1
- package/dist/chunks/{chunk-TM2G7DNT.js → chunk-56F2GGE4.js} +5 -5
- package/dist/chunks/{chunk-LCM5SSGJ.js → chunk-5MM2IZ27.js} +423 -36
- package/dist/chunks/{chunk-BWFCTE43.js → chunk-5NQZO3CO.js} +48 -5
- package/dist/chunks/{chunk-KVCDZ2FX.js → chunk-5RIK6OLF.js} +7 -7
- package/dist/chunks/{chunk-5E2FDXBU.js → chunk-64RYQOXA.js} +1 -1
- package/dist/chunks/{chunk-44ZWNC7A.js → chunk-7BP3HU74.js} +2 -2
- package/dist/chunks/{chunk-3Q5F4C5B.js → chunk-AW3HQUOC.js} +5 -5
- package/dist/chunks/{chunk-7M5OYRK2.js → chunk-BD3M2YVN.js} +3 -3
- package/dist/chunks/{chunk-JEQHNNSS.js → chunk-BFVUBCYO.js} +14 -0
- package/dist/chunks/{chunk-PAWXVT6H.js → chunk-CLVEXDEJ.js} +4 -5
- package/dist/chunks/{chunk-TBCKK6LH.js → chunk-DWCMKEMO.js} +2 -2
- package/dist/chunks/{chunk-AVDEZLEB.js → chunk-E3XUYWYA.js} +4 -4
- package/dist/chunks/{chunk-3IX6L74V.js → chunk-FIPTUAOW.js} +2 -2
- package/dist/chunks/{chunk-4MAQALTM.js → chunk-GQEIHXY5.js} +6 -6
- package/dist/chunks/{chunk-TD5IOEGN.js → chunk-JUPKXW4P.js} +1 -1
- package/dist/chunks/{chunk-HYNOKFYJ.js → chunk-KZ3JR3GE.js} +3 -3
- package/dist/chunks/{chunk-4PBN7NJY.js → chunk-L2PKMZIU.js} +1 -1
- package/dist/chunks/{chunk-DACQKJ6O.js → chunk-LXWWOHM6.js} +4 -4
- package/dist/chunks/{chunk-7DE3VMZD.js → chunk-LYFPWZBD.js} +6 -1
- package/dist/chunks/{chunk-2UV4IZIT.js → chunk-MTIV6JEN.js} +2 -2
- package/dist/chunks/{chunk-WXV5FIKA.js → chunk-MWFKLXVU.js} +38 -38
- package/dist/chunks/{chunk-PMRNIGKZ.js → chunk-RVVRTW4P.js} +2 -2
- package/dist/chunks/{chunk-FPWCCRKT.js → chunk-UASZW22U.js} +3 -3
- package/dist/chunks/{chunk-RVEKGVZU.js → chunk-VMUVVTT4.js} +2 -2
- package/dist/chunks/{chunk-JQPKSQAK.js → chunk-W4BGNYKR.js} +1 -1
- package/dist/chunks/{chunk-OVTCWLNQ.js → chunk-W4R3SXJV.js} +15 -7
- package/dist/chunks/{chunk-UDBQJLQF.js → chunk-WF5G5SV3.js} +2 -2
- package/dist/chunks/{chunk-EGHRA2E3.js → chunk-WM5ZE67G.js} +1 -1
- package/dist/chunks/{chunk-QVKRNL7L.js → chunk-WQ4ZHAEZ.js} +10 -2
- package/dist/chunks/{chunk-JFZM3ZRU.js → chunk-X7OZKI6F.js} +12 -12
- package/dist/chunks/{chunk-YKTVK6XM.js → chunk-Y6HRTEDD.js} +1 -1
- package/dist/chunks/{chunk-2KW7AI6P.js → chunk-YFDKTTYX.js} +8 -5
- package/dist/chunks/{chunk-HKW5FYZR.js → chunk-YLPGCOAM.js} +76 -69
- package/dist/chunks/{chunk-LQLIXBJF.js → chunk-YXIPZFMX.js} +1 -1
- package/dist/chunks/{cli-JDTWQDDR.js → cli-VCQIDBDQ.js} +37 -37
- package/dist/chunks/{commands-J52MJ6NF.js → commands-THGXVOEL.js} +9 -5
- package/dist/chunks/{conflict-O4FXUTIX.js → conflict-T7URCNS6.js} +2 -2
- package/dist/chunks/{contract-GW7US3UF.js → contract-ZLGLQ45G.js} +3 -3
- package/dist/chunks/{cowork-GZDODGKF.js → cowork-2MBNOUYS.js} +21 -8
- package/dist/chunks/{create-flow-YIFMKM2C.js → create-flow-OFZC36MV.js} +6 -6
- package/dist/chunks/{data-HTQZRPPI.js → data-6O7ANJVT.js} +3 -3
- package/dist/chunks/{ebuilder-form-GHNIZ7ET.js → ebuilder-form-OJ3KJVQI.js} +4 -4
- package/dist/chunks/{ehr-7TGZTZR3.js → ehr-NWMI5Q7S.js} +4 -4
- package/dist/chunks/{employee-QX57HEWS.js → employee-O2EPUYIH.js} +2 -2
- package/dist/chunks/{entry-mode-X3KKRN36.js → entry-mode-TVACGU7K.js} +3 -3
- package/dist/chunks/{env-MCVDVISU.js → env-EWG4ZAWP.js} +2 -2
- package/dist/chunks/{esb-ATRKVHCD.js → esb-56FV2PIA.js} +5 -5
- package/dist/chunks/{factory-ALB7DMVY.js → factory-GQSEJRDY.js} +1 -1
- package/dist/chunks/{fna-IKYI3SST.js → fna-YLA3RKRW.js} +3 -3
- package/dist/chunks/{group-chat-GGPL2EBF.js → group-chat-5R6L3LCG.js} +3 -3
- package/dist/chunks/{host-UY4LQPN4.js → host-42MLO4KX.js} +4 -4
- package/dist/chunks/{host-XXGDQM7D.js → host-J72VEDW5.js} +4 -4
- package/dist/chunks/{host-EJSJSLVK.js → host-QKCRQS2C.js} +4 -4
- package/dist/chunks/{host-EYNLB6S4.js → host-W3BVEATN.js} +4 -4
- package/dist/chunks/{host-OT4KNR3G.js → host-YJINI5GG.js} +4 -4
- package/dist/chunks/{host-6UOXYOOY.js → host-ZVGBZOHY.js} +4 -4
- package/dist/chunks/{hrm-5JQ7QZ6A.js → hrm-3JFZNB42.js} +66 -26
- package/dist/chunks/{im-2YJW3EI5.js → im-HKIRPCGD.js} +5 -5
- package/dist/chunks/{invoice-36BCXKOX.js → invoice-4PREIOTG.js} +80 -17
- package/dist/chunks/{jiuchuanhui-KBWUZ7WT.js → jiuchuanhui-K3PLNENZ.js} +3 -3
- package/dist/chunks/{lazy-dispatch-ZDKLS5MR.js → lazy-dispatch-MKGEWZNM.js} +8 -8
- package/dist/chunks/{mail-YBKUM6HM.js → mail-6QPVWKXM.js} +3 -3
- package/dist/chunks/{meeting-MU3RHAEX.js → meeting-QPPEPBSN.js} +15 -15
- package/dist/chunks/{minute-doc-NHIEZEHU.js → minute-doc-JMIDZK5D.js} +1 -1
- package/dist/chunks/{okr-HW7IULIR.js → okr-67C5LQYD.js} +3 -3
- package/dist/chunks/{operations-4P2UYVLH.js → operations-YLKRNAPI.js} +5 -5
- package/dist/chunks/{org-MWWIFNAO.js → org-L5XDM2RQ.js} +2 -2
- package/dist/chunks/{performance-PM2G6L3E.js → performance-33QZZR4I.js} +3 -3
- package/dist/chunks/{plan-3YYGZ7ZM.js → plan-W4BPONRL.js} +3 -3
- package/dist/chunks/{project-6PRGBLO2.js → project-OKSEH6AF.js} +3 -3
- package/dist/chunks/{reception-7G3J2MA6.js → reception-H5M7SPHT.js} +3 -3
- package/dist/chunks/{recruit-stage-5KK7R37U.js → recruit-stage-O2JGNVMO.js} +12 -8
- package/dist/chunks/{registry-4S3RXXWS.js → registry-45VEUYTC.js} +4 -4
- package/dist/chunks/{registry-3VTB3KLV.js → registry-BMTQ55G5.js} +5 -5
- package/dist/chunks/{registry-KQ4TNUWO.js → registry-PYONXFUF.js} +3 -3
- package/dist/chunks/{registry-HWUNNXDU.js → registry-SAMJ4VH2.js} +14 -14
- package/dist/chunks/{registry-AC33ZZVH.js → registry-YY62OFKQ.js} +1 -1
- package/dist/chunks/{room-recommend-V4BSHR2M.js → room-recommend-NRLAZJCI.js} +4 -4
- package/dist/chunks/{schedule-T7W357TN.js → schedule-LNBOCBP5.js} +4 -4
- package/dist/chunks/{smart-extract-T5Z4AULN.js → smart-extract-JOTX6UZC.js} +3 -3
- package/dist/chunks/{update-77ZUIYSG.js → update-BERR64TI.js} +3 -3
- package/dist/chunks/{workflow-SYCBS5XD.js → workflow-ZDQY3TI7.js} +5 -5
- package/dist/core/runtime-agent.js +19 -3
- package/dist/index.js +4 -4
- package/dist/internal/e10/auth/agent-host-key.js +10 -1
- package/dist/internal/e10/auth/commands.js +20 -4
- package/dist/internal/e10/auth/xiaoe.js +15 -3
- package/dist/shortcuts/asset/host.js +39 -1
- package/dist/shortcuts/asset/index.js +16 -2
- package/dist/shortcuts/asset/manifest.js +115 -1
- package/dist/shortcuts/asset/operations/audit-report.js +144 -0
- package/dist/shortcuts/asset/operations/registry.js +4 -0
- package/dist/shortcuts/asset/operations/write.js +7 -1
- package/dist/shortcuts/cowork/operations/read.js +13 -6
- package/dist/shortcuts/cowork/operations/shared.js +15 -0
- package/dist/shortcuts/hrm/host.js +51 -4
- package/dist/shortcuts/hrm/index.js +45 -26
- package/dist/shortcuts/hrm/manifest.js +17 -0
- package/dist/shortcuts/hrm/operations/employee.js +3 -7
- package/dist/shortcuts/hrm/operations/org.js +2 -4
- package/dist/shortcuts/hrm/operations/position.js +2 -4
- package/dist/shortcuts/hrm/operations/shared.js +21 -0
- package/dist/shortcuts/hrm/operations.js +34 -0
- package/dist/shortcuts/im/constants.js +163 -0
- package/dist/shortcuts/im/host.js +12 -5
- package/dist/shortcuts/im/operations/at-mention.js +4 -2
- package/dist/shortcuts/im/operations/file-user.js +3 -1
- package/dist/shortcuts/im/operations/msg-sync.js +219 -2
- package/dist/shortcuts/im/operations/msg-write.js +70 -30
- package/dist/shortcuts/invoice/invoice-record.js +4 -0
- package/dist/shortcuts/invoice/manifest.js +1 -1
- package/dist/shortcuts/invoice/operations/reim-auto.js +10 -7
- package/dist/shortcuts/invoice/read-enrichment.js +74 -7
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +1 -1
- package/dist/shortcuts/meeting/operations/rooms.js +7 -0
- package/dist/shortcuts/recruit-stage/operations/list.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/profile.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/search.js +2 -2
- package/dist/shortcuts/recruit-stage/operations/shortlist.js +3 -2
- package/dist/shortcuts/recruit-stage/operations/tag.js +5 -0
- package/dist/shortcuts/workflow/operations/form.js +2 -1
- package/docs/agent-invoice.md +1 -1
- package/docs/e10-auth.md +14 -1
- package/docs/hrm.md +5 -1
- package/docs/invoice.md +1 -1
- package/docs/ziguanjia.md +5 -1
- package/package.json +1 -1
- package/skill-template/business-info.json +6 -1
- package/skill-template/domains/hrm.md +1 -1
- package/skill-template/domains/yepiaotong.md +1 -1
- package/skill-template/domains/ziguanjia.md +7 -2
- package/skills/weaver-e10-cowork/SKILL.md +13 -1
- package/skills/weaver-e10-hrm/SKILL.md +16 -2
- package/skills/weaver-e10-hrm/references/org.md +1 -1
- package/skills/weaver-e10-meeting/SKILL.md +1 -1
- package/skills/weaver-e10-recruit-stage/SKILL.md +24 -15
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +14 -7
- package/skills/weaver-e10-recruit-stage/lib/interview-summary.mjs +12 -1
- package/skills/weaver-e10-recruit-stage/lib/recruit-shortlist.mjs +18 -1
- package/skills/weaver-e10-recruit-stage/lib/resume-import-once.mjs +308 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-report-templates.md +9 -4
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +54 -15
- package/skills/weaver-e10-recruit-stage/templates/candidate-evidence.html +456 -93
- package/skills/weaver-e10-recruit-stage/templates/interview-summary.html +2 -2
- package/skills/weaver-e10-shared/SKILL.md +1 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +1 -1
- package/skills/weaver-e10-shared-report.html +874 -0
- package/skills/weaver-e10-workflow/SKILL.md +4 -4
- package/skills/weaver-e10-workflow/aiDeepRead/config.json +138 -142
- package/skills/weaver-e10-workflow/references/workflow-deep-read.md +7 -7
- package/skills/weaver-e10-yepiaotong/SKILL.md +2 -2
- package/skills/weaver-e10-yepiaotong/references/invoice-detail.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-enterprise-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/invoice-output-view.md +5 -3
- package/skills/weaver-e10-yepiaotong/references/invoice-personal-list.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +1 -1
- package/skills/weaver-e10-yepiaotong/references/source-manifest.json +34 -32
- package/skills/weaver-e10-yepiaotong.zip +0 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +12 -9
- package/skills/weaver-e10-yimiaoban/references/constants.md +291 -0
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/group-read.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/group-write.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +10 -1
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +3 -1
- package/skills/weaver-e10-yimiaoban/references/session-sysmsg.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +175 -36
- package/skills/weaver-e10-ziguanjia/SKILL.md +26 -6
- package/skills/weaver-e10-ziguanjia/references/source-manifest.json +1373 -96
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-audit.md +63 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-disabled-capabilities.md +5 -1
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-idle.md +52 -0
- package/skills/weaver-e10-ziguanjia/references/ziguanjia-report.md +59 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-314.pyc +0 -0
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UASZW22U.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE
|
|
17
17
|
} from "./chunk-IZCQU5D5.js";
|
|
18
18
|
import {
|
|
19
19
|
getActiveProfile
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WQ4ZHAEZ.js";
|
|
21
21
|
|
|
22
22
|
// src/shortcuts/hrm/host.ts
|
|
23
23
|
function inferProfile(ctx) {
|
|
@@ -44,6 +44,17 @@ function businessCode(value) {
|
|
|
44
44
|
if (typeof code === "string" || typeof code === "number") return code;
|
|
45
45
|
return void 0;
|
|
46
46
|
}
|
|
47
|
+
var UNAVAILABLE_MESSAGE = /系统内部错误|接口标识不存在|接口不存在|接口未实现|未装配|尚未启用/;
|
|
48
|
+
var PERMISSION_MESSAGE = /没有权限|无权限|权限不足|未授权/;
|
|
49
|
+
function operationUnavailableMessage(operation, confirmed = false) {
|
|
50
|
+
const scope = operation ? `\uFF08${operation}\uFF09` : "";
|
|
51
|
+
const cause = confirmed ? "E10 \u670D\u52A1\u7AEF\u672A\u88C5\u914D\u6216\u672A\u5F00\u901A\u5BF9\u5E94\u63A5\u53E3" : "E10 \u670D\u52A1\u7AEF\u8FD4\u56DE HTTP 500\uFF08\u53EF\u80FD\u662F\u5BF9\u5E94\u63A5\u53E3\u672A\u88C5\u914D / \u672A\u5F00\u901A\uFF0C\u4E5F\u53EF\u80FD\u662F\u670D\u52A1\u7AEF\u4E34\u65F6\u6545\u969C\uFF09";
|
|
52
|
+
return `\u7EC4\u7EC7\u7BA1\u7406\u67E5\u8BE2\u80FD\u529B${scope}\u5728\u5F53\u524D\u79DF\u6237\u4E0D\u53EF\u7528\uFF1A${cause}\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u786E\u8BA4\u672C\u79DF\u6237\u5DF2\u5F00\u901A\u7EC4\u7EC7\u7BA1\u7406\u6A21\u5757\u3001\u5E76\u88C5\u914D\u5BF9\u5E94\u7684 ebuilder / ESB \u5E94\u7528\u540E\u91CD\u8BD5\u3002\u8FD9\u4E0D\u662F CLI \u53C2\u6570\u6216\u4F1A\u8BDD\u95EE\u9898\uFF1B\u82E5\u4E3A\u4E34\u65F6\u6545\u969C\u53EF\u7A0D\u540E\u91CD\u8BD5\u3002`;
|
|
53
|
+
}
|
|
54
|
+
function permissionDeniedMessage(rawMessage, operation) {
|
|
55
|
+
const scope = operation ? `\uFF08${operation}\uFF09` : "";
|
|
56
|
+
return `\u5F53\u524D\u8D26\u53F7\u7F3A\u5C11\u8BE5\u7EC4\u7EC7\u6570\u636E\u7684\u53EF\u89C1\u8303\u56F4${scope}\uFF1A${rawMessage}\u3002\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u4E3A\u5F53\u524D\u8D26\u53F7\u5F00\u542F\u7EC4\u7EC7\u7BA1\u7406\u8BFB\u63A5\u53E3 / \u5BF9\u5E94\u7EC4\u7EC7\u6570\u636E\u53EF\u89C1\u8303\u56F4\u540E\u91CD\u8BD5\u3002CLI \u53C2\u6570\u4E0E\u4F1A\u8BDD\u5747\u6B63\u5E38\uFF0C\u91CD\u8BD5\u4E0D\u4F1A\u6210\u529F\u3002`;
|
|
57
|
+
}
|
|
47
58
|
function assertPath(requestPath) {
|
|
48
59
|
if (typeof requestPath !== "string" || !requestPath.startsWith("/") || requestPath.startsWith("//")) {
|
|
49
60
|
throw hrmValidationError("path_invalid", "\u8BF7\u6C42\u8DEF\u5F84\u5FC5\u987B\u662F\u76F8\u5BF9\u7EDD\u5BF9\u8DEF\u5F84");
|
|
@@ -121,6 +132,13 @@ function createHrmHost(ctx, dependencies = {}) {
|
|
|
121
132
|
}
|
|
122
133
|
if (response.parseError) {
|
|
123
134
|
if (response.status < 200 || response.status >= 300) {
|
|
135
|
+
if (response.status === 500) {
|
|
136
|
+
throw new HrmCliError("api", "operation_unavailable", operationUnavailableMessage(operation), {
|
|
137
|
+
code: response.status,
|
|
138
|
+
details: { status: response.status },
|
|
139
|
+
exitCode: 1
|
|
140
|
+
});
|
|
141
|
+
}
|
|
124
142
|
throw new HrmCliError("api", "http_error", `\u6CDB\u5FAE\u63A5\u53E3 HTTP ${response.status}`, {
|
|
125
143
|
code: response.status,
|
|
126
144
|
details: { status: response.status },
|
|
@@ -130,17 +148,42 @@ function createHrmHost(ctx, dependencies = {}) {
|
|
|
130
148
|
throw hrmNetworkError("protocol", `\u63A5\u53E3\u8FD4\u56DE\u4E0D\u662F\u5408\u6CD5 JSON\uFF08HTTP ${response.status}\uFF09`, { retryable: false });
|
|
131
149
|
}
|
|
132
150
|
if (response.status < 200 || response.status >= 300) {
|
|
151
|
+
const rawMessage = businessMessage(response.value);
|
|
152
|
+
const confirmedUnavailable = UNAVAILABLE_MESSAGE.test(rawMessage);
|
|
153
|
+
if (response.status === 500 || confirmedUnavailable) {
|
|
154
|
+
throw new HrmCliError(
|
|
155
|
+
"api",
|
|
156
|
+
"operation_unavailable",
|
|
157
|
+
operationUnavailableMessage(operation, confirmedUnavailable),
|
|
158
|
+
{ code: response.status, details: { status: response.status, message: rawMessage }, exitCode: 1 }
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
if (response.status === 403 || PERMISSION_MESSAGE.test(rawMessage)) {
|
|
162
|
+
throw new HrmCliError("api", "permission_denied", permissionDeniedMessage(rawMessage, operation), {
|
|
163
|
+
code: response.status,
|
|
164
|
+
details: { status: response.status, message: rawMessage },
|
|
165
|
+
exitCode: 1
|
|
166
|
+
});
|
|
167
|
+
}
|
|
133
168
|
throw new HrmCliError("api", "http_error", `\u6CDB\u5FAE\u63A5\u53E3 HTTP ${response.status}`, {
|
|
134
169
|
code: response.status,
|
|
135
|
-
details: { status: response.status, message:
|
|
170
|
+
details: { status: response.status, message: rawMessage },
|
|
136
171
|
exitCode: 1
|
|
137
172
|
});
|
|
138
173
|
}
|
|
139
174
|
if (!isBusinessSuccess(response.value)) {
|
|
140
175
|
const code = businessCode(response.value);
|
|
141
176
|
const message = businessMessage(response.value);
|
|
142
|
-
if (code === 403) {
|
|
143
|
-
throw new HrmCliError(
|
|
177
|
+
if (code === 403 || PERMISSION_MESSAGE.test(message)) {
|
|
178
|
+
throw new HrmCliError(
|
|
179
|
+
"api",
|
|
180
|
+
"permission_denied",
|
|
181
|
+
permissionDeniedMessage(message || "\u5F53\u524D\u8D26\u53F7\u65E0\u8BE5\u7EC4\u7EC7\u6570\u636E\u7684\u8BBF\u95EE\u6743\u9650", operation),
|
|
182
|
+
{ code, details: { code, message }, exitCode: 1 }
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
if (UNAVAILABLE_MESSAGE.test(message)) {
|
|
186
|
+
throw new HrmCliError("api", "operation_unavailable", operationUnavailableMessage(operation, true), {
|
|
144
187
|
code,
|
|
145
188
|
details: { code, message },
|
|
146
189
|
exitCode: 1
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
meetingValidationError,
|
|
13
13
|
queryBody,
|
|
14
14
|
toIdCsv
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KZ3JR3GE.js";
|
|
16
16
|
|
|
17
17
|
// src/shortcuts/meeting/operations/eb/conflict.ts
|
|
18
18
|
var ACTIVE_MT_STATUS = "1,2,8,9";
|
|
@@ -146,7 +146,7 @@ async function collectMemberConflicts(members, begin, end, excludeMtId, env, ope
|
|
|
146
146
|
let candidates = allCandidates;
|
|
147
147
|
let prefilterSkipped = 0;
|
|
148
148
|
try {
|
|
149
|
-
const { resolveEmployeeNames } = await import("./create-flow-
|
|
149
|
+
const { resolveEmployeeNames } = await import("./create-flow-OFZC36MV.js");
|
|
150
150
|
const names = await resolveEmployeeNames(env, members);
|
|
151
151
|
const tokens = [...members, ...names.values()].map((token) => String(token ?? "").trim()).filter((token) => token !== "");
|
|
152
152
|
if (tokens.length > 0) {
|
|
@@ -315,7 +315,7 @@ var ebMeetingWritePreflight = async ({ endpoint, payload, args, env, extras }) =
|
|
|
315
315
|
const items = rawMembers.split(/[,;,;]+/u).map((item) => item.trim()).filter((item) => item !== "");
|
|
316
316
|
const nameLike = items.filter((item) => !/^\d+$/u.test(item));
|
|
317
317
|
if (nameLike.length > 0) {
|
|
318
|
-
const { resolveMemberIdsByName } = await import("./schedule-
|
|
318
|
+
const { resolveMemberIdsByName } = await import("./schedule-LNBOCBP5.js");
|
|
319
319
|
const idsByName = await resolveMemberIdsByName(env, nameLike);
|
|
320
320
|
const resolved = items.map((item) => idsByName.get(item) ?? item);
|
|
321
321
|
payload.mainTable.hrm_members = [...new Set(resolved)].join(",");
|
|
@@ -448,7 +448,7 @@ var ebConflictRoom = {
|
|
|
448
448
|
let addressId = String(args.address ?? "").trim();
|
|
449
449
|
let resolvedRoom = null;
|
|
450
450
|
if (!addressId && String(args.room_name ?? "").trim()) {
|
|
451
|
-
const { resolveAddressRoom } = await import("./create-flow-
|
|
451
|
+
const { resolveAddressRoom } = await import("./create-flow-OFZC36MV.js");
|
|
452
452
|
const resolved = await resolveAddressRoom(env, String(args.room_name));
|
|
453
453
|
if (!resolved?.id) {
|
|
454
454
|
throw meetingValidationError(
|
|
@@ -585,7 +585,7 @@ async function resolveMemberNames(env, ids) {
|
|
|
585
585
|
const unique = [...new Set(ids.filter((id) => id !== ""))];
|
|
586
586
|
if (unique.length === 0) return map;
|
|
587
587
|
try {
|
|
588
|
-
const { hrmEmployeeOperations } = await import("./employee-
|
|
588
|
+
const { hrmEmployeeOperations } = await import("./employee-O2EPUYIH.js");
|
|
589
589
|
const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
|
|
590
590
|
if (!batch) return map;
|
|
591
591
|
const result = await batch.handler({ ids: unique }, env);
|
|
@@ -638,7 +638,7 @@ async function findCommonFreeSlots(env, input) {
|
|
|
638
638
|
let meetings = allMeetings;
|
|
639
639
|
let prefilterSkipped = 0;
|
|
640
640
|
try {
|
|
641
|
-
const { resolveEmployeeNames } = await import("./create-flow-
|
|
641
|
+
const { resolveEmployeeNames } = await import("./create-flow-OFZC36MV.js");
|
|
642
642
|
const names2 = await resolveEmployeeNames(env, members);
|
|
643
643
|
const tokens = [...members, ...names2.values()].map((token) => String(token ?? "").trim()).filter((token) => token !== "");
|
|
644
644
|
if (tokens.length > 0 && process.env.WEAVER_MEETING_NO_PREFILTER !== "1") {
|
|
@@ -676,7 +676,7 @@ async function findCommonFreeSlots(env, input) {
|
|
|
676
676
|
const scheduleItems = [];
|
|
677
677
|
if (includeSchedule) {
|
|
678
678
|
try {
|
|
679
|
-
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-
|
|
679
|
+
const { runScheduleConflictFlow, parseScheduleConflictMessage, resolveMemberIdsByName } = await import("./schedule-LNBOCBP5.js");
|
|
680
680
|
const dayBegin = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 0, 0, 0, 0);
|
|
681
681
|
const dayEnd = new Date(rangeStart.getFullYear(), rangeStart.getMonth(), rangeStart.getDate(), 23, 59, 0, 0);
|
|
682
682
|
const flow = await runScheduleConflictFlow(env, {
|
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
isEsbFlowUnavailable
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VMUVVTT4.js";
|
|
6
6
|
import {
|
|
7
7
|
esbValidationError
|
|
8
8
|
} from "./chunk-TXUG266F.js";
|
|
@@ -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-
|
|
5
|
+
} from "./chunk-W4BGNYKR.js";
|
|
6
6
|
import {
|
|
7
7
|
meetingSuccess,
|
|
8
8
|
meetingValidationError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KZ3JR3GE.js";
|
|
10
10
|
|
|
11
11
|
// src/shortcuts/meeting/operations/eb/entry-mode.ts
|
|
12
12
|
import { join, dirname } from "node:path";
|
|
@@ -2,10 +2,10 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
hrmEmployeeOperations
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CLVEXDEJ.js";
|
|
6
6
|
import {
|
|
7
7
|
hrmOrgOperations
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BD3M2YVN.js";
|
|
9
9
|
import {
|
|
10
10
|
READ,
|
|
11
11
|
SCHEMA_ID,
|
|
@@ -14,10 +14,11 @@ import {
|
|
|
14
14
|
orgLink,
|
|
15
15
|
pickDefined,
|
|
16
16
|
positionLink,
|
|
17
|
+
requireId,
|
|
17
18
|
schemaOf,
|
|
18
19
|
toNumber,
|
|
19
20
|
toStringIdList
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BFVUBCYO.js";
|
|
21
22
|
import {
|
|
22
23
|
hrmValidationError
|
|
23
24
|
} from "./chunk-56EZERK4.js";
|
|
@@ -112,8 +113,7 @@ var positionDetail = {
|
|
|
112
113
|
{ required: ["id"] }
|
|
113
114
|
),
|
|
114
115
|
handler: async (args, { host }) => {
|
|
115
|
-
const id =
|
|
116
|
-
if (!id) throw hrmValidationError("id_required", "id \u5FC5\u586B");
|
|
116
|
+
const id = requireId(args.id);
|
|
117
117
|
const session = await host.getSession();
|
|
118
118
|
const baseUrl = session.baseUrl.replace(/\/+$/, "");
|
|
119
119
|
const resp = await host.request({
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
hrmSuccess,
|
|
9
9
|
orgLink,
|
|
10
10
|
pickDefined,
|
|
11
|
+
requireId,
|
|
11
12
|
schemaOf,
|
|
12
13
|
toNumber,
|
|
13
14
|
toPositiveInt,
|
|
14
15
|
toStringIdList
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BFVUBCYO.js";
|
|
16
17
|
import {
|
|
17
18
|
hrmValidationError
|
|
18
19
|
} from "./chunk-56EZERK4.js";
|
|
@@ -106,8 +107,7 @@ var orgDetail = {
|
|
|
106
107
|
{ required: ["id"] }
|
|
107
108
|
),
|
|
108
109
|
handler: async (args, { host }) => {
|
|
109
|
-
const id =
|
|
110
|
-
if (!id) throw hrmValidationError("id_required", "id \u5FC5\u586B");
|
|
110
|
+
const id = requireId(args.id);
|
|
111
111
|
const session = await host.getSession();
|
|
112
112
|
const baseUrl = session.baseUrl.replace(/\/+$/, "");
|
|
113
113
|
const resp = await host.request({
|
|
@@ -62,6 +62,19 @@ function toPositiveInt(value, field) {
|
|
|
62
62
|
}
|
|
63
63
|
return truncated;
|
|
64
64
|
}
|
|
65
|
+
function requireId(value, field = "id") {
|
|
66
|
+
if (value === void 0 || value === null) {
|
|
67
|
+
throw hrmValidationError(`${field}_required`, `${field} \u5FC5\u586B\uFF08E10 \u957F\u6574\u578B id\uFF0C\u6309\u5B57\u7B26\u4E32\u4F20\u9012\uFF09`);
|
|
68
|
+
}
|
|
69
|
+
const text = typeof value === "string" ? value.trim() : String(value).trim();
|
|
70
|
+
if (text === "") {
|
|
71
|
+
throw hrmValidationError(`${field}_required`, `${field} \u5FC5\u586B\uFF08E10 \u957F\u6574\u578B id\uFF0C\u6309\u5B57\u7B26\u4E32\u4F20\u9012\uFF09`);
|
|
72
|
+
}
|
|
73
|
+
if (!/^\d+$/.test(text)) {
|
|
74
|
+
throw hrmValidationError(`${field}_invalid`, `${field} \u5FC5\u987B\u662F\u6570\u5B57 id\uFF0C\u6536\u5230 ${JSON.stringify(text)}`);
|
|
75
|
+
}
|
|
76
|
+
return text;
|
|
77
|
+
}
|
|
65
78
|
function toStringIdList(value, field) {
|
|
66
79
|
if (value === void 0 || value === null) return void 0;
|
|
67
80
|
const list = Array.isArray(value) ? value : [value];
|
|
@@ -147,6 +160,7 @@ export {
|
|
|
147
160
|
assertNoForbiddenKeys,
|
|
148
161
|
toNumber,
|
|
149
162
|
toPositiveInt,
|
|
163
|
+
requireId,
|
|
150
164
|
toStringIdList,
|
|
151
165
|
pickDefined,
|
|
152
166
|
browserBaseBody,
|
|
@@ -10,12 +10,13 @@ import {
|
|
|
10
10
|
inferEmployeeField,
|
|
11
11
|
orgLink,
|
|
12
12
|
personLink,
|
|
13
|
+
requireId,
|
|
13
14
|
resolveDepartmentIdByName,
|
|
14
15
|
schemaOf,
|
|
15
16
|
toNumber,
|
|
16
17
|
toPositiveInt,
|
|
17
18
|
toStringIdList
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BFVUBCYO.js";
|
|
19
20
|
import {
|
|
20
21
|
HrmCliError,
|
|
21
22
|
hrmValidationError
|
|
@@ -355,8 +356,7 @@ var employeeDetail = {
|
|
|
355
356
|
{ required: ["id"] }
|
|
356
357
|
),
|
|
357
358
|
handler: async (args, { host }) => {
|
|
358
|
-
const id =
|
|
359
|
-
if (!id) throw hrmValidationError("id_required", "id \u5FC5\u586B");
|
|
359
|
+
const id = requireId(args.id);
|
|
360
360
|
const session = await host.getSession();
|
|
361
361
|
const baseUrl = session.baseUrl.replace(/\/+$/, "");
|
|
362
362
|
const resp = await host.request({
|
|
@@ -427,8 +427,7 @@ var subordinateById = {
|
|
|
427
427
|
{ required: ["id"] }
|
|
428
428
|
),
|
|
429
429
|
handler: async (args, { host }) => {
|
|
430
|
-
const id =
|
|
431
|
-
if (!id) throw hrmValidationError("id_required", "id \u5FC5\u586B");
|
|
430
|
+
const id = requireId(args.id);
|
|
432
431
|
const scope = args.scope === void 0 ? "direct" : String(args.scope);
|
|
433
432
|
const path = scope === "indirect" ? `/api/bs/hrm/user/myIndirectSubordinates/${id}` : `/api/bs/hrm/user/myDirectSubordinates/${id}`;
|
|
434
433
|
const pageNo = toPositiveInt(args.pageNo, "pageNo") ?? 1;
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
createE10RequestRuntime,
|
|
10
10
|
isE10AuthenticationRequired,
|
|
11
11
|
requireE10Session
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UASZW22U.js";
|
|
13
13
|
import {
|
|
14
14
|
E10_SESSION_EXPIRED_MESSAGE
|
|
15
15
|
} from "./chunk-IZCQU5D5.js";
|
|
16
16
|
import {
|
|
17
17
|
getActiveProfile
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WQ4ZHAEZ.js";
|
|
19
19
|
|
|
20
20
|
// src/shortcuts/workflow/host.ts
|
|
21
21
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
cacheScopeSuffix,
|
|
5
5
|
readCache,
|
|
6
6
|
writeCache
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WM5ZE67G.js";
|
|
8
8
|
import {
|
|
9
9
|
EB_BASE,
|
|
10
10
|
SCHEMA_DATETIME_MINUTE,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
meetingSuccess,
|
|
14
14
|
queryBody,
|
|
15
15
|
schemaOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KZ3JR3GE.js";
|
|
17
17
|
|
|
18
18
|
// src/shortcuts/meeting/operations/eb/usage-cache.ts
|
|
19
19
|
var USAGE_TTL_MS = 5 * 60 * 1e3;
|
|
@@ -88,7 +88,7 @@ async function clearCache(env, key) {
|
|
|
88
88
|
try {
|
|
89
89
|
const { rm } = await import("node:fs/promises");
|
|
90
90
|
const { join } = await import("node:path");
|
|
91
|
-
const { meetingStateDir } = await import("./env-
|
|
91
|
+
const { meetingStateDir } = await import("./env-EWG4ZAWP.js");
|
|
92
92
|
await rm(join(meetingStateDir(env.ctx), "cache", `${key}.json`), { force: true });
|
|
93
93
|
} catch {
|
|
94
94
|
}
|
|
@@ -221,7 +221,7 @@ async function loadFrequentRooms(env, options = {}) {
|
|
|
221
221
|
const counts = /* @__PURE__ */ new Map();
|
|
222
222
|
let requests = 0;
|
|
223
223
|
try {
|
|
224
|
-
const { getMeetingOperation } = await import("./registry-
|
|
224
|
+
const { getMeetingOperation } = await import("./registry-SAMJ4VH2.js");
|
|
225
225
|
const listOp = getMeetingOperation("meeting.eb.meeting.list");
|
|
226
226
|
let seen = 0;
|
|
227
227
|
let total = 0;
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-WMRNO6IU.js";
|
|
6
6
|
import {
|
|
7
7
|
meetingStateDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-W4BGNYKR.js";
|
|
9
9
|
import {
|
|
10
10
|
SCHEMA_ID,
|
|
11
11
|
meetingSuccess,
|
|
12
12
|
meetingValidationError,
|
|
13
13
|
schemaOf
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KZ3JR3GE.js";
|
|
15
15
|
|
|
16
16
|
// src/shortcuts/meeting/operations/attachment-content.ts
|
|
17
17
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -114,9 +114,9 @@ async function generateMinuteDocViaEsb(env, input) {
|
|
|
114
114
|
const employeeId = String(session?.userId ?? "").trim();
|
|
115
115
|
if (!employeeId) return { docId: "", error: "no_employee_id" };
|
|
116
116
|
const flowId = String(input.flowId ?? "").trim() || FLOW_GENERATE_DOCUMENT;
|
|
117
|
-
const { createEsbHost } = await import("./host-
|
|
117
|
+
const { createEsbHost } = await import("./host-QKCRQS2C.js");
|
|
118
118
|
const { createEsbContinuationSigner } = await import("./continuation-KI7DRRZN.js");
|
|
119
|
-
const { getEsbOperation } = await import("./registry-
|
|
119
|
+
const { getEsbOperation } = await import("./registry-BMTQ55G5.js");
|
|
120
120
|
const esbEnv = {
|
|
121
121
|
ctx: env.ctx,
|
|
122
122
|
host: createEsbHost(env.ctx),
|
|
@@ -144,8 +144,8 @@ async function ensureMinuteDoc(env, input) {
|
|
|
144
144
|
const id = String(input.id ?? "").trim();
|
|
145
145
|
const mtId = String(input.mtId ?? "").trim();
|
|
146
146
|
if (!id || !mtId) return null;
|
|
147
|
-
const { getMeetingOperation } = await import("./registry-
|
|
148
|
-
const { meetingStateDir } = await import("./env-
|
|
147
|
+
const { getMeetingOperation } = await import("./registry-SAMJ4VH2.js");
|
|
148
|
+
const { meetingStateDir } = await import("./env-EWG4ZAWP.js");
|
|
149
149
|
const { mkdir, writeFile } = await import("node:fs/promises");
|
|
150
150
|
const { join } = await import("node:path");
|
|
151
151
|
const subject = String(input.subject ?? "").trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
|
|
@@ -168,8 +168,8 @@ async function ensureMinuteDoc(env, input) {
|
|
|
168
168
|
let docId = "";
|
|
169
169
|
let docError = "";
|
|
170
170
|
try {
|
|
171
|
-
const { executeCaizhilianOperation } = await import("./operations-
|
|
172
|
-
const { createCaizhilianHost } = await import("./host-
|
|
171
|
+
const { executeCaizhilianOperation } = await import("./operations-YLKRNAPI.js");
|
|
172
|
+
const { createCaizhilianHost } = await import("./host-YJINI5GG.js");
|
|
173
173
|
const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
|
|
174
174
|
const caizhilianEnv = {
|
|
175
175
|
ctx: env.ctx,
|
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
UpdateService
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YXIPZFMX.js";
|
|
6
6
|
import {
|
|
7
7
|
packageRootDir
|
|
8
8
|
} from "./chunk-2BZ7TY4M.js";
|
|
@@ -1570,7 +1570,7 @@ async function buildPersonnelText(env, data) {
|
|
|
1570
1570
|
if (ids.length === 0) return {};
|
|
1571
1571
|
const names = /* @__PURE__ */ new Map();
|
|
1572
1572
|
try {
|
|
1573
|
-
const { hrmEmployeeOperations } = await import("./employee-
|
|
1573
|
+
const { hrmEmployeeOperations } = await import("./employee-O2EPUYIH.js");
|
|
1574
1574
|
const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
|
|
1575
1575
|
if (batch) {
|
|
1576
1576
|
const result = await batch.handler({ ids: [...new Set(ids)] }, env);
|
|
@@ -2228,7 +2228,7 @@ function buildWriteInputSchema(endpoint, includeConfirm) {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
async function lookupEmployeeDepartmentId(env, userId) {
|
|
2230
2230
|
try {
|
|
2231
|
-
const { hrmEmployeeOperations } = await import("./employee-
|
|
2231
|
+
const { hrmEmployeeOperations } = await import("./employee-O2EPUYIH.js");
|
|
2232
2232
|
const batch = hrmEmployeeOperations.find((operation) => operation.name === "hrm.employee.batch");
|
|
2233
2233
|
if (!batch) return null;
|
|
2234
2234
|
const result = await batch.handler({ ids: [userId] }, env);
|
|
@@ -2339,7 +2339,7 @@ function buildWriteOperations(endpoint, preflight, afterWrite) {
|
|
|
2339
2339
|
);
|
|
2340
2340
|
}
|
|
2341
2341
|
if (endpoint.interfacePk === "create_meeting") {
|
|
2342
|
-
const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-
|
|
2342
|
+
const { fetchEbAppSettings, assertEbCreatePathAllowed } = await import("./conflict-T7URCNS6.js");
|
|
2343
2343
|
assertEbCreatePathAllowed(await fetchEbAppSettings(env, applyName));
|
|
2344
2344
|
}
|
|
2345
2345
|
const pkQuery = writePkQuery(endpoint, payload);
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
} from "./chunk-AJ62BGAW.js";
|
|
19
19
|
import {
|
|
20
20
|
updateCommand
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JUPKXW4P.js";
|
|
22
22
|
import {
|
|
23
23
|
registerE10AuthCommands
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-W4R3SXJV.js";
|
|
25
25
|
import {
|
|
26
26
|
requireE10Session
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UASZW22U.js";
|
|
28
28
|
import {
|
|
29
29
|
E10AuthSession,
|
|
30
30
|
findAuthFile,
|
|
31
31
|
resolveActiveProfileForHost
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WQ4ZHAEZ.js";
|
|
33
33
|
import {
|
|
34
34
|
packageFileUrl,
|
|
35
35
|
packagePath
|
|
@@ -20,9 +20,13 @@ function isXiaoERuntimeAgent(value) {
|
|
|
20
20
|
function isXiaoERuntime(options) {
|
|
21
21
|
return isXiaoERuntimeAgent(options?.runtimeAgent);
|
|
22
22
|
}
|
|
23
|
+
var XIAOE_ENV_PREFIX = "XIAOE_";
|
|
24
|
+
function hasXiaoEEnvMarker(env = process.env) {
|
|
25
|
+
return Object.keys(env).some((key) => key.startsWith(XIAOE_ENV_PREFIX));
|
|
26
|
+
}
|
|
23
27
|
function isXiaoEHostEnvironment(env, options = {}) {
|
|
28
|
+
if (hasXiaoEEnvMarker(env)) return true;
|
|
24
29
|
if (isXiaoERuntime(options)) return true;
|
|
25
|
-
if (Object.keys(env).some((key) => key.startsWith("XIAOE_"))) return true;
|
|
26
30
|
const explicitHost = env.WORKBUDDY_AGENT_TYPE?.trim() || env.CODEX_AGENT_TYPE?.trim();
|
|
27
31
|
if (explicitHost) return isXiaoERuntimeAgent(explicitHost);
|
|
28
32
|
if (Object.keys(env).some((key) => key.startsWith("WORKBUDDY_") || key.startsWith("CODEX_"))) return false;
|
|
@@ -31,5 +35,6 @@ function isXiaoEHostEnvironment(env, options = {}) {
|
|
|
31
35
|
|
|
32
36
|
export {
|
|
33
37
|
isXiaoERuntimeAgent,
|
|
38
|
+
hasXiaoEEnvMarker,
|
|
34
39
|
isXiaoEHostEnvironment
|
|
35
40
|
};
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
createE10RequestRuntime,
|
|
5
5
|
isE10SessionExpiredResponse,
|
|
6
6
|
requireE10Session
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UASZW22U.js";
|
|
8
8
|
import {
|
|
9
9
|
E10_REAUTH_GUIDANCE,
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE
|
|
11
11
|
} from "./chunk-IZCQU5D5.js";
|
|
12
12
|
import {
|
|
13
13
|
getActiveProfile
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WQ4ZHAEZ.js";
|
|
15
15
|
import {
|
|
16
16
|
CliError
|
|
17
17
|
} from "./chunk-UG5G54VL.js";
|