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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createAssetIdleHost } from './host.js';
|
|
5
6
|
import { assetIdleManifest } from './manifest.js';
|
|
6
7
|
import { executeAssetIdleOperation } from './operations.js';
|
|
@@ -100,8 +101,16 @@ export const assetIdleShortcut = {
|
|
|
100
101
|
assetIdle
|
|
101
102
|
.command('schema')
|
|
102
103
|
.description('Print asset-idle operation manifest for agents')
|
|
103
|
-
.
|
|
104
|
-
|
|
104
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
105
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
106
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
107
|
+
.action(action((ctx, options) => {
|
|
108
|
+
const schema = schemaOptionsOf(options);
|
|
109
|
+
ctx.output.write(manifestView(assetIdleManifest, schema), {
|
|
110
|
+
json: true,
|
|
111
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
112
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
113
|
+
});
|
|
105
114
|
}));
|
|
106
115
|
assetIdle
|
|
107
116
|
.command('run')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createBlogContinuationSigner } from './continuation.js';
|
|
5
6
|
import { blogValidationError } from './errors.js';
|
|
6
7
|
import { createBlogHost } from './host.js';
|
|
@@ -115,8 +116,16 @@ export const blogShortcut = {
|
|
|
115
116
|
const blog = program.command('blog').description('E10 工作日报(查询/发布/编辑/评论/点赞/提醒/导出)');
|
|
116
117
|
blog.command('schema')
|
|
117
118
|
.description('Print blog operation manifest for agents')
|
|
118
|
-
.
|
|
119
|
-
|
|
119
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
120
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
121
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
122
|
+
.action(action((ctx, options) => {
|
|
123
|
+
const schema = schemaOptionsOf(options);
|
|
124
|
+
ctx.output.write(manifestView(blogManifest, schema), {
|
|
125
|
+
json: true,
|
|
126
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
127
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
128
|
+
});
|
|
120
129
|
}));
|
|
121
130
|
withJsonInputOptions(blog.command('run')
|
|
122
131
|
.description('Run a blog operation with JSON input')
|
|
@@ -172,6 +172,7 @@ export const blogOperations = [
|
|
|
172
172
|
{
|
|
173
173
|
name: 'blog.publish.prepare',
|
|
174
174
|
risk: 'read-before-write',
|
|
175
|
+
requiresConfirmation: true,
|
|
175
176
|
summary: '发布准备:查当日是否已有日报 + 回填默认共享 + 签发 continuation(不写数据)',
|
|
176
177
|
inputSchema: {
|
|
177
178
|
type: 'object',
|
|
@@ -195,6 +196,7 @@ export const blogOperations = [
|
|
|
195
196
|
{
|
|
196
197
|
name: 'blog.publish.apply',
|
|
197
198
|
risk: 'high-risk-write',
|
|
199
|
+
requiresConfirmation: true,
|
|
198
200
|
summary: '发布落库:校验 continuation 与写前状态后调用 addBlog,并回查验证',
|
|
199
201
|
inputSchema: CONFIRM_SCHEMA,
|
|
200
202
|
missingExamples: [
|
|
@@ -208,6 +210,7 @@ export const blogOperations = [
|
|
|
208
210
|
{
|
|
209
211
|
name: 'blog.edit.prepare',
|
|
210
212
|
risk: 'read-before-write',
|
|
213
|
+
requiresConfirmation: true,
|
|
211
214
|
summary: '编辑准备:回查原内容与差异 + 目标指纹 + 签发 continuation(不写数据)',
|
|
212
215
|
inputSchema: {
|
|
213
216
|
type: 'object',
|
|
@@ -232,6 +235,7 @@ export const blogOperations = [
|
|
|
232
235
|
{
|
|
233
236
|
name: 'blog.edit.apply',
|
|
234
237
|
risk: 'high-risk-write',
|
|
238
|
+
requiresConfirmation: true,
|
|
235
239
|
summary: '编辑落库:目标指纹校验后调用 updateBlog,并回查内容一致性',
|
|
236
240
|
inputSchema: CONFIRM_SCHEMA,
|
|
237
241
|
missingExamples: [
|
|
@@ -245,6 +249,7 @@ export const blogOperations = [
|
|
|
245
249
|
{
|
|
246
250
|
name: 'blog.comment.prepare',
|
|
247
251
|
risk: 'read-before-write',
|
|
252
|
+
requiresConfirmation: true,
|
|
248
253
|
summary: '评论准备:定位目标日报(blog_id 或 date+user)后签发 continuation',
|
|
249
254
|
inputSchema: {
|
|
250
255
|
type: 'object',
|
|
@@ -271,6 +276,7 @@ export const blogOperations = [
|
|
|
271
276
|
{
|
|
272
277
|
name: 'blog.comment.apply',
|
|
273
278
|
risk: 'high-risk-write',
|
|
279
|
+
requiresConfirmation: true,
|
|
274
280
|
summary: '评论落库:createComment 后从评论列表回查该评论',
|
|
275
281
|
inputSchema: CONFIRM_SCHEMA,
|
|
276
282
|
missingExamples: [
|
|
@@ -284,6 +290,7 @@ export const blogOperations = [
|
|
|
284
290
|
{
|
|
285
291
|
name: 'blog.like.prepare',
|
|
286
292
|
risk: 'read-before-write',
|
|
293
|
+
requiresConfirmation: true,
|
|
287
294
|
summary: '点赞/取消点赞准备:定位目标日报后签发 continuation',
|
|
288
295
|
inputSchema: {
|
|
289
296
|
type: 'object',
|
|
@@ -309,6 +316,7 @@ export const blogOperations = [
|
|
|
309
316
|
{
|
|
310
317
|
name: 'blog.like.apply',
|
|
311
318
|
risk: 'high-risk-write',
|
|
319
|
+
requiresConfirmation: true,
|
|
312
320
|
summary: '点赞落库:vote / cancelVote,以业务码为生效依据(无只读回查接口)',
|
|
313
321
|
inputSchema: CONFIRM_SCHEMA,
|
|
314
322
|
missingExamples: [
|
|
@@ -322,6 +330,7 @@ export const blogOperations = [
|
|
|
322
330
|
{
|
|
323
331
|
name: 'blog.remind.prepare',
|
|
324
332
|
risk: 'read-before-write',
|
|
333
|
+
requiresConfirmation: true,
|
|
325
334
|
summary: '提醒准备:解析被提醒人 + 生成默认文案 + 签发 continuation(不发送)',
|
|
326
335
|
inputSchema: {
|
|
327
336
|
type: 'object',
|
|
@@ -366,6 +375,7 @@ export const blogOperations = [
|
|
|
366
375
|
{
|
|
367
376
|
name: 'blog.remind.apply',
|
|
368
377
|
risk: 'high-risk-write',
|
|
378
|
+
requiresConfirmation: true,
|
|
369
379
|
summary: '提醒落库:逐人 POST sendUrge;部分失败返回 PARTIAL,中断返回 write_uncertain',
|
|
370
380
|
inputSchema: CONFIRM_SCHEMA,
|
|
371
381
|
missingExamples: [
|
|
@@ -30,15 +30,29 @@ export function isCaizhilianBusinessSuccess(value) {
|
|
|
30
30
|
return value.status;
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
|
+
/** 服务端响应无可读文案时的兜底 message(调用方按引用判定「服务端没给文案」)。 */
|
|
34
|
+
export const CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE = '采知连接口返回业务失败';
|
|
35
|
+
/** 错误信封 details.raw:服务端原始响应体摘要(截断 2 KB),供调用方自助排障。 */
|
|
36
|
+
function rawErrorBody(value) {
|
|
37
|
+
if (value === undefined || value === null)
|
|
38
|
+
return undefined;
|
|
39
|
+
try {
|
|
40
|
+
const text = typeof value === 'string' ? value : JSON.stringify(value);
|
|
41
|
+
return text.length > 2048 ? `${text.slice(0, 2048)}…` : text;
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
33
47
|
export function caizhilianBusinessMessage(value) {
|
|
34
48
|
if (!value || typeof value !== 'object')
|
|
35
|
-
return
|
|
49
|
+
return CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE;
|
|
36
50
|
const candidates = [value.msg, value.message, value.errMsg, value.data?.msg, value.data?.message];
|
|
37
51
|
for (const item of candidates) {
|
|
38
52
|
if (typeof item === 'string' && item.trim())
|
|
39
53
|
return item;
|
|
40
54
|
}
|
|
41
|
-
return
|
|
55
|
+
return CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE;
|
|
42
56
|
}
|
|
43
57
|
function caizhilianBusinessCode(value) {
|
|
44
58
|
if (!value || typeof value !== 'object')
|
|
@@ -167,16 +181,18 @@ export function createCaizhilianHost(ctx, dependencies = {}) {
|
|
|
167
181
|
throw caizhilianNetworkError('protocol', `接口返回不是合法 JSON(HTTP ${response.status})`, { retryable: false });
|
|
168
182
|
}
|
|
169
183
|
if (response.status < 200 || response.status >= 300 || (request.requireHttp200 && response.status !== 200)) {
|
|
184
|
+
const raw = rawErrorBody(response.value);
|
|
170
185
|
throw new CaizhilianCliError('api', 'http_error', `采知连接口 HTTP ${response.status}`, {
|
|
171
186
|
code: response.status,
|
|
172
|
-
details: { status: response.status, message: caizhilianBusinessMessage(response.value) },
|
|
187
|
+
details: { status: response.status, message: caizhilianBusinessMessage(response.value), ...(raw === undefined ? {} : { raw }) },
|
|
173
188
|
exitCode: 1,
|
|
174
189
|
});
|
|
175
190
|
}
|
|
176
191
|
if (!request.tolerateBusinessError && !isCaizhilianBusinessSuccess(response.value)) {
|
|
192
|
+
const raw = rawErrorBody(response.value);
|
|
177
193
|
throw new CaizhilianCliError('api', 'business_error', caizhilianBusinessMessage(response.value), {
|
|
178
194
|
code: caizhilianBusinessCode(response.value),
|
|
179
|
-
details: { code: caizhilianBusinessCode(response.value), message: caizhilianBusinessMessage(response.value) },
|
|
195
|
+
details: { code: caizhilianBusinessCode(response.value), message: caizhilianBusinessMessage(response.value), ...(raw === undefined ? {} : { raw }) },
|
|
180
196
|
exitCode: 1,
|
|
181
197
|
});
|
|
182
198
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createCaizhilianContinuationSigner } from './continuation.js';
|
|
5
6
|
import { caizhilianValidationError } from './errors.js';
|
|
6
7
|
import { createCaizhilianHost } from './host.js';
|
|
@@ -115,6 +116,7 @@ function operationsCatalog() {
|
|
|
115
116
|
sourceSkill: caizhilianManifest.sourceSkill,
|
|
116
117
|
total: caizhilianOperationDefinitions().length,
|
|
117
118
|
groups: [...groups.entries()].map(([resource, operations]) => ({ resource, operations })),
|
|
119
|
+
withheldCount: caizhilianManifest.withheldCount,
|
|
118
120
|
withheldOperations: caizhilianManifest.withheldOperations,
|
|
119
121
|
};
|
|
120
122
|
}
|
|
@@ -134,8 +136,16 @@ export const caizhilianShortcut = {
|
|
|
134
136
|
caizhilian
|
|
135
137
|
.command('schema')
|
|
136
138
|
.description('Print caizhilian operation manifest for agents')
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
140
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
141
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
142
|
+
.action(action((ctx, options) => {
|
|
143
|
+
const schema = schemaOptionsOf(options);
|
|
144
|
+
ctx.output.write(manifestView(caizhilianManifest, schema), {
|
|
145
|
+
json: true,
|
|
146
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
147
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
148
|
+
});
|
|
139
149
|
}));
|
|
140
150
|
caizhilian
|
|
141
151
|
.command('operations')
|
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import { caizhilianOperationContracts } from './operations/registry.js';
|
|
2
|
-
/**
|
|
3
|
-
* 禁用边界:源 Skill 的 64 个 operation 中,4 个属于「本地多环境配置」能力,
|
|
4
|
-
* 在 weaver-work-cli 里由框架层统一承担(config / e10 auth),模块 CLI 不重复实现,
|
|
5
|
-
* 因此不进入 operations,仅在此显式声明,避免 Agent 误以为能力缺失。
|
|
6
|
-
*/
|
|
7
|
-
const WITHHELD = [
|
|
8
|
-
{
|
|
9
|
-
name: 'caizhilian.system.list-systems',
|
|
10
|
-
reason: '源 list_systems 读取的是 Skill 自带 assets/config.json 的多环境配置与登录态;weaver-work-cli 的环境与登录态由框架统一管理,请用 `weaver-work-cli config list` 与 `weaver-work-cli auth status` 查看,连通性自检用 caizhilian.system.health。',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'caizhilian.system.get-loaded-config',
|
|
14
|
-
reason: '源 get_loaded_config 会输出 Skill 本地 config.json 的生效内容(含 cookies 掩码、下载目录等);CLI 侧等价信息来自框架配置,请用 `weaver-work-cli config list`,不在业务模块内暴露配置快照。',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'caizhilian.system.reload-config',
|
|
18
|
-
reason: '源 reload_config 重新加载 Skill 本地 config.json;CLI 每次进程启动即读取框架配置,无进程内缓存需要刷新,故不提供该操作。',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: 'caizhilian.system.switch-config',
|
|
22
|
-
reason: '源 switch_config 在 Skill 本地多套环境配置间切换;CLI 的环境与认证配置体系负责这一职责,业务模块不做环境切换。',
|
|
23
|
-
},
|
|
24
|
-
];
|
|
1
|
+
import { caizhilianOperationContracts, caizhilianWithheldOperations } from './operations/registry.js';
|
|
2
|
+
/** 4 个本地配置类 operation 的禁用声明与理由见 operations/registry.ts 的 caizhilianWithheldOperations。 */
|
|
25
3
|
function buildOperations() {
|
|
26
4
|
return caizhilianOperationContracts();
|
|
27
5
|
}
|
|
@@ -35,7 +13,8 @@ export const caizhilianManifest = {
|
|
|
35
13
|
sourceSkill: 'weaver-e10-caizhilian',
|
|
36
14
|
capabilities: ['caizhilian'],
|
|
37
15
|
operations: buildOperations(),
|
|
38
|
-
|
|
16
|
+
withheldCount: caizhilianWithheldOperations.length,
|
|
17
|
+
withheldOperations: caizhilianWithheldOperations,
|
|
39
18
|
};
|
|
40
19
|
export function hasCaizhilianManifestOperation(operation) {
|
|
41
20
|
return caizhilianManifest.operations.some((item) => item.name === operation);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { hasNextPage, optionalId, optionalText, parsePage, resolveTimeRange, toBoolean, } from '../shared.js';
|
|
2
|
+
import { CaizhilianCliError } from '../../errors.js';
|
|
3
|
+
import { CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE } from '../../host.js';
|
|
2
4
|
import { caizhilianSuccess } from '../types.js';
|
|
3
5
|
/**
|
|
4
6
|
* 检索类只读操作(1:1 对应源 scripts/search_plugins.py 的 10 个 plugin
|
|
@@ -156,6 +158,35 @@ async function searchVirtualFolders(args, env) {
|
|
|
156
158
|
folders,
|
|
157
159
|
});
|
|
158
160
|
}
|
|
161
|
+
/** 服务端裸失败信封(实测签名 {code:500,status:false,fail:true},无任何错误文案)。 */
|
|
162
|
+
function isBareServerFail(raw) {
|
|
163
|
+
if (typeof raw !== 'string')
|
|
164
|
+
return false;
|
|
165
|
+
try {
|
|
166
|
+
const parsed = JSON.parse(raw);
|
|
167
|
+
return isRecord(parsed) && parsed.code === 500 && parsed.status === false && parsed.fail === true;
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* 裸失败信封且服务端无文案时,用操作自带的业务提示替换 message(code/details 原样保留)。
|
|
175
|
+
* 服务端有可读文案时一律透传,不做归因替换。
|
|
176
|
+
*/
|
|
177
|
+
function applyBusinessErrorMessage(error, businessErrorMessage) {
|
|
178
|
+
if (!businessErrorMessage || !(error instanceof CaizhilianCliError))
|
|
179
|
+
return error;
|
|
180
|
+
if (error.subtype !== 'business_error')
|
|
181
|
+
return error;
|
|
182
|
+
if (error.message !== CAIZHILIAN_BUSINESS_FALLBACK_MESSAGE)
|
|
183
|
+
return error;
|
|
184
|
+
const raw = error.details?.raw;
|
|
185
|
+
if (!isBareServerFail(raw))
|
|
186
|
+
return error;
|
|
187
|
+
error.message = businessErrorMessage;
|
|
188
|
+
return error;
|
|
189
|
+
}
|
|
159
190
|
function browserSearch(config) {
|
|
160
191
|
return async (args, env) => {
|
|
161
192
|
const { pageNo, pageSize } = parsePage(args, 50);
|
|
@@ -177,6 +208,8 @@ function browserSearch(config) {
|
|
|
177
208
|
path: config.path,
|
|
178
209
|
body,
|
|
179
210
|
operation: config.action,
|
|
211
|
+
}).catch((error) => {
|
|
212
|
+
throw applyBusinessErrorMessage(error, config.businessErrorMessage);
|
|
180
213
|
});
|
|
181
214
|
const items = nestedList(response, 'data', 'data');
|
|
182
215
|
return caizhilianSuccess(config.action, {
|
|
@@ -226,6 +259,7 @@ const subcompanySearch = browserSearch({
|
|
|
226
259
|
resultKey: 'subcompanies',
|
|
227
260
|
head: { browserMultiple: true, virtualType: 'ALL', cmd: 'list' },
|
|
228
261
|
tail: { stopDepartment: false },
|
|
262
|
+
businessErrorMessage: '本租户未开通分部功能',
|
|
229
263
|
mapItem: (item) => ({
|
|
230
264
|
id: String(item.id ?? ''),
|
|
231
265
|
name: item.name ?? '',
|
|
@@ -14,6 +14,29 @@ import { caizhilianSettingStorageHandlers } from './handlers/setting-storage.js'
|
|
|
14
14
|
import { caizhilianSystemHandlers } from './handlers/system.js';
|
|
15
15
|
import { caizhilianOperationSpecs } from './specs.js';
|
|
16
16
|
import { applySchemaOf, isWriteHandler } from './types.js';
|
|
17
|
+
/**
|
|
18
|
+
* 禁用边界:源 Skill 的 64 个 operation 中,4 个属于「本地多环境配置」能力,
|
|
19
|
+
* 在 weaver-work-cli 里由框架层统一承担(config / e10 auth),模块 CLI 不重复实现,
|
|
20
|
+
* 因此不进入 operations,仅在此显式声明,避免 Agent 误以为能力缺失。
|
|
21
|
+
*/
|
|
22
|
+
export const caizhilianWithheldOperations = [
|
|
23
|
+
{
|
|
24
|
+
name: 'caizhilian.system.list-systems',
|
|
25
|
+
reason: '源 list_systems 读取的是 Skill 自带 assets/config.json 的多环境配置与登录态;weaver-work-cli 的环境与登录态由框架统一管理,请用 `weaver-work-cli config list` 与 `weaver-work-cli auth status` 查看,连通性自检用 caizhilian.system.health。',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'caizhilian.system.get-loaded-config',
|
|
29
|
+
reason: '源 get_loaded_config 会输出 Skill 本地 config.json 的生效内容(含 cookies 掩码、下载目录等);CLI 侧等价信息来自框架配置,请用 `weaver-work-cli config list`,不在业务模块内暴露配置快照。',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'caizhilian.system.reload-config',
|
|
33
|
+
reason: '源 reload_config 重新加载 Skill 本地 config.json;CLI 每次进程启动即读取框架配置,无进程内缓存需要刷新,故不提供该操作。',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'caizhilian.system.switch-config',
|
|
37
|
+
reason: '源 switch_config 在 Skill 本地多套环境配置间切换;CLI 的环境与认证配置体系负责这一职责,业务模块不做环境切换。',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
17
40
|
/**
|
|
18
41
|
* 操作注册表:specs.ts 提供 WHAT(name/resource/risk/inputSchema),
|
|
19
42
|
* handlers/*.ts 提供 HOW(execute 或 prepare/apply)。
|
|
@@ -132,7 +155,8 @@ export function caizhilianOperationDefinitions() {
|
|
|
132
155
|
export function getCaizhilianOperation(operation) {
|
|
133
156
|
const definition = caizhilianRegistry.get(operation);
|
|
134
157
|
if (!definition) {
|
|
135
|
-
|
|
158
|
+
const withheld = caizhilianWithheldOperations.some((entry) => entry.name === operation);
|
|
159
|
+
throw caizhilianValidationError('operation_unknown', `采知连不支持操作:${operation}${withheld ? '(属 withheld 能力,原因与替代命令见 caizhilian operations 输出的 withheldOperations)' : ''}`);
|
|
136
160
|
}
|
|
137
161
|
return definition;
|
|
138
162
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createCalendarContinuationSigner } from './continuation.js';
|
|
5
6
|
import { createCalendarHost } from './host.js';
|
|
6
7
|
import { calendarManifest } from './manifest.js';
|
|
@@ -97,8 +98,16 @@ export const calendarShortcut = {
|
|
|
97
98
|
const calendar = program.command('calendar').description('泛微E10日程管理(创建/查询列表/详情/总数/更新/删除/类型/紧急程度)');
|
|
98
99
|
calendar.command('schema')
|
|
99
100
|
.description('Print calendar operation manifest for agents')
|
|
100
|
-
.
|
|
101
|
-
|
|
101
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
102
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
103
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
104
|
+
.action(action((ctx, options) => {
|
|
105
|
+
const schema = schemaOptionsOf(options);
|
|
106
|
+
ctx.output.write(manifestView(calendarManifest, schema), {
|
|
107
|
+
json: true,
|
|
108
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
109
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
110
|
+
});
|
|
102
111
|
}));
|
|
103
112
|
calendar.command('run')
|
|
104
113
|
.description('Run a calendar operation with JSON input')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { ExitCode, isCliError, toErrorEnvelope } from '../../core/errors.js';
|
|
3
3
|
import { reportPlatformError } from '../../core/error-codes.js';
|
|
4
|
+
import { MANIFEST_LIST_COMPACT_PATHS, manifestView, schemaOptionsOf } from '../../core/manifest-view.js';
|
|
4
5
|
import { createContractContinuationSigner } from './continuation.js';
|
|
5
6
|
import { contractValidationError } from './errors.js';
|
|
6
7
|
import { createContractHost } from './host.js';
|
|
@@ -141,8 +142,16 @@ export const contractShortcut = {
|
|
|
141
142
|
const contract = program.command('contract').description('泛微E10今承达合同管理');
|
|
142
143
|
contract.command('schema')
|
|
143
144
|
.description('Print contract operation manifest for agents')
|
|
144
|
-
.
|
|
145
|
-
|
|
145
|
+
.option('--list', '只列操作清单(name/summary/risk),全量不截断;判断"有没有某操作"用这个')
|
|
146
|
+
.option('--full', '打印完整 manifest(超 stdout 预算会落本地 ref,用 refs get 分页取)')
|
|
147
|
+
.option('--operation <name>', '只输出单个操作的完整契约(含 inputSchema,体积远低于预算)')
|
|
148
|
+
.action(wrap((ctx, options) => {
|
|
149
|
+
const schema = schemaOptionsOf(options);
|
|
150
|
+
ctx.output.write(manifestView(contractManifest, schema), {
|
|
151
|
+
json: true,
|
|
152
|
+
// 只有 --list 单行化:条目多、缩进空白能吃掉近一半体积,且对读模型无收益。
|
|
153
|
+
...(schema.list === true ? { compactPaths: MANIFEST_LIST_COMPACT_PATHS } : {}),
|
|
154
|
+
});
|
|
146
155
|
}));
|
|
147
156
|
const run = contract.command('run')
|
|
148
157
|
.description('Run a contract operation with JSON input')
|