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
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-X2C5CGGM.js";
|
|
8
|
+
import "./chunk-G7ZM2VOX.js";
|
|
9
|
+
import "./chunk-XLSJC6JZ.js";
|
|
10
|
+
import "./chunk-VJWVB55R.js";
|
|
11
11
|
import "./chunk-WMRNO6IU.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-FRMDHZSN.js";
|
|
13
|
+
import "./chunk-LU2SPJYY.js";
|
|
14
|
+
import "./chunk-ICNUOWLL.js";
|
|
15
|
+
import "./chunk-VMVMEIL3.js";
|
|
16
|
+
import "./chunk-OPTJ6IF7.js";
|
|
17
|
+
import "./chunk-Q3EXRNB4.js";
|
|
18
|
+
import "./chunk-EJLP63UO.js";
|
|
19
19
|
import "./chunk-7BDPM5ST.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-SUWR5QEG.js";
|
|
21
21
|
import "./chunk-UG5G54VL.js";
|
|
22
22
|
import "./chunk-BUSC6UAE.js";
|
|
23
23
|
export {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
getWorkflowOperation,
|
|
5
5
|
hasWorkflowOperation,
|
|
6
6
|
workflowOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OFCF23FY.js";
|
|
8
8
|
import "./chunk-HP7JIYMT.js";
|
|
9
9
|
import "./chunk-WRXSAVKO.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-6MMSLE6K.js";
|
|
11
11
|
import "./chunk-AJ62BGAW.js";
|
|
12
12
|
import "./chunk-7BDPM5ST.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-IZCQU5D5.js";
|
|
14
|
+
import "./chunk-SUWR5QEG.js";
|
|
15
15
|
import "./chunk-UG5G54VL.js";
|
|
16
16
|
import "./chunk-BUSC6UAE.js";
|
|
17
17
|
export {
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
esbOperationDefinitions,
|
|
5
5
|
getEsbOperation,
|
|
6
6
|
hasEsbOperation
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-GB2MCJPG.js";
|
|
8
|
+
import "./chunk-B4NINGP2.js";
|
|
9
9
|
import "./chunk-TXUG266F.js";
|
|
10
10
|
import "./chunk-7BDPM5ST.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-DRJYPXKC.js";
|
|
12
|
+
import "./chunk-IZCQU5D5.js";
|
|
13
|
+
import "./chunk-SUWR5QEG.js";
|
|
14
14
|
import "./chunk-UG5G54VL.js";
|
|
15
15
|
import "./chunk-BUSC6UAE.js";
|
|
16
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-VMVMEIL3.js";
|
|
11
|
+
import "./chunk-OPTJ6IF7.js";
|
|
12
|
+
import "./chunk-Q3EXRNB4.js";
|
|
13
|
+
import "./chunk-EJLP63UO.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-ICNUOWLL.js";
|
|
12
|
+
import "./chunk-OPTJ6IF7.js";
|
|
13
|
+
import "./chunk-Q3EXRNB4.js";
|
|
14
|
+
import "./chunk-EJLP63UO.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -2,10 +2,15 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
defaultResultThresholdChars
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6MMSLE6K.js";
|
|
6
6
|
import {
|
|
7
7
|
stateRoot
|
|
8
8
|
} from "./chunk-AJ62BGAW.js";
|
|
9
|
+
import {
|
|
10
|
+
MANIFEST_LIST_COMPACT_PATHS,
|
|
11
|
+
manifestView,
|
|
12
|
+
schemaOptionsOf
|
|
13
|
+
} from "./chunk-WM33BSIL.js";
|
|
9
14
|
import {
|
|
10
15
|
CONTINUATION_TTL_MS,
|
|
11
16
|
CONTINUATION_TTL_SECONDS
|
|
@@ -15,11 +20,11 @@ import {
|
|
|
15
20
|
createE10RequestRuntime,
|
|
16
21
|
isE10SessionExpiredResponse,
|
|
17
22
|
requireE10Session
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-DRJYPXKC.js";
|
|
24
|
+
import "./chunk-IZCQU5D5.js";
|
|
20
25
|
import {
|
|
21
26
|
getActiveProfile
|
|
22
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-SUWR5QEG.js";
|
|
23
28
|
import {
|
|
24
29
|
CliError,
|
|
25
30
|
isCliError,
|
|
@@ -1725,6 +1730,7 @@ function requireSuccessResult(result) {
|
|
|
1725
1730
|
var savePrepare = {
|
|
1726
1731
|
name: "smart-extract.save.prepare",
|
|
1727
1732
|
risk: "read-before-write",
|
|
1733
|
+
requiresConfirmation: true,
|
|
1728
1734
|
summary: "\u7EC4\u88C5\u843D\u5E93\u8BF7\u6C42\u5E76\u7B7E\u53D1\u786E\u8BA4\u7968\u636E\uFF1A\u5148\u6309\u5185\u5BB9\u6307\u7EB9\u4E0E\u9644\u4EF6\u952E\u67E5\u672C\u5730\u53F0\u8D26\uFF08\u547D\u4E2D\u8FD4\u56DE duplicate \u4E0E\u5DF2\u6709 aiExtraId\uFF0C\u4E0D\u7B7E\u7968\u636E\uFF09\uFF0C\u518D\u81EA\u52A8\u751F\u6210 requestId\uFF08\u9632\u300C\u5199\u7ED3\u679C\u672A\u77E5\u540E\u91CD\u8BD5\u300D\u53CC\u63D2\uFF09\u3002\u672C\u8EAB\u4E0D\u53D1\u5199\u8BF7\u6C42\u3002",
|
|
1729
1735
|
inputSchema: schemaOf({
|
|
1730
1736
|
workflowId: { ...SCHEMA_ID, description: "\u6D41\u7A0B\u6A21\u677F ID\uFF08\u5FC5\u586B\uFF0C\u670D\u52A1\u7AEF\u8981\u6C42\uFF09" },
|
|
@@ -1932,6 +1938,7 @@ async function resolveContinuation(args, stateDir) {
|
|
|
1932
1938
|
var saveApply = {
|
|
1933
1939
|
name: "smart-extract.save.apply",
|
|
1934
1940
|
risk: "high-risk-write",
|
|
1941
|
+
requiresConfirmation: true,
|
|
1935
1942
|
summary: "\u786E\u8BA4\u540E\u771F\u6B63\u5199\u5165\u6279\u6B21\u8BB0\u5F55\uFF1A\u5FC5\u987B confirm=true \u4E14\u5E26 prepare \u8FD4\u56DE\u7684 ticketFile\u3002\u53D1\u5199\u8BF7\u6C42\u524D\u5148\u6309 requestId/\u5185\u5BB9\u6307\u7EB9/\u9644\u4EF6\u952E\u4E09\u5C42\u67E5\u91CD\uFF0C\u91CD\u590D\u4E00\u5F8B\u8FD4\u56DE\u5DF2\u6709 aiExtraId\uFF0C\u4E0D\u518D\u5165\u5E93\u3002",
|
|
1936
1943
|
inputSchema: schemaOf({
|
|
1937
1944
|
confirm: { type: "boolean", description: "\u5FC5\u987B\u4E3A true\uFF1B\u8868\u793A\u7528\u6237\u5DF2\u660E\u786E\u786E\u8BA4\u4FDD\u5B58" },
|
|
@@ -2784,6 +2791,7 @@ var smartExtractOperations = smartExtractOperationDefinitions.map((definition) =
|
|
|
2784
2791
|
name: definition.name,
|
|
2785
2792
|
risk: definition.risk,
|
|
2786
2793
|
summary: definition.summary,
|
|
2794
|
+
...definition.requiresConfirmation ? { requiresConfirmation: true } : {},
|
|
2787
2795
|
inputSchema: definition.inputSchema
|
|
2788
2796
|
}));
|
|
2789
2797
|
var smartExtractManifest = {
|
|
@@ -2880,8 +2888,13 @@ var smartExtractShortcut = {
|
|
|
2880
2888
|
register({ program, action }) {
|
|
2881
2889
|
assertManifestMatchesRegistry();
|
|
2882
2890
|
const command = program.command("smart-extract").description("E10 \u667A\u80FD\u62BD\u53D6\uFF1Afill \u4E00\u6B21\u53D6\u9F50\u7ED3\u6784\u4E0E\u9644\u4EF6\u6B63\u6587\uFF0Cfill.save \u6821\u9A8C+\u843D\u5E93+\u56DE\u67E5\uFF1B\u5176\u4F59\u4E3A\u6392\u969C\u547D\u4EE4");
|
|
2883
|
-
command.command("schema").description("\u8F93\u51FA operation \u5408\u7EA6\uFF08Agent \u81EA\u67E5\u5165\u53E3\uFF09").action(action((ctx) => {
|
|
2884
|
-
|
|
2891
|
+
command.command("schema").description("\u8F93\u51FA operation \u5408\u7EA6\uFF08Agent \u81EA\u67E5\u5165\u53E3\uFF09").option("--list", '\u53EA\u5217\u64CD\u4F5C\u6E05\u5355\uFF08name/summary/risk\uFF09\uFF0C\u5168\u91CF\u4E0D\u622A\u65AD\uFF1B\u5224\u65AD"\u6709\u6CA1\u6709\u67D0\u64CD\u4F5C"\u7528\u8FD9\u4E2A').option("--full", "\u6253\u5370\u5B8C\u6574 manifest\uFF08\u8D85 stdout \u9884\u7B97\u4F1A\u843D\u672C\u5730 ref\uFF0C\u7528 refs get \u5206\u9875\u53D6\uFF09").option("--operation <name>", "\u53EA\u8F93\u51FA\u5355\u4E2A\u64CD\u4F5C\u7684\u5B8C\u6574\u5951\u7EA6\uFF08\u542B inputSchema\uFF0C\u4F53\u79EF\u8FDC\u4F4E\u4E8E\u9884\u7B97\uFF09").action(action((ctx, options) => {
|
|
2892
|
+
const schema = schemaOptionsOf(options);
|
|
2893
|
+
ctx.output.write(manifestView(smartExtractManifest, schema), {
|
|
2894
|
+
json: true,
|
|
2895
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
2896
|
+
...schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}
|
|
2897
|
+
});
|
|
2885
2898
|
}));
|
|
2886
2899
|
command.command("run").description("\u6309 operation \u540D\u6267\u884C\uFF0C\u4F8B\u5982 smart-extract.form.structure").argument("<operation>", "operation \u540D\uFF0C\u89C1 schema \u8F93\u51FA").option("--input <path>", "JSON \u5165\u53C2\u6587\u4EF6\uFF0C- \u8868\u793A stdin").option("--input-json <json>", "\u5185\u8054 JSON \u5165\u53C2").action(action(async (ctx, operation, options) => {
|
|
2887
2900
|
const opts = asOptions(options);
|
|
@@ -2,7 +2,7 @@ import { createRequire as __esbuildCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __esbuildCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
createWorkflowHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MD5RXRI3.js";
|
|
6
6
|
import {
|
|
7
7
|
USER_INTENT_RULE_FILE,
|
|
8
8
|
aigroupUserDir,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
validateRuleFile,
|
|
18
18
|
workflowOperationDefinitions,
|
|
19
19
|
workflowSuccess
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OFCF23FY.js";
|
|
21
21
|
import {
|
|
22
22
|
createWorkflowContinuationSigner
|
|
23
23
|
} from "./chunk-HP7JIYMT.js";
|
|
@@ -27,15 +27,17 @@ import {
|
|
|
27
27
|
workflowPolicyError,
|
|
28
28
|
workflowValidationError
|
|
29
29
|
} from "./chunk-WRXSAVKO.js";
|
|
30
|
-
import
|
|
30
|
+
import {
|
|
31
|
+
charsOf
|
|
32
|
+
} from "./chunk-6MMSLE6K.js";
|
|
31
33
|
import "./chunk-AJ62BGAW.js";
|
|
32
34
|
import {
|
|
33
35
|
reportPlatformError
|
|
34
36
|
} from "./chunk-MD5CW4B6.js";
|
|
35
37
|
import "./chunk-7BDPM5ST.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-DRJYPXKC.js";
|
|
39
|
+
import "./chunk-IZCQU5D5.js";
|
|
40
|
+
import "./chunk-SUWR5QEG.js";
|
|
39
41
|
import {
|
|
40
42
|
isCliError,
|
|
41
43
|
toErrorEnvelope
|
|
@@ -440,14 +442,26 @@ var workflowShortcut = {
|
|
|
440
442
|
category: "shortcut",
|
|
441
443
|
register({ program, action }) {
|
|
442
444
|
const workflow = program.command("workflow").description("\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B\uFF08\u5F85\u529E/\u5DF2\u529E/\u6211\u53D1\u8D77/\u5168\u90E8\u3001\u8BE6\u60C5\u3001\u64CD\u4F5C\u3001\u6279\u91CF\u3001\u53D1\u8D77\u3001\u4FEE\u6539\uFF09");
|
|
443
|
-
workflow.command("schema").description("Print workflow operation manifest for agents").option("--operation <name>", "print one operation with its full inputSchema").option("--full", "print the whole manifest (about 65 KB; stdout may be trimmed)").action(action((ctx, options) => {
|
|
445
|
+
workflow.command("schema").description("Print workflow operation manifest for agents").option("--list", "\u53EA\u5217\u64CD\u4F5C\u7D22\u5F15\uFF08name/summary/\u98CE\u9669\uFF09\uFF0C\u4E0E\u9ED8\u8BA4\u8F93\u51FA\u4E00\u81F4\uFF0C\u5168\u91CF\u4E0D\u622A\u65AD").option("--operation <name>", "print one operation with its full inputSchema").option("--full", "print the whole manifest (about 65 KB; stdout may be trimmed)").action(action((ctx, options) => {
|
|
444
446
|
const opts = asOptions(options);
|
|
445
447
|
const requested = String(opts.operation ?? "").trim();
|
|
446
448
|
if (requested && opts.full === true) {
|
|
447
449
|
throw workflowValidationError("option_conflict", "\u4E0D\u80FD\u540C\u65F6\u4F20 --operation \u548C --full");
|
|
448
450
|
}
|
|
449
451
|
if (opts.full === true) {
|
|
450
|
-
|
|
452
|
+
const full = manifestFull();
|
|
453
|
+
if (charsOf(full) > ctx.output.budgetChars()) {
|
|
454
|
+
ctx.output.write({
|
|
455
|
+
...manifestIndex(),
|
|
456
|
+
fullOmitted: {
|
|
457
|
+
totalOperations: visibleOperations().length,
|
|
458
|
+
fullChars: charsOf(full),
|
|
459
|
+
hint: "\u5B8C\u6574 inputSchema \u8D85\u51FA stdout \u9884\u7B97\uFF0C\u672A\u968F\u672C\u6B21\u8FD4\u56DE\uFF08\u5426\u5219 operations \u4F1A\u88AB\u622A\u6210\u51E0\u6761\uFF0C\u8BA9\u4F60\u8BEF\u4EE5\u4E3A\u6A21\u5757\u53EA\u6709\u90A3\u4E48\u591A\u4E2A\u80FD\u529B\uFF09\u3002\u53D6\u67D0\u4E2A\u64CD\u4F5C\u7684\u5B8C\u6574\u5951\u7EA6\uFF1Aweaver-work-cli workflow schema --operation <name>\u3002"
|
|
460
|
+
}
|
|
461
|
+
}, { json: true });
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
ctx.output.write(full, { json: true });
|
|
451
465
|
return;
|
|
452
466
|
}
|
|
453
467
|
if (requested) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { registerE10AuthCommands } from '../../internal/e10/auth/commands.js';
|
|
2
|
+
/**
|
|
3
|
+
* 顶层 `auth` 入口:把 E10 auth 命令族挂到根 program 上。
|
|
4
|
+
*
|
|
5
|
+
* 单独登记成一个内建命令,而不再由 `e10Command.register` 顺手挂到根 program,原因有两条:
|
|
6
|
+
*
|
|
7
|
+
* 1. **可发现性**:`commands list` 与顶层 help 的元数据都来自 `builtinCommands` 数组,
|
|
8
|
+
* 侧挂出来的 `auth` 不会出现在 `commands list` 里 —— 文档写 `auth login` / `auth show`,
|
|
9
|
+
* 按 `commands list` 找入口却查不到,两条路径互相打架。
|
|
10
|
+
* 2. **启动开销**:`src/index.ts` 靠 `BUILTIN_NAMES`(同样派生自 `builtinCommands`)
|
|
11
|
+
* 判断要不要加载 shortcut 实现。`auth` 不在其中时会落进"没命中任何已知命令名 ⇒
|
|
12
|
+
* 全量加载"的兜底分支,于是每次 `auth ...` 都要把全部 shortcut 实现加载一遍。
|
|
13
|
+
*
|
|
14
|
+
* `e10 auth` 仍然由 `e10Command` 注册在 `e10` 子命令下,作为等价入口保留。
|
|
15
|
+
*/
|
|
16
|
+
export const authCommand = {
|
|
17
|
+
name: 'auth',
|
|
18
|
+
description: 'E10 auth and profile management',
|
|
19
|
+
category: 'platform',
|
|
20
|
+
register({ program, action }) {
|
|
21
|
+
registerE10AuthCommands(program, action);
|
|
22
|
+
},
|
|
23
|
+
};
|
package/dist/cmd/e10/index.js
CHANGED
|
@@ -5,7 +5,8 @@ export const e10Command = {
|
|
|
5
5
|
description: 'E10 platform adapter: auth, profiles, and shared API client',
|
|
6
6
|
category: 'platform',
|
|
7
7
|
register({ program, ctx, action }) {
|
|
8
|
-
|
|
8
|
+
// 顶层 `auth` 由 src/cmd/auth/index.ts 的 authCommand 单独登记;这里只挂 `e10 auth`。
|
|
9
|
+
// 两边都挂根 program 会把 `auth` 注册两次(commander 会重复列命令并只路由到第一个)。
|
|
9
10
|
const e10 = program.command('e10').description('E10 platform commands');
|
|
10
11
|
registerE10AuthCommands(e10, action);
|
|
11
12
|
ctx.hooks.register({
|
package/dist/cmd/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { authCommand } from './auth/index.js';
|
|
1
2
|
import { commandsCommand } from './commands/index.js';
|
|
2
3
|
import { configCommand } from './config/index.js';
|
|
3
4
|
import { docsCommand } from './docs/index.js';
|
|
@@ -15,6 +16,7 @@ export const builtinCommands = [
|
|
|
15
16
|
commandsCommand,
|
|
16
17
|
runCommand,
|
|
17
18
|
refsCommand,
|
|
19
|
+
authCommand,
|
|
18
20
|
e10Command,
|
|
19
21
|
identityCommand,
|
|
20
22
|
setupCommand,
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { CliError, ExitCode } from './errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* 域级 `schema` 的分级视图。
|
|
4
|
+
*
|
|
5
|
+
* ## 为什么需要它
|
|
6
|
+
*
|
|
7
|
+
* `<domain> schema` 把「有哪些操作」和「每个操作的完整 inputSchema」塞进同一份 JSON。大域的实测体积
|
|
8
|
+
* (`outputChars`,即压缩前的原始字符数):
|
|
9
|
+
*
|
|
10
|
+
* | 域 | 操作数 | 原始字符 | 压缩后剩余操作 |
|
|
11
|
+
* | --- | --- | --- | --- |
|
|
12
|
+
* | meeting | 149 | 309,577 | 10 |
|
|
13
|
+
* | caizhilian | 180 | 212,694 | 8 |
|
|
14
|
+
* | contract | 151 | 196,881 | 20 |
|
|
15
|
+
* | invoice | 28 | 181,625 | 2 |
|
|
16
|
+
*
|
|
17
|
+
* 全部超过 stdout 预算(默认 28,000 字符),被 `Output.prepare()` 统一压成预览。危害不是"少看几条":
|
|
18
|
+
* invoice 只剩 2 条,操作名还被截成 `invoice.enterprise.l…(truncated 3 chars)`,模型连名字都没法照抄;
|
|
19
|
+
* 更关键的是 `inputSchema` 几乎全丢,模型「知道有这工具,但不知道字段怎么传」→ 猜参数 → 校验失败 → 重试。
|
|
20
|
+
*
|
|
21
|
+
* ## 为什么不用 offset/limit 分页
|
|
22
|
+
*
|
|
23
|
+
* operations 每条长度差一个数量级(mail 平均 372 字符、invoice 2,530、performance 2,689),按条分页
|
|
24
|
+
* 对不齐边界;而且 `refs get` 的自适应分批实测取完 caizhilian 的 180 条要 10 次往返、累计 200K+ 上下文。
|
|
25
|
+
* 分页解决的是"一页装不下",而这里的问题是"根本不需要一次看全每个工具的参数"。
|
|
26
|
+
*
|
|
27
|
+
* ## 三级输出
|
|
28
|
+
*
|
|
29
|
+
* - 默认(不传 flag):完整 manifest,**行为不变**,超预算仍走 ref 恢复(兼容既有技能契约)。
|
|
30
|
+
* - `--list`:只留 name / summary(截 40 字)/ risk 等检索必需字段。实测 caizhilian 19,324 字符、
|
|
31
|
+
* meeting 15,215、contract 14,464、ehr 6,465、invoice 2,418 —— 全部落在 28K 预算内,一波放完不截断。
|
|
32
|
+
* - `--operation <name>`:单个操作的完整契约(含 inputSchema),实测 400–2,700 字符。
|
|
33
|
+
*
|
|
34
|
+
* 组合用法就是"先用 `--list` 认操作,再用 `--operation` 拿精确入参",两次往返、总量可控。
|
|
35
|
+
*/
|
|
36
|
+
/** `--list` 里 summary 的最大字符数。实测 40 字能把 180 条压到 19.3K;再长就会顶到预算。 */
|
|
37
|
+
export const OPERATION_SUMMARY_MAX_CHARS = 40;
|
|
38
|
+
/**
|
|
39
|
+
* `--list` 模式下要单行化的路径。
|
|
40
|
+
*
|
|
41
|
+
* 清单条目多,每条只占一行后缩进空白能省掉近一半体积,而这些空白对读模型的收益为零
|
|
42
|
+
* (模型要的是"叫什么、干什么、什么风险",不是每层两个空格)。内容一字不改,仍是合法 JSON。
|
|
43
|
+
*/
|
|
44
|
+
export const MANIFEST_LIST_COMPACT_PATHS = ['operations', 'withheldOperations'];
|
|
45
|
+
/** 找不到操作时最多回几条近似建议。 */
|
|
46
|
+
const MAX_SUGGESTIONS = 8;
|
|
47
|
+
/** 域标识:优先 `name`(多数域),退化到 `module`(ebuilder-form),都没有时给占位符。 */
|
|
48
|
+
function domainOf(manifest) {
|
|
49
|
+
if (typeof manifest.name === 'string' && manifest.name !== '')
|
|
50
|
+
return manifest.name;
|
|
51
|
+
if (typeof manifest.module === 'string' && manifest.module !== '')
|
|
52
|
+
return manifest.module;
|
|
53
|
+
return '';
|
|
54
|
+
}
|
|
55
|
+
function clip(text, max) {
|
|
56
|
+
const value = typeof text === 'string' ? text : text === undefined || text === null ? '' : String(text);
|
|
57
|
+
return value.length > max ? `${value.slice(0, max)}…` : value;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 清单里保留哪些字段:够模型判断"该用哪个",不含 inputSchema。
|
|
61
|
+
*
|
|
62
|
+
* **不带 `resource` / `capability`**:它们几乎总能从 name 的第二段读出来
|
|
63
|
+
* (`caizhilian.document.search` → document、`meeting.eb.create` → eb),
|
|
64
|
+
* 而 180 条各带一次 `"resource":"document"` 要吃掉约 4K 字符——正好把清单顶过预算。
|
|
65
|
+
*/
|
|
66
|
+
function toListEntry(operation) {
|
|
67
|
+
const entry = { name: operation.name };
|
|
68
|
+
entry.summary = clip(operation.summary, OPERATION_SUMMARY_MAX_CHARS);
|
|
69
|
+
if (typeof operation.risk === 'string')
|
|
70
|
+
entry.risk = operation.risk;
|
|
71
|
+
if (operation.requiresConfirmation === true)
|
|
72
|
+
entry.requiresConfirmation = true;
|
|
73
|
+
return entry;
|
|
74
|
+
}
|
|
75
|
+
function operationsOf(manifest) {
|
|
76
|
+
if (!Array.isArray(manifest.operations))
|
|
77
|
+
return [];
|
|
78
|
+
return manifest.operations.filter((item) => Boolean(item) && typeof item === 'object' && !Array.isArray(item));
|
|
79
|
+
}
|
|
80
|
+
function namesOf(manifest) {
|
|
81
|
+
return operationsOf(manifest).map((item) => String(item?.name ?? '')).filter((name) => name !== '');
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 按名字找操作。允许三种写法,省掉模型记不住全名时的来回:
|
|
85
|
+
* 全名(`invoice.list`)、省略域前缀(`list`)、以及唯一后缀匹配(`enterprise.list`)。
|
|
86
|
+
*/
|
|
87
|
+
function findOperation(manifest, wanted) {
|
|
88
|
+
const operations = operationsOf(manifest);
|
|
89
|
+
const domain = domainOf(manifest);
|
|
90
|
+
const exact = operations.find((item) => String(item?.name ?? '') === wanted);
|
|
91
|
+
if (exact)
|
|
92
|
+
return exact;
|
|
93
|
+
if (domain) {
|
|
94
|
+
const prefixed = operations.find((item) => String(item?.name ?? '') === `${domain}.${wanted}`);
|
|
95
|
+
if (prefixed)
|
|
96
|
+
return prefixed;
|
|
97
|
+
}
|
|
98
|
+
const suffixed = operations.filter((item) => String(item?.name ?? '').endsWith(`.${wanted}`));
|
|
99
|
+
// 只有唯一命中才认,避免 `.list` 这种后缀同时命中十几个操作时给出错误结果。
|
|
100
|
+
return suffixed.length === 1 ? suffixed[0] : undefined;
|
|
101
|
+
}
|
|
102
|
+
function suggestionsOf(manifest, wanted) {
|
|
103
|
+
const needle = wanted.toLowerCase();
|
|
104
|
+
const all = namesOf(manifest);
|
|
105
|
+
const contains = all.filter((name) => name.toLowerCase().includes(needle));
|
|
106
|
+
const tail = all.filter((name) => {
|
|
107
|
+
const last = name.split('.').pop() ?? '';
|
|
108
|
+
return !contains.includes(name) && last.toLowerCase().includes(needle);
|
|
109
|
+
});
|
|
110
|
+
return [...contains, ...tail].slice(0, MAX_SUGGESTIONS);
|
|
111
|
+
}
|
|
112
|
+
function schemaHintOf(manifest) {
|
|
113
|
+
const domain = domainOf(manifest) || '<domain>';
|
|
114
|
+
return `本清单只含 name/summary/risk。取单个操作的完整入参契约(含 inputSchema):`
|
|
115
|
+
+ `weaver-work-cli ${domain} schema --operation <name>`;
|
|
116
|
+
}
|
|
117
|
+
function operationHintOf(manifest) {
|
|
118
|
+
const domain = domainOf(manifest) || '<domain>';
|
|
119
|
+
return `要看全部操作清单:weaver-work-cli ${domain} schema --list`;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 从 commander 的 options 参数里读出 `--list` / `--operation`。
|
|
123
|
+
*
|
|
124
|
+
* 与各业务模块的 `asOptions(options)` 一致:**无位置参数**的子命令,action 回调第二个参数就是
|
|
125
|
+
* options 对象(jiuchuanhui 的 `schema --operation` 一直这么取,已跑通)。这里只做类型收窄,
|
|
126
|
+
* 非对象一律当"没传 flag",交由 `manifestView` 走默认分支。
|
|
127
|
+
*/
|
|
128
|
+
export function schemaOptionsOf(value) {
|
|
129
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
130
|
+
return {};
|
|
131
|
+
const holder = value;
|
|
132
|
+
return {
|
|
133
|
+
list: holder.list === true,
|
|
134
|
+
full: holder.full === true,
|
|
135
|
+
operation: holder.operation === undefined || holder.operation === null
|
|
136
|
+
? undefined
|
|
137
|
+
: String(holder.operation),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* 把完整 manifest 投影成 `--list` / `--operation` 视图;两个 flag 都没给时**原样返回**,
|
|
142
|
+
* 保证默认行为逐字节不变。
|
|
143
|
+
*/
|
|
144
|
+
export function manifestView(manifest, options = {}) {
|
|
145
|
+
const wanted = String(options.operation ?? '').trim();
|
|
146
|
+
if (wanted !== '') {
|
|
147
|
+
const hit = findOperation(manifest, wanted);
|
|
148
|
+
if (!hit) {
|
|
149
|
+
const suggestions = suggestionsOf(manifest, wanted);
|
|
150
|
+
const tail = suggestions.length > 0
|
|
151
|
+
? `可用操作(近似匹配):${suggestions.join(', ')}。先用 --list 看全量清单。`
|
|
152
|
+
: '先用 --list 看全量清单。';
|
|
153
|
+
throw new CliError(`未知操作 ${wanted}(域 ${domainOf(manifest)} 共 ${operationsOf(manifest).length} 个操作)。${tail}`, ExitCode.UsageError);
|
|
154
|
+
}
|
|
155
|
+
const domain = domainOf(manifest);
|
|
156
|
+
return {
|
|
157
|
+
schemaVersion: 1,
|
|
158
|
+
ok: true,
|
|
159
|
+
...(domain ? { module: domain } : {}),
|
|
160
|
+
...(typeof manifest.title === 'string' ? { title: manifest.title } : {}),
|
|
161
|
+
...(typeof manifest.sourceSkill === 'string' ? { sourceSkill: manifest.sourceSkill } : {}),
|
|
162
|
+
operation: hit,
|
|
163
|
+
operationHint: operationHintOf(manifest),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
// `--full` 优先于 `--list`:同时给时以"要完整"为准,避免模型以为拿了全量其实拿的是清单。
|
|
167
|
+
if (options.full === true)
|
|
168
|
+
return manifest;
|
|
169
|
+
if (options.list !== true)
|
|
170
|
+
return manifest;
|
|
171
|
+
const operations = operationsOf(manifest);
|
|
172
|
+
const withheld = Array.isArray(manifest.withheldOperations) ? manifest.withheldOperations : [];
|
|
173
|
+
const domain = domainOf(manifest);
|
|
174
|
+
return {
|
|
175
|
+
schemaVersion: 1,
|
|
176
|
+
ok: true,
|
|
177
|
+
...(domain !== '' ? { module: domain } : {}),
|
|
178
|
+
...(typeof manifest.title === 'string' ? { title: manifest.title } : {}),
|
|
179
|
+
...(typeof manifest.version === 'string' || typeof manifest.version === 'number'
|
|
180
|
+
? { version: manifest.version }
|
|
181
|
+
: {}),
|
|
182
|
+
...(typeof manifest.sourceSkill === 'string' ? { sourceSkill: manifest.sourceSkill } : {}),
|
|
183
|
+
...(Array.isArray(manifest.capabilities) ? { capabilities: manifest.capabilities } : {}),
|
|
184
|
+
// count 与 total 相等是常态;分成两个键是为了让模型一眼看出"这份清单没被截断"。
|
|
185
|
+
total: operations.length,
|
|
186
|
+
count: operations.length,
|
|
187
|
+
schemaHint: schemaHintOf(manifest),
|
|
188
|
+
operations: operations.map(toListEntry),
|
|
189
|
+
// 被禁用的操作必须也在清单里:模型看到 `mail.delete.batch` 存在于清单才不会再去找它。
|
|
190
|
+
//
|
|
191
|
+
// `withheldCount` 一起回:各域 SKILL.md 明确要模型"看 withheldCount 与 withheldOperations 条数
|
|
192
|
+
// 是否一致来判断有没有被截",漏掉这个键会让那段指引失效。`--list` 保证全量,所以这里
|
|
193
|
+
// 直接用数组长度,天然自洽(不取 manifest 里的预置值,避免两者口径不一致)。
|
|
194
|
+
// 值为 0 也要回(招聘域当前就是 0),否则模型找不到字段会以为输出残缺。
|
|
195
|
+
...(manifest.withheldCount !== undefined || withheld.length > 0
|
|
196
|
+
? { withheldCount: withheld.length }
|
|
197
|
+
: {}),
|
|
198
|
+
...(withheld.length > 0
|
|
199
|
+
? {
|
|
200
|
+
withheldOperations: withheld.map((item) => {
|
|
201
|
+
const record = (item ?? {});
|
|
202
|
+
return { name: record.name, reason: clip(record.reason, 80) };
|
|
203
|
+
}),
|
|
204
|
+
}
|
|
205
|
+
: {}),
|
|
206
|
+
};
|
|
207
|
+
}
|
package/dist/core/output.js
CHANGED
|
@@ -128,6 +128,19 @@ export function bytesOf(value) {
|
|
|
128
128
|
export function charsOf(value) {
|
|
129
129
|
return JSON.stringify(value ?? null, null, 2).length;
|
|
130
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* 按"给 `compactPaths` 时实际会写出去的文本"计字符数。
|
|
133
|
+
*
|
|
134
|
+
* `charsOf()` 恒按 2 空格缩进计数,而 `write()` 最终走 `stringifyForStdout(value, compactPaths)`;
|
|
135
|
+
* 不同口径会让预算判断失真:一份紧凑化后 19,324 字符、本可完整输出的清单,按缩进会被算成 38,833,
|
|
136
|
+
* 于是被误判超线并切掉大半条目(caizhilian 180 条只留 50 条,2026-11-27 实测)。
|
|
137
|
+
*/
|
|
138
|
+
function compactCharsOf(value, compactPaths) {
|
|
139
|
+
if (!compactPaths || compactPaths.length === 0)
|
|
140
|
+
return charsOf(value);
|
|
141
|
+
const text = stringifyForStdout(value, compactPaths);
|
|
142
|
+
return text === undefined ? charsOf(value) : text.length;
|
|
143
|
+
}
|
|
131
144
|
/** 链接类字段不参与截断:被截断的 URL 无法点击或调用。 */
|
|
132
145
|
function isLinkField(key) {
|
|
133
146
|
if (!key)
|
|
@@ -437,11 +450,13 @@ function withTruncationNotice(leading, truncations) {
|
|
|
437
450
|
: '完整结果未能暂存,无法恢复。';
|
|
438
451
|
const notice = `⚠️ stdout 仅为预览,不是全量(不要据此判断条数或分页):${detail}。${tail}`;
|
|
439
452
|
const { largeOutputNotice: rawNotice, ...rest } = leading;
|
|
453
|
+
// 顺序即优先级(2026-11-27):`largeOutputNotice` 必须落在信封**第一行**。此前它排在第 14 行左右,
|
|
454
|
+
// 模型只扫前几个键时看不到"已截断",会把预览当全量。机读索引紧跟着它,明细放最后。
|
|
440
455
|
return {
|
|
441
|
-
|
|
456
|
+
largeOutputNotice: `${String(rawNotice ?? '')}${notice}`,
|
|
442
457
|
...(omitted ? { previewOmitted: omitted } : {}),
|
|
443
458
|
...(recovery ? { recovery } : {}),
|
|
444
|
-
|
|
459
|
+
...rest,
|
|
445
460
|
...(truncatedFields ? { previewTruncatedFields: truncatedFields } : {}),
|
|
446
461
|
};
|
|
447
462
|
}
|
|
@@ -485,13 +500,14 @@ function fitEnvelope(value, leading, extraWarnings, budgetChars) {
|
|
|
485
500
|
: '结果无法暂存;stdout 仅保留精简内容,完整结果不可恢复。';
|
|
486
501
|
const finalDetail = describeTruncations(skeletonTruncations(base));
|
|
487
502
|
return {
|
|
503
|
+
// 这一档连骨架都放不下,提示必须绝对第一:模型看到 `data: '<omitted ...>'` 之前得先知道发生了什么。
|
|
504
|
+
largeOutputNotice: finalDetail ? `${finalNotice}⚠️ 预览不是全量:${finalDetail}。` : finalNotice,
|
|
488
505
|
...(persisted ? { refId } : {}),
|
|
489
506
|
resultPersisted: persisted,
|
|
490
507
|
previewTruncated: true,
|
|
491
508
|
...(finalOmitted ? { previewOmitted: finalOmitted } : {}),
|
|
492
509
|
outputChars: Number(leading.outputChars) || 0,
|
|
493
510
|
outputBytes: Number(leading.outputBytes) || 0,
|
|
494
|
-
largeOutputNotice: finalDetail ? `${finalNotice}⚠️ 预览不是全量:${finalDetail}。` : finalNotice,
|
|
495
511
|
schemaVersion: typeof base.schemaVersion === 'number' || typeof base.schemaVersion === 'string'
|
|
496
512
|
? String(base.schemaVersion).slice(0, 20)
|
|
497
513
|
: 1,
|
|
@@ -575,7 +591,10 @@ export class Output {
|
|
|
575
591
|
if (options.persist === false || threshold <= 0)
|
|
576
592
|
return value;
|
|
577
593
|
const finalBudget = Math.max(1024, threshold - 1024);
|
|
578
|
-
|
|
594
|
+
// 预算必须按**真正写出去的形态**算。给了 compactPaths 时,紧凑序列化能省掉近一半缩进空白
|
|
595
|
+
// (实测 caizhilian 的 180 条操作清单:全缩进 38,833 字符、operations 单行 19,324 字符),
|
|
596
|
+
// 而 `charsOf()` 恒按 2 空格缩进计数,会把本该完整放下的一份清单误判成超线并逐级切条目。
|
|
597
|
+
const chars = compactCharsOf(value, options.compactPaths);
|
|
579
598
|
if (chars <= threshold)
|
|
580
599
|
return value;
|
|
581
600
|
// 字节数只用于回报(refs list / 通知文案),预算判断一律走字符。
|
|
@@ -629,6 +648,11 @@ export class Output {
|
|
|
629
648
|
? ' 本结果超过暂存容量上限,已保留本次结果并淘汰旧结果。'
|
|
630
649
|
: '';
|
|
631
650
|
return {
|
|
651
|
+
// 首行就是人话提示:模型只扫前几个键时也能先看到"已超线、别当全量用"。
|
|
652
|
+
largeOutputNotice: `结果 ${chars} 字符已超 stdout 预算 ${resultThresholdChars(this.ctx)} 字符,全量已暂存为本地 ref。`
|
|
653
|
+
+ `取全量用 refs get ${meta.refId} <路径>(或 --input-ref ${meta.refId} 喂给下一条命令),`
|
|
654
|
+
+ '不要重新调用业务接口。'
|
|
655
|
+
+ retentionNotice,
|
|
632
656
|
refId: meta.refId,
|
|
633
657
|
resultPersisted: true,
|
|
634
658
|
previewTruncated: true,
|
|
@@ -636,13 +660,19 @@ export class Output {
|
|
|
636
660
|
expiresAt: meta.expiresAt,
|
|
637
661
|
outputChars: chars,
|
|
638
662
|
outputBytes: bytes,
|
|
639
|
-
largeOutputNotice: `结果 ${chars} 字符已超 stdout 预算 ${resultThresholdChars(this.ctx)} 字符,全量已暂存为本地 ref。`
|
|
640
|
-
+ `取全量用 refs get ${meta.refId} <路径>(或 --input-ref ${meta.refId} 喂给下一条命令),`
|
|
641
|
-
+ '不要重新调用业务接口。'
|
|
642
|
-
+ retentionNotice,
|
|
643
663
|
};
|
|
644
664
|
}
|
|
645
665
|
raw(message) {
|
|
646
666
|
console.log(message);
|
|
647
667
|
}
|
|
668
|
+
/**
|
|
669
|
+
* 当前生效的 stdout 预算(字符)。
|
|
670
|
+
*
|
|
671
|
+
* 给需要**自己判断"装不装得下"**的命令用(如 `schema --full`:装不下就改回完整清单,
|
|
672
|
+
* 而不是让输出层把 `operations` 切掉几条,让模型以为模块只有那么多个工具)。
|
|
673
|
+
* 统一走这里,避免各命令自己读 `BASH_MAX_OUTPUT_LENGTH` 或硬编码 28,000。
|
|
674
|
+
*/
|
|
675
|
+
budgetChars() {
|
|
676
|
+
return resultThresholdChars(this.ctx);
|
|
677
|
+
}
|
|
648
678
|
}
|