weaver-work-cli 0.1.69 → 0.1.71
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-VUTREF3P.js → archive-5P33NAUN.js} +22 -5
- package/dist/chunks/{archive-oa-VXXO4RTB.js → archive-oa-YTY5D7DG.js} +17 -5
- package/dist/chunks/{asset-45U6TY7I.js → asset-3Q5MFQBX.js} +22 -5
- package/dist/chunks/{asset-idle-YCRBMTIT.js → asset-idle-PQPNYIS7.js} +15 -5
- package/dist/chunks/{attachment-content-7BEDNQ3O.js → attachment-content-7CN7JB6B.js} +3 -3
- package/dist/chunks/{blog-5AML4WMG.js → blog-MFHHK6ZR.js} +25 -5
- package/dist/chunks/{caizhilian-3P7BUNHT.js → caizhilian-OZ435AYW.js} +22 -8
- package/dist/chunks/{calendar-2HUXM3CZ.js → calendar-TNJXS5UC.js} +15 -5
- package/dist/chunks/{chunk-H2NRTGZR.js → chunk-2DNCKZRX.js} +3 -3
- package/dist/chunks/{chunk-DVFA3ODS.js → chunk-35A56FJ7.js} +12 -0
- package/dist/chunks/{chunk-HG6INLH6.js → chunk-6MMSLE6K.js} +23 -6
- package/dist/chunks/{chunk-UVWW5ABZ.js → chunk-B4NINGP2.js} +3 -3
- package/dist/chunks/{chunk-LRKKKO5A.js → chunk-DRJYPXKC.js} +3 -4
- package/dist/chunks/{chunk-3TZURS7M.js → chunk-EJLP63UO.js} +1 -1
- package/dist/chunks/{chunk-FMAZ42HS.js → chunk-FRMDHZSN.js} +11 -11
- package/dist/chunks/{chunk-MLJK4KLE.js → chunk-G7ZM2VOX.js} +34 -34
- package/dist/chunks/{chunk-LSVA7QA6.js → chunk-GB2MCJPG.js} +3 -1
- package/dist/chunks/{chunk-3CBURKSY.js → chunk-ICNUOWLL.js} +4 -4
- package/dist/chunks/{chunk-GTAFCAVP.js → chunk-IZCQU5D5.js} +1 -1
- package/dist/chunks/{chunk-BEYEXCWU.js → chunk-LU2SPJYY.js} +2 -2
- package/dist/chunks/{chunk-E7VWE2XI.js → chunk-MD5RXRI3.js} +3 -3
- package/dist/chunks/{chunk-VZUH3LKI.js → chunk-MZVQKQP5.js} +167 -157
- package/dist/chunks/{chunk-67AN5YJT.js → chunk-OFCF23FY.js} +9 -9
- package/dist/chunks/{chunk-ERAE4GHX.js → chunk-OPTJ6IF7.js} +1 -1
- package/dist/chunks/{chunk-727VKJQK.js → chunk-OZ7CJC7W.js} +2 -2
- package/dist/chunks/{chunk-T24EBWAZ.js → chunk-P3AFNAJ6.js} +48 -21
- package/dist/chunks/{chunk-4XYRTXRR.js → chunk-Q3EXRNB4.js} +1 -1
- package/dist/chunks/{chunk-QYDSTYGG.js → chunk-SKWKCLJX.js} +3 -3
- package/dist/chunks/{chunk-DSBV4GRK.js → chunk-SSS75WXW.js} +3 -3
- package/dist/chunks/{chunk-I5XB4MZT.js → chunk-SUWR5QEG.js} +94 -65
- package/dist/chunks/{chunk-YR3K53BU.js → chunk-VJWVB55R.js} +2 -2
- package/dist/chunks/{chunk-JAIZY37Z.js → chunk-VMVMEIL3.js} +4 -4
- package/dist/chunks/chunk-WM33BSIL.js +136 -0
- package/dist/chunks/{chunk-6DH73Q5H.js → chunk-X2C5CGGM.js} +52 -51
- package/dist/chunks/{chunk-ELF5TPSG.js → chunk-XLSJC6JZ.js} +6 -6
- package/dist/chunks/{chunk-U3OO3IZF.js → chunk-YN5SD4TX.js} +20 -7
- package/dist/chunks/{conflict-VKCRXHUV.js → conflict-Y4PXZ2YQ.js} +2 -2
- package/dist/chunks/{contract-3PMHUASH.js → contract-C3BGUMBM.js} +48 -5
- package/dist/chunks/{cowork-FZBTTBYX.js → cowork-2AWG4QLA.js} +37 -8
- package/dist/chunks/{create-flow-WYPLBLRK.js → create-flow-LOUOK46Z.js} +6 -6
- package/dist/chunks/{data-2YZ6A6TL.js → data-BSFYMXVO.js} +99 -184
- package/dist/chunks/{ebuilder-form-AWPTMZBZ.js → ebuilder-form-LAAMTD2Y.js} +17 -7
- package/dist/chunks/{ehr-MNPR4TE5.js → ehr-36KEX5SH.js} +62 -13
- package/dist/chunks/{entry-mode-BCJ7RPFC.js → entry-mode-6N2IGCS4.js} +3 -3
- package/dist/chunks/{env-SCVCHBN2.js → env-QYLS3EB3.js} +2 -2
- package/dist/chunks/{esb-GSB5QCEX.js → esb-PTYS3E67.js} +17 -7
- package/dist/chunks/{factory-CBXYOEBF.js → factory-LPFPKZ4T.js} +1 -1
- package/dist/chunks/{fna-XBSNUS2V.js → fna-JNHCLRDE.js} +15 -5
- package/dist/chunks/{group-chat-RFL4U7RF.js → group-chat-QP2WX4QJ.js} +3 -3
- package/dist/chunks/{host-2UMNXX5H.js → host-57LSRSE7.js} +4 -4
- package/dist/chunks/{host-NVDG3NC6.js → host-7BVR7CQ3.js} +4 -4
- package/dist/chunks/{host-SYPCA63D.js → host-C2BLBIID.js} +4 -4
- package/dist/chunks/{host-XVWBOSEN.js → host-K2ZKNXME.js} +4 -4
- package/dist/chunks/{host-R7BP3CTI.js → host-NS36QFLR.js} +6 -4
- package/dist/chunks/{host-BD44ASOD.js → host-QXFKQXNX.js} +4 -4
- package/dist/chunks/{hrm-FZUDJAND.js → hrm-FSGO4NSH.js} +15 -6
- package/dist/chunks/{im-F5NENPD7.js → im-2BFGS2XO.js} +16 -6
- package/dist/chunks/{invoice-DS6FLU55.js → invoice-JKLTTHSZ.js} +27 -6
- package/dist/chunks/{jiuchuanhui-PY2WEBUH.js → jiuchuanhui-PTABJE7V.js} +1294 -1134
- package/dist/chunks/{lazy-dispatch-F6O2EPGR.js → lazy-dispatch-YN2ZP3CS.js} +6 -6
- package/dist/chunks/{mail-ZEOSANEJ.js → mail-YNO7ZZUK.js} +116 -97
- package/dist/chunks/{meeting-N2AGGLVI.js → meeting-NIDHDBCB.js} +29 -16
- package/dist/chunks/{minute-doc-C62EZOJH.js → minute-doc-G3QAT7DE.js} +4 -4
- package/dist/chunks/{okr-OZUMTMCL.js → okr-QC52G6AJ.js} +15 -5
- package/dist/chunks/{operations-LQY3FTPH.js → operations-2WHIF5WV.js} +1 -1
- package/dist/chunks/{operations-UTUWFJTX.js → operations-MQV32ITT.js} +5 -5
- package/dist/chunks/{performance-GBKM5G2Y.js → performance-3MQ3AHDQ.js} +97 -11
- package/dist/chunks/{plan-C2NENH42.js → plan-ISINIEPY.js} +15 -5
- package/dist/chunks/{project-FAJ2P3UR.js → project-IJ6DVKT7.js} +18 -5
- package/dist/chunks/{reception-NH6MJFPR.js → reception-3H5LUG2I.js} +17 -7
- package/dist/chunks/{recruit-stage-DPEFHLSE.js → recruit-stage-MIOJXP6W.js} +412 -85
- package/dist/chunks/{registry-7US3QQXV.js → registry-3GQRYP2R.js} +12 -12
- package/dist/chunks/{registry-Y2HWS6JS.js → registry-3S7AVMXR.js} +4 -4
- package/dist/chunks/{registry-FTPUUHWC.js → registry-NHHKOEU3.js} +5 -5
- package/dist/chunks/{room-recommend-LMNF76YS.js → room-recommend-IOKBJVYP.js} +4 -4
- package/dist/chunks/{schedule-4QE2THAP.js → schedule-IB6EUARH.js} +4 -4
- package/dist/chunks/{smart-extract-GTYKF5TJ.js → smart-extract-N2TK3CEF.js} +19 -6
- package/dist/chunks/{workflow-KXYTQZ2H.js → workflow-RINBAL2M.js} +22 -8
- package/dist/cmd/auth/index.js +23 -0
- package/dist/cmd/e10/index.js +2 -1
- package/dist/cmd/index.js +2 -0
- package/dist/core/manifest-view.js +207 -0
- package/dist/core/output.js +38 -8
- package/dist/index.js +35 -35
- package/dist/internal/e10/auth/crypto.js +18 -8
- package/dist/internal/e10/auth/error-log.js +1 -2
- package/dist/internal/e10/auth/messages.js +2 -3
- package/dist/internal/e10/auth/xiaoe.js +1 -1
- package/dist/internal/e10/tls-policy.js +61 -13
- package/dist/shortcuts/archive/index.js +11 -2
- package/dist/shortcuts/archive/operations/download.js +1 -0
- package/dist/shortcuts/archive/operations/flow-url.js +3 -0
- package/dist/shortcuts/archive/operations/prelib.js +2 -0
- package/dist/shortcuts/archive/operations/upload.js +1 -0
- package/dist/shortcuts/archive-oa/index.js +11 -2
- package/dist/shortcuts/archive-oa/operations/borrow-car.js +2 -0
- package/dist/shortcuts/asset/index.js +11 -2
- package/dist/shortcuts/asset/manifest.js +7 -0
- package/dist/shortcuts/asset-idle/index.js +11 -2
- package/dist/shortcuts/blog/index.js +11 -2
- package/dist/shortcuts/blog/manifest.js +10 -0
- package/dist/shortcuts/caizhilian/host.js +20 -4
- package/dist/shortcuts/caizhilian/index.js +12 -2
- package/dist/shortcuts/caizhilian/manifest.js +4 -25
- package/dist/shortcuts/caizhilian/operations/handlers/search.js +34 -0
- package/dist/shortcuts/caizhilian/operations/registry.js +25 -1
- package/dist/shortcuts/calendar/index.js +11 -2
- package/dist/shortcuts/contract/index.js +11 -2
- package/dist/shortcuts/contract/manifest.js +32 -0
- package/dist/shortcuts/contract/operations/write.js +3 -0
- package/dist/shortcuts/cowork/index.js +21 -5
- package/dist/shortcuts/cowork/manifest.js +3 -0
- package/dist/shortcuts/cowork/operations/discuss-write.js +2 -0
- package/dist/shortcuts/cowork/operations/item-write.js +3 -0
- package/dist/shortcuts/cowork/operations/member-write.js +2 -0
- package/dist/shortcuts/cowork/operations/permission-write.js +2 -0
- package/dist/shortcuts/cowork/operations/review-write.js +1 -0
- package/dist/shortcuts/data/errors.js +16 -29
- package/dist/shortcuts/data/host.js +16 -7
- package/dist/shortcuts/data/index.js +12 -41
- package/dist/shortcuts/data/manifest.js +5 -44
- package/dist/shortcuts/data/operations/attend.js +2 -2
- package/dist/shortcuts/data/operations/conf.js +0 -88
- package/dist/shortcuts/data/operations/ds.js +4 -4
- package/dist/shortcuts/data/operations/index.js +1 -5
- package/dist/shortcuts/data/operations/module.js +40 -14
- package/dist/shortcuts/data/operations/query.js +2 -2
- package/dist/shortcuts/ebuilder-form/index.js +11 -2
- package/dist/shortcuts/ebuilder-form/manifest.js +12 -0
- package/dist/shortcuts/ehr/index.js +11 -2
- package/dist/shortcuts/ehr/operations/attend-write.js +51 -8
- package/dist/shortcuts/esb/index.js +11 -2
- package/dist/shortcuts/esb/manifest.js +2 -0
- package/dist/shortcuts/fna/index.js +11 -2
- package/dist/shortcuts/hrm/index.js +11 -1
- package/dist/shortcuts/im/index.js +11 -2
- package/dist/shortcuts/invoice/index.js +11 -2
- package/dist/shortcuts/invoice/manifest.js +8 -0
- package/dist/shortcuts/jiuchuanhui/cache.js +49 -35
- package/dist/shortcuts/jiuchuanhui/host.js +37 -5
- package/dist/shortcuts/jiuchuanhui/index.js +57 -7
- package/dist/shortcuts/jiuchuanhui/manifest.js +38 -1
- package/dist/shortcuts/jiuchuanhui/operations/customer-quick.js +110 -0
- package/dist/shortcuts/jiuchuanhui/operations/datajson.js +11 -56
- package/dist/shortcuts/jiuchuanhui/operations/esb.js +9 -16
- package/dist/shortcuts/jiuchuanhui/operations/generic.js +8 -30
- package/dist/shortcuts/jiuchuanhui/operations/registry.js +8 -2
- package/dist/shortcuts/jiuchuanhui/operations/shared.js +0 -10
- package/dist/shortcuts/mail/errors.js +14 -0
- package/dist/shortcuts/mail/index.js +23 -6
- package/dist/shortcuts/mail/manifest.js +11 -4
- package/dist/shortcuts/mail/operations/mail-blacklist.js +6 -6
- package/dist/shortcuts/mail/operations/mail-contacts.js +10 -10
- package/dist/shortcuts/mail/operations/mail-manage.js +15 -14
- package/dist/shortcuts/mail/operations/mail-read.js +7 -25
- package/dist/shortcuts/mail/operations/mail-send.js +12 -12
- package/dist/shortcuts/mail/operations/mail-sign.js +10 -10
- package/dist/shortcuts/mail/operations/mail-template.js +10 -10
- package/dist/shortcuts/meeting/index.js +11 -2
- package/dist/shortcuts/meeting/operations/invitation-publish.js +1 -0
- package/dist/shortcuts/okr/index.js +11 -2
- package/dist/shortcuts/performance/index.js +62 -3
- package/dist/shortcuts/performance/operations/flow-detail.js +5 -4
- package/dist/shortcuts/performance/scheme-validate.js +7 -0
- package/dist/shortcuts/performance/shared.js +40 -2
- package/dist/shortcuts/plan/index.js +11 -2
- package/dist/shortcuts/project/index.js +11 -2
- package/dist/shortcuts/project/operations/write.js +3 -0
- package/dist/shortcuts/reception/index.js +11 -2
- package/dist/shortcuts/reception/manifest.js +2 -2
- package/dist/shortcuts/reception/operations/ask.js +3 -0
- package/dist/shortcuts/recruit-stage/index.js +22 -3
- package/dist/shortcuts/recruit-stage/manifest.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/jd-create.js +33 -16
- package/dist/shortcuts/recruit-stage/operations/profile.js +186 -0
- package/dist/shortcuts/recruit-stage/operations/registry.js +2 -0
- package/dist/shortcuts/recruit-stage/operations/resume-import.js +76 -47
- package/dist/shortcuts/recruit-stage/operations/search.js +151 -16
- package/dist/shortcuts/recruit-stage/operations/tag.js +17 -3
- package/dist/shortcuts/recruit-stage/shared.js +11 -1
- package/dist/shortcuts/smart-extract/index.js +11 -2
- package/dist/shortcuts/smart-extract/manifest.js +1 -0
- package/dist/shortcuts/smart-extract/operations/save.js +2 -0
- package/dist/shortcuts/workflow/index.js +21 -1
- package/dist/shortcuts/workflow/operations/aiDeepRead/collect.js +5 -2
- package/dist/shortcuts/workflow/operations/read.js +2 -2
- package/dist/shortcuts/workflow/operations/write.js +1 -1
- package/docs/caizhilian.md +1 -1
- package/docs/contract.md +1 -0
- package/docs/data.md +22 -22
- package/docs/e10-auth.md +41 -33
- package/docs/ehr.md +2 -0
- package/docs/jiuchuanhui.md +17 -5
- package/docs/reception.md +4 -3
- package/package.json +1 -1
- package/scripts/pysite/__pycache__/sitecustomize.cpython-312.pyc +0 -0
- package/scripts/pysite/__pycache__/sitecustomize.cpython-313.pyc +0 -0
- package/scripts/pysite/sitecustomize.py +41 -0
- package/skill-template/domains/data.md +4 -4
- package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
- package/skills/weaver-e10-caizhilian/references/org-browser.md +1 -0
- package/skills/weaver-e10-cowork/SKILL.md +3 -1
- package/skills/weaver-e10-data/SKILL.md +12 -16
- package/skills/weaver-e10-data/references/config-center.md +6 -7
- package/skills/weaver-e10-data/references/datasource.md +1 -1
- package/skills/weaver-e10-data/references/scene-and-misc.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +51 -90
- package/skills/weaver-e10-jiuchuanhui/references/cache.md +17 -13
- package/skills/weaver-e10-jiuchuanhui/references/clue.md +2 -2
- package/skills/weaver-e10-jiuchuanhui/references/customer.md +49 -11
- package/skills/weaver-e10-jiuchuanhui/references/discovery-config.md +3 -3
- package/skills/weaver-e10-jiuchuanhui/references/jiuchuanhui-entry.md +9 -7
- package/skills/weaver-e10-jiuchuanhui/references/sale.md +2 -2
- package/skills/weaver-e10-jucailin/references/attend-write.md +1 -1
- package/skills/weaver-e10-mail/SKILL.md +4 -1
- package/skills/weaver-e10-mail/references/mail-read.md +4 -2
- package/skills/weaver-e10-mail/references/safety-boundaries.md +1 -0
- package/skills/weaver-e10-okr/references/source-manifest.json +3 -3
- package/skills/weaver-e10-performance/SKILL.md +9 -7
- package/skills/weaver-e10-performance/agents/openai.yaml +4 -2
- package/skills/weaver-e10-performance/references/flow-assess.md +19 -6
- package/skills/weaver-e10-recruit-stage/SKILL.md +125 -20
- package/skills/weaver-e10-recruit-stage/lib/recruit-write-helper.mjs +359 -0
- package/skills/weaver-e10-recruit-stage/references/env-fixed-values.md +87 -0
- package/skills/weaver-e10-recruit-stage/references/recruit-jd-create.md +9 -2
- package/skills/weaver-e10-recruit-stage/references/recruit-tag-recommend.md +1 -0
- package/skills/weaver-e10-recruit-stage/templates/match-report.html +177 -0
- package/skills/weaver-e10-shared/SKILL.md +22 -1
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +2 -2
- package/skills/weaver-e10-workflow/SKILL.md +1 -1
- package/skills/weaver-e10-workflow/references/workflow-deep-read.md +8 -3
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
refMaxCount,
|
|
16
16
|
resolveRefInput,
|
|
17
17
|
resultThresholdChars
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6MMSLE6K.js";
|
|
19
19
|
import {
|
|
20
20
|
refsDir
|
|
21
21
|
} from "./chunk-AJ62BGAW.js";
|
|
22
22
|
import {
|
|
23
23
|
Command,
|
|
24
24
|
clearInvoiceTokenForSession
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2DNCKZRX.js";
|
|
26
26
|
import {
|
|
27
27
|
shouldReportPlatformError,
|
|
28
28
|
toPlatformError
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
normalizeXiaoEAuthErrorLogLimit,
|
|
35
35
|
readXiaoEAuthErrorLog,
|
|
36
36
|
xiaoEAuthLogSecrets
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-DRJYPXKC.js";
|
|
38
38
|
import {
|
|
39
39
|
E10AuthSession,
|
|
40
40
|
XIAOE_AGENT_TYPE,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
switchActiveProfile,
|
|
71
71
|
tryXiaoEUnifiedLogin,
|
|
72
72
|
upsertAgentHost
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-SUWR5QEG.js";
|
|
74
74
|
import {
|
|
75
75
|
CliError,
|
|
76
76
|
isCliError,
|
|
@@ -107,160 +107,10 @@ function toCommandMetadata(commands) {
|
|
|
107
107
|
}));
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// src/cmd/commands/index.ts
|
|
111
|
-
var commandsCommand = {
|
|
112
|
-
name: "commands",
|
|
113
|
-
description: "Registered command discovery",
|
|
114
|
-
category: "system",
|
|
115
|
-
register({ program, action }) {
|
|
116
|
-
const commands = program.command("commands").alias("module").description("Inspect registered commands");
|
|
117
|
-
commands.command("list").description("List registered commands").action(action((ctx) => {
|
|
118
|
-
ctx.output.write({ commands: ctx.commands, modules: ctx.modules });
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
// src/cmd/config/index.ts
|
|
124
|
-
function parseValue(value) {
|
|
125
|
-
if (value === "true") return true;
|
|
126
|
-
if (value === "false") return false;
|
|
127
|
-
if (value === "null") return null;
|
|
128
|
-
if (/^-?\d+(\.\d+)?$/.test(value)) return Number(value);
|
|
129
|
-
try {
|
|
130
|
-
return JSON.parse(value);
|
|
131
|
-
} catch {
|
|
132
|
-
return value;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
var configCommand = {
|
|
136
|
-
name: "config",
|
|
137
|
-
description: "Generic local configuration commands",
|
|
138
|
-
category: "system",
|
|
139
|
-
register({ program, action }) {
|
|
140
|
-
const config = program.command("config").description("Manage weaver-work-cli config");
|
|
141
|
-
config.command("path").description("Print the active config file path").action(action((ctx) => {
|
|
142
|
-
ctx.output.write({ path: ctx.config.path() }, { text: ctx.config.path() });
|
|
143
|
-
}));
|
|
144
|
-
config.command("list").description("Print all config values").action(action((ctx) => {
|
|
145
|
-
ctx.output.write(ctx.config.all());
|
|
146
|
-
}));
|
|
147
|
-
config.command("get").description("Print one config value").argument("<key>", "config key").action(action((ctx, key) => {
|
|
148
|
-
if (typeof key !== "string") throw new CliError("key must be a string", 2 /* UsageError */);
|
|
149
|
-
ctx.output.write({ key, value: ctx.config.get(key) });
|
|
150
|
-
}));
|
|
151
|
-
config.command("set").description("Set one config value").argument("<key>", "config key").argument("<value>", "config value").action(action((ctx, key, value) => {
|
|
152
|
-
if (typeof key !== "string" || typeof value !== "string") {
|
|
153
|
-
throw new CliError("key and value must be strings", 2 /* UsageError */);
|
|
154
|
-
}
|
|
155
|
-
const parsed = parseValue(value);
|
|
156
|
-
ctx.config.set(key, parsed);
|
|
157
|
-
ctx.output.write({ key, value: parsed, path: ctx.config.path() }, { text: "Saved " + key });
|
|
158
|
-
}));
|
|
159
|
-
config.command("delete").description("Delete one config value").argument("<key>", "config key").action(action((ctx, key) => {
|
|
160
|
-
if (typeof key !== "string") throw new CliError("key must be a string", 2 /* UsageError */);
|
|
161
|
-
const deleted = ctx.config.delete(key);
|
|
162
|
-
ctx.output.write({ key, deleted, path: ctx.config.path() }, { text: deleted ? "Deleted " + key : "No value for " + key });
|
|
163
|
-
}));
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
// src/cmd/docs/index.ts
|
|
168
|
-
import { cpSync, existsSync, readdirSync, readFileSync } from "node:fs";
|
|
169
|
-
import { resolve } from "node:path";
|
|
170
|
-
var DOCS_DIR = packagePath("docs");
|
|
171
|
-
var PKG_JSON_URL = packageFileUrl("package.json");
|
|
172
|
-
function packageVersion() {
|
|
173
|
-
try {
|
|
174
|
-
return JSON.parse(readFileSync(PKG_JSON_URL, "utf-8")).version;
|
|
175
|
-
} catch {
|
|
176
|
-
return "unknown";
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
function countFiles(dir) {
|
|
180
|
-
let count = 0;
|
|
181
|
-
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
182
|
-
const entryPath = resolve(dir, entry.name);
|
|
183
|
-
count += entry.isDirectory() ? countFiles(entryPath) : 1;
|
|
184
|
-
}
|
|
185
|
-
return count;
|
|
186
|
-
}
|
|
187
|
-
function ensureDocs() {
|
|
188
|
-
if (!existsSync(DOCS_DIR)) {
|
|
189
|
-
throw new CliError("docs directory does not exist: " + DOCS_DIR);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
var docsCommand = {
|
|
193
|
-
name: "docs",
|
|
194
|
-
description: "Packaged docs and template copy commands",
|
|
195
|
-
category: "system",
|
|
196
|
-
register({ program, action }) {
|
|
197
|
-
const docs = program.command("docs").description("Read or copy packaged docs");
|
|
198
|
-
docs.command("root").description("Print packaged docs root path").action(action((ctx) => {
|
|
199
|
-
ensureDocs();
|
|
200
|
-
const root = DOCS_DIR.replace(/[\\/]+$/, "");
|
|
201
|
-
ctx.output.write({ root, version: packageVersion() }, { text: root + "\nversion: " + packageVersion() });
|
|
202
|
-
}));
|
|
203
|
-
docs.command("copy").description("Copy packaged docs to <target>/weaver-work-cli-docs").argument("[target]", "target directory", process.cwd()).action(action((ctx, target) => {
|
|
204
|
-
ensureDocs();
|
|
205
|
-
const dest = resolve(String(target || process.cwd()), "weaver-work-cli-docs");
|
|
206
|
-
const sourceRoot = DOCS_DIR.replace(/[\\/]+$/, "");
|
|
207
|
-
if (dest === sourceRoot || dest.startsWith(sourceRoot + "/") || dest.startsWith(sourceRoot + "\\")) {
|
|
208
|
-
throw new CliError("target directory is inside docs source: " + dest);
|
|
209
|
-
}
|
|
210
|
-
cpSync(DOCS_DIR, dest, { recursive: true });
|
|
211
|
-
const files = countFiles(dest);
|
|
212
|
-
ctx.output.write({ files, dest, version: packageVersion() }, { text: "Copied " + files + " files to " + dest });
|
|
213
|
-
}));
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
// src/cmd/doctor/index.ts
|
|
218
|
-
import { existsSync as existsSync2 } from "node:fs";
|
|
219
|
-
function versionMajor(version) {
|
|
220
|
-
return Number(version.replace(/^v/, "").split(".")[0] || 0);
|
|
221
|
-
}
|
|
222
|
-
var doctorCommand = {
|
|
223
|
-
name: "doctor",
|
|
224
|
-
description: "Environment diagnostics",
|
|
225
|
-
category: "system",
|
|
226
|
-
register({ program, action }) {
|
|
227
|
-
program.command("doctor").description("Check local CLI environment").option("--e10", "also check E10 auth file discovery").action(action((ctx, options) => {
|
|
228
|
-
const opts = options && typeof options === "object" ? options : {};
|
|
229
|
-
const checks = [
|
|
230
|
-
{
|
|
231
|
-
name: "node",
|
|
232
|
-
ok: versionMajor(process.version) >= 18,
|
|
233
|
-
detail: process.version
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
name: "package",
|
|
237
|
-
ok: Boolean(ctx.packageInfo.version),
|
|
238
|
-
detail: ctx.packageInfo.name + "@" + ctx.packageInfo.version
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
name: "configPath",
|
|
242
|
-
ok: true,
|
|
243
|
-
detail: ctx.config.path()
|
|
244
|
-
}
|
|
245
|
-
];
|
|
246
|
-
if (opts.e10) {
|
|
247
|
-
const authFile = findAuthFile(ctx.cwd);
|
|
248
|
-
checks.push({
|
|
249
|
-
name: "e10AuthFile",
|
|
250
|
-
ok: Boolean(authFile && existsSync2(authFile)),
|
|
251
|
-
detail: authFile || "not found"
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
const ok = checks.every((check) => check.ok);
|
|
255
|
-
ctx.output.write({ ok, checks });
|
|
256
|
-
}));
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
|
|
260
110
|
// src/internal/e10/auth/commands.ts
|
|
261
111
|
import { execFile } from "node:child_process";
|
|
262
112
|
import { randomBytes } from "node:crypto";
|
|
263
|
-
import { existsSync
|
|
113
|
+
import { existsSync } from "node:fs";
|
|
264
114
|
import { createServer } from "node:http";
|
|
265
115
|
var DEFAULT_AGENT_TYPE = "weaver-work-cli";
|
|
266
116
|
var EXPLICIT_AGENT_TYPE_ENV_KEYS = [
|
|
@@ -506,7 +356,7 @@ function renderE10LoginSuccessPage(userId, returnTarget = null, launchToken = ""
|
|
|
506
356
|
}
|
|
507
357
|
function defaultFileExists(file) {
|
|
508
358
|
try {
|
|
509
|
-
return
|
|
359
|
+
return existsSync(file);
|
|
510
360
|
} catch {
|
|
511
361
|
return false;
|
|
512
362
|
}
|
|
@@ -1499,13 +1349,172 @@ function registerE10AuthCommands(parent, action) {
|
|
|
1499
1349
|
return auth;
|
|
1500
1350
|
}
|
|
1501
1351
|
|
|
1352
|
+
// src/cmd/auth/index.ts
|
|
1353
|
+
var authCommand = {
|
|
1354
|
+
name: "auth",
|
|
1355
|
+
description: "E10 auth and profile management",
|
|
1356
|
+
category: "platform",
|
|
1357
|
+
register({ program, action }) {
|
|
1358
|
+
registerE10AuthCommands(program, action);
|
|
1359
|
+
}
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
// src/cmd/commands/index.ts
|
|
1363
|
+
var commandsCommand = {
|
|
1364
|
+
name: "commands",
|
|
1365
|
+
description: "Registered command discovery",
|
|
1366
|
+
category: "system",
|
|
1367
|
+
register({ program, action }) {
|
|
1368
|
+
const commands = program.command("commands").alias("module").description("Inspect registered commands");
|
|
1369
|
+
commands.command("list").description("List registered commands").action(action((ctx) => {
|
|
1370
|
+
ctx.output.write({ commands: ctx.commands, modules: ctx.modules });
|
|
1371
|
+
}));
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
// src/cmd/config/index.ts
|
|
1376
|
+
function parseValue(value) {
|
|
1377
|
+
if (value === "true") return true;
|
|
1378
|
+
if (value === "false") return false;
|
|
1379
|
+
if (value === "null") return null;
|
|
1380
|
+
if (/^-?\d+(\.\d+)?$/.test(value)) return Number(value);
|
|
1381
|
+
try {
|
|
1382
|
+
return JSON.parse(value);
|
|
1383
|
+
} catch {
|
|
1384
|
+
return value;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
var configCommand = {
|
|
1388
|
+
name: "config",
|
|
1389
|
+
description: "Generic local configuration commands",
|
|
1390
|
+
category: "system",
|
|
1391
|
+
register({ program, action }) {
|
|
1392
|
+
const config = program.command("config").description("Manage weaver-work-cli config");
|
|
1393
|
+
config.command("path").description("Print the active config file path").action(action((ctx) => {
|
|
1394
|
+
ctx.output.write({ path: ctx.config.path() }, { text: ctx.config.path() });
|
|
1395
|
+
}));
|
|
1396
|
+
config.command("list").description("Print all config values").action(action((ctx) => {
|
|
1397
|
+
ctx.output.write(ctx.config.all());
|
|
1398
|
+
}));
|
|
1399
|
+
config.command("get").description("Print one config value").argument("<key>", "config key").action(action((ctx, key) => {
|
|
1400
|
+
if (typeof key !== "string") throw new CliError("key must be a string", 2 /* UsageError */);
|
|
1401
|
+
ctx.output.write({ key, value: ctx.config.get(key) });
|
|
1402
|
+
}));
|
|
1403
|
+
config.command("set").description("Set one config value").argument("<key>", "config key").argument("<value>", "config value").action(action((ctx, key, value) => {
|
|
1404
|
+
if (typeof key !== "string" || typeof value !== "string") {
|
|
1405
|
+
throw new CliError("key and value must be strings", 2 /* UsageError */);
|
|
1406
|
+
}
|
|
1407
|
+
const parsed = parseValue(value);
|
|
1408
|
+
ctx.config.set(key, parsed);
|
|
1409
|
+
ctx.output.write({ key, value: parsed, path: ctx.config.path() }, { text: "Saved " + key });
|
|
1410
|
+
}));
|
|
1411
|
+
config.command("delete").description("Delete one config value").argument("<key>", "config key").action(action((ctx, key) => {
|
|
1412
|
+
if (typeof key !== "string") throw new CliError("key must be a string", 2 /* UsageError */);
|
|
1413
|
+
const deleted = ctx.config.delete(key);
|
|
1414
|
+
ctx.output.write({ key, deleted, path: ctx.config.path() }, { text: deleted ? "Deleted " + key : "No value for " + key });
|
|
1415
|
+
}));
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
// src/cmd/docs/index.ts
|
|
1420
|
+
import { cpSync, existsSync as existsSync2, readdirSync, readFileSync } from "node:fs";
|
|
1421
|
+
import { resolve } from "node:path";
|
|
1422
|
+
var DOCS_DIR = packagePath("docs");
|
|
1423
|
+
var PKG_JSON_URL = packageFileUrl("package.json");
|
|
1424
|
+
function packageVersion() {
|
|
1425
|
+
try {
|
|
1426
|
+
return JSON.parse(readFileSync(PKG_JSON_URL, "utf-8")).version;
|
|
1427
|
+
} catch {
|
|
1428
|
+
return "unknown";
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
function countFiles(dir) {
|
|
1432
|
+
let count = 0;
|
|
1433
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
1434
|
+
const entryPath = resolve(dir, entry.name);
|
|
1435
|
+
count += entry.isDirectory() ? countFiles(entryPath) : 1;
|
|
1436
|
+
}
|
|
1437
|
+
return count;
|
|
1438
|
+
}
|
|
1439
|
+
function ensureDocs() {
|
|
1440
|
+
if (!existsSync2(DOCS_DIR)) {
|
|
1441
|
+
throw new CliError("docs directory does not exist: " + DOCS_DIR);
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
var docsCommand = {
|
|
1445
|
+
name: "docs",
|
|
1446
|
+
description: "Packaged docs and template copy commands",
|
|
1447
|
+
category: "system",
|
|
1448
|
+
register({ program, action }) {
|
|
1449
|
+
const docs = program.command("docs").description("Read or copy packaged docs");
|
|
1450
|
+
docs.command("root").description("Print packaged docs root path").action(action((ctx) => {
|
|
1451
|
+
ensureDocs();
|
|
1452
|
+
const root = DOCS_DIR.replace(/[\\/]+$/, "");
|
|
1453
|
+
ctx.output.write({ root, version: packageVersion() }, { text: root + "\nversion: " + packageVersion() });
|
|
1454
|
+
}));
|
|
1455
|
+
docs.command("copy").description("Copy packaged docs to <target>/weaver-work-cli-docs").argument("[target]", "target directory", process.cwd()).action(action((ctx, target) => {
|
|
1456
|
+
ensureDocs();
|
|
1457
|
+
const dest = resolve(String(target || process.cwd()), "weaver-work-cli-docs");
|
|
1458
|
+
const sourceRoot = DOCS_DIR.replace(/[\\/]+$/, "");
|
|
1459
|
+
if (dest === sourceRoot || dest.startsWith(sourceRoot + "/") || dest.startsWith(sourceRoot + "\\")) {
|
|
1460
|
+
throw new CliError("target directory is inside docs source: " + dest);
|
|
1461
|
+
}
|
|
1462
|
+
cpSync(DOCS_DIR, dest, { recursive: true });
|
|
1463
|
+
const files = countFiles(dest);
|
|
1464
|
+
ctx.output.write({ files, dest, version: packageVersion() }, { text: "Copied " + files + " files to " + dest });
|
|
1465
|
+
}));
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
|
|
1469
|
+
// src/cmd/doctor/index.ts
|
|
1470
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
1471
|
+
function versionMajor(version) {
|
|
1472
|
+
return Number(version.replace(/^v/, "").split(".")[0] || 0);
|
|
1473
|
+
}
|
|
1474
|
+
var doctorCommand = {
|
|
1475
|
+
name: "doctor",
|
|
1476
|
+
description: "Environment diagnostics",
|
|
1477
|
+
category: "system",
|
|
1478
|
+
register({ program, action }) {
|
|
1479
|
+
program.command("doctor").description("Check local CLI environment").option("--e10", "also check E10 auth file discovery").action(action((ctx, options) => {
|
|
1480
|
+
const opts = options && typeof options === "object" ? options : {};
|
|
1481
|
+
const checks = [
|
|
1482
|
+
{
|
|
1483
|
+
name: "node",
|
|
1484
|
+
ok: versionMajor(process.version) >= 18,
|
|
1485
|
+
detail: process.version
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
name: "package",
|
|
1489
|
+
ok: Boolean(ctx.packageInfo.version),
|
|
1490
|
+
detail: ctx.packageInfo.name + "@" + ctx.packageInfo.version
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
name: "configPath",
|
|
1494
|
+
ok: true,
|
|
1495
|
+
detail: ctx.config.path()
|
|
1496
|
+
}
|
|
1497
|
+
];
|
|
1498
|
+
if (opts.e10) {
|
|
1499
|
+
const authFile = findAuthFile(ctx.cwd);
|
|
1500
|
+
checks.push({
|
|
1501
|
+
name: "e10AuthFile",
|
|
1502
|
+
ok: Boolean(authFile && existsSync3(authFile)),
|
|
1503
|
+
detail: authFile || "not found"
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
const ok = checks.every((check) => check.ok);
|
|
1507
|
+
ctx.output.write({ ok, checks });
|
|
1508
|
+
}));
|
|
1509
|
+
}
|
|
1510
|
+
};
|
|
1511
|
+
|
|
1502
1512
|
// src/cmd/e10/index.ts
|
|
1503
1513
|
var e10Command = {
|
|
1504
1514
|
name: "e10",
|
|
1505
1515
|
description: "E10 platform adapter: auth, profiles, and shared API client",
|
|
1506
1516
|
category: "platform",
|
|
1507
1517
|
register({ program, ctx, action }) {
|
|
1508
|
-
registerE10AuthCommands(program, action);
|
|
1509
1518
|
const e10 = program.command("e10").description("E10 platform commands");
|
|
1510
1519
|
registerE10AuthCommands(e10, action);
|
|
1511
1520
|
ctx.hooks.register({
|
|
@@ -2457,6 +2466,7 @@ var builtinCommands = [
|
|
|
2457
2466
|
commandsCommand,
|
|
2458
2467
|
runCommand,
|
|
2459
2468
|
refsCommand,
|
|
2469
|
+
authCommand,
|
|
2460
2470
|
e10Command,
|
|
2461
2471
|
identityCommand,
|
|
2462
2472
|
setupCommand,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-WRXSAVKO.js";
|
|
16
16
|
import {
|
|
17
17
|
stringifyForStdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6MMSLE6K.js";
|
|
19
19
|
import {
|
|
20
20
|
stateRoot
|
|
21
21
|
} from "./chunk-AJ62BGAW.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
E10_REAUTH_GUIDANCE,
|
|
28
28
|
createFetchTimingSink,
|
|
29
29
|
runWithFetchTiming
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-IZCQU5D5.js";
|
|
31
31
|
import {
|
|
32
32
|
hasXiaoEEnv
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SUWR5QEG.js";
|
|
34
34
|
|
|
35
35
|
// src/shortcuts/workflow/operations/form.ts
|
|
36
36
|
import { randomUUID } from "node:crypto";
|
|
@@ -3981,7 +3981,7 @@ var workflowSummary = {
|
|
|
3981
3981
|
...schemaOf({
|
|
3982
3982
|
requestId: SCHEMA_REQUEST_ID,
|
|
3983
3983
|
index: SCHEMA_INDEX,
|
|
3984
|
-
group: { type: "string" },
|
|
3984
|
+
group: { type: "string", description: "\u68C0\u7D22\u7D22\u5F15\u5206\u7EC4\u6807\u8BC6\uFF08urgent/overdue/batch/pending\uFF0Cplan \u573A\u666F\u53EF\u80FD\u662F specialGroups \u7684 kind\uFF09\uFF1B\u53EA\u7ED9 index \u65F6\u7528\u6765\u5B9A\u4F4D\u662F\u54EA\u4E00\u7EC4\uFF0C\u53D6\u503C\u6CBF\u7528 workflow.search \u8FD4\u56DE\u7684 cards[].group" },
|
|
3985
3985
|
summaryFields: { type: "integer", minimum: 1, default: 12 }
|
|
3986
3986
|
}),
|
|
3987
3987
|
// requestId 与 index 至少给一个:只给 index 时按 group 在本地检索索引中定位(见 resolveTargetRequestId)
|
|
@@ -4645,7 +4645,7 @@ var workflowOpen = {
|
|
|
4645
4645
|
...schemaOf({
|
|
4646
4646
|
requestId: SCHEMA_REQUEST_ID,
|
|
4647
4647
|
index: SCHEMA_INDEX,
|
|
4648
|
-
group: { type: "string" },
|
|
4648
|
+
group: { type: "string", description: "\u68C0\u7D22\u7D22\u5F15\u5206\u7EC4\u6807\u8BC6\uFF08urgent/overdue/batch/pending\uFF0Cplan \u573A\u666F\u53EF\u80FD\u662F specialGroups \u7684 kind\uFF09\uFF1B\u53EA\u7ED9 index \u65F6\u7528\u6765\u5B9A\u4F4D\u662F\u54EA\u4E00\u7EC4\uFF0C\u53D6\u503C\u6CBF\u7528 workflow.search \u8FD4\u56DE\u7684 cards[].group" },
|
|
4649
4649
|
openMode: { type: "string", enum: ["auto", "localBrowser", "clientAction", "url"], default: "auto" },
|
|
4650
4650
|
noOpen: { type: "boolean", default: false }
|
|
4651
4651
|
}),
|
|
@@ -12882,12 +12882,12 @@ function writeCollectCache(payload, batchSize) {
|
|
|
12882
12882
|
batchNo,
|
|
12883
12883
|
batchTotal: Math.ceil(details.length / size),
|
|
12884
12884
|
batchSize: size,
|
|
12885
|
-
rows: batchRows,
|
|
12886
|
-
details: slice,
|
|
12887
12885
|
// 默认详读提示词(2026-11-24 用户定稿:唯一提示词源 = config defaultPrompt):
|
|
12888
12886
|
// 每个批次文件都带 defaultPrompts 区块,未命中 prompts 条目的详读指令来源
|
|
12889
12887
|
...payload.defaultPrompts && typeof payload.defaultPrompts === "object" ? { defaultPrompts: payload.defaultPrompts } : {},
|
|
12890
|
-
...batchPrompts.length > 0 ? { prompts: batchPrompts } : {}
|
|
12888
|
+
...batchPrompts.length > 0 ? { prompts: batchPrompts } : {},
|
|
12889
|
+
rows: batchRows,
|
|
12890
|
+
details: slice
|
|
12891
12891
|
};
|
|
12892
12892
|
const batchFile = join3(dir, `aiDeepRead-batch-${stamp}-${String(batchNo).padStart(2, "0")}.json`);
|
|
12893
12893
|
const batchJson = JSON.stringify(batchPayload, null, 2);
|
|
@@ -19094,7 +19094,7 @@ var workflowOperateApply = {
|
|
|
19094
19094
|
var SHARE_INPUT = schemaOf(
|
|
19095
19095
|
{
|
|
19096
19096
|
requestId: SCHEMA_REQUEST_ID,
|
|
19097
|
-
group: { type: "string" },
|
|
19097
|
+
group: { type: "string", description: "\u68C0\u7D22\u7D22\u5F15\u5206\u7EC4\u6807\u8BC6\uFF08urgent/overdue/batch/pending\uFF0Cplan \u573A\u666F\u53EF\u80FD\u662F specialGroups \u7684 kind\uFF09\uFF1B\u53EA\u7ED9 index \u65F6\u7528\u6765\u5B9A\u4F4D\u662F\u54EA\u4E00\u7EC4\uFF0C\u53D6\u503C\u6CBF\u7528 workflow.search \u8FD4\u56DE\u7684 cards[].group" },
|
|
19098
19098
|
index: SCHEMA_INDEX,
|
|
19099
19099
|
shareObjects: {
|
|
19100
19100
|
type: "array",
|
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
meetingStateDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q3EXRNB4.js";
|
|
6
6
|
|
|
7
7
|
// src/shortcuts/meeting/operations/eb/cache.ts
|
|
8
8
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
createE10RequestRuntime,
|
|
11
11
|
isE10SessionExpiredResponse,
|
|
12
12
|
requireE10Session
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DRJYPXKC.js";
|
|
14
14
|
import {
|
|
15
15
|
getActiveProfile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SUWR5QEG.js";
|
|
17
17
|
|
|
18
18
|
// src/shortcuts/ebuilder-form/host.ts
|
|
19
19
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,9 +3,10 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CAIZHILAN_MAX_DOWNLOAD_BYTES,
|
|
5
5
|
CAIZHILAN_TRANSFER_TIMEOUT_MS,
|
|
6
|
+
CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE,
|
|
6
7
|
caizhilianBusinessMessage,
|
|
7
8
|
isCaizhilianBusinessSuccess
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YN5SD4TX.js";
|
|
9
10
|
import {
|
|
10
11
|
CaizhilianCliError,
|
|
11
12
|
caizhilianAuthError,
|
|
@@ -7951,6 +7952,24 @@ async function searchVirtualFolders(args, env) {
|
|
|
7951
7952
|
folders
|
|
7952
7953
|
});
|
|
7953
7954
|
}
|
|
7955
|
+
function isBareServerFail(raw) {
|
|
7956
|
+
if (typeof raw !== "string") return false;
|
|
7957
|
+
try {
|
|
7958
|
+
const parsed = JSON.parse(raw);
|
|
7959
|
+
return isRecord(parsed) && parsed.code === 500 && parsed.status === false && parsed.fail === true;
|
|
7960
|
+
} catch {
|
|
7961
|
+
return false;
|
|
7962
|
+
}
|
|
7963
|
+
}
|
|
7964
|
+
function applyBusinessErrorMessage(error, businessErrorMessage) {
|
|
7965
|
+
if (!businessErrorMessage || !(error instanceof CaizhilianCliError)) return error;
|
|
7966
|
+
if (error.subtype !== "business_error") return error;
|
|
7967
|
+
if (error.message !== CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE) return error;
|
|
7968
|
+
const raw = error.details?.raw;
|
|
7969
|
+
if (!isBareServerFail(raw)) return error;
|
|
7970
|
+
error.message = businessErrorMessage;
|
|
7971
|
+
return error;
|
|
7972
|
+
}
|
|
7954
7973
|
function browserSearch(config) {
|
|
7955
7974
|
return async (args, env) => {
|
|
7956
7975
|
const { pageNo, pageSize } = parsePage(args, 50);
|
|
@@ -7971,6 +7990,8 @@ function browserSearch(config) {
|
|
|
7971
7990
|
path: config.path,
|
|
7972
7991
|
body,
|
|
7973
7992
|
operation: config.action
|
|
7993
|
+
}).catch((error) => {
|
|
7994
|
+
throw applyBusinessErrorMessage(error, config.businessErrorMessage);
|
|
7974
7995
|
});
|
|
7975
7996
|
const items = nestedList(response, "data", "data");
|
|
7976
7997
|
return caizhilianSuccess(config.action, {
|
|
@@ -8020,6 +8041,7 @@ var subcompanySearch = browserSearch({
|
|
|
8020
8041
|
resultKey: "subcompanies",
|
|
8021
8042
|
head: { browserMultiple: true, virtualType: "ALL", cmd: "list" },
|
|
8022
8043
|
tail: { stopDepartment: false },
|
|
8044
|
+
businessErrorMessage: "\u672C\u79DF\u6237\u672A\u5F00\u901A\u5206\u90E8\u529F\u80FD",
|
|
8023
8045
|
mapItem: (item) => ({
|
|
8024
8046
|
id: String(item.id ?? ""),
|
|
8025
8047
|
name: item.name ?? "",
|
|
@@ -9527,6 +9549,24 @@ var caizhilianSystemHandlers = {
|
|
|
9527
9549
|
};
|
|
9528
9550
|
|
|
9529
9551
|
// src/shortcuts/caizhilian/operations/registry.ts
|
|
9552
|
+
var caizhilianWithheldOperations = [
|
|
9553
|
+
{
|
|
9554
|
+
name: "caizhilian.system.list-systems",
|
|
9555
|
+
reason: "\u6E90 list_systems \u8BFB\u53D6\u7684\u662F Skill \u81EA\u5E26 assets/config.json \u7684\u591A\u73AF\u5883\u914D\u7F6E\u4E0E\u767B\u5F55\u6001\uFF1Bweaver-work-cli \u7684\u73AF\u5883\u4E0E\u767B\u5F55\u6001\u7531\u6846\u67B6\u7EDF\u4E00\u7BA1\u7406\uFF0C\u8BF7\u7528 `weaver-work-cli config list` \u4E0E `weaver-work-cli auth status` \u67E5\u770B\uFF0C\u8FDE\u901A\u6027\u81EA\u68C0\u7528 caizhilian.system.health\u3002"
|
|
9556
|
+
},
|
|
9557
|
+
{
|
|
9558
|
+
name: "caizhilian.system.get-loaded-config",
|
|
9559
|
+
reason: "\u6E90 get_loaded_config \u4F1A\u8F93\u51FA Skill \u672C\u5730 config.json \u7684\u751F\u6548\u5185\u5BB9\uFF08\u542B cookies \u63A9\u7801\u3001\u4E0B\u8F7D\u76EE\u5F55\u7B49\uFF09\uFF1BCLI \u4FA7\u7B49\u4EF7\u4FE1\u606F\u6765\u81EA\u6846\u67B6\u914D\u7F6E\uFF0C\u8BF7\u7528 `weaver-work-cli config list`\uFF0C\u4E0D\u5728\u4E1A\u52A1\u6A21\u5757\u5185\u66B4\u9732\u914D\u7F6E\u5FEB\u7167\u3002"
|
|
9560
|
+
},
|
|
9561
|
+
{
|
|
9562
|
+
name: "caizhilian.system.reload-config",
|
|
9563
|
+
reason: "\u6E90 reload_config \u91CD\u65B0\u52A0\u8F7D Skill \u672C\u5730 config.json\uFF1BCLI \u6BCF\u6B21\u8FDB\u7A0B\u542F\u52A8\u5373\u8BFB\u53D6\u6846\u67B6\u914D\u7F6E\uFF0C\u65E0\u8FDB\u7A0B\u5185\u7F13\u5B58\u9700\u8981\u5237\u65B0\uFF0C\u6545\u4E0D\u63D0\u4F9B\u8BE5\u64CD\u4F5C\u3002"
|
|
9564
|
+
},
|
|
9565
|
+
{
|
|
9566
|
+
name: "caizhilian.system.switch-config",
|
|
9567
|
+
reason: "\u6E90 switch_config \u5728 Skill \u672C\u5730\u591A\u5957\u73AF\u5883\u914D\u7F6E\u95F4\u5207\u6362\uFF1BCLI \u7684\u73AF\u5883\u4E0E\u8BA4\u8BC1\u914D\u7F6E\u4F53\u7CFB\u8D1F\u8D23\u8FD9\u4E00\u804C\u8D23\uFF0C\u4E1A\u52A1\u6A21\u5757\u4E0D\u505A\u73AF\u5883\u5207\u6362\u3002"
|
|
9568
|
+
}
|
|
9569
|
+
];
|
|
9530
9570
|
var PREPARE_SUFFIX = ".prepare";
|
|
9531
9571
|
var APPLY_SUFFIX = ".apply";
|
|
9532
9572
|
function mergeHandlers(maps) {
|
|
@@ -9628,7 +9668,11 @@ function caizhilianOperationDefinitions() {
|
|
|
9628
9668
|
function getCaizhilianOperation(operation) {
|
|
9629
9669
|
const definition = caizhilianRegistry.get(operation);
|
|
9630
9670
|
if (!definition) {
|
|
9631
|
-
|
|
9671
|
+
const withheld = caizhilianWithheldOperations.some((entry) => entry.name === operation);
|
|
9672
|
+
throw caizhilianValidationError(
|
|
9673
|
+
"operation_unknown",
|
|
9674
|
+
`\u91C7\u77E5\u8FDE\u4E0D\u652F\u6301\u64CD\u4F5C\uFF1A${operation}${withheld ? "\uFF08\u5C5E withheld \u80FD\u529B\uFF0C\u539F\u56E0\u4E0E\u66FF\u4EE3\u547D\u4EE4\u89C1 caizhilian operations \u8F93\u51FA\u7684 withheldOperations\uFF09" : ""}`
|
|
9675
|
+
);
|
|
9632
9676
|
}
|
|
9633
9677
|
return definition;
|
|
9634
9678
|
}
|
|
@@ -9647,24 +9691,6 @@ function caizhilianOperationContracts() {
|
|
|
9647
9691
|
}
|
|
9648
9692
|
|
|
9649
9693
|
// src/shortcuts/caizhilian/manifest.ts
|
|
9650
|
-
var WITHHELD = [
|
|
9651
|
-
{
|
|
9652
|
-
name: "caizhilian.system.list-systems",
|
|
9653
|
-
reason: "\u6E90 list_systems \u8BFB\u53D6\u7684\u662F Skill \u81EA\u5E26 assets/config.json \u7684\u591A\u73AF\u5883\u914D\u7F6E\u4E0E\u767B\u5F55\u6001\uFF1Bweaver-work-cli \u7684\u73AF\u5883\u4E0E\u767B\u5F55\u6001\u7531\u6846\u67B6\u7EDF\u4E00\u7BA1\u7406\uFF0C\u8BF7\u7528 `weaver-work-cli config list` \u4E0E `weaver-work-cli auth status` \u67E5\u770B\uFF0C\u8FDE\u901A\u6027\u81EA\u68C0\u7528 caizhilian.system.health\u3002"
|
|
9654
|
-
},
|
|
9655
|
-
{
|
|
9656
|
-
name: "caizhilian.system.get-loaded-config",
|
|
9657
|
-
reason: "\u6E90 get_loaded_config \u4F1A\u8F93\u51FA Skill \u672C\u5730 config.json \u7684\u751F\u6548\u5185\u5BB9\uFF08\u542B cookies \u63A9\u7801\u3001\u4E0B\u8F7D\u76EE\u5F55\u7B49\uFF09\uFF1BCLI \u4FA7\u7B49\u4EF7\u4FE1\u606F\u6765\u81EA\u6846\u67B6\u914D\u7F6E\uFF0C\u8BF7\u7528 `weaver-work-cli config list`\uFF0C\u4E0D\u5728\u4E1A\u52A1\u6A21\u5757\u5185\u66B4\u9732\u914D\u7F6E\u5FEB\u7167\u3002"
|
|
9658
|
-
},
|
|
9659
|
-
{
|
|
9660
|
-
name: "caizhilian.system.reload-config",
|
|
9661
|
-
reason: "\u6E90 reload_config \u91CD\u65B0\u52A0\u8F7D Skill \u672C\u5730 config.json\uFF1BCLI \u6BCF\u6B21\u8FDB\u7A0B\u542F\u52A8\u5373\u8BFB\u53D6\u6846\u67B6\u914D\u7F6E\uFF0C\u65E0\u8FDB\u7A0B\u5185\u7F13\u5B58\u9700\u8981\u5237\u65B0\uFF0C\u6545\u4E0D\u63D0\u4F9B\u8BE5\u64CD\u4F5C\u3002"
|
|
9662
|
-
},
|
|
9663
|
-
{
|
|
9664
|
-
name: "caizhilian.system.switch-config",
|
|
9665
|
-
reason: "\u6E90 switch_config \u5728 Skill \u672C\u5730\u591A\u5957\u73AF\u5883\u914D\u7F6E\u95F4\u5207\u6362\uFF1BCLI \u7684\u73AF\u5883\u4E0E\u8BA4\u8BC1\u914D\u7F6E\u4F53\u7CFB\u8D1F\u8D23\u8FD9\u4E00\u804C\u8D23\uFF0C\u4E1A\u52A1\u6A21\u5757\u4E0D\u505A\u73AF\u5883\u5207\u6362\u3002"
|
|
9666
|
-
}
|
|
9667
|
-
];
|
|
9668
9694
|
function buildOperations() {
|
|
9669
9695
|
return caizhilianOperationContracts();
|
|
9670
9696
|
}
|
|
@@ -9678,7 +9704,8 @@ var caizhilianManifest = {
|
|
|
9678
9704
|
sourceSkill: "weaver-e10-caizhilian",
|
|
9679
9705
|
capabilities: ["caizhilian"],
|
|
9680
9706
|
operations: buildOperations(),
|
|
9681
|
-
|
|
9707
|
+
withheldCount: caizhilianWithheldOperations.length,
|
|
9708
|
+
withheldOperations: caizhilianWithheldOperations
|
|
9682
9709
|
};
|
|
9683
9710
|
|
|
9684
9711
|
// src/shortcuts/caizhilian/operations.ts
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DRJYPXKC.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IZCQU5D5.js";
|
|
18
18
|
import {
|
|
19
19
|
getActiveProfile
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SUWR5QEG.js";
|
|
21
21
|
|
|
22
22
|
// src/shortcuts/im/host.ts
|
|
23
23
|
import { createHash } from "node:crypto";
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
createE10RequestRuntime,
|
|
12
12
|
isE10SessionExpiredResponse,
|
|
13
13
|
requireE10Session
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DRJYPXKC.js";
|
|
15
15
|
import {
|
|
16
16
|
E10_SESSION_EXPIRED_MESSAGE
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IZCQU5D5.js";
|
|
18
18
|
import {
|
|
19
19
|
getActiveProfile
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-SUWR5QEG.js";
|
|
21
21
|
|
|
22
22
|
// src/shortcuts/hrm/host.ts
|
|
23
23
|
function inferProfile(ctx) {
|