weaver-work-cli 0.1.53 → 0.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{archive-ZQ4A4TV6.js → archive-4SQAVTIB.js} +3 -2
- package/dist/chunks/{archive-oa-57R2FYHV.js → archive-oa-W2UEJ67L.js} +137 -8
- package/dist/chunks/{asset-ZOJVBWZH.js → asset-EGZEABBI.js} +3 -2
- package/dist/chunks/{asset-idle-XGB5IPGT.js → asset-idle-EBUZBB6M.js} +3 -2
- package/dist/chunks/{attachment-content-W3TSJC3Y.js → attachment-content-QGM5MLQE.js} +4 -3
- package/dist/chunks/{blog-QSHLZSFW.js → blog-2YKMWOWI.js} +3 -2
- package/dist/chunks/{caizhilian-KCQYFH72.js → caizhilian-QJ4FLSQJ.js} +5 -4
- package/dist/chunks/{calendar-DLGMRJQA.js → calendar-H4QTJCUY.js} +3 -2
- package/dist/chunks/{chunk-XPQN4E5O.js → chunk-44KJ7WFA.js} +300 -55
- package/dist/chunks/{chunk-CZNZKOHR.js → chunk-4GG72JAT.js} +2 -2
- package/dist/chunks/{chunk-YIKSL36S.js → chunk-5N222HK6.js} +2 -2
- package/dist/chunks/{chunk-6GCXWKG6.js → chunk-6DVL5IN5.js} +4 -1
- package/dist/chunks/{chunk-WTLQGS6D.js → chunk-6MS3RLPO.js} +5 -334
- package/dist/chunks/{chunk-Z4G7LLDD.js → chunk-7EBV7Q3R.js} +124 -27
- package/dist/chunks/{chunk-76PRVYH4.js → chunk-AHJZIMCX.js} +1 -1
- package/dist/chunks/{chunk-TGAGQV4I.js → chunk-CQ4OVCKG.js} +2 -2
- package/dist/chunks/{chunk-2BQESR2U.js → chunk-DVR2EDUU.js} +99 -34
- package/dist/chunks/{chunk-QQXMHM3J.js → chunk-FDAJC7R4.js} +4 -4
- package/dist/chunks/{chunk-GR76ZDDX.js → chunk-FMNCSYIG.js} +2 -2
- package/dist/chunks/{chunk-IF33CG4V.js → chunk-L2LMBFG5.js} +1 -1
- package/dist/chunks/{chunk-DLY5GUXX.js → chunk-PH7N4UFT.js} +1 -1
- package/dist/chunks/{chunk-U6R6FZHD.js → chunk-SFM3M2L3.js} +286 -93
- package/dist/chunks/chunk-SHYQUBY3.js +48 -0
- package/dist/chunks/{chunk-HFXK54M4.js → chunk-TGM7BWEH.js} +2 -2
- package/dist/chunks/{chunk-2J3XY4ED.js → chunk-TJUAGZU7.js} +11 -11
- package/dist/chunks/{chunk-PE334WL3.js → chunk-UI66EMOR.js} +4 -4
- package/dist/chunks/{chunk-762M5XJS.js → chunk-VMCCRWFO.js} +2 -2
- package/dist/chunks/{chunk-U7ROML5E.js → chunk-WHJIUKJW.js} +681 -48
- package/dist/chunks/{chunk-PGO4ILMQ.js → chunk-WMB3SMXI.js} +1 -1
- package/dist/chunks/chunk-WMRNO6IU.js +337 -0
- package/dist/chunks/{chunk-6NXT4ICB.js → chunk-WVH5ESDA.js} +1 -1
- package/dist/chunks/{chunk-DEHJ7PMA.js → chunk-XU3FL3AW.js} +4 -4
- package/dist/chunks/{chunk-Z6UUBY37.js → chunk-Z4IPY5GV.js} +2 -2
- package/dist/chunks/{conflict-57WDJWL7.js → conflict-VAFFPUY3.js} +2 -2
- package/dist/chunks/{contract-LJRAXVZU.js → contract-LLRKMLQQ.js} +2655 -1319
- package/dist/chunks/{cowork-3ACICHDQ.js → cowork-2RDFBZWB.js} +3 -2
- package/dist/chunks/{create-flow-3FMMZBCA.js → create-flow-TVYE3IOH.js} +6 -6
- package/dist/chunks/{data-WK5CQXNF.js → data-WVICO3DT.js} +57 -11
- package/dist/chunks/{ebuilder-form-CBYI6CQ6.js → ebuilder-form-TWSXS5NA.js} +7 -6
- package/dist/chunks/{ehr-XI4BIVR2.js → ehr-52GBKNJR.js} +3 -2
- package/dist/chunks/{env-JYZE3BZB.js → env-BVVFIN4P.js} +2 -2
- package/dist/chunks/{esb-4BQHNP5C.js → esb-HJSXCEOM.js} +5 -4
- package/dist/chunks/{factory-66SCIKW3.js → factory-RCQ36LLE.js} +1 -1
- package/dist/chunks/{fna-ECOYBQYL.js → fna-OBACRT3J.js} +72 -3
- package/dist/chunks/{group-chat-MNRYMLNG.js → group-chat-YFZDUUY3.js} +3 -3
- package/dist/chunks/{host-TUOIOEMC.js → host-2BKMPWDH.js} +4 -3
- package/dist/chunks/{host-3TNBMDTR.js → host-KJT3G5D2.js} +4 -3
- package/dist/chunks/{host-7OWWPLM4.js → host-KOWUMNAY.js} +4 -3
- package/dist/chunks/{host-M4XP5URR.js → host-MFXRA2MY.js} +4 -3
- package/dist/chunks/{host-7NTIBSPK.js → host-TTSGY5NZ.js} +4 -3
- package/dist/chunks/{host-G3VU7SDW.js → host-W4JCNRFS.js} +4 -3
- package/dist/chunks/{hrm-YGIR3HGF.js → hrm-AK3WGBMN.js} +4 -3
- package/dist/chunks/{im-TN2JYVGJ.js → im-JZSBPO4Z.js} +4 -3
- package/dist/chunks/{invoice-V7ZTITUO.js → invoice-V6KD4TZE.js} +4 -3
- package/dist/chunks/{jiuchuanhui-ASFZBMPU.js → jiuchuanhui-K4EQU6GK.js} +3 -2
- package/dist/chunks/{lazy-dispatch-XSAHDK6Z.js → lazy-dispatch-JHGFCKJN.js} +5 -4
- package/dist/chunks/{mail-M3HJF5ER.js → mail-IKVCQCVZ.js} +3 -2
- package/dist/chunks/{meeting-IIY4UAJL.js → meeting-JOHV4RH3.js} +14 -12
- package/dist/chunks/minute-doc-JLS4KMFZ.js +156 -0
- package/dist/chunks/{okr-EVX7FB5G.js → okr-KV43FPPX.js} +3 -2
- package/dist/chunks/{operations-J7PUIVWZ.js → operations-ZPWBMYKE.js} +5 -4
- package/dist/chunks/{plan-2QJQEPBO.js → plan-WOYR4WEG.js} +3 -2
- package/dist/chunks/{project-XELELW2T.js → project-CQJKBUIL.js} +3 -2
- package/dist/chunks/{reception-QGPNTGHG.js → reception-MPBU3JXC.js} +3 -2
- package/dist/chunks/{recruit-stage-XCMVEQA2.js → recruit-stage-USTTRHOX.js} +3 -2
- package/dist/chunks/{registry-CJOVECZD.js → registry-GURQG4ZV.js} +3 -2
- package/dist/chunks/{registry-METZ2LWE.js → registry-LITYOH2W.js} +12 -10
- package/dist/chunks/{registry-QJCZ2GVG.js → registry-SS5J2FZQ.js} +5 -4
- package/dist/chunks/{room-recommend-YFY7HTOF.js → room-recommend-62MECG4J.js} +4 -4
- package/dist/chunks/{schedule-6I63TERA.js → schedule-6QRXIBGU.js} +4 -4
- package/dist/chunks/{smart-extract-FOUYNIG3.js → smart-extract-APX2PNIN.js} +3 -2
- package/dist/chunks/{workflow-YHXFIU63.js → workflow-WMPW3WSB.js} +5 -4
- package/dist/index.js +33 -32
- package/dist/internal/e10/auth/agent-host-key.js +68 -0
- package/dist/internal/e10/auth/agent-hosts.js +250 -0
- package/dist/internal/e10/auth/commands.js +99 -30
- package/dist/internal/e10/auth/paths.js +9 -0
- package/dist/internal/e10/auth/session.js +17 -0
- package/dist/internal/e10/auth/xiaoe.js +37 -3
- package/dist/shortcuts/archive-oa/operations/contract-modules.js +106 -0
- package/dist/shortcuts/archive-oa/operations/contract.js +38 -4
- package/dist/shortcuts/archive-oa/operations/registry.js +2 -1
- package/dist/shortcuts/contract/index.js +6 -7
- package/dist/shortcuts/contract/manifest.js +101 -24
- package/dist/shortcuts/contract/ooxml/docx-table.js +75 -3
- package/dist/shortcuts/contract/ooxml/xlsx.js +49 -13
- package/dist/shortcuts/contract/operations/card-action.js +113 -12
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +29 -7
- package/dist/shortcuts/contract/operations/card-plan.js +75 -9
- package/dist/shortcuts/contract/operations/card-risk-report.js +2 -2
- package/dist/shortcuts/contract/operations/card.js +1 -1
- package/dist/shortcuts/contract/operations/clause-library.js +88 -16
- package/dist/shortcuts/contract/operations/compare-screen.js +378 -0
- package/dist/shortcuts/contract/operations/compare.js +1 -1
- package/dist/shortcuts/contract/operations/credit-page.js +1 -1
- package/dist/shortcuts/contract/operations/docx-slots.js +1000 -0
- package/dist/shortcuts/contract/operations/flow.js +2 -2
- package/dist/shortcuts/contract/operations/quote-to-contract.js +495 -0
- package/dist/shortcuts/contract/operations/quote.js +2 -229
- package/dist/shortcuts/contract/operations/recommend.js +1 -1
- package/dist/shortcuts/contract/operations/registry.js +6 -2
- package/dist/shortcuts/contract/operations/review.js +230 -4
- package/dist/shortcuts/contract/operations/save-recognize.js +122 -3
- package/dist/shortcuts/contract/operations/template.js +11 -10
- package/dist/shortcuts/data/operations/ds.js +5 -5
- package/dist/shortcuts/data/operations/shared.js +76 -4
- package/dist/shortcuts/fna/manifest.js +7 -2
- package/dist/shortcuts/fna/operations/budget.js +68 -0
- package/dist/shortcuts/meeting/minute-doc.js +153 -0
- package/dist/shortcuts/meeting/operations/compose-outcome.js +176 -0
- package/dist/shortcuts/meeting/operations/eb/catalog.js +1 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +47 -0
- package/dist/shortcuts/meeting/operations/eb/decision-task-batch.js +144 -0
- package/dist/shortcuts/meeting/operations/eb/decision.js +92 -4
- package/dist/shortcuts/meeting/operations/eb/index.js +133 -4
- package/dist/shortcuts/meeting/operations/eb/meeting-link.js +90 -0
- package/dist/shortcuts/meeting/operations/from-group-chat.js +46 -0
- package/dist/shortcuts/meeting/operations/minute-content.js +61 -0
- package/dist/shortcuts/meeting/operations/registry.js +14 -1
- package/dist/shortcuts/meeting/operations/self-check.js +49 -0
- package/dist/shortcuts/workflow/endpoints.js +2 -0
- package/dist/shortcuts/workflow/operations/read.js +114 -8
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.collect.js +72 -46
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.core.js +41 -0
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.js +46 -11
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroup.js +18 -1
- package/dist/shortcuts/workflow/operations/todoSmartConvert/todoSmartConvert.smartGroupAdd.js +51 -0
- package/docs/e10-auth.md +78 -0
- package/docs/fna.md +8 -3
- package/package.json +4 -2
- package/scripts/pack-offline.mjs +228 -0
- package/scripts/package-skill.mjs +14 -5
- package/skill-template/business-info.json +3 -0
- package/skill-template/domains/qiyecheng.md +4 -3
- package/skills/weaver-e10-archive-oa/SKILL.md +6 -1
- package/skills/weaver-e10-archive-oa/references/contract-search.md +91 -4
- package/skills/weaver-e10-jinchengda/SKILL.md +100 -81
- package/skills/weaver-e10-jinchengda/references/contract-action-card-template.html +11 -6
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +5 -4
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +38 -12
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +20 -6
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +8 -3
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +56 -13
- package/skills/weaver-e10-jinchengda/references/contract-clause-recommender.md +7 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +11 -5
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +38 -7
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +13 -25
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +9 -8
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +8 -6
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +10 -7
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +3 -1
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +26 -18
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +18 -13
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +5 -3
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +105 -49
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +3 -6
- package/skills/weaver-e10-meeting/SKILL.md +48 -9
- package/skills/weaver-e10-qiyecheng/SKILL.md +16 -7
- package/skills/weaver-e10-qiyecheng/references/budget.md +77 -3
- package/skills/weaver-e10-qiyecheng/references/catalog.md +6 -4
- package/skills/weaver-e10-qiyecheng/references/getEnabledTemplate-api.md +255 -0
- package/skills/weaver-e10-qiyecheng/references/source-manifest.json +70 -25
- package/skills/weaver-e10-workflow/SKILL.md +54 -40
- package/skills/weaver-e10-workflow/references/todo-dialogue.md +134 -0
- package/skills/weaver-e10-workflow/references/todo-smart-convert.md +102 -80
- package/skills/weaver-e10-workflow/references/workflow-agent-entry.md +23 -13
- package/skills/weaver-e10-workflow/references/workflow-query.md +68 -46
- package/skills/weaver-e10-workflow/references/workflow-view.md +21 -13
- package/skills/weaver-e10-workflow/tools/todo-summary.cjs +317 -332
- package/dist/shortcuts/contract/ooxml/docx.js +0 -295
- package/dist/shortcuts/contract/operations/docx-fillfromquote.js +0 -532
- package/skills/weaver-e10-jinchengda/references/contract-risk-report-template.html +0 -178
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +0 -1270
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +0 -998
- package/skills/weaver-e10-workflow/tools/todo-serve.cjs +0 -327
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
2
|
+
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
writeDocxEntries
|
|
5
|
+
} from "./chunk-WMRNO6IU.js";
|
|
6
|
+
import "./chunk-BUSC6UAE.js";
|
|
7
|
+
|
|
8
|
+
// src/shortcuts/meeting/minute-doc.ts
|
|
9
|
+
function esc(text) {
|
|
10
|
+
return String(text ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
11
|
+
}
|
|
12
|
+
function para(text, options = {}) {
|
|
13
|
+
const props = [
|
|
14
|
+
options.bold ? "<w:b/>" : "",
|
|
15
|
+
options.size ? `<w:sz w:val="${options.size}"/><w:szCs w:val="${options.size}"/>` : "",
|
|
16
|
+
options.align ? `<w:jc w:val="${options.align}"/>` : ""
|
|
17
|
+
].join("");
|
|
18
|
+
return `<w:p><w:pPr>${props}</w:pPr><w:r><w:t xml:space="preserve">${esc(text)}</w:t></w:r></w:p>`;
|
|
19
|
+
}
|
|
20
|
+
var CONTENT_TYPES = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
21
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
|
|
22
|
+
<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
|
|
23
|
+
<Default Extension="xml" ContentType="application/xml"/>
|
|
24
|
+
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
|
|
25
|
+
</Types>`;
|
|
26
|
+
var RELS = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
27
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
|
28
|
+
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
29
|
+
</Relationships>`;
|
|
30
|
+
function buildMinuteDocx(input) {
|
|
31
|
+
const body = [];
|
|
32
|
+
body.push(para(input.title, { bold: true, size: 36, align: "center" }));
|
|
33
|
+
for (const line of input.meta) {
|
|
34
|
+
if (String(line).trim() !== "") body.push(para(line, { size: 21 }));
|
|
35
|
+
}
|
|
36
|
+
body.push(para("", { size: 21 }));
|
|
37
|
+
for (const raw of String(input.content ?? "").split(/\r?\n/)) {
|
|
38
|
+
const line = raw.replace(/\s+$/, "");
|
|
39
|
+
if (line.trim() === "") {
|
|
40
|
+
body.push(para("", { size: 21 }));
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const heading = line.match(/^#{1,4}\s+(.*)$/);
|
|
44
|
+
if (heading) {
|
|
45
|
+
body.push(para(heading[1], { bold: true, size: 28 }));
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
body.push(para(line.replace(/^[-*]\s+/, "\xB7 "), { size: 21 }));
|
|
49
|
+
}
|
|
50
|
+
const documentXml = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
51
|
+
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
|
|
52
|
+
<w:body>${body.join("")}<w:sectPr><w:pgSz w:w="11906" w:h="16838"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440"/></w:sectPr></w:body>
|
|
53
|
+
</w:document>`;
|
|
54
|
+
const entries = [
|
|
55
|
+
{ name: "[Content_Types].xml", data: Buffer.from(CONTENT_TYPES, "utf8") },
|
|
56
|
+
{ name: "_rels/.rels", data: Buffer.from(RELS, "utf8") },
|
|
57
|
+
{ name: "word/document.xml", data: Buffer.from(documentXml, "utf8") }
|
|
58
|
+
];
|
|
59
|
+
return writeDocxEntries(entries);
|
|
60
|
+
}
|
|
61
|
+
function safeDocxName(subject) {
|
|
62
|
+
return String(subject ?? "").replace(/[\\/:*?"<>|]+/g, "-").replace(/\s+/g, " ").trim().slice(0, 80) || "\u4F1A\u8BAE\u7EAA\u8981";
|
|
63
|
+
}
|
|
64
|
+
async function ensureMinuteDoc(env, input) {
|
|
65
|
+
const id = String(input.id ?? "").trim();
|
|
66
|
+
const mtId = String(input.mtId ?? "").trim();
|
|
67
|
+
if (!id || !mtId) return null;
|
|
68
|
+
const { getMeetingOperation } = await import("./registry-LITYOH2W.js");
|
|
69
|
+
const { meetingStateDir } = await import("./env-BVVFIN4P.js");
|
|
70
|
+
const { mkdir, writeFile } = await import("node:fs/promises");
|
|
71
|
+
const { join } = await import("node:path");
|
|
72
|
+
const subject = String(input.subject ?? "").trim() || `\u4F1A\u8BAE\u7EAA\u8981-${mtId}`;
|
|
73
|
+
const fileName = safeDocxName(subject);
|
|
74
|
+
const buf = buildMinuteDocx({
|
|
75
|
+
title: subject,
|
|
76
|
+
meta: [`\u4F1A\u8BAE id\uFF1A${mtId}`],
|
|
77
|
+
content: String(input.content ?? "")
|
|
78
|
+
});
|
|
79
|
+
const dir = join(meetingStateDir(env.ctx), "minute-docs");
|
|
80
|
+
await mkdir(dir, { recursive: true });
|
|
81
|
+
const filePath = join(dir, `${id}.docx`);
|
|
82
|
+
await writeFile(filePath, buf);
|
|
83
|
+
const upload = await getMeetingOperation("meeting.attachment.upload").handler(
|
|
84
|
+
{ file: filePath, name: `${fileName}.docx`, module: "meeting", refId: mtId },
|
|
85
|
+
env
|
|
86
|
+
);
|
|
87
|
+
const fileId = String(upload?.data?.fileId ?? "").trim();
|
|
88
|
+
if (!fileId) return null;
|
|
89
|
+
let docId = "";
|
|
90
|
+
let docError = "";
|
|
91
|
+
try {
|
|
92
|
+
const { executeCaizhilianOperation } = await import("./operations-ZPWBMYKE.js");
|
|
93
|
+
const { createCaizhilianHost } = await import("./host-TTSGY5NZ.js");
|
|
94
|
+
const { createCaizhilianContinuationSigner } = await import("./continuation-GW6PRWK3.js");
|
|
95
|
+
const caizhilianEnv = {
|
|
96
|
+
ctx: env.ctx,
|
|
97
|
+
host: createCaizhilianHost(env.ctx),
|
|
98
|
+
continuation: createCaizhilianContinuationSigner(env.ctx)
|
|
99
|
+
};
|
|
100
|
+
const session = await env.host.getSession();
|
|
101
|
+
const base = {
|
|
102
|
+
file_path: (await import("node:path")).win32.normalize(filePath),
|
|
103
|
+
name: fileName,
|
|
104
|
+
folder_id: "300",
|
|
105
|
+
folder_type: "company",
|
|
106
|
+
author_id: String(session?.userId ?? "").trim()
|
|
107
|
+
};
|
|
108
|
+
const preparedDoc = await executeCaizhilianOperation(
|
|
109
|
+
"caizhilian.document.create-office.prepare",
|
|
110
|
+
base,
|
|
111
|
+
caizhilianEnv
|
|
112
|
+
);
|
|
113
|
+
const continuation = String(preparedDoc?.data?.continuation ?? "");
|
|
114
|
+
if (continuation) {
|
|
115
|
+
const appliedDoc = await executeCaizhilianOperation(
|
|
116
|
+
"caizhilian.document.create-office.apply",
|
|
117
|
+
{ ...base, continuation, confirm: true },
|
|
118
|
+
caizhilianEnv
|
|
119
|
+
);
|
|
120
|
+
docId = String(appliedDoc?.data?.doc_id ?? "").trim();
|
|
121
|
+
}
|
|
122
|
+
} catch (error) {
|
|
123
|
+
docId = "";
|
|
124
|
+
docError = String(error?.message ?? error).slice(0, 160);
|
|
125
|
+
}
|
|
126
|
+
const prepared = await getMeetingOperation("meeting.eb.minute.update.prepare").handler(
|
|
127
|
+
{
|
|
128
|
+
id,
|
|
129
|
+
mt_id: mtId,
|
|
130
|
+
doc_file: fileId,
|
|
131
|
+
...docId ? { mt_minutes: JSON.stringify([{ id: docId, name: `${fileName}.docx` }]) } : {},
|
|
132
|
+
file_type: "0",
|
|
133
|
+
minutes_status: "2"
|
|
134
|
+
},
|
|
135
|
+
env
|
|
136
|
+
);
|
|
137
|
+
await getMeetingOperation("meeting.eb.minute.update.apply").handler(
|
|
138
|
+
{ confirm: true, continuation: prepared?.data?.continuation },
|
|
139
|
+
env
|
|
140
|
+
);
|
|
141
|
+
const detail = await getMeetingOperation("meeting.eb.minute.detail").handler({ id }, env);
|
|
142
|
+
const row = detail?.data?.data ?? {};
|
|
143
|
+
return {
|
|
144
|
+
fileId,
|
|
145
|
+
docId,
|
|
146
|
+
...docError ? { docError } : {},
|
|
147
|
+
name: `${fileName}.docx`,
|
|
148
|
+
size: buf.length,
|
|
149
|
+
attached: String(row.doc_file ?? "") === fileId && (docId === "" || String(row.mt_minutes ?? "").includes(docId))
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export {
|
|
153
|
+
buildMinuteDocx,
|
|
154
|
+
ensureMinuteDoc,
|
|
155
|
+
safeDocxName
|
|
156
|
+
};
|
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
createE10RequestRuntime,
|
|
13
13
|
isE10SessionExpiredResponse,
|
|
14
14
|
requireE10Session
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WVH5ESDA.js";
|
|
16
16
|
import {
|
|
17
17
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
18
18
|
getActiveProfile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SFM3M2L3.js";
|
|
20
|
+
import "./chunk-SHYQUBY3.js";
|
|
20
21
|
import {
|
|
21
22
|
CliError,
|
|
22
23
|
isCliError,
|
|
@@ -2,12 +2,13 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
executeCaizhilianOperation
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-WMB3SMXI.js";
|
|
6
|
+
import "./chunk-VMCCRWFO.js";
|
|
7
7
|
import "./chunk-P5GQRWDC.js";
|
|
8
8
|
import "./chunk-7BDPM5ST.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-WVH5ESDA.js";
|
|
10
|
+
import "./chunk-SFM3M2L3.js";
|
|
11
|
+
import "./chunk-SHYQUBY3.js";
|
|
11
12
|
import "./chunk-UG5G54VL.js";
|
|
12
13
|
import "./chunk-BUSC6UAE.js";
|
|
13
14
|
export {
|
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
createE10RequestRuntime,
|
|
13
13
|
isE10SessionExpiredResponse,
|
|
14
14
|
requireE10Session
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WVH5ESDA.js";
|
|
16
16
|
import {
|
|
17
17
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
18
18
|
getActiveProfile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SFM3M2L3.js";
|
|
20
|
+
import "./chunk-SHYQUBY3.js";
|
|
20
21
|
import {
|
|
21
22
|
CliError,
|
|
22
23
|
isCliError,
|
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WVH5ESDA.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
17
17
|
getActiveProfile
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SFM3M2L3.js";
|
|
19
|
+
import "./chunk-SHYQUBY3.js";
|
|
19
20
|
import {
|
|
20
21
|
CliError,
|
|
21
22
|
isCliError,
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
E10ApiError,
|
|
8
8
|
createE10RequestRuntime,
|
|
9
9
|
getE10Session
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-WVH5ESDA.js";
|
|
11
|
+
import "./chunk-SFM3M2L3.js";
|
|
12
|
+
import "./chunk-SHYQUBY3.js";
|
|
12
13
|
import {
|
|
13
14
|
CliError,
|
|
14
15
|
isCliError,
|
|
@@ -12,11 +12,12 @@ import {
|
|
|
12
12
|
createE10RequestRuntime,
|
|
13
13
|
isE10SessionExpiredResponse,
|
|
14
14
|
requireE10Session
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WVH5ESDA.js";
|
|
16
16
|
import {
|
|
17
17
|
E10_SESSION_EXPIRED_MESSAGE,
|
|
18
18
|
getActiveProfile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SFM3M2L3.js";
|
|
20
|
+
import "./chunk-SHYQUBY3.js";
|
|
20
21
|
import {
|
|
21
22
|
CliError,
|
|
22
23
|
isCliError,
|
|
@@ -4,13 +4,14 @@ import {
|
|
|
4
4
|
getWorkflowOperation,
|
|
5
5
|
hasWorkflowOperation,
|
|
6
6
|
workflowOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-44KJ7WFA.js";
|
|
8
8
|
import "./chunk-HP7JIYMT.js";
|
|
9
9
|
import "./chunk-WRXSAVKO.js";
|
|
10
10
|
import "./chunk-2IGZUMNG.js";
|
|
11
11
|
import "./chunk-AJ62BGAW.js";
|
|
12
12
|
import "./chunk-7BDPM5ST.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-SFM3M2L3.js";
|
|
14
|
+
import "./chunk-SHYQUBY3.js";
|
|
14
15
|
import "./chunk-UG5G54VL.js";
|
|
15
16
|
import "./chunk-BUSC6UAE.js";
|
|
16
17
|
export {
|
|
@@ -4,17 +4,19 @@ 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-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-WHJIUKJW.js";
|
|
8
|
+
import "./chunk-6MS3RLPO.js";
|
|
9
|
+
import "./chunk-WMRNO6IU.js";
|
|
10
|
+
import "./chunk-TJUAGZU7.js";
|
|
11
|
+
import "./chunk-7EBV7Q3R.js";
|
|
12
|
+
import "./chunk-XU3FL3AW.js";
|
|
13
|
+
import "./chunk-FDAJC7R4.js";
|
|
14
|
+
import "./chunk-UI66EMOR.js";
|
|
15
|
+
import "./chunk-AHJZIMCX.js";
|
|
16
|
+
import "./chunk-L2LMBFG5.js";
|
|
17
|
+
import "./chunk-6DVL5IN5.js";
|
|
17
18
|
import "./chunk-7BDPM5ST.js";
|
|
19
|
+
import "./chunk-SHYQUBY3.js";
|
|
18
20
|
import "./chunk-UG5G54VL.js";
|
|
19
21
|
import "./chunk-BUSC6UAE.js";
|
|
20
22
|
export {
|
|
@@ -4,12 +4,13 @@ import {
|
|
|
4
4
|
esbOperationDefinitions,
|
|
5
5
|
getEsbOperation,
|
|
6
6
|
hasEsbOperation
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-PH7N4UFT.js";
|
|
8
|
+
import "./chunk-CQ4OVCKG.js";
|
|
9
9
|
import "./chunk-TXUG266F.js";
|
|
10
10
|
import "./chunk-7BDPM5ST.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-WVH5ESDA.js";
|
|
12
|
+
import "./chunk-SFM3M2L3.js";
|
|
13
|
+
import "./chunk-SHYQUBY3.js";
|
|
13
14
|
import "./chunk-UG5G54VL.js";
|
|
14
15
|
import "./chunk-BUSC6UAE.js";
|
|
15
16
|
export {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
loadRooms,
|
|
8
8
|
recommendRooms,
|
|
9
9
|
rememberFrequentRoom
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-UI66EMOR.js";
|
|
11
|
+
import "./chunk-AHJZIMCX.js";
|
|
12
|
+
import "./chunk-L2LMBFG5.js";
|
|
13
|
+
import "./chunk-6DVL5IN5.js";
|
|
14
14
|
import "./chunk-7BDPM5ST.js";
|
|
15
15
|
import "./chunk-UG5G54VL.js";
|
|
16
16
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resolveMeetingScheduleTypeIds,
|
|
9
9
|
resolveMemberIdsByName,
|
|
10
10
|
runScheduleConflictFlow
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-FDAJC7R4.js";
|
|
12
|
+
import "./chunk-AHJZIMCX.js";
|
|
13
|
+
import "./chunk-L2LMBFG5.js";
|
|
14
|
+
import "./chunk-6DVL5IN5.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -15,10 +15,11 @@ import {
|
|
|
15
15
|
createE10RequestRuntime,
|
|
16
16
|
isE10SessionExpiredResponse,
|
|
17
17
|
requireE10Session
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WVH5ESDA.js";
|
|
19
19
|
import {
|
|
20
20
|
getActiveProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SFM3M2L3.js";
|
|
22
|
+
import "./chunk-SHYQUBY3.js";
|
|
22
23
|
import {
|
|
23
24
|
CliError,
|
|
24
25
|
isCliError,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
validateRuleFile,
|
|
15
15
|
workflowOperationDefinitions,
|
|
16
16
|
workflowSuccess
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-44KJ7WFA.js";
|
|
18
18
|
import {
|
|
19
19
|
createWorkflowHost
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TGM7BWEH.js";
|
|
21
21
|
import {
|
|
22
22
|
createWorkflowContinuationSigner
|
|
23
23
|
} from "./chunk-HP7JIYMT.js";
|
|
@@ -32,8 +32,9 @@ import {
|
|
|
32
32
|
reportPlatformError
|
|
33
33
|
} from "./chunk-6N4JPNFL.js";
|
|
34
34
|
import "./chunk-7BDPM5ST.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-WVH5ESDA.js";
|
|
36
|
+
import "./chunk-SFM3M2L3.js";
|
|
37
|
+
import "./chunk-SHYQUBY3.js";
|
|
37
38
|
import {
|
|
38
39
|
isCliError,
|
|
39
40
|
toErrorEnvelope
|
package/dist/index.js
CHANGED
|
@@ -7,13 +7,14 @@ import {
|
|
|
7
7
|
firstPositionalToken,
|
|
8
8
|
registerCommands,
|
|
9
9
|
toCommandMetadata
|
|
10
|
-
} from "./chunks/chunk-
|
|
10
|
+
} from "./chunks/chunk-DVR2EDUU.js";
|
|
11
11
|
import "./chunks/chunk-2IGZUMNG.js";
|
|
12
|
-
import "./chunks/chunk-
|
|
12
|
+
import "./chunks/chunk-FMNCSYIG.js";
|
|
13
13
|
import "./chunks/chunk-AJ62BGAW.js";
|
|
14
14
|
import "./chunks/chunk-6N4JPNFL.js";
|
|
15
|
-
import "./chunks/chunk-
|
|
16
|
-
import "./chunks/chunk-
|
|
15
|
+
import "./chunks/chunk-WVH5ESDA.js";
|
|
16
|
+
import "./chunks/chunk-SFM3M2L3.js";
|
|
17
|
+
import "./chunks/chunk-SHYQUBY3.js";
|
|
17
18
|
import "./chunks/chunk-UG5G54VL.js";
|
|
18
19
|
import "./chunks/chunk-BUSC6UAE.js";
|
|
19
20
|
|
|
@@ -30,7 +31,7 @@ function lazyShortcut(definition) {
|
|
|
30
31
|
placeholder.allowExcessArguments(true);
|
|
31
32
|
placeholder.helpOption(false);
|
|
32
33
|
placeholder.action(async () => {
|
|
33
|
-
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-
|
|
34
|
+
const { dispatchLazyShortcut } = await import("./chunks/lazy-dispatch-JHGFCKJN.js");
|
|
34
35
|
await dispatchLazyShortcut(definition, shortcutMetadata());
|
|
35
36
|
});
|
|
36
37
|
}
|
|
@@ -40,137 +41,137 @@ var builtinShortcuts = [
|
|
|
40
41
|
lazyShortcut({
|
|
41
42
|
name: "invoice",
|
|
42
43
|
description: "E10 \u4E1A\u7968\u901A\u53D1\u7968\u7BA1\u7406 CLI",
|
|
43
|
-
load: async () => (await import("./chunks/invoice-
|
|
44
|
+
load: async () => (await import("./chunks/invoice-V6KD4TZE.js")).invoiceShortcut
|
|
44
45
|
}),
|
|
45
46
|
lazyShortcut({
|
|
46
47
|
name: "ehr",
|
|
47
48
|
description: "\u6CDB\u5FAEE10\u805A\u624D\u6797\uFF08\u4EBA\u4E8B/\u51FA\u52E4/\u85AA\u916C\uFF09CLI",
|
|
48
|
-
load: async () => (await import("./chunks/ehr-
|
|
49
|
+
load: async () => (await import("./chunks/ehr-52GBKNJR.js")).ehrShortcut
|
|
49
50
|
}),
|
|
50
51
|
lazyShortcut({
|
|
51
52
|
name: "recruit-stage",
|
|
52
53
|
description: "\u6CDB\u5FAEE10\u62DB\u8058\u52A9\u624B\uFF08JD\u751F\u6210/\u7B80\u5386\u5EFA\u6863/AI\u9762\u8BD5\u9080\u7EA6\uFF09CLI",
|
|
53
|
-
load: async () => (await import("./chunks/recruit-stage-
|
|
54
|
+
load: async () => (await import("./chunks/recruit-stage-USTTRHOX.js")).recruitStageShortcut
|
|
54
55
|
}),
|
|
55
56
|
lazyShortcut({
|
|
56
57
|
name: "cowork",
|
|
57
58
|
description: "\u6CDB\u5FAEE10\u534F\u4F5C\u533A\uFF08\u534F\u4F5C\u4E8B\u9879/\u8BA8\u8BBA/\u5BA1\u6279/\u5171\u4EAB\u6743\u9650\uFF09CLI",
|
|
58
|
-
load: async () => (await import("./chunks/cowork-
|
|
59
|
+
load: async () => (await import("./chunks/cowork-2RDFBZWB.js")).coworkShortcut
|
|
59
60
|
}),
|
|
60
61
|
lazyShortcut({
|
|
61
62
|
name: "archive",
|
|
62
63
|
description: "E10 \u6587\u4E66\u5B9A\u6863\u6848\u7BA1\u7406 CLI",
|
|
63
|
-
load: async () => (await import("./chunks/archive-
|
|
64
|
+
load: async () => (await import("./chunks/archive-4SQAVTIB.js")).archiveShortcut
|
|
64
65
|
}),
|
|
65
66
|
lazyShortcut({
|
|
66
67
|
name: "archive-oa",
|
|
67
68
|
description: "E10 \u6863\u6848\u5B9A\u4F4D\u4E0E OA \u5546\u52A1\u5408\u540C\u501F\u9605 CLI",
|
|
68
|
-
load: async () => (await import("./chunks/archive-oa-
|
|
69
|
+
load: async () => (await import("./chunks/archive-oa-W2UEJ67L.js")).archiveOaShortcut
|
|
69
70
|
}),
|
|
70
71
|
lazyShortcut({
|
|
71
72
|
name: "calendar",
|
|
72
73
|
description: "\u6CDB\u5FAEE10\u65E5\u7A0B\u7BA1\u7406 CLI\uFF08\u521B\u5EFA/\u67E5\u8BE2/\u66F4\u65B0/\u5220\u9664/\u5B57\u5178\uFF09",
|
|
73
|
-
load: async () => (await import("./chunks/calendar-
|
|
74
|
+
load: async () => (await import("./chunks/calendar-H4QTJCUY.js")).calendarShortcut
|
|
74
75
|
}),
|
|
75
76
|
lazyShortcut({
|
|
76
77
|
name: "fna",
|
|
77
78
|
description: "\u6CDB\u5FAEE10\u9F50\u4E1A\u6210\u8D39\u63A7\u4E2D\u5FC3\uFF08\u9884\u7B97/\u8D39\u7528\u4E2D\u5FC3/\u501F\u6B3E\u7BA1\u7406/\u53D1\u7968\u6838\u9500\uFF09CLI",
|
|
78
|
-
load: async () => (await import("./chunks/fna-
|
|
79
|
+
load: async () => (await import("./chunks/fna-OBACRT3J.js")).fnaShortcut
|
|
79
80
|
}),
|
|
80
81
|
lazyShortcut({
|
|
81
82
|
name: "hrm",
|
|
82
83
|
description: "\u6CDB\u5FAEE10\u7EC4\u7EC7\u7BA1\u7406\uFF08\u5458\u5DE5/\u7EC4\u7EC7/\u5C97\u4F4D\u67E5\u8BE2\uFF09CLI",
|
|
83
|
-
load: async () => (await import("./chunks/hrm-
|
|
84
|
+
load: async () => (await import("./chunks/hrm-AK3WGBMN.js")).hrmShortcut
|
|
84
85
|
}),
|
|
85
86
|
lazyShortcut({
|
|
86
87
|
name: "mail",
|
|
87
88
|
description: "\u6CDB\u5FAEE10\u90AE\u4EF6\u7BA1\u7406 CLI",
|
|
88
|
-
load: async () => (await import("./chunks/mail-
|
|
89
|
+
load: async () => (await import("./chunks/mail-IKVCQCVZ.js")).mailShortcut
|
|
89
90
|
}),
|
|
90
91
|
lazyShortcut({
|
|
91
92
|
name: "meeting",
|
|
92
93
|
description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
|
|
93
|
-
load: async () => (await import("./chunks/meeting-
|
|
94
|
+
load: async () => (await import("./chunks/meeting-JOHV4RH3.js")).meetingShortcut
|
|
94
95
|
}),
|
|
95
96
|
lazyShortcut({
|
|
96
97
|
name: "okr",
|
|
97
98
|
description: "\u6CDB\u5FAEE10 OKR \u76EE\u6807\u7BA1\u7406 CLI\uFF08\u76EE\u6807\u67E5\u8BE2/\u65B0\u5EFA/\u7F16\u8F91\u3001\u5173\u952E\u6210\u679C\u3001\u76EE\u6807\u5BF9\u9F50\u3001\u8BC4\u8BBA\uFF09",
|
|
98
|
-
load: async () => (await import("./chunks/okr-
|
|
99
|
+
load: async () => (await import("./chunks/okr-KV43FPPX.js")).okrShortcut
|
|
99
100
|
}),
|
|
100
101
|
lazyShortcut({
|
|
101
102
|
name: "plan",
|
|
102
103
|
description: "\u6CDB\u5FAEE10\u8BA1\u5212\u62A5\u544A CLI\uFF08\u67E5\u8BE2/\u65B0\u5EFA/\u4FEE\u6539/\u53D1\u5E03/\u64A4\u56DE/\u63D0\u4EA4\u63D0\u9192/\u8BC4\u8BBA\uFF09",
|
|
103
|
-
load: async () => (await import("./chunks/plan-
|
|
104
|
+
load: async () => (await import("./chunks/plan-WOYR4WEG.js")).planShortcut
|
|
104
105
|
}),
|
|
105
106
|
lazyShortcut({
|
|
106
107
|
name: "esb",
|
|
107
108
|
description: "\u6CDB\u5FAEE10 ESB \u4E2D\u5FC3\u81EA\u5B9A\u4E49\u89E6\u53D1\u52A8\u4F5C\u6D41 CLI",
|
|
108
|
-
load: async () => (await import("./chunks/esb-
|
|
109
|
+
load: async () => (await import("./chunks/esb-HJSXCEOM.js")).esbShortcut
|
|
109
110
|
}),
|
|
110
111
|
lazyShortcut({
|
|
111
112
|
name: "ebuilder-form",
|
|
112
113
|
description: "\u6CDB\u5FAEE10 eBuilder \u8868\u5355\u83DC\u5355\u3001\u5217\u8868\u548C\u8868\u5355\u6570\u636E CLI",
|
|
113
|
-
load: async () => (await import("./chunks/ebuilder-form-
|
|
114
|
+
load: async () => (await import("./chunks/ebuilder-form-TWSXS5NA.js")).ebuilderFormShortcut
|
|
114
115
|
}),
|
|
115
116
|
lazyShortcut({
|
|
116
117
|
name: "jiuchuanhui",
|
|
117
118
|
description: "\u6CDB\u5FAEE10\u4E5D\u6C1A\u6C47\u8425\u9500\u7BA1\u7406 CLI\uFF08\u5BA2\u6237/\u8054\u7CFB\u4EBA/\u5546\u673A/\u7EBF\u7D22/\u8054\u7CFB\u8BA1\u5212/\u516C\u6D77\uFF09",
|
|
118
|
-
load: async () => (await import("./chunks/jiuchuanhui-
|
|
119
|
+
load: async () => (await import("./chunks/jiuchuanhui-K4EQU6GK.js")).jiuchuanhuiShortcut
|
|
119
120
|
}),
|
|
120
121
|
lazyShortcut({
|
|
121
122
|
name: "asset",
|
|
122
123
|
description: "E10 \u8D44\u4EA7\u7BA1\u7406\uFF08\u8D44\u7BA1\u5BB6\uFF09CLI",
|
|
123
|
-
load: async () => (await import("./chunks/asset-
|
|
124
|
+
load: async () => (await import("./chunks/asset-EGZEABBI.js")).assetShortcut
|
|
124
125
|
}),
|
|
125
126
|
lazyShortcut({
|
|
126
127
|
name: "asset-idle",
|
|
127
128
|
description: "E10 \u95F2\u7F6E\u8D44\u4EA7\u5224\u5B9A\u7ED3\u679C\u67E5\u8BE2 CLI\uFF08\u5206\u9875\u83B7\u53D6/\u805A\u5408\u7EDF\u8BA1\uFF09",
|
|
128
|
-
load: async () => (await import("./chunks/asset-idle-
|
|
129
|
+
load: async () => (await import("./chunks/asset-idle-EBUZBB6M.js")).assetIdleShortcut
|
|
129
130
|
}),
|
|
130
131
|
lazyShortcut({
|
|
131
132
|
name: "im",
|
|
132
133
|
description: "\u6CDB\u5FAEE10\u6613\u79D2\u529E\uFF08\u5373\u65F6\u901A\u8BAF\uFF09CLI",
|
|
133
|
-
load: async () => (await import("./chunks/im-
|
|
134
|
+
load: async () => (await import("./chunks/im-JZSBPO4Z.js")).imShortcut
|
|
134
135
|
}),
|
|
135
136
|
lazyShortcut({
|
|
136
137
|
name: "project",
|
|
137
138
|
description: "\u6CDB\u5FAEE10\u4E8B\u4E95\u7136\u9879\u76EE\u7BA1\u7406 CLI\uFF08\u9879\u76EE/\u4EFB\u52A1\u67E5\u8BE2\u4E0E\u786E\u8BA4\u5199\u5165\uFF09",
|
|
138
|
-
load: async () => (await import("./chunks/project-
|
|
139
|
+
load: async () => (await import("./chunks/project-CQJKBUIL.js")).projectShortcut
|
|
139
140
|
}),
|
|
140
141
|
lazyShortcut({
|
|
141
142
|
name: "workflow",
|
|
142
143
|
description: "\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B CLI\uFF08\u67E5\u8BE2/\u67E5\u770B/\u64CD\u4F5C/\u6279\u91CF/\u53D1\u8D77/\u4FEE\u6539\uFF09",
|
|
143
|
-
load: async () => (await import("./chunks/workflow-
|
|
144
|
+
load: async () => (await import("./chunks/workflow-WMPW3WSB.js")).workflowShortcut
|
|
144
145
|
}),
|
|
145
146
|
lazyShortcut({
|
|
146
147
|
name: "blog",
|
|
147
148
|
description: "\u6CDB\u5FAEE10\u5DE5\u4F5C\u65E5\u62A5 CLI\uFF08\u67E5\u8BE2/\u53D1\u5E03/\u7F16\u8F91/\u8BC4\u8BBA/\u70B9\u8D5E/\u63D0\u9192/\u5BFC\u51FA\uFF09",
|
|
148
|
-
load: async () => (await import("./chunks/blog-
|
|
149
|
+
load: async () => (await import("./chunks/blog-2YKMWOWI.js")).blogShortcut
|
|
149
150
|
}),
|
|
150
151
|
lazyShortcut({
|
|
151
152
|
name: "caizhilian",
|
|
152
153
|
description: "\u6CDB\u5FAEE10\u91C7\u77E5\u8FDE\uFF08\u6587\u6863\u4E2D\u5FC3\uFF09CLI",
|
|
153
|
-
load: async () => (await import("./chunks/caizhilian-
|
|
154
|
+
load: async () => (await import("./chunks/caizhilian-QJ4FLSQJ.js")).caizhilianShortcut
|
|
154
155
|
}),
|
|
155
156
|
lazyShortcut({
|
|
156
157
|
name: "contract",
|
|
157
158
|
description: "\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406 CLI",
|
|
158
|
-
load: async () => (await import("./chunks/contract-
|
|
159
|
+
load: async () => (await import("./chunks/contract-LLRKMLQQ.js")).contractShortcut
|
|
159
160
|
}),
|
|
160
161
|
lazyShortcut({
|
|
161
162
|
name: "reception",
|
|
162
163
|
description: "\u6CDB\u5FAE\u5BA2\u6237\u53C2\u89C2\u63A5\u5F85\u6D41\u7A0B CLI\uFF08\u9762\u677F/\u884C\u7A0B\u5355\u4E0E\u5185\u90E8\u65B9\u6848/\u586B\u5355\u9875\u9884\u586B\uFF09",
|
|
163
|
-
load: async () => (await import("./chunks/reception-
|
|
164
|
+
load: async () => (await import("./chunks/reception-MPBU3JXC.js")).receptionShortcut
|
|
164
165
|
}),
|
|
165
166
|
lazyShortcut({
|
|
166
167
|
name: "smart-extract",
|
|
167
168
|
description: "\u6CDB\u5FAEE10\u667A\u80FD\u62BD\u53D6 CLI\uFF08\u8868\u5355\u7ED3\u6784 / \u9644\u4EF6\u6B63\u6587 / \u6821\u9A8C\u5E76\u843D\u5E93\uFF0C\u8FD4\u56DE aiExtraId\uFF09",
|
|
168
|
-
load: async () => (await import("./chunks/smart-extract-
|
|
169
|
+
load: async () => (await import("./chunks/smart-extract-APX2PNIN.js")).smartExtractShortcut
|
|
169
170
|
}),
|
|
170
171
|
lazyShortcut({
|
|
171
172
|
name: "data",
|
|
172
173
|
description: "\u6CDB\u5FAEE10\u6570\u636E\u52A9\u624B CLI\uFF08\u6570\u636E\u6E90\u67E5\u8BE2 / \u914D\u7F6E\u4E2D\u5FC3 / \u573A\u666F\u5B9A\u4F4D\uFF09",
|
|
173
|
-
load: async () => (await import("./chunks/data-
|
|
174
|
+
load: async () => (await import("./chunks/data-WVICO3DT.js")).dataShortcut
|
|
174
175
|
})
|
|
175
176
|
];
|
|
176
177
|
function shortcutMetadata() {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主 key 识别(leaf 模块,不依赖 session / xiaoe,避免循环导入)。
|
|
3
|
+
*
|
|
4
|
+
* 这里只产出 `agents.json` 的分区 key,**不等同于** `agentType`:
|
|
5
|
+
* - 宿主 key:小写、协议安全,如 `xiaoe` / `workbuddy` / `doubao` / `qwen`
|
|
6
|
+
* - agentType:业务请求头与 OAuth 授权参数用,如 `XiaoE` / `workbuddy`
|
|
7
|
+
*
|
|
8
|
+
* 关键约束:**不能用 `resolveAgentType()` 的返回值当 key**。它的 fallback 是
|
|
9
|
+
* `weaver-work-cli`,会让「终端手工执行」也写出一条宿主记录,污染分区。
|
|
10
|
+
*/
|
|
11
|
+
function hasEnvPrefix(env, prefix) {
|
|
12
|
+
return Object.keys(env).some((key) => key === prefix || key.startsWith(`${prefix}_`));
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 宿主探测表,顺序即优先级。
|
|
16
|
+
*
|
|
17
|
+
* - XiaoE 必须最优先:网页端沙箱里 `XIAOE_*` 可能与其他框架变量并存。
|
|
18
|
+
* - 豆包办公注入 `DOUBAO_OFFICE_*`(`DOUBAO_OFFICE_AGENT_NAME=doubao_moa` 最稳定),
|
|
19
|
+
* 只检查存在性,不读取值——值可能随版本变化。
|
|
20
|
+
* - 千问(QwenWork)注入 `QWENWORK_*`,注意不是 `QWEN_*`,二者都要认。
|
|
21
|
+
* - 对方平台的变量属保留前缀,本 CLI 只读不写,自有变量统一用 `WEAVER_*`。
|
|
22
|
+
*/
|
|
23
|
+
const AGENT_HOST_PREFIXES = [
|
|
24
|
+
{ key: 'xiaoe', prefixes: ['XIAOE', 'WEAVER_XIAOE'] },
|
|
25
|
+
{ key: 'workbuddy', prefixes: ['WORKBUDDY'] },
|
|
26
|
+
{ key: 'codex', prefixes: ['CODEX'] },
|
|
27
|
+
{ key: 'doubao', prefixes: ['DOUBAO_OFFICE', 'DOUBAO'] },
|
|
28
|
+
{ key: 'qwen', prefixes: ['QWENWORK', 'QWEN'] },
|
|
29
|
+
];
|
|
30
|
+
/** 无任何宿主标识时的分区,表示终端/未知宿主。 */
|
|
31
|
+
export const DEFAULT_AGENT_HOST_KEY = 'default';
|
|
32
|
+
export function normalizeAgentHostKey(value) {
|
|
33
|
+
return value.trim().toLowerCase().replace(/[^a-z0-9]+/gu, '');
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 把显式 `--agent_type` 归一化到已有分区。
|
|
37
|
+
*
|
|
38
|
+
* `doubao_moa`、`Doubao-Office` 这类写法应落到 `doubao`,不要新建 `doubaomoa` 分区,
|
|
39
|
+
* 否则同一个宿主会因为传参写法不同而被拆成多份记录。
|
|
40
|
+
*/
|
|
41
|
+
function normalizeExplicitAgentHostKey(value) {
|
|
42
|
+
const normalized = normalizeAgentHostKey(value);
|
|
43
|
+
if (!normalized)
|
|
44
|
+
return '';
|
|
45
|
+
for (const { key, prefixes } of AGENT_HOST_PREFIXES) {
|
|
46
|
+
if (normalized === normalizeAgentHostKey(key))
|
|
47
|
+
return key;
|
|
48
|
+
if (prefixes.some((prefix) => normalized.startsWith(normalizeAgentHostKey(prefix))))
|
|
49
|
+
return key;
|
|
50
|
+
}
|
|
51
|
+
return normalized;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 解析当前进程所属的宿主 key。
|
|
55
|
+
*
|
|
56
|
+
* @param env 进程环境(测试可注入)
|
|
57
|
+
* @param explicitAgentType 显式声明的智能体类型,优先级高于环境推断
|
|
58
|
+
*/
|
|
59
|
+
export function resolveAgentHostKey(env = process.env, explicitAgentType = '') {
|
|
60
|
+
const explicit = normalizeExplicitAgentHostKey(explicitAgentType);
|
|
61
|
+
if (explicit)
|
|
62
|
+
return explicit;
|
|
63
|
+
for (const { key, prefixes } of AGENT_HOST_PREFIXES) {
|
|
64
|
+
if (prefixes.some((prefix) => hasEnvPrefix(env, prefix)))
|
|
65
|
+
return key;
|
|
66
|
+
}
|
|
67
|
+
return DEFAULT_AGENT_HOST_KEY;
|
|
68
|
+
}
|