weaver-work-cli 0.1.39 → 0.1.42
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-ENZYBBME.js → archive-J4I6MCKF.js} +2 -2
- package/dist/chunks/{archive-oa-YWLEC5V4.js → archive-oa-BRZKKTO4.js} +2 -2
- package/dist/chunks/{asset-OOV6DWPA.js → asset-L7D4FAOZ.js} +2 -2
- package/dist/chunks/{asset-idle-RE632MY5.js → asset-idle-DADLLV75.js} +2 -2
- package/dist/chunks/{attachment-content-RWN2FCLL.js → attachment-content-K4C7VLWQ.js} +3 -3
- package/dist/chunks/{blog-PEPOJAL7.js → blog-BVGQ7NZL.js} +2 -2
- package/dist/chunks/{caizhilian-WYIQDVPJ.js → caizhilian-SAADNFD6.js} +2 -2
- package/dist/chunks/{calendar-CIARBAOX.js → calendar-Q7NQY5Z2.js} +61 -23
- package/dist/chunks/{chunk-F2EQXUEE.js → chunk-3KTFS4IA.js} +397 -159
- package/dist/chunks/{chunk-G2JSIUWF.js → chunk-4PD5NWAX.js} +89 -0
- package/dist/chunks/{chunk-HJYVHXUQ.js → chunk-4RAE6JXP.js} +1 -1
- package/dist/chunks/{chunk-CQHGNCK2.js → chunk-72CKAUAG.js} +41 -8
- package/dist/chunks/{chunk-K3RUEEOL.js → chunk-APVFJUQH.js} +2 -2
- package/dist/chunks/{chunk-BJGXMFGD.js → chunk-BBKDXQEC.js} +2 -2
- package/dist/chunks/chunk-BIPYLLVS.js +501 -0
- package/dist/chunks/{chunk-GVPJZXJ2.js → chunk-EKWAQSLU.js} +92 -50
- package/dist/chunks/{chunk-XXJOSZTQ.js → chunk-FOAA27U5.js} +381 -57
- package/dist/chunks/{chunk-I2HB737U.js → chunk-G4UR6NXN.js} +2 -2
- package/dist/chunks/{chunk-YS5DPN4T.js → chunk-GEWYMQME.js} +1 -1
- package/dist/chunks/{chunk-P2DAISYW.js → chunk-GHXCDPTM.js} +1 -1
- package/dist/chunks/{chunk-L4N7B7ZD.js → chunk-IZ7S7QUS.js} +4 -4
- package/dist/chunks/{chunk-NLK2RZKG.js → chunk-JPRO6ER2.js} +122 -2214
- package/dist/chunks/{chunk-36DIFZAH.js → chunk-LADPYOWC.js} +2 -2
- package/dist/chunks/chunk-LDZQPUIA.js +1238 -0
- package/dist/chunks/chunk-NKZRQXST.js +2546 -0
- package/dist/chunks/{chunk-EINRJHQ3.js → chunk-QKNKR4RH.js} +3 -3
- package/dist/chunks/{chunk-T7JDJJ7H.js → chunk-R4CHUSKC.js} +126 -19
- package/dist/chunks/{chunk-EZGFHJFW.js → chunk-SA6VBIHY.js} +88 -15
- package/dist/chunks/{chunk-ZXRNHZTE.js → chunk-TTPJJJC4.js} +2 -2
- package/dist/chunks/{chunk-KTCB5R5H.js → chunk-W7BEHOSR.js} +2 -2
- package/dist/chunks/{chunk-MUQUHKPG.js → chunk-YRSZQUD2.js} +2 -2
- package/dist/chunks/{conflict-DRMDOL56.js → conflict-F2OMZRTO.js} +2 -2
- package/dist/chunks/{contract-73MERZWN.js → contract-5BETHRSG.js} +2 -2
- package/dist/chunks/{cowork-HNGBPD7A.js → cowork-3MN6EQQO.js} +27 -10
- package/dist/chunks/create-flow-5FQNNMVO.js +55 -0
- package/dist/chunks/{ebuilder-form-OY6DVNRK.js → ebuilder-form-SBHOYBUD.js} +3 -3
- package/dist/chunks/{ehr-RAQNEQO7.js → ehr-KMOJULKG.js} +432 -1234
- package/dist/chunks/env-LB7NBL2O.js +19 -0
- package/dist/chunks/{esb-6XV7C7YV.js → esb-W2PJCFCX.js} +4 -4
- package/dist/chunks/factory-6ZFQXQ46.js +30 -0
- package/dist/chunks/{fna-XTSRB7G7.js → fna-ZQPCUV4R.js} +2 -2
- package/dist/chunks/group-chat-2HHAJN46.js +20 -0
- package/dist/chunks/{host-YMBXWFWX.js → host-4CBHGOHT.js} +3 -3
- package/dist/chunks/{host-A7J6GDUP.js → host-ATKVNZAT.js} +3 -3
- package/dist/chunks/{host-3F5UM5GN.js → host-BQH22NTQ.js} +3 -3
- package/dist/chunks/{host-YAQAPYNP.js → host-X2CSLFM6.js} +3 -3
- package/dist/chunks/{host-VGPVP7YF.js → host-YTODKMSL.js} +3 -3
- package/dist/chunks/{hrm-TLHKC545.js → hrm-FFM4UJFS.js} +4 -4
- package/dist/chunks/{im-YOUCFMUK.js → im-VEHKDQPB.js} +8 -8
- package/dist/chunks/{invoice-WNBS2B4C.js → invoice-LVIKSIIF.js} +3 -3
- package/dist/chunks/{jiuchuanhui-XABWS5RN.js → jiuchuanhui-X6DINO5P.js} +2 -2
- package/dist/chunks/{lazy-dispatch-NLZ5UQQI.js → lazy-dispatch-KSWTN5L6.js} +4 -4
- package/dist/chunks/{mail-LRYMBFNL.js → mail-VDKRGUD3.js} +9 -4
- package/dist/chunks/{meeting-ESXL6MFI.js → meeting-CLC6HP3Z.js} +12 -10
- package/dist/chunks/{okr-EOV65SSF.js → okr-CHG4OO3U.js} +2 -2
- package/dist/chunks/{plan-YFPVKW6Y.js → plan-XWR75667.js} +2 -2
- package/dist/chunks/{project-MDVZUYQW.js → project-5BXOOKMG.js} +40 -23
- package/dist/chunks/recruit-stage-DGMFNNDE.js +4507 -0
- package/dist/chunks/{registry-VT5Y2HLA.js → registry-7FFOXIAW.js} +4 -4
- package/dist/chunks/{registry-QCLZEDAP.js → registry-BKBZPBAJ.js} +10 -8
- package/dist/chunks/{registry-YX4CSEMD.js → registry-RHMW6ANW.js} +2 -2
- package/dist/chunks/{registry-NYPYMZXG.js → registry-Z43434VG.js} +1 -1
- package/dist/chunks/{room-recommend-L3MWH4JW.js → room-recommend-62H7ZQQ6.js} +4 -4
- package/dist/chunks/{schedule-UASAVDVD.js → schedule-FNXKH3DQ.js} +4 -4
- package/dist/chunks/{workflow-KDGIUCNW.js → workflow-ADHKCAJK.js} +4 -4
- package/dist/index.js +33 -28
- package/dist/internal/e10/auth/commands.js +110 -56
- package/dist/internal/e10/auth/messages.js +6 -0
- package/dist/internal/e10/auth/session.js +28 -1
- package/dist/internal/e10/auth/xiaoe.js +315 -48
- package/dist/internal/e10/auth-recovery.js +36 -5
- package/dist/internal/e10/client.js +13 -0
- package/dist/internal/e10/context.js +61 -9
- package/dist/internal/e10/index.js +1 -1
- package/dist/internal/e10/network-error.js +93 -0
- package/dist/internal/e10/request-runtime.js +15 -0
- package/dist/shortcuts/calendar/operations/read.js +31 -22
- package/dist/shortcuts/calendar/operations/write.js +45 -1
- package/dist/shortcuts/cowork/operations/discuss-write.js +5 -1
- package/dist/shortcuts/cowork/operations/item-write.js +5 -3
- package/dist/shortcuts/cowork/operations/member-write.js +3 -1
- package/dist/shortcuts/cowork/operations/permission-write.js +5 -1
- package/dist/shortcuts/cowork/operations/shared.js +7 -0
- package/dist/shortcuts/ehr/operations/attend-write.js +43 -1
- package/dist/shortcuts/ehr/operations/hr-contact.js +7 -4
- package/dist/shortcuts/ehr/operations/hr-report.js +13 -7
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +134 -59
- package/dist/shortcuts/ehr/operations/recruit-write.js +262 -17
- package/dist/shortcuts/ehr/operations/recruit.js +10 -4
- package/dist/shortcuts/ehr/operations/shared.js +47 -0
- package/dist/shortcuts/hrm/operations/org.js +118 -0
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/mail/operations/mail-send.js +8 -2
- package/dist/shortcuts/meeting/operations/eb/catalog.js +9 -2
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +461 -127
- package/dist/shortcuts/meeting/operations/eb/crm-search.js +87 -5
- package/dist/shortcuts/meeting/operations/eb/factory.js +33 -0
- package/dist/shortcuts/meeting/operations/eb/flow-memory.js +49 -0
- package/dist/shortcuts/meeting/operations/eb/group-chat.js +605 -0
- package/dist/shortcuts/meeting/operations/eb/index.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/person-cache.js +96 -0
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +44 -6
- package/dist/shortcuts/meeting/operations/eb/room-summary.js +2 -0
- package/dist/shortcuts/meeting/operations/eb/usage-cache.js +99 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +35 -12
- package/dist/shortcuts/project/operations/read.js +6 -25
- package/dist/shortcuts/project/operations/shared.js +22 -0
- package/dist/shortcuts/project/operations/write.js +28 -2
- package/dist/shortcuts/recruit-stage/context.js +119 -0
- package/dist/shortcuts/recruit-stage/continuation.js +73 -0
- package/dist/shortcuts/recruit-stage/errors.js +65 -0
- package/dist/shortcuts/recruit-stage/host.js +109 -0
- package/dist/shortcuts/recruit-stage/index.js +115 -0
- package/dist/shortcuts/recruit-stage/manifest.js +29 -0
- package/dist/shortcuts/recruit-stage/operations/interview-arrange.js +722 -0
- package/dist/shortcuts/recruit-stage/operations/interview-feedback.js +269 -0
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +630 -0
- package/dist/shortcuts/recruit-stage/operations/list.js +431 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +38 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +1198 -0
- package/dist/shortcuts/recruit-stage/operations/search.js +158 -0
- package/dist/shortcuts/recruit-stage/operations/types.js +25 -0
- package/dist/shortcuts/recruit-stage/school-tiers.json +318 -0
- package/dist/shortcuts/recruit-stage/shared.js +608 -0
- package/dist/shortcuts/workflow/operations/form.js +21 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +52 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/detailFieldRules.js +4 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/summaryCache.js +19 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailCache.js +17 -24
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoDetailFetcher.js +14 -9
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +78 -10
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +3 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.detail.js +17 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +16 -40
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +3 -2
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +52 -15
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.pipeline.js +16 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +151 -63
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.subGroup.js +56 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +53 -16
- package/docs/e10-auth.md +22 -1
- package/docs/operation-manual.md +8 -0
- package/package.json +1 -1
- package/scripts/install-skill-to-xiaoe.mjs +105 -0
- package/scripts/mcp-meeting.mjs +234 -0
- package/scripts/package-skill.mjs +4 -2
- package/skill-template/business-info.json +24 -0
- package/skill-template/domains/recruit-stage.md +29 -0
- package/skills/weaver-e10-calendar/SKILL.md +2 -1
- package/skills/weaver-e10-calendar/references/calendar-write.md +54 -0
- package/skills/weaver-e10-cowork/SKILL.md +1 -1
- package/skills/weaver-e10-cowork/references/cowork-write.md +3 -1
- package/skills/weaver-e10-jucailin/SKILL.md +1 -1
- package/skills/weaver-e10-jucailin/references/attend-write.md +8 -0
- package/skills/weaver-e10-jucailin/references/hr-contact.md +8 -0
- package/skills/weaver-e10-jucailin/references/hr-report.md +8 -0
- package/skills/weaver-e10-jucailin/references/recruit-create.md +2 -2
- package/skills/weaver-e10-jucailin/references/recruit-read.md +1 -1
- package/skills/weaver-e10-jucailin/references/recruit-write.md +4 -3
- package/skills/weaver-e10-mail/SKILL.md +1 -1
- package/skills/weaver-e10-mail/references/mail-send.md +2 -0
- package/skills/weaver-e10-meeting/SKILL.md +119 -26
- package/skills/weaver-e10-meeting/references/meeting-minute-file.md +25 -11
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-recruit-stage/SKILL.md +226 -0
- package/skills/weaver-e10-recruit-stage/agents/openai.yaml +119 -0
- package/skills/weaver-e10-recruit-stage/lib/recruit-xiaoe-file.mjs +188 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-arrange-interview.md +322 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-capability-check.md +127 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-check-install.md +65 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-detail-process.md +63 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-edit-interview-feedback.md +142 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +73 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-template.md +56 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-candidate.md +101 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-list-interview.md +148 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-match-candidates.md +77 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-output-links.md +59 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-creator.md +69 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resolve-metadata.md +241 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-import.md +438 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-resume-parse.md +128 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-search-candidate.md +146 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-urge-feedback.md +69 -0
- package/skills/weaver-e10-shared/SKILL.md +2 -2
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +4 -2
- package/skills/weaver-e10-shijingran/SKILL.md +3 -2
- package/skills/weaver-e10-shijingran/references/operations.md +3 -1
- package/skills/weaver-e10-shijingran/references/source-manifest.json +41 -40
- package/skills/weaver-e10-shijingran/references/write-operations.md +2 -0
- package/skills/weaver-e10-workflow/SKILL.md +7 -1
- package/skills/weaver-e10-workflow/aigroup/default.json +23 -9
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +37 -21
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +135 -43
- package/skills/weaver-e10-yepiaotong/SKILL.md +9 -10
- package/skills/weaver-e10-yepiaotong/references/invoice-agent-entry.md +6 -3
package/README.md
CHANGED
|
@@ -224,6 +224,8 @@ weaver-work-cli auth xiaoe
|
|
|
224
224
|
桌面 XiaoE 客户端会话和 `WEAVER_XIAOE_*` 映射。`XIAOE_DOMAIN` 是 XiaoE/erpa 换票
|
|
225
225
|
服务地址,不是 E10 地址。E10 目标按“显式 `--base-url` → 专用 `WEAVER_XIAOE_*`
|
|
226
226
|
E10 配置/映射 → 当前 profile → `https://www.e-cology.com.cn`”解析。
|
|
227
|
+
换票结果会保存 Unix 毫秒时间戳 `expiryTimes`;响应未携带时,CLI 按小E `tokens.py`
|
|
228
|
+
的规则使用换票成功时间加 2 小时。
|
|
227
229
|
|
|
228
230
|
统一登录失败时,所有操作系统都返回结构化的
|
|
229
231
|
`authentication/xiaoe_credential_unavailable`,不会自动打开浏览器或降级到
|
|
@@ -232,7 +234,7 @@ E10 配置/映射 → 当前 profile → `https://www.e-cology.com.cn`”解析
|
|
|
232
234
|
业务命令缺少可读取的本地会话时,若当前环境已通过 `XIAOE_*`、`--runtime-agent xiaoe`
|
|
233
235
|
等运行时标记识别为 XiaoE,CLI 会先静默尝试统一登录,再继续原业务操作;失败时返回
|
|
234
236
|
`authentication/xiaoe_credential_unavailable`,提示已尝试自动获取。未识别到 XiaoE 的首次认证仍需显式选择登录方式。
|
|
235
|
-
`auth status --no-check` 等本地状态查询不会触发登录。已有 XiaoE
|
|
237
|
+
`auth status --no-check` 等本地状态查询不会触发登录。已有 XiaoE 会话达到 `expiryTimes` 时,CLI 会在业务请求发出前静默换取新会话;接口层明确判定失效(HTTP 401/302、业务码 `-2` 或登录页)时,
|
|
236
238
|
公共 E10 请求运行时会根据持久化会话的 `agentType` / `loginSource` 静默换取一次新会话并把被拒绝的请求重放一次;该恢复不依赖 shared Skill、Agent、`XIAOE_*` 或 `--runtime-agent xiaoe`。这个过程不向
|
|
237
239
|
stdout/stderr 输出中间“登录”步骤,并会合并同一 profile 的并发换票。流式请求、网络错误、
|
|
238
240
|
`partial` / `write_uncertain` 不会重放;恢复后的地址或用户身份变化时也会停止。
|
|
@@ -251,7 +253,7 @@ weaver-work-cli --runtime-agent xiaoe workflow ...
|
|
|
251
253
|
`credentialSourceDetected`、`attempted` 及各凭据源检测结果;命中 `tokens.py` 或内置
|
|
252
254
|
Node 客户端会话路径时还会输出明确的尝试日志。统一登录成功后,登录结果以及后续
|
|
253
255
|
`auth status` 会显示 `credentialSourceStep`、`credentialSourceType`、
|
|
254
|
-
`credentialSourceLabel`,可据此确认实际凭证来源;`3 / xiaoe_client / XiaoE client settings`
|
|
256
|
+
`credentialSourceLabel`、`expiryTimes`,可据此确认实际凭证来源;`3 / xiaoe_client / XiaoE client settings`
|
|
255
257
|
表示未依赖 `tokens.py`,由 Node 直接换票。
|
|
256
258
|
|
|
257
259
|
默认本地回调地址为 `http://127.0.0.1:19800/callback`。如果端口被占用:
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
isE10SessionExpiredResponse,
|
|
7
7
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SA6VBIHY.js";
|
|
9
9
|
import {
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
11
11
|
getActiveProfile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FOAA27U5.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
isCliError,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
isE10SessionExpiredResponse,
|
|
7
7
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SA6VBIHY.js";
|
|
9
9
|
import {
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
11
11
|
getActiveProfile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FOAA27U5.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
isCliError,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
createE10RequestRuntime,
|
|
5
5
|
isE10SessionExpiredResponse,
|
|
6
6
|
requireE10Session
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SA6VBIHY.js";
|
|
8
8
|
import {
|
|
9
9
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
10
10
|
getActiveProfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FOAA27U5.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
isCliError,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
isE10SessionExpiredResponse,
|
|
7
7
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SA6VBIHY.js";
|
|
9
9
|
import {
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
11
11
|
getActiveProfile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FOAA27U5.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
isCliError,
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
looksLikeFileId,
|
|
9
9
|
meetingAttachmentContentOperations,
|
|
10
10
|
parseFileIdList
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-W7BEHOSR.js";
|
|
12
|
+
import "./chunk-GEWYMQME.js";
|
|
13
|
+
import "./chunk-72CKAUAG.js";
|
|
14
14
|
import "./chunk-LUSPKZKY.js";
|
|
15
15
|
import "./chunk-BUSC6UAE.js";
|
|
16
16
|
export {
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
createE10RequestRuntime,
|
|
5
5
|
isE10SessionExpiredResponse,
|
|
6
6
|
requireE10Session
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SA6VBIHY.js";
|
|
8
8
|
import {
|
|
9
9
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
10
10
|
getActiveProfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FOAA27U5.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
isCliError,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
isE10SessionExpiredResponse,
|
|
7
7
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SA6VBIHY.js";
|
|
9
9
|
import {
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
11
11
|
getActiveProfile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FOAA27U5.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
isCliError,
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
isE10SessionExpiredResponse,
|
|
7
7
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SA6VBIHY.js";
|
|
9
9
|
import {
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
11
11
|
getActiveProfile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FOAA27U5.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
isCliError,
|
|
@@ -460,6 +460,31 @@ function firstId(value) {
|
|
|
460
460
|
if (typeof value === "string" || typeof value === "number") return String(value);
|
|
461
461
|
return void 0;
|
|
462
462
|
}
|
|
463
|
+
async function fetchAgendaAppAndForm(host) {
|
|
464
|
+
const appIdsResponse = await host.request({
|
|
465
|
+
method: "GET",
|
|
466
|
+
path: "/api/bs/ebuilder/app/tags/getAppIds",
|
|
467
|
+
operation: "calendar.app.check",
|
|
468
|
+
query: { tag: AGENDA_APP_TAG }
|
|
469
|
+
}).catch(() => void 0);
|
|
470
|
+
const appId = firstId(appIdsResponse?.data);
|
|
471
|
+
let formId;
|
|
472
|
+
if (appId) {
|
|
473
|
+
for (let attempt = 0; attempt < 3 && !formId; attempt++) {
|
|
474
|
+
const formResponse = await host.request({
|
|
475
|
+
method: "GET",
|
|
476
|
+
path: "/api/ebuilder/form/obj/getObjsByTag",
|
|
477
|
+
operation: "calendar.app.check",
|
|
478
|
+
query: { tag: AGENDA_FORM_TAG, appId }
|
|
479
|
+
}).catch(() => void 0);
|
|
480
|
+
formId = firstId(formResponse?.data);
|
|
481
|
+
if (!formId && attempt < 2) {
|
|
482
|
+
await new Promise((resolve2) => setTimeout(resolve2, 800));
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return { appId: appId ?? null, formId: formId ?? null };
|
|
487
|
+
}
|
|
463
488
|
var calendarAppCheck = {
|
|
464
489
|
name: "calendar.app.check",
|
|
465
490
|
resource: "calendar",
|
|
@@ -470,13 +495,7 @@ var calendarAppCheck = {
|
|
|
470
495
|
risk: "read",
|
|
471
496
|
inputSchema: schemaOf({}),
|
|
472
497
|
handler: async (_args, { host }) => {
|
|
473
|
-
const
|
|
474
|
-
method: "GET",
|
|
475
|
-
path: "/api/bs/ebuilder/app/tags/getAppIds",
|
|
476
|
-
operation: "calendar.app.check",
|
|
477
|
-
query: { tag: AGENDA_APP_TAG }
|
|
478
|
-
}).catch(() => void 0);
|
|
479
|
-
const appId = firstId(appIdsResponse?.data);
|
|
498
|
+
const { appId, formId } = await fetchAgendaAppAndForm(host);
|
|
480
499
|
if (!appId) {
|
|
481
500
|
return calendarSuccess("calendar.app.check", {
|
|
482
501
|
installed: false,
|
|
@@ -491,19 +510,6 @@ var calendarAppCheck = {
|
|
|
491
510
|
query: { appId }
|
|
492
511
|
}).catch(() => void 0);
|
|
493
512
|
const commitVersion = versionResponse?.data?.commitVersion ?? versionResponse?.commitVersion;
|
|
494
|
-
let formId;
|
|
495
|
-
for (let attempt = 0; attempt < 3 && !formId; attempt++) {
|
|
496
|
-
const formResponse = await host.request({
|
|
497
|
-
method: "GET",
|
|
498
|
-
path: "/api/ebuilder/form/obj/getObjsByTag",
|
|
499
|
-
operation: "calendar.app.check",
|
|
500
|
-
query: { tag: AGENDA_FORM_TAG, appId }
|
|
501
|
-
}).catch(() => void 0);
|
|
502
|
-
formId = firstId(formResponse?.data);
|
|
503
|
-
if (!formId && attempt < 2) {
|
|
504
|
-
await new Promise((resolve2) => setTimeout(resolve2, 800));
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
513
|
const hasVersion = typeof commitVersion === "string" && commitVersion.trim() !== "";
|
|
508
514
|
const installed = hasVersion && commitVersion !== null && commitVersion !== void 0;
|
|
509
515
|
const versionOk = installed && compareVersion(commitVersion, MIN_APP_VERSION) >= 0;
|
|
@@ -667,6 +673,26 @@ async function verifyLease(args, action, env) {
|
|
|
667
673
|
function isNetworkError(error) {
|
|
668
674
|
return error instanceof CalendarCliError && error.type === "network";
|
|
669
675
|
}
|
|
676
|
+
function extractCreatedIds(response) {
|
|
677
|
+
const datajson = response?.datajson;
|
|
678
|
+
if (!datajson || typeof datajson !== "object") return [];
|
|
679
|
+
if (Array.isArray(datajson.dataIds)) {
|
|
680
|
+
return datajson.dataIds.map((v) => String(v)).filter(Boolean);
|
|
681
|
+
}
|
|
682
|
+
const datas = Array.isArray(datajson.datas) ? datajson.datas : [];
|
|
683
|
+
const ids = [];
|
|
684
|
+
for (const d of datas) {
|
|
685
|
+
const mt = d?.mainTable;
|
|
686
|
+
if (!mt) continue;
|
|
687
|
+
if (Array.isArray(mt.dataIds)) ids.push(...mt.dataIds.map((v) => String(v)));
|
|
688
|
+
else if (mt.id !== void 0 && mt.id !== null && mt.id !== "") ids.push(String(mt.id));
|
|
689
|
+
}
|
|
690
|
+
return ids;
|
|
691
|
+
}
|
|
692
|
+
function buildCardUrl(baseUrl, formId, id) {
|
|
693
|
+
const hostPart = String(baseUrl || "").replace(/^https?:\/\//i, "").replace(/\/+$/, "");
|
|
694
|
+
return `https://${hostPart}/sp/ebdfpage/card/0/${formId}/${id}`;
|
|
695
|
+
}
|
|
670
696
|
async function buildWriteDatajson(host, mainTableList) {
|
|
671
697
|
const session = await host.getSession();
|
|
672
698
|
return {
|
|
@@ -775,9 +801,21 @@ var calendarCreateApply = {
|
|
|
775
801
|
}
|
|
776
802
|
throw error;
|
|
777
803
|
}
|
|
804
|
+
const createdIds = extractCreatedIds(response);
|
|
805
|
+
const createdId = createdIds[0];
|
|
806
|
+
const session = await env.host.getSession();
|
|
807
|
+
let accessUrl = null;
|
|
808
|
+
if (createdId) {
|
|
809
|
+
const { formId } = await fetchAgendaAppAndForm(env.host);
|
|
810
|
+
if (formId) {
|
|
811
|
+
accessUrl = buildCardUrl(session.baseUrl, formId, createdId);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
778
814
|
return calendarSuccess("calendar.create.apply", {
|
|
779
815
|
status: "COMPLETE",
|
|
780
|
-
|
|
816
|
+
createdId: createdId ?? null,
|
|
817
|
+
createdIds,
|
|
818
|
+
accessUrl
|
|
781
819
|
});
|
|
782
820
|
}
|
|
783
821
|
};
|