weaver-work-cli 0.1.32 → 0.1.33
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 +2 -2
- package/dist/chunks/{archive-UMGX72K6.js → archive-FVFY6GZN.js} +2 -2
- package/dist/chunks/{archive-oa-N2IYBLF3.js → archive-oa-NW3OD4UV.js} +2 -2
- package/dist/chunks/{asset-GLEGKFG5.js → asset-7QJKMIDV.js} +2 -2
- package/dist/chunks/{attachment-content-AQNX5N3S.js → attachment-content-OSAVA6K3.js} +3 -2
- package/dist/chunks/{blog-E44OTVDA.js → blog-I7SDPNW4.js} +2 -2
- package/dist/chunks/{caizhilian-DQUFZXZL.js → caizhilian-O37ZIQNY.js} +2 -2
- package/dist/chunks/{calendar-JKPIRKFD.js → calendar-7KXE4ED3.js} +2 -2
- package/dist/chunks/{chunk-4YC43QQ4.js → chunk-2FLWXFVS.js} +4 -4
- package/dist/chunks/{chunk-QWY6PGL6.js → chunk-2LV74IWP.js} +361 -56
- package/dist/chunks/chunk-3SO6QL6U.js +73 -0
- package/dist/chunks/{chunk-DW6AUUKS.js → chunk-6ATGWRZM.js} +6 -4
- package/dist/chunks/chunk-BYATLLEF.js +68 -0
- package/dist/chunks/chunk-BYBSCN4X.js +932 -0
- package/dist/chunks/{chunk-2GA5ZIQL.js → chunk-D223PTXU.js} +1 -0
- package/dist/chunks/{chunk-H7J4DC5R.js → chunk-EEWPQE3O.js} +2 -2
- package/dist/chunks/{chunk-6RKD4DRZ.js → chunk-GFPXQIY2.js} +2 -2
- package/dist/chunks/{chunk-C6R3B2ML.js → chunk-HEL5XTYI.js} +12 -6
- package/dist/chunks/{chunk-CVZ2JOSW.js → chunk-IHUYP6LO.js} +1 -1
- package/dist/chunks/{chunk-YRVDW4WN.js → chunk-ILMBNVSG.js} +2 -2
- package/dist/chunks/{chunk-G3QJULO2.js → chunk-KAS45KNR.js} +1 -1
- package/dist/chunks/{chunk-H6XSTSLM.js → chunk-MEEFGWTM.js} +54 -196
- package/dist/chunks/{chunk-GCG2NMWR.js → chunk-MQ2I5AA3.js} +4 -2
- package/dist/chunks/chunk-NHA62QD7.js +774 -0
- package/dist/chunks/{chunk-WKI2FBIQ.js → chunk-OCU4RLHC.js} +641 -309
- package/dist/chunks/{chunk-WSKBSQ2U.js → chunk-PRHJGPMA.js} +2 -2
- package/dist/chunks/{chunk-6EFWDL7Y.js → chunk-Q6LWB5HX.js} +2 -2
- package/dist/chunks/{chunk-IURUFGZK.js → chunk-RBGOMK4Y.js} +50 -33
- package/dist/chunks/chunk-VBCFFFGT.js +226 -0
- package/dist/chunks/{ebuilder-form-V5FG2EHC.js → chunk-WRRJ4GG2.js} +22 -1148
- package/dist/chunks/{chunk-E4Z23GHM.js → chunk-WY74UBJ6.js} +264 -750
- package/dist/chunks/conflict-SFNEVJY5.js +21 -0
- package/dist/chunks/continuation-RN6PZN2M.js +11 -0
- package/dist/chunks/cowork-CKWYHXYB.js +2508 -0
- package/dist/chunks/ebuilder-form-KOLJRVZD.js +121 -0
- package/dist/chunks/{ehr-HMFY6VIL.js → ehr-WFOC3B4D.js} +1174 -20
- package/dist/chunks/{esb-ZYSVB7SG.js → esb-LJZTN663.js} +4 -4
- package/dist/chunks/{fna-B7RKPAZD.js → fna-F7QRIIZC.js} +2 -2
- package/dist/chunks/{host-45WED2KK.js → host-BCGUVEWX.js} +3 -3
- package/dist/chunks/host-BQBRHVR3.js +23 -0
- package/dist/chunks/{host-I4Z6BFYX.js → host-DGE2TZD4.js} +3 -3
- package/dist/chunks/{host-KNZ52LJZ.js → host-KXPTEWFS.js} +3 -3
- package/dist/chunks/{host-OCH2BCCV.js → host-VQ6JJXGQ.js} +3 -3
- package/dist/chunks/{hrm-2KAZGUHI.js → hrm-NI6XAKW5.js} +3 -3
- package/dist/chunks/{im-ACJJWH4U.js → im-7TRTF3KT.js} +88 -12
- package/dist/chunks/{invoice-ZK3WCX2U.js → invoice-AOXWJKYT.js} +3 -3
- package/dist/chunks/{jiuchuanhui-5PQD3IL2.js → jiuchuanhui-7NQWEZAW.js} +2 -2
- package/dist/chunks/{lazy-dispatch-JQXBW3GM.js → lazy-dispatch-RNS4EE4S.js} +4 -4
- package/dist/chunks/{mail-S2HDDXO2.js → mail-VDHJAB4O.js} +3 -3
- package/dist/chunks/{meeting-QVN3I37L.js → meeting-GA7XCNNP.js} +214 -43
- package/dist/chunks/{okr-QNG4VC2Q.js → okr-TQIRERPQ.js} +2 -2
- package/dist/chunks/operations-5QL3AECO.js +11 -0
- package/dist/chunks/{plan-A25EMW6U.js → plan-4RY4LN2P.js} +2 -2
- package/dist/chunks/{project-G6XV66DZ.js → project-D6XT2OC5.js} +2 -2
- package/dist/chunks/{registry-DC6KR3NH.js → registry-JHRIDQ3A.js} +4 -4
- package/dist/chunks/{registry-2VLUAESA.js → registry-OZSMDVPP.js} +2 -2
- package/dist/chunks/{registry-TI3CIUXF.js → registry-QKMI43Q6.js} +8 -6
- package/dist/chunks/{registry-7C5UMIPL.js → registry-VOGKFFTR.js} +2 -2
- package/dist/chunks/{room-recommend-WRTHO6Y2.js → room-recommend-D4EUOOWY.js} +4 -3
- package/dist/chunks/{schedule-KFIITGSK.js → schedule-XPFBHPCV.js} +4 -3
- package/dist/chunks/{workflow-DJ7SYWAF.js → workflow-HLBZRWIY.js} +172 -6
- package/dist/index.js +30 -25
- package/dist/internal/e10/auth-recovery.js +14 -4
- package/dist/shortcuts/contract/host.js +34 -59
- package/dist/shortcuts/cowork/continuation.js +70 -0
- package/dist/shortcuts/cowork/errors.js +59 -0
- package/dist/shortcuts/cowork/host.js +172 -0
- package/dist/shortcuts/cowork/index.js +166 -0
- package/dist/shortcuts/cowork/manifest.js +65 -0
- package/dist/shortcuts/cowork/operations/discuss-write.js +277 -0
- package/dist/shortcuts/cowork/operations/item-write.js +380 -0
- package/dist/shortcuts/cowork/operations/member-write.js +283 -0
- package/dist/shortcuts/cowork/operations/permission-write.js +286 -0
- package/dist/shortcuts/cowork/operations/read.js +423 -0
- package/dist/shortcuts/cowork/operations/registry.js +39 -0
- package/dist/shortcuts/cowork/operations/review-write.js +157 -0
- package/dist/shortcuts/cowork/operations/shared.js +215 -0
- package/dist/shortcuts/cowork/operations/types.js +24 -0
- package/dist/shortcuts/cowork/operations.js +19 -0
- package/dist/shortcuts/ehr/host.js +4 -1
- package/dist/shortcuts/ehr/operations/recruit-candidate-import.js +757 -0
- package/dist/shortcuts/ehr/operations/recruit-position.js +367 -0
- package/dist/shortcuts/ehr/operations/recruit-stats.js +133 -0
- package/dist/shortcuts/ehr/operations/recruit-write.js +8 -16
- package/dist/shortcuts/ehr/operations/recruit.js +35 -10
- package/dist/shortcuts/ehr/operations/registry.js +6 -0
- package/dist/shortcuts/im/diagnostics.js +97 -0
- package/dist/shortcuts/im/host.js +58 -31
- package/dist/shortcuts/im/index.js +7 -2
- package/dist/shortcuts/im/operations/at-mention.js +127 -0
- package/dist/shortcuts/im/operations/file-user.js +10 -2
- package/dist/shortcuts/im/operations/group-read.js +26 -5
- package/dist/shortcuts/im/operations/group-write.js +35 -28
- package/dist/shortcuts/im/operations/msg-sync.js +7 -2
- package/dist/shortcuts/im/operations/msg-write.js +76 -10
- package/dist/shortcuts/im/operations/quote-mention.js +119 -0
- package/dist/shortcuts/im/operations/session.js +1 -1
- package/dist/shortcuts/im/operations/shared.js +10 -0
- package/dist/shortcuts/im/operations/types.js +13 -0
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/mail/host.js +4 -1
- package/dist/shortcuts/meeting/host.js +27 -34
- package/dist/shortcuts/meeting/operations/create.js +4 -1
- package/dist/shortcuts/meeting/operations/eb/catalog.js +5 -0
- package/dist/shortcuts/meeting/operations/eb/conflict.js +78 -7
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +168 -26
- package/dist/shortcuts/meeting/operations/eb/factory.js +69 -1
- package/dist/shortcuts/meeting/operations/eb/index.js +16 -3
- package/dist/shortcuts/meeting/operations/eb/room-recommend.js +14 -3
- package/dist/shortcuts/meeting/operations/eb-fallback.js +159 -0
- package/dist/shortcuts/meeting/operations/env.js +93 -46
- package/dist/shortcuts/meeting/operations/form-fields.js +110 -0
- package/dist/shortcuts/meeting/operations/registry.js +2 -0
- package/dist/shortcuts/meeting/operations/standard-guard.js +71 -0
- package/dist/shortcuts/meeting/operations.js +16 -0
- package/dist/shortcuts/workflow/index.js +110 -1
- package/dist/shortcuts/workflow/operations/form.js +24 -3
- package/dist/shortcuts/workflow/operations/read.js +104 -23
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupRules.js +448 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/aigroupStore.js +106 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/businessRules.js +47 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +30 -23
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.group.js +1 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.groupSummary.js +2 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +2 -4
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +138 -181
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.summary.js +12 -7
- package/docs/e10-auth.md +1 -1
- package/docs/im.md +8 -1
- package/docs/todo-smart-convert/README.md +1 -1
- package/docs/todo-smart-convert/data-contract.md +2 -2
- package/docs/todo-smart-convert/subgroup-rules.md +6 -0
- package/package.json +1 -1
- package/skill-template/domains/yimiaoban.md +3 -3
- package/skill-template/skill-template.md +1 -1
- package/skills/weaver-e10-blog/SKILL.md +5 -5
- package/skills/weaver-e10-caizhilian/SKILL.md +5 -5
- package/skills/weaver-e10-calendar/SKILL.md +5 -5
- package/skills/weaver-e10-esb/SKILL.md +5 -5
- package/skills/weaver-e10-hrm/SKILL.md +5 -5
- package/skills/weaver-e10-jinchengda/SKILL.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +5 -5
- package/skills/weaver-e10-jucailin/SKILL.md +18 -12
- package/skills/weaver-e10-jucailin/references/recruit-create.md +104 -0
- package/skills/weaver-e10-mail/SKILL.md +5 -5
- package/skills/weaver-e10-meeting/SKILL.md +171 -25
- package/skills/weaver-e10-meeting/references/meeting-eb.md +4 -3
- package/skills/weaver-e10-meeting/references/meeting-queries.md +9 -6
- package/skills/weaver-e10-meeting/references/meeting-verification.md +8 -6
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-okr/SKILL.md +5 -5
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-plan/SKILL.md +5 -5
- package/skills/weaver-e10-shared/SKILL.md +12 -12
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +4 -4
- package/skills/weaver-e10-wenshuding/SKILL.md +5 -5
- package/skills/weaver-e10-workflow/SKILL.md +29 -5
- package/skills/weaver-e10-workflow/aigroup/default.json +88 -0
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +66 -14
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-memory.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +12 -10
- package/skills/weaver-e10-workflow/references/workflow-view.md +2 -2
- package/skills/weaver-e10-workflow/tools/todo-serve.cjs +239 -0
- package/skills/weaver-e10-workflow/{scripts → tools}/todo-summary.cjs +218 -28
- package/skills/weaver-e10-yepiaotong/SKILL.md +10 -8
- package/skills/weaver-e10-yepiaotong/references/invoice-reim.md +7 -7
- package/skills/weaver-e10-yepiaotong/references/reim-api-reference.md +10 -10
- package/skills/weaver-e10-yepiaotong/references/reim-examples.md +40 -37
- package/skills/weaver-e10-yepiaotong/references/reim-expense-subject-rules.md +4 -4
- package/skills/weaver-e10-yepiaotong/references/reim-form-fill-rules.md +27 -38
- package/skills/weaver-e10-yepiaotong/references/reim-phone-subsidy-rules.md +4 -4
- package/skills/weaver-e10-yepiaotong/references/reim-workflow.md +37 -29
- package/skills/weaver-e10-yimiaoban/SKILL.md +156 -33
- package/skills/weaver-e10-yimiaoban/references/ding-write.md +1 -1
- package/skills/weaver-e10-yimiaoban/references/error-codes.md +5 -1
- package/skills/weaver-e10-yimiaoban/references/group-read.md +5 -1
- package/skills/weaver-e10-yimiaoban/references/group-write.md +6 -4
- package/skills/weaver-e10-yimiaoban/references/msg-read.md +1 -0
- package/skills/weaver-e10-yimiaoban/references/msg-write.md +34 -2
- package/skills/weaver-e10-yimiaoban/references/safety-boundaries.md +5 -2
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +79 -58
- package/skills/weaver-e10-yimiaoban/references/user-remind.md +2 -2
- package/skills/weaver-e10-ziguanjia/SKILL.md +5 -5
|
@@ -3,29 +3,34 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
meetingOperationDefinitions
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-WY74UBJ6.js";
|
|
7
|
+
import "./chunk-HEL5XTYI.js";
|
|
8
|
+
import "./chunk-2FLWXFVS.js";
|
|
9
|
+
import "./chunk-IHUYP6LO.js";
|
|
10
|
+
import "./chunk-NHA62QD7.js";
|
|
11
|
+
import "./chunk-MQ2I5AA3.js";
|
|
12
|
+
import {
|
|
13
|
+
degradeMeetingEnvToStandard,
|
|
14
|
+
meetingStateDir,
|
|
15
|
+
readCache
|
|
16
|
+
} from "./chunk-VBCFFFGT.js";
|
|
11
17
|
import {
|
|
12
18
|
MeetingCliError,
|
|
13
19
|
asObject,
|
|
14
20
|
assertNoForbiddenKeys,
|
|
15
21
|
meetingAuthError,
|
|
16
22
|
meetingNetworkError,
|
|
17
|
-
meetingStateDir,
|
|
18
23
|
meetingValidationError
|
|
19
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-MEEFGWTM.js";
|
|
20
25
|
import {
|
|
21
26
|
E10ApiError,
|
|
22
27
|
createE10RequestRuntime,
|
|
23
28
|
requireE10Session
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6ATGWRZM.js";
|
|
25
30
|
import {
|
|
26
31
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
27
32
|
getActiveProfile
|
|
28
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-D223PTXU.js";
|
|
29
34
|
import {
|
|
30
35
|
isCliError,
|
|
31
36
|
toErrorEnvelope
|
|
@@ -190,47 +195,41 @@ function createMeetingHost(ctx, dependencies = {}) {
|
|
|
190
195
|
return sessionContext;
|
|
191
196
|
}
|
|
192
197
|
async function download(request2) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
for (const [key, value] of Object.entries(request2.query ?? {})) {
|
|
196
|
-
if (value !== void 0 && value !== null && String(value) !== "") url.searchParams.set(key, String(value));
|
|
197
|
-
}
|
|
198
|
-
const controller = new AbortController();
|
|
199
|
-
const timer = setTimeout(() => controller.abort(), request2.timeoutMs ?? 6e4);
|
|
198
|
+
assertPath(request2.path);
|
|
199
|
+
let response;
|
|
200
200
|
try {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
redirect: "manual",
|
|
210
|
-
signal: controller.signal
|
|
201
|
+
response = await (await runtime()).requestBinary({
|
|
202
|
+
module: "meeting",
|
|
203
|
+
operation: "meeting.attachment.download",
|
|
204
|
+
method: "GET",
|
|
205
|
+
path: request2.path,
|
|
206
|
+
query: omitEmptyQueryValues(request2.query),
|
|
207
|
+
headers: { accept: "*/*" },
|
|
208
|
+
timeoutMs: request2.timeoutMs ?? 6e4
|
|
211
209
|
});
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
code: response.status,
|
|
218
|
-
exitCode: 1
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
return {
|
|
222
|
-
buffer: Buffer.from(await response.arrayBuffer()),
|
|
223
|
-
contentType: response.headers.get("content-type") ?? "",
|
|
224
|
-
contentDisposition: response.headers.get("content-disposition") ?? ""
|
|
225
|
-
};
|
|
226
|
-
} finally {
|
|
227
|
-
clearTimeout(timer);
|
|
210
|
+
} catch (error) {
|
|
211
|
+
mapRuntimeNetworkError(error);
|
|
212
|
+
}
|
|
213
|
+
if (response.status === 401 || response.status === 302) {
|
|
214
|
+
throw meetingAuthError("session_expired", E10_SESSION_EXPIRED_MESSAGE, { httpStatus: response.status });
|
|
228
215
|
}
|
|
216
|
+
if (response.status !== 200) {
|
|
217
|
+
throw new MeetingCliError("api", "download_failed", `\u4E0B\u8F7D\u5931\u8D25 HTTP ${response.status}`, {
|
|
218
|
+
code: response.status,
|
|
219
|
+
exitCode: 1
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
buffer: response.content,
|
|
224
|
+
contentType: response.contentType,
|
|
225
|
+
contentDisposition: response.headers.get("content-disposition") ?? ""
|
|
226
|
+
};
|
|
229
227
|
}
|
|
230
228
|
async function runtime() {
|
|
231
229
|
return createE10RequestRuntime(ctx, await ensureSession(), {
|
|
232
230
|
interceptors: dependencies.interceptors,
|
|
233
|
-
fetch: dependencies.fetch
|
|
231
|
+
fetch: dependencies.fetch,
|
|
232
|
+
recoverAuthentication: dependencies.recoverAuthentication
|
|
234
233
|
});
|
|
235
234
|
}
|
|
236
235
|
async function request(request2) {
|
|
@@ -353,6 +352,171 @@ var meetingManifest = {
|
|
|
353
352
|
// src/shortcuts/meeting/operations.ts
|
|
354
353
|
import { appendFile, mkdir as mkdir2 } from "node:fs/promises";
|
|
355
354
|
import { dirname, join } from "node:path";
|
|
355
|
+
|
|
356
|
+
// src/shortcuts/meeting/operations/eb-fallback.ts
|
|
357
|
+
var EB_TO_STANDARD = {
|
|
358
|
+
"meeting.eb.meeting.list": "meeting.list",
|
|
359
|
+
"meeting.eb.meeting.detail": "meeting.detail.field",
|
|
360
|
+
"meeting.eb.meeting.create.prepare": "meeting.create.prepare",
|
|
361
|
+
"meeting.eb.meeting.create.apply": "meeting.create.apply",
|
|
362
|
+
"meeting.eb.meeting.change.prepare": "meeting.change.prepare",
|
|
363
|
+
"meeting.eb.meeting.change.apply": "meeting.change.apply",
|
|
364
|
+
"meeting.eb.meeting.delete.prepare": "meeting.delete.prepare",
|
|
365
|
+
"meeting.eb.meeting.delete.apply": "meeting.delete.apply",
|
|
366
|
+
"meeting.eb.room.list": "meeting.room.list",
|
|
367
|
+
"meeting.eb.room.detail": null,
|
|
368
|
+
"meeting.eb.room.create.prepare": null,
|
|
369
|
+
"meeting.eb.room.create.apply": null,
|
|
370
|
+
"meeting.eb.room.update.prepare": null,
|
|
371
|
+
"meeting.eb.room.update.apply": null,
|
|
372
|
+
"meeting.eb.room.delete.prepare": null,
|
|
373
|
+
"meeting.eb.room.delete.apply": null,
|
|
374
|
+
"meeting.eb.roomUsage.list": "meeting.room.usage",
|
|
375
|
+
"meeting.eb.sign.list": "meeting.sign.list",
|
|
376
|
+
"meeting.eb.sign.mark.prepare": "meeting.sign.mark.prepare",
|
|
377
|
+
"meeting.eb.sign.mark.apply": "meeting.sign.mark.apply",
|
|
378
|
+
"meeting.eb.receipt.list": "meeting.receipt.list",
|
|
379
|
+
"meeting.eb.receipt.update.prepare": "meeting.receipt.update.prepare",
|
|
380
|
+
"meeting.eb.receipt.update.apply": "meeting.receipt.update.apply",
|
|
381
|
+
"meeting.eb.type.list": "meeting.type.list",
|
|
382
|
+
"meeting.eb.conflict.room": "meeting.conflict.room",
|
|
383
|
+
"meeting.eb.conflict.member": "meeting.conflict.member",
|
|
384
|
+
"meeting.eb.conflict.availability": null,
|
|
385
|
+
"meeting.eb.baseSet.get": "meeting.calendar.base",
|
|
386
|
+
"meeting.eb.minute.create.prepare": null,
|
|
387
|
+
"meeting.eb.minute.create.apply": null,
|
|
388
|
+
"meeting.eb.topic.list": null,
|
|
389
|
+
"meeting.eb.decision.create.prepare": null,
|
|
390
|
+
"meeting.eb.decision.create.apply": null,
|
|
391
|
+
"meeting.eb.decisionTask.list": null,
|
|
392
|
+
"meeting.eb.schedule.free": null,
|
|
393
|
+
"meeting.eb.room.recommend": null,
|
|
394
|
+
"meeting.eb.meeting.create.flow.prepare": null,
|
|
395
|
+
"meeting.eb.meeting.create.flow.apply": null,
|
|
396
|
+
"meeting.eb.meeting.create.flow.quick": null
|
|
397
|
+
};
|
|
398
|
+
var NO_FALLBACK_TYPES = /* @__PURE__ */ new Set(["validation", "confirmation", "continuation"]);
|
|
399
|
+
var NO_FALLBACK_SUBTYPES = /* @__PURE__ */ new Set([
|
|
400
|
+
"session_expired",
|
|
401
|
+
"permission_denied",
|
|
402
|
+
"not_found",
|
|
403
|
+
"missing_required_field",
|
|
404
|
+
"datetime_invalid",
|
|
405
|
+
"id_invalid",
|
|
406
|
+
"conflict_rejected",
|
|
407
|
+
"flow_not_launchable",
|
|
408
|
+
"target_changed",
|
|
409
|
+
"env_unavailable",
|
|
410
|
+
"env_fallback"
|
|
411
|
+
]);
|
|
412
|
+
function describe(error) {
|
|
413
|
+
if (error instanceof MeetingCliError) {
|
|
414
|
+
return `${error.type}/${error.subtype}: ${error.message}`;
|
|
415
|
+
}
|
|
416
|
+
if (error instanceof Error) {
|
|
417
|
+
return `${error.type ?? "api"}/${error.subtype ?? "error"}: ${error.message}`;
|
|
418
|
+
}
|
|
419
|
+
return String(error);
|
|
420
|
+
}
|
|
421
|
+
function isEbStructurallyAbsent(error) {
|
|
422
|
+
const status = error?.details?.status ?? error?.code;
|
|
423
|
+
if (status === 404 || status === 405 || status === 501) return true;
|
|
424
|
+
if (error?.subtype === "http_error" && typeof status === "number" && status >= 400 && status < 500) return true;
|
|
425
|
+
const message = String(error?.message ?? "");
|
|
426
|
+
return /接口不存在|不存在该接口|NoHandler|No mapping|Not Found|路由不存在|does not exist/i.test(message);
|
|
427
|
+
}
|
|
428
|
+
function peerHint(operation) {
|
|
429
|
+
if (!(operation in EB_TO_STANDARD)) return {};
|
|
430
|
+
const peer = EB_TO_STANDARD[operation];
|
|
431
|
+
return peer == null ? { unavailable: true } : { peer };
|
|
432
|
+
}
|
|
433
|
+
async function tryDegradeEbFailure(operation, error, host, ctx) {
|
|
434
|
+
if (!operation.startsWith("meeting.eb.")) return null;
|
|
435
|
+
if (process.env.WEAVER_MEETING_ENV_AUTOFALLBACK === "0") return null;
|
|
436
|
+
const type = String(error?.type ?? "");
|
|
437
|
+
const subtype = String(error?.subtype ?? "");
|
|
438
|
+
if (NO_FALLBACK_TYPES.has(type) || NO_FALLBACK_SUBTYPES.has(subtype)) return null;
|
|
439
|
+
let ebErrorDetail = describe(error);
|
|
440
|
+
const persist = isEbStructurallyAbsent(error);
|
|
441
|
+
try {
|
|
442
|
+
const degraded = await degradeMeetingEnvToStandard(host, ctx, error, { persist });
|
|
443
|
+
ebErrorDetail = degraded.ebError || ebErrorDetail;
|
|
444
|
+
} catch {
|
|
445
|
+
return null;
|
|
446
|
+
}
|
|
447
|
+
const hint = peerHint(operation);
|
|
448
|
+
const action = hint.peer ? `\u8BF7\u6539\u7528\u6807\u51C6\u7248 operation **\`${hint.peer}\`** \u91CD\u8BD5\uFF08\u53C2\u6570\u53E3\u5F84\u4E0D\u540C\uFF0C\u5148\u8DD1 \`meeting schema\` \u770B\u8BE5 operation \u7684 inputSchema\uFF09\u3002` : hint.unavailable ? "\u6807\u51C6\u7248**\u6CA1\u6709**\u8BE5\u80FD\u529B\u7684\u5BF9\u7B49\u5B9E\u73B0\uFF0C\u8BF7\u5982\u5B9E\u544A\u77E5\u7528\u6237\u672C\u73AF\u5883\u65E0\u6CD5\u5B8C\u6210\u8FD9\u9879\u64CD\u4F5C\uFF0C\u4E0D\u8981\u7528\u5176\u5B83\u63A5\u53E3\u62FC\u51D1\u3002" : "\u6807\u51C6\u7248\u6E05\u5355\u89C1 `meeting schema`\uFF0C\u6311\u8BED\u4E49\u6700\u63A5\u8FD1\u7684 operation\uFF08\u5148\u786E\u8BA4 inputSchema \u518D\u8C03\u7528\uFF09\u3002";
|
|
449
|
+
const modeNote = persist ? "\u5DF2\u5B9E\u63A2\u6807\u51C6\u7248\u63A5\u53E3\u53EF\u7528\uFF0C**\u73AF\u5883\u6A21\u5F0F\u5DF2\u66F4\u65B0\u4E3A `standard` \u5E76\u5199\u5165\u7F13\u5B58**\uFF0C\u540E\u7EED\u540C\u4E00\u73AF\u5883\u76F4\u63A5\u8D70\u6807\u51C6\u7248\u3002" : "\u6807\u51C6\u7248\u63A5\u53E3\u672C\u6B21\u63A2\u6D4B\u53EF\u7528\uFF0C\u4F46\u8FD9\u662F EB \u4FA7\u7684\u5076\u53D1\u6545\u969C\uFF08HTTP 5xx / \u7F51\u7EDC\u7C7B\uFF09\uFF0C**\u6CA1\u6709\u6539\u52A8\u6A21\u5F0F\u7F13\u5B58**\uFF0C\u4E0B\u6B21\u4ECD\u4F1A\u5148\u6309 EB \u7248\u5C1D\u8BD5\u3002";
|
|
450
|
+
const message = [
|
|
451
|
+
`EB \u7248\u4F1A\u8BAE\u63A5\u53E3\u5728\u5F53\u524D\u73AF\u5883\u4E0D\u53EF\u7528\uFF08${ebErrorDetail}\uFF09\u3002`,
|
|
452
|
+
modeNote,
|
|
453
|
+
action,
|
|
454
|
+
"\u82E5\u786E\u8BA4\u672C\u73AF\u5883\u5176\u5B9E\u662F EB \u7248\uFF08\u4F8B\u5982\u521A\u5B89\u88C5\u5B8C\u4F1A\u8BAE EB \u5E94\u7528\uFF09\uFF0C\u8DD1 `meeting.env.detect`\uFF08`refresh:true`\uFF09\u91CD\u65B0\u5224\u5B9A\u5373\u53EF\u3002"
|
|
455
|
+
].join(" ");
|
|
456
|
+
return new MeetingCliError("api", "env_fallback", message, {
|
|
457
|
+
code: "env_fallback",
|
|
458
|
+
details: {
|
|
459
|
+
ebOperation: operation,
|
|
460
|
+
ebError: ebErrorDetail,
|
|
461
|
+
standardOperation: hint.peer ?? null,
|
|
462
|
+
standardUnavailable: hint.unavailable === true,
|
|
463
|
+
// persist=true 时降级已落盘,调用方不必重复 detect。
|
|
464
|
+
envModeUpdated: persist ? "standard" : null
|
|
465
|
+
},
|
|
466
|
+
retryable: false,
|
|
467
|
+
exitCode: 1
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// src/shortcuts/meeting/operations/standard-guard.ts
|
|
472
|
+
var STANDARD_TO_EB = {
|
|
473
|
+
"meeting.list": "meeting.eb.meeting.list",
|
|
474
|
+
"meeting.detail.field": "meeting.eb.meeting.detail",
|
|
475
|
+
"meeting.room.list": "meeting.eb.room.list",
|
|
476
|
+
"meeting.room.usage": "meeting.eb.roomUsage.list",
|
|
477
|
+
"meeting.type.list": "meeting.eb.type.list",
|
|
478
|
+
"meeting.receipt.list": "meeting.eb.receipt.list",
|
|
479
|
+
"meeting.sign.list": "meeting.eb.sign.list",
|
|
480
|
+
"meeting.conflict.room": "meeting.eb.conflict.room",
|
|
481
|
+
"meeting.conflict.member": "meeting.eb.conflict.member",
|
|
482
|
+
"meeting.roomAttribute.list": "meeting.eb.room.list"
|
|
483
|
+
};
|
|
484
|
+
function escapeEnabled() {
|
|
485
|
+
const flag = String(process.env.WEAVER_MEETING_ALLOW_STANDARD_IN_EB ?? "").trim().toLowerCase();
|
|
486
|
+
return flag === "1" || flag === "true";
|
|
487
|
+
}
|
|
488
|
+
async function assertStandardOperationAllowed(operation, context) {
|
|
489
|
+
const peer = STANDARD_TO_EB[operation];
|
|
490
|
+
if (!peer) return;
|
|
491
|
+
if (escapeEnabled()) return;
|
|
492
|
+
let mode;
|
|
493
|
+
try {
|
|
494
|
+
const session = await context.host.getSession();
|
|
495
|
+
const cache = await readCache(context.ctx);
|
|
496
|
+
mode = cache.environments[session.baseUrl]?.mode;
|
|
497
|
+
} catch {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (mode !== "eb") return;
|
|
501
|
+
throw new MeetingCliError(
|
|
502
|
+
"api",
|
|
503
|
+
"env_mismatch",
|
|
504
|
+
`\u5F53\u524D\u73AF\u5883\u5DF2\u786E\u8BA4\u4E3A **EB \u7248**\uFF0C\`${operation}\` \u662F**\u6807\u51C6\u7248**\u63A5\u53E3\uFF0C\u8FD4\u56DE\u7684\u662F\u53E6\u4E00\u5957\u6570\u636E\uFF08\u4E24\u5957\u4F1A\u8BAE\u6570\u636E\u4E92\u4E0D\u76F8\u901A\uFF0C\u6807\u51C6\u7248\u4F1A\u8BAE\u5BA4/\u4F1A\u8BAE\u5728\u8FD9\u91CC\u662F\u4E0D\u5B58\u5728\u7684\u4E1C\u897F\uFF09\u3002\u8BF7\u6539\u7528 EB operation **\`` + peer + "`**\u3002\u5982\u679C\u786E\u5B9E\u8981\u8BFB\u6807\u51C6\u7248\u6570\u636E\uFF08\u6781\u5C11\u89C1\uFF09\uFF0C\u8BBE\u73AF\u5883\u53D8\u91CF `WEAVER_MEETING_ALLOW_STANDARD_IN_EB=1` \u540E\u518D\u8DD1\u3002",
|
|
505
|
+
{
|
|
506
|
+
code: "env_mismatch",
|
|
507
|
+
details: {
|
|
508
|
+
requestedOperation: operation,
|
|
509
|
+
standardOperation: operation,
|
|
510
|
+
ebOperation: peer,
|
|
511
|
+
envMode: "eb"
|
|
512
|
+
},
|
|
513
|
+
retryable: false,
|
|
514
|
+
exitCode: 1
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// src/shortcuts/meeting/operations.ts
|
|
356
520
|
function recordCall(context, operation, startedAt, ok, errorType) {
|
|
357
521
|
try {
|
|
358
522
|
const file = join(meetingStateDir(context.ctx), "logs", "calls.jsonl");
|
|
@@ -388,11 +552,18 @@ async function executeMeetingOperation(operation, rawInput, context) {
|
|
|
388
552
|
};
|
|
389
553
|
const startedAt = Date.now();
|
|
390
554
|
try {
|
|
555
|
+
await assertStandardOperationAllowed(operation, { ...context, host });
|
|
391
556
|
const envelope = await definition.handler(input, { ...context, host });
|
|
392
557
|
recordCall(context, operation, startedAt, true);
|
|
393
558
|
return envelope;
|
|
394
559
|
} catch (error) {
|
|
395
560
|
recordCall(context, operation, startedAt, false, String(error?.type ?? "unknown"));
|
|
561
|
+
try {
|
|
562
|
+
const degraded = await tryDegradeEbFailure(operation, error, context.host, context.ctx);
|
|
563
|
+
if (degraded) throw degraded;
|
|
564
|
+
} catch (rethrow) {
|
|
565
|
+
if (rethrow !== error) throw rethrow;
|
|
566
|
+
}
|
|
396
567
|
throw error;
|
|
397
568
|
}
|
|
398
569
|
}
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
E10ApiError,
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
requireE10Session
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6ATGWRZM.js";
|
|
8
8
|
import {
|
|
9
9
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
10
10
|
getActiveProfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D223PTXU.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
isCliError,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
|
+
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
executeEbuilderFormOperation
|
|
5
|
+
} from "./chunk-BYBSCN4X.js";
|
|
6
|
+
import "./chunk-BYATLLEF.js";
|
|
7
|
+
import "./chunk-LUSPKZKY.js";
|
|
8
|
+
import "./chunk-BUSC6UAE.js";
|
|
9
|
+
export {
|
|
10
|
+
executeEbuilderFormOperation
|
|
11
|
+
};
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
E10ApiError,
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
requireE10Session
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6ATGWRZM.js";
|
|
8
8
|
import {
|
|
9
9
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
10
10
|
getActiveProfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D223PTXU.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
isCliError,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
E10ApiError,
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
requireE10Session
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6ATGWRZM.js";
|
|
8
8
|
import {
|
|
9
9
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
10
10
|
getActiveProfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D223PTXU.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
isCliError,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
esbOperationDefinitions,
|
|
5
5
|
getEsbOperation,
|
|
6
6
|
hasEsbOperation
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-KAS45KNR.js";
|
|
8
|
+
import "./chunk-ILMBNVSG.js";
|
|
9
9
|
import "./chunk-GPMFD4RD.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-6ATGWRZM.js";
|
|
11
|
+
import "./chunk-D223PTXU.js";
|
|
12
12
|
import "./chunk-LUSPKZKY.js";
|
|
13
13
|
import "./chunk-BUSC6UAE.js";
|
|
14
14
|
export {
|
|
@@ -3,9 +3,9 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getImOperation,
|
|
5
5
|
imOperationDefinitions
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-YLCYX7LE.js";
|
|
6
|
+
} from "./chunk-2LV74IWP.js";
|
|
8
7
|
import "./chunk-ZEDWSH32.js";
|
|
8
|
+
import "./chunk-YLCYX7LE.js";
|
|
9
9
|
import "./chunk-LUSPKZKY.js";
|
|
10
10
|
import "./chunk-BUSC6UAE.js";
|
|
11
11
|
export {
|
|
@@ -4,12 +4,14 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-WY74UBJ6.js";
|
|
8
|
+
import "./chunk-HEL5XTYI.js";
|
|
9
|
+
import "./chunk-2FLWXFVS.js";
|
|
10
|
+
import "./chunk-IHUYP6LO.js";
|
|
11
|
+
import "./chunk-NHA62QD7.js";
|
|
12
|
+
import "./chunk-MQ2I5AA3.js";
|
|
13
|
+
import "./chunk-VBCFFFGT.js";
|
|
14
|
+
import "./chunk-MEEFGWTM.js";
|
|
13
15
|
import "./chunk-LUSPKZKY.js";
|
|
14
16
|
import "./chunk-BUSC6UAE.js";
|
|
15
17
|
export {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getWorkflowOperation,
|
|
5
5
|
hasWorkflowOperation,
|
|
6
6
|
workflowOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OCU4RLHC.js";
|
|
8
8
|
import "./chunk-EZALDOQH.js";
|
|
9
9
|
import "./chunk-FMPJJYYI.js";
|
|
10
10
|
import "./chunk-EG6ZU444.js";
|
|
11
11
|
import "./chunk-AJ62BGAW.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-D223PTXU.js";
|
|
13
13
|
import "./chunk-LUSPKZKY.js";
|
|
14
14
|
import "./chunk-BUSC6UAE.js";
|
|
15
15
|
export {
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
loadRooms,
|
|
7
7
|
recommendRooms,
|
|
8
8
|
rememberFrequentRoom
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HEL5XTYI.js";
|
|
10
|
+
import "./chunk-IHUYP6LO.js";
|
|
11
|
+
import "./chunk-VBCFFFGT.js";
|
|
12
|
+
import "./chunk-MEEFGWTM.js";
|
|
12
13
|
import "./chunk-LUSPKZKY.js";
|
|
13
14
|
import "./chunk-BUSC6UAE.js";
|
|
14
15
|
export {
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
resolveMeetingScheduleTypeIds,
|
|
9
9
|
resolveMemberIdsByName,
|
|
10
10
|
runScheduleConflictFlow
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-2FLWXFVS.js";
|
|
12
|
+
import "./chunk-IHUYP6LO.js";
|
|
13
|
+
import "./chunk-VBCFFFGT.js";
|
|
14
|
+
import "./chunk-MEEFGWTM.js";
|
|
14
15
|
import "./chunk-LUSPKZKY.js";
|
|
15
16
|
import "./chunk-BUSC6UAE.js";
|
|
16
17
|
export {
|