weaver-work-cli 0.1.63 → 0.1.64
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-BLDYBZDX.js → archive-WUZKAEZ6.js} +2 -2
- package/dist/chunks/{archive-oa-3GJ3TWXR.js → archive-oa-PN46RTI2.js} +2 -2
- package/dist/chunks/{asset-AFXJN4CK.js → asset-ZPC5VWZM.js} +2 -2
- package/dist/chunks/{asset-idle-VUJXWGWJ.js → asset-idle-DHGP3NYY.js} +2 -2
- package/dist/chunks/{attachment-content-VMJA7NSQ.js → attachment-content-JQDW3BIB.js} +3 -3
- package/dist/chunks/{blog-EREB35VU.js → blog-JC47AIXK.js} +2 -2
- package/dist/chunks/{caizhilian-ATM2JO5S.js → caizhilian-IKIHM77A.js} +4 -4
- package/dist/chunks/{calendar-E26ZIH7S.js → calendar-GZTSJ57Y.js} +2 -2
- package/dist/chunks/{chunk-OMAGCLUE.js → chunk-26FCCU5O.js} +2 -2
- package/dist/chunks/{chunk-BY3WDJO5.js → chunk-3PCXBG4H.js} +1 -1
- package/dist/chunks/{chunk-EOZHSNND.js → chunk-3W5NMGDS.js} +2 -2
- package/dist/chunks/{chunk-TNFIUZ4H.js → chunk-4AFWOGOV.js} +1 -1
- package/dist/chunks/{chunk-QAMIIFP6.js → chunk-5QQKLR6H.js} +11 -11
- package/dist/chunks/{chunk-C5PIGPGX.js → chunk-6T5X6YWX.js} +2 -2
- package/dist/chunks/{chunk-WPBZQVLS.js → chunk-AFZTMYGC.js} +1 -1
- package/dist/chunks/{chunk-IGICM3WJ.js → chunk-AGSO3PIK.js} +2 -2
- package/dist/chunks/{chunk-6VCQLZXE.js → chunk-FDBAFANU.js} +1 -0
- package/dist/chunks/{chunk-RV2JAA5I.js → chunk-FJUOUSV3.js} +1 -1
- package/dist/chunks/{chunk-6G2JARDK.js → chunk-HLT6B26P.js} +1 -1
- package/dist/chunks/{chunk-THMBDCRA.js → chunk-HWA2A25Y.js} +2 -2
- package/dist/chunks/{chunk-SHBDXEUE.js → chunk-I3MOFD6Q.js} +4 -4
- package/dist/chunks/{chunk-5CY37VLS.js → chunk-INVYKG4I.js} +45 -43
- package/dist/chunks/{chunk-QZYKZ7MQ.js → chunk-K7QKQRSL.js} +155 -57
- package/dist/chunks/{chunk-HEJPVXD3.js → chunk-KDFEHDIB.js} +4 -4
- package/dist/chunks/{chunk-I4C2KR2G.js → chunk-KYDXWYFB.js} +1 -1
- package/dist/chunks/{chunk-RR45ELVE.js → chunk-Q6D6PSMH.js} +2 -2
- package/dist/chunks/{chunk-G3ZM57PD.js → chunk-RMOH2GMF.js} +2 -2
- package/dist/chunks/{chunk-LOVAIGM2.js → chunk-SCMHG23G.js} +50 -50
- package/dist/chunks/{chunk-GQK6WLOS.js → chunk-VLY5RTVO.js} +2 -2
- package/dist/chunks/{chunk-SDPC7BG2.js → chunk-WSHIOSGM.js} +2 -2
- package/dist/chunks/{chunk-4OB22YKE.js → chunk-XHSEK2VM.js} +6 -6
- package/dist/chunks/{chunk-GOBNIGWS.js → chunk-YTFNMQO4.js} +1 -1
- package/dist/chunks/{conflict-AMNTM3FV.js → conflict-UUC7AFUI.js} +2 -2
- package/dist/chunks/{contract-PLO2V2NO.js → contract-INMS7SYQ.js} +846 -199
- package/dist/chunks/{cowork-FZAXE6FO.js → cowork-34CBYVQP.js} +2 -2
- package/dist/chunks/{create-flow-2DAUN7HU.js → create-flow-YOR4QTAJ.js} +8 -6
- package/dist/chunks/{data-7NXMWET4.js → data-QKWI5325.js} +13 -2
- package/dist/chunks/{ebuilder-form-DEYHX6M7.js → ebuilder-form-ZONRROK4.js} +3 -3
- package/dist/chunks/{ehr-QQH2DYYA.js → ehr-2CONM7R6.js} +2 -2
- package/dist/chunks/{entry-mode-2JTVEKMP.js → entry-mode-S2ENJ6GZ.js} +3 -3
- package/dist/chunks/{env-2JZMXC6I.js → env-ZSAXU5PJ.js} +2 -2
- package/dist/chunks/{esb-I5ZFHJUK.js → esb-FQASCY2H.js} +4 -4
- package/dist/chunks/{factory-XIATYHU6.js → factory-N76QQA53.js} +1 -1
- package/dist/chunks/{fna-3V2TL6B2.js → fna-FCLVIWAS.js} +2 -2
- package/dist/chunks/{group-chat-CVYUZCOQ.js → group-chat-UM665WDZ.js} +3 -3
- package/dist/chunks/{host-CBONEAZS.js → host-2ED2KC4X.js} +3 -3
- package/dist/chunks/{host-4DP7C7YQ.js → host-2UYZEY2V.js} +3 -3
- package/dist/chunks/{host-4KQCAEWA.js → host-46NYKDQP.js} +3 -3
- package/dist/chunks/{host-BD7NAM33.js → host-7IPZKIM4.js} +3 -3
- package/dist/chunks/{host-L37QVNIV.js → host-P7G22WNM.js} +3 -3
- package/dist/chunks/{host-4X2F3JPQ.js → host-XLCBLNJD.js} +3 -3
- package/dist/chunks/{hrm-OL3IKN7C.js → hrm-XKL27NX2.js} +3 -3
- package/dist/chunks/{im-YXQWUF3R.js → im-NDYIMASG.js} +3 -3
- package/dist/chunks/{invoice-4WY32PR2.js → invoice-MOGNB6HN.js} +3 -3
- package/dist/chunks/{jiuchuanhui-L6SHLONH.js → jiuchuanhui-3T5X7SB7.js} +2 -2
- package/dist/chunks/{lazy-dispatch-OYE6QV24.js → lazy-dispatch-4WOIL3ZQ.js} +4 -4
- package/dist/chunks/{mail-PZV2KNRU.js → mail-P7VMUKQW.js} +2 -2
- package/dist/chunks/{meeting-6SOBCC6N.js → meeting-MMTYDHXA.js} +13 -13
- package/dist/chunks/{minute-doc-KSJSJNOH.js → minute-doc-LCSBWGJ3.js} +4 -4
- package/dist/chunks/{okr-B76FW5M2.js → okr-VZXRQGS4.js} +2 -2
- package/dist/chunks/{operations-YOMEGFLV.js → operations-MI2BSKZX.js} +4 -4
- package/dist/chunks/{performance-4VBKUPFO.js → performance-OPEQNW7Y.js} +870 -15
- package/dist/chunks/{plan-HBNZRQTI.js → plan-TJAS4N5X.js} +2 -2
- package/dist/chunks/{project-IV6FWK74.js → project-CYBGU6K6.js} +2 -2
- package/dist/chunks/{reception-BR5YURT6.js → reception-3FT2F66K.js} +2 -2
- package/dist/chunks/{recruit-stage-4HQ6OGXT.js → recruit-stage-WPGB5BDJ.js} +2 -2
- package/dist/chunks/{registry-JFQEFC7E.js → registry-BAWCWV4D.js} +2 -2
- package/dist/chunks/{registry-7LICMV5J.js → registry-FNI5E76J.js} +12 -12
- package/dist/chunks/{registry-MZJQX65Q.js → registry-QRMXRSCT.js} +4 -4
- package/dist/chunks/{room-recommend-43GLLE7Y.js → room-recommend-I7QQRHEL.js} +4 -4
- package/dist/chunks/{schedule-ZQ42BEW6.js → schedule-3P7EWGNZ.js} +4 -4
- package/dist/chunks/{smart-extract-QKAEAZGM.js → smart-extract-FOBSVNYW.js} +2 -2
- package/dist/chunks/{workflow-6HV7H5PC.js → workflow-U2KKTVQY.js} +4 -4
- package/dist/index.js +33 -33
- package/dist/internal/e10/auth/commands.js +182 -43
- package/dist/shortcuts/contract/error-actions.js +112 -0
- package/dist/shortcuts/contract/errors.js +9 -1
- package/dist/shortcuts/contract/manifest.js +18 -7
- package/dist/shortcuts/contract/operations/docx-slots.js +112 -5
- package/dist/shortcuts/contract/operations/docx-verify.js +2 -70
- package/dist/shortcuts/contract/operations/elements-build.js +82 -56
- package/dist/shortcuts/contract/operations/elements-spec.js +140 -3
- package/dist/shortcuts/contract/operations/ledger-card.js +25 -2
- package/dist/shortcuts/contract/operations/ledger.js +33 -5
- package/dist/shortcuts/contract/operations/money.js +90 -0
- package/dist/shortcuts/contract/operations/placeholder-scan.js +104 -0
- package/dist/shortcuts/contract/operations/quote-recognize.js +54 -17
- package/dist/shortcuts/contract/operations/quote-ref.js +179 -0
- package/dist/shortcuts/contract/operations/quote-submit.js +20 -3
- package/dist/shortcuts/contract/operations/quote.js +66 -12
- package/dist/shortcuts/contract/operations/solutions-spec.js +79 -0
- package/dist/shortcuts/contract/operations/triage.js +55 -9
- package/dist/shortcuts/data/operations/shared.js +14 -1
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +25 -11
- package/dist/shortcuts/performance/flow-utils.js +363 -0
- package/dist/shortcuts/performance/manifest.js +2 -2
- package/dist/shortcuts/performance/operations/flow-detail.js +85 -0
- package/dist/shortcuts/performance/operations/flow-list.js +213 -0
- package/dist/shortcuts/performance/operations/flow-score.js +241 -0
- package/dist/shortcuts/performance/operations/registry.js +6 -0
- package/docs/e10-auth.md +27 -2
- package/package.json +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +87 -39
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +29 -29
- package/skills/weaver-e10-jinchengda/references/contract-clause-insert.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-clause-library-crud.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +29 -7
- package/skills/weaver-e10-jinchengda/references/contract-compare-report.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-credit-page.md +5 -5
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-doc-compare.md +22 -25
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +53 -314
- package/skills/weaver-e10-jinchengda/references/contract-element-extract.md +6 -5
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +19 -11
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +43 -25
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +103 -212
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +7 -7
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +7 -6
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +34 -21
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +6 -6
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +6 -6
- package/skills/weaver-e10-jinchengda/references/contract-object-detect.md +22 -22
- package/skills/weaver-e10-jinchengda/references/contract-open-web-pages.md +21 -19
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +6 -5
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +132 -95
- package/skills/weaver-e10-jinchengda/references/contract-request-status.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-request-write.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-template-recommend.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-type-fingerprints.md +12 -12
- package/skills/weaver-e10-jinchengda/references/contract-workflow-discovery.md +1 -1
- package/skills/weaver-e10-jinchengda/references/orchestration.md +5 -5
- package/skills/weaver-e10-meeting/SKILL.md +8 -7
- package/skills/weaver-e10-meeting/references/create-commands.md +2 -2
- package/skills/weaver-e10-meeting/references/create-flow.md +6 -6
- package/skills/weaver-e10-meeting/references/create-guardrails.md +10 -10
- package/skills/weaver-e10-meeting/references/invitation.md +1 -1
- package/skills/weaver-e10-meeting/references/meeting-eb.md +26 -26
- package/skills/weaver-e10-meeting/references/meeting-invitation.md +2 -2
- package/skills/weaver-e10-meeting/references/meeting-minute-file.md +2 -2
- package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
- package/skills/weaver-e10-performance/SKILL.md +45 -5
- package/skills/weaver-e10-performance/agents/openai.yaml +26 -2
- package/skills/weaver-e10-performance/references/flow-api.md +128 -0
- package/skills/weaver-e10-performance/references/flow-assess.md +149 -0
- package/skills/weaver-e10-yimiaoban/SKILL.md +8 -5
- package/skills/weaver-e10-yimiaoban/references/source-manifest.json +3 -3
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { extractRows, extractTotal, unwrapWeaData, toFlowRowView, FLOW_STATUS_LABELS } from '../flow-utils.js';
|
|
2
|
+
import { pfSuccess, schemaOf } from './types.js';
|
|
3
|
+
/** 考核流程类只读接口(全部为 POST/GET 查询,无写副作用)。 */
|
|
4
|
+
const API = {
|
|
5
|
+
recent: '/api/workrelate/performance/flow/getPortalRecently',
|
|
6
|
+
pending: '/api/workrelate/performance/flow/getPendingNums',
|
|
7
|
+
todo: '/api/workrelate/performance/flow/pendinglist',
|
|
8
|
+
done: '/api/workrelate/performance/flow/dealDonelist',
|
|
9
|
+
list: '/api/workrelate/performance/flow/list',
|
|
10
|
+
};
|
|
11
|
+
/** 最近已有考核(我作为被考核人的成绩)。 */
|
|
12
|
+
async function recent(_args, env) {
|
|
13
|
+
const data = unwrapWeaData(await env.host.request({ path: API.recent, body: {}, operation: 'performance.flow.recent' }), '最近考核列表');
|
|
14
|
+
// getPortalRecently 只返回 { id, score, assessmentCycle, linkUrl }:
|
|
15
|
+
// 单独映射,避免复用 toFlowRowView 造成 name/status 都是 null 的误导
|
|
16
|
+
const rows = extractRows(data).map((row) => ({
|
|
17
|
+
flowId: row?.id === undefined || row?.id === null ? null : String(row.id),
|
|
18
|
+
assessmentCycle: row?.assessmentCycle ?? null,
|
|
19
|
+
scoreText: row?.score ?? null,
|
|
20
|
+
detailUrl: row?.linkUrl
|
|
21
|
+
? String(row.linkUrl)
|
|
22
|
+
: (row?.id === undefined || row?.id === null ? null : `/sp/performance/flow/deal/detail/${row.id}`),
|
|
23
|
+
}));
|
|
24
|
+
return pfSuccess('performance.flow.recent', {
|
|
25
|
+
count: rows.length,
|
|
26
|
+
rows,
|
|
27
|
+
note: '最近考核接口只返回考核 id、成绩文本与周期;名称/被考核人需用 performance.flow.detail 获取',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** 待处理数量(待评分/待审批/面谈等)。 */
|
|
31
|
+
async function pending(_args, env) {
|
|
32
|
+
const data = unwrapWeaData(await env.host.request({ path: API.pending, body: {}, operation: 'performance.flow.pending' }), '待处理数量');
|
|
33
|
+
return pfSuccess('performance.flow.pending', {
|
|
34
|
+
scoreNum: data?.scoreNum ?? 0,
|
|
35
|
+
approveNum: data?.approveNum ?? 0,
|
|
36
|
+
interviewNum: data?.interviewNum ?? 0,
|
|
37
|
+
auditNum: data?.auditNum ?? 0,
|
|
38
|
+
frozenNum: data?.frozenNum ?? 0,
|
|
39
|
+
totalNum: data?.totalNum ?? 0,
|
|
40
|
+
hint: 'scoreNum>0 表示有待评分考核;取明细用 performance.flow.todo',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/** 待处理明细(默认待评分)。total/hasMore 后端恒不可信,只能翻页到空。 */
|
|
44
|
+
async function todo(args, env) {
|
|
45
|
+
const tab = String(args.tab || 'score');
|
|
46
|
+
const current = Number(args.current ?? 1);
|
|
47
|
+
const pageSize = Number(args.pageSize ?? 20);
|
|
48
|
+
const data = unwrapWeaData(await env.host.request({
|
|
49
|
+
path: API.todo,
|
|
50
|
+
body: { status: tab, current, pageSize },
|
|
51
|
+
operation: 'performance.flow.todo',
|
|
52
|
+
}), '待处理明细');
|
|
53
|
+
const rows = extractRows(data).map(toFlowRowView);
|
|
54
|
+
return pfSuccess('performance.flow.todo', {
|
|
55
|
+
tab,
|
|
56
|
+
current,
|
|
57
|
+
pageSize,
|
|
58
|
+
count: rows.length,
|
|
59
|
+
rows,
|
|
60
|
+
paging: {
|
|
61
|
+
note: '后端 total 恒为 0、hasMore 恒为 false,不能用于判断是否还有下一页;本页行数小于 pageSize 即到末页',
|
|
62
|
+
nextCurrent: rows.length < pageSize ? null : current + 1,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/** 已办明细(我作为评分/审批人已处理完的考核)。 */
|
|
67
|
+
async function done(args, env) {
|
|
68
|
+
const current = Number(args.current ?? 1);
|
|
69
|
+
const pageSize = Number(args.pageSize ?? 20);
|
|
70
|
+
const searchParams = {};
|
|
71
|
+
if (args.kpiUserName) {
|
|
72
|
+
// 被考核人过滤:browser 格式 formDatas.userIdList=[{userIdList:[{id}]}]
|
|
73
|
+
searchParams.formDatas = { userIdList: [{ userIdList: [{ id: String(args.kpiUserId ?? args.kpiUserName) }] }] };
|
|
74
|
+
}
|
|
75
|
+
if (args.keyword)
|
|
76
|
+
searchParams.formDatas = { ...(searchParams.formDatas || {}), name: String(args.keyword) };
|
|
77
|
+
const data = unwrapWeaData(await env.host.request({
|
|
78
|
+
path: API.done,
|
|
79
|
+
body: { searchParams, current, pageSize },
|
|
80
|
+
operation: 'performance.flow.done',
|
|
81
|
+
}), '已办列表');
|
|
82
|
+
const rows = extractRows(data).map(toFlowRowView);
|
|
83
|
+
return pfSuccess('performance.flow.done', { current, pageSize, count: rows.length, rows });
|
|
84
|
+
}
|
|
85
|
+
/** 考核成绩列表:我的 / 直接下属 / 间接下属 / 下属 / 全部 / 本人 / 待处理。 */
|
|
86
|
+
async function list(args, env) {
|
|
87
|
+
const dataTypes = Array.isArray(args.dataType) && args.dataType.length
|
|
88
|
+
? args.dataType.map((x) => String(x))
|
|
89
|
+
: ['mine'];
|
|
90
|
+
const current = Number(args.current ?? 1);
|
|
91
|
+
const pageSize = Number(args.pageSize ?? 20);
|
|
92
|
+
const body = {
|
|
93
|
+
dataType: dataTypes,
|
|
94
|
+
// 前端同源写法:高级搜索侧也带同一份 dataType(flow/sub/list.tsx:127-136)
|
|
95
|
+
searchParams: { formDatas: { dataType: dataTypes.map((t) => ({ dataType: [t] })) } },
|
|
96
|
+
current,
|
|
97
|
+
pageSize,
|
|
98
|
+
dateType: args.dateType ?? null,
|
|
99
|
+
startTime: args.startTime ?? null,
|
|
100
|
+
endTime: args.endTime ?? null,
|
|
101
|
+
};
|
|
102
|
+
if (args.status !== undefined)
|
|
103
|
+
body.status = args.status;
|
|
104
|
+
if (args.keyword)
|
|
105
|
+
body.keywords = String(args.keyword);
|
|
106
|
+
if (args.schemeId !== undefined)
|
|
107
|
+
body.schemeId = args.schemeId;
|
|
108
|
+
const data = unwrapWeaData(await env.host.request({ path: API.list, body, operation: 'performance.flow.list' }), '考核成绩列表');
|
|
109
|
+
// WeaTable 结构:data.data 为行数组,data.total 视 pageUid 而定(不保证)
|
|
110
|
+
const rows = extractRows(data).map(toFlowRowView);
|
|
111
|
+
const scopeLabels = {
|
|
112
|
+
mine: '我的',
|
|
113
|
+
directsub: '直接下属',
|
|
114
|
+
indirectsub: '间接下属',
|
|
115
|
+
sub: '下属',
|
|
116
|
+
all: '全部',
|
|
117
|
+
myself: '本人',
|
|
118
|
+
pending: '待处理',
|
|
119
|
+
};
|
|
120
|
+
return pfSuccess('performance.flow.list', {
|
|
121
|
+
scope: dataTypes.map((t) => scopeLabels[t] || t).join('+'),
|
|
122
|
+
current,
|
|
123
|
+
pageSize,
|
|
124
|
+
count: rows.length,
|
|
125
|
+
rows,
|
|
126
|
+
total: extractTotal(data),
|
|
127
|
+
paging: {
|
|
128
|
+
note: '本接口的 total 由 pageUid 决定,可能为 0 或不准确;以本页行数判断是否到末页',
|
|
129
|
+
nextCurrent: rows.length < pageSize ? null : current + 1,
|
|
130
|
+
},
|
|
131
|
+
statusLegend: FLOW_STATUS_LABELS,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
export const flowListOperations = [
|
|
135
|
+
{
|
|
136
|
+
name: 'performance.flow.recent',
|
|
137
|
+
resource: 'performance.flow',
|
|
138
|
+
method: 'query',
|
|
139
|
+
action: 'flow.recent',
|
|
140
|
+
summary: '最近已有考核成绩列表(我的)',
|
|
141
|
+
capability: 'performance.flow.query',
|
|
142
|
+
risk: 'read',
|
|
143
|
+
inputSchema: schemaOf({}),
|
|
144
|
+
handler: recent,
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'performance.flow.pending',
|
|
148
|
+
resource: 'performance.flow',
|
|
149
|
+
method: 'query',
|
|
150
|
+
action: 'flow.pending',
|
|
151
|
+
summary: '待处理数量(待评分/待审批/面谈/审核)',
|
|
152
|
+
capability: 'performance.flow.query',
|
|
153
|
+
risk: 'read',
|
|
154
|
+
inputSchema: schemaOf({}),
|
|
155
|
+
handler: pending,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'performance.flow.todo',
|
|
159
|
+
resource: 'performance.flow',
|
|
160
|
+
method: 'query',
|
|
161
|
+
action: 'flow.todo',
|
|
162
|
+
summary: '待处理明细列表(默认待评分;total/hasMore 不可信)',
|
|
163
|
+
capability: 'performance.flow.query',
|
|
164
|
+
risk: 'read',
|
|
165
|
+
inputSchema: schemaOf({
|
|
166
|
+
tab: { type: 'string', enum: ['score', 'approve'], description: '待评分(score) 或 待审批(approve),默认 score' },
|
|
167
|
+
current: { type: 'integer', minimum: 1, description: '页码,默认 1' },
|
|
168
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 100, description: '每页条数,默认 20' },
|
|
169
|
+
}),
|
|
170
|
+
handler: todo,
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'performance.flow.done',
|
|
174
|
+
resource: 'performance.flow',
|
|
175
|
+
method: 'query',
|
|
176
|
+
action: 'flow.done',
|
|
177
|
+
summary: '已办考核列表(我作为评分/审批人已处理的)',
|
|
178
|
+
capability: 'performance.flow.query',
|
|
179
|
+
risk: 'read',
|
|
180
|
+
inputSchema: schemaOf({
|
|
181
|
+
keyword: { type: 'string', description: '考核名称关键字' },
|
|
182
|
+
kpiUserId: { type: 'string', description: '被考核人 userId(字符串,按被考核人过滤)' },
|
|
183
|
+
current: { type: 'integer', minimum: 1, description: '页码,默认 1' },
|
|
184
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 100, description: '每页条数,默认 20' },
|
|
185
|
+
}),
|
|
186
|
+
handler: done,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'performance.flow.list',
|
|
190
|
+
resource: 'performance.flow',
|
|
191
|
+
method: 'query',
|
|
192
|
+
action: 'flow.list',
|
|
193
|
+
summary: '考核成绩列表:我的/直接下属/间接下属/下属/全部/本人/待处理(dataType 单选或组合)',
|
|
194
|
+
capability: 'performance.flow.query',
|
|
195
|
+
risk: 'read',
|
|
196
|
+
inputSchema: schemaOf({
|
|
197
|
+
dataType: {
|
|
198
|
+
type: 'array',
|
|
199
|
+
items: { type: 'string', enum: ['mine', 'directsub', 'indirectsub', 'sub', 'all', 'myself', 'pending'] },
|
|
200
|
+
description: '查询范围:mine=我的 / directsub=直接下属 / indirectsub=间接下属 / sub=下属 / all=全部 / myself=本人 / pending=待处理;默认 ["mine"]',
|
|
201
|
+
},
|
|
202
|
+
status: { type: 'array', items: { type: 'string' }, description: '流程状态过滤(可选)' },
|
|
203
|
+
dateType: { type: 'string', enum: ['year', 'halfyear', 'quarter', 'month'], description: '考核周期类型(可选)' },
|
|
204
|
+
startTime: { type: ['string', 'integer'], description: '开始时间(可选);按前端同源写法原样透传' },
|
|
205
|
+
endTime: { type: ['string', 'integer'], description: '结束时间(可选)' },
|
|
206
|
+
keyword: { type: 'string', description: '考核名称关键字(可选)' },
|
|
207
|
+
schemeId: { type: ['string', 'integer'], description: '限定某个方案(可选)' },
|
|
208
|
+
current: { type: 'integer', minimum: 1, description: '页码,默认 1' },
|
|
209
|
+
pageSize: { type: 'integer', minimum: 1, maximum: 100, description: '每页条数,默认 20' },
|
|
210
|
+
}),
|
|
211
|
+
handler: list,
|
|
212
|
+
},
|
|
213
|
+
];
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { buildDetailUrl, buildScoreRequest, estimateTotal, parseScoreColumn, unwrapWeaData, } from '../flow-utils.js';
|
|
2
|
+
import { pfConfirmationError, pfFail, pfValidationError } from '../errors.js';
|
|
3
|
+
import { schemeFingerprint } from '../scheme-validate.js';
|
|
4
|
+
import { pfSuccess, schemaOf } from './types.js';
|
|
5
|
+
const DETAIL_PATH = '/api/workrelate/performance/flow/detail';
|
|
6
|
+
const STAGE_PATH = '/api/workrelate/performance/flow/countBasicFlowTotal';
|
|
7
|
+
const SUBMIT_PATH = '/api/workrelate/performance/flow/updateScore';
|
|
8
|
+
const PAYLOAD_SCHEMA = {
|
|
9
|
+
type: 'array',
|
|
10
|
+
description: '评分行数组:[{dataRow, kps, targetValue?, actualValue?, remark?}];dataRow 与 kps 必填(公式行 kps 可省略)',
|
|
11
|
+
items: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
properties: {
|
|
15
|
+
dataRow: { type: 'integer', description: '指标行号(必填,取自 flow.assess 的 indicators[].dataRow)' },
|
|
16
|
+
kps: { type: ['string', 'number'], description: '评分(必填;不得超过满分)' },
|
|
17
|
+
targetValue: { type: ['string', 'number'], description: '目标值(定量指标必填,可省略取详情已有值)' },
|
|
18
|
+
actualValue: { type: ['string', 'number'], description: '实际值(dataSource=1 或数据源模式允许编辑时必填)' },
|
|
19
|
+
remark: { type: 'string', description: '评分备注(可选,页面备注框同源)' },
|
|
20
|
+
},
|
|
21
|
+
required: ['dataRow'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
async function loadDetail(env, flowId, operation) {
|
|
25
|
+
const data = unwrapWeaData(await env.host.request({
|
|
26
|
+
path: `${DETAIL_PATH}/${encodeURIComponent(flowId)}`,
|
|
27
|
+
method: 'GET',
|
|
28
|
+
operation,
|
|
29
|
+
}), '考核详情');
|
|
30
|
+
const column = parseScoreColumn(data);
|
|
31
|
+
if (!column) {
|
|
32
|
+
throw pfValidationError('not_scorable', '当前用户对该考核不可评分(找不到可编辑评分列):可能不是本轮评分人,或考核不在评分阶段', { flowStatus: data?.flowStatus ?? null, canScore: data?.canScore ?? null });
|
|
33
|
+
}
|
|
34
|
+
return { data, column };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* stage:评分暂存到考核详情页(低风险预览写)。
|
|
38
|
+
* 后端 countBasicFlowTotal(type=1) 会真实写入 HR_KPI_FLOW_STEP_LINK:页面立即可见、不流转、可被提交覆盖。
|
|
39
|
+
* 副作用:若最终不提交,页面会残留 AI 预填分。
|
|
40
|
+
*/
|
|
41
|
+
async function stage(args, env) {
|
|
42
|
+
if (args.confirm !== true) {
|
|
43
|
+
throw pfConfirmationError('performance.flow.score.stage', {
|
|
44
|
+
hint: '暂存会把评分写进考核详情页(不流转、可覆盖)。确认用户已知晓该副作用后,带 confirm=true 重试',
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const flowId = String(args.flowId ?? '');
|
|
48
|
+
if (!flowId)
|
|
49
|
+
throw pfValidationError('flow_id_missing', '缺少考核流程 id(flowId)');
|
|
50
|
+
const { data, column } = await loadDetail(env, flowId, 'performance.flow.score.stage');
|
|
51
|
+
const built = buildScoreRequest(data, args.rows, column);
|
|
52
|
+
const response = await env.host.request({
|
|
53
|
+
path: STAGE_PATH,
|
|
54
|
+
body: {
|
|
55
|
+
stepId: column.stepId,
|
|
56
|
+
operater: column.scoreUserId,
|
|
57
|
+
flowid: flowId,
|
|
58
|
+
stepLinkData: built.body.kpiFlowStepLinkList,
|
|
59
|
+
type: '1',
|
|
60
|
+
},
|
|
61
|
+
operation: 'performance.flow.score.stage',
|
|
62
|
+
});
|
|
63
|
+
const computed = unwrapWeaData(response, '暂存评分');
|
|
64
|
+
const missingRemark = (Array.isArray(args.rows) ? args.rows : [])
|
|
65
|
+
.filter((row) => !row?.remark)
|
|
66
|
+
.map((row) => row?.dataRow);
|
|
67
|
+
return pfSuccess('performance.flow.score.stage', {
|
|
68
|
+
flowId,
|
|
69
|
+
staged: true,
|
|
70
|
+
computedTotal: computed?.score ?? computed?.finalScore ?? null,
|
|
71
|
+
backendTotalScore: computed?.totalScore ?? null,
|
|
72
|
+
estimatedTotal: estimateTotal(data, built.body.kpiFlowStepLinkList),
|
|
73
|
+
rows: built.rows,
|
|
74
|
+
detailUrl: buildDetailUrl(flowId, built.rows),
|
|
75
|
+
sideEffect: '评分已写入详情页(不流转、可覆盖);若不提交,页面会保留 AI 预填分,可在页面清除',
|
|
76
|
+
...(missingRemark.length
|
|
77
|
+
? { warnings: [`以下指标行未提供评分理由(remark),页面备注列会是空的:dataRow=${missingRemark.join('、')}——每行都应把评分理由写入 remark`] }
|
|
78
|
+
: {}),
|
|
79
|
+
next: '用户在详情页查看后,可自行点「确认并通过」,或让 AI 走 performance.flow.score.submit.prepare → apply',
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/** submit.prepare:组装提交内容 + 前置校验 + 确认摘要(不落库)。 */
|
|
83
|
+
async function submitPrepare(args, env) {
|
|
84
|
+
const flowId = String(args.flowId ?? '');
|
|
85
|
+
if (!flowId)
|
|
86
|
+
throw pfValidationError('flow_id_missing', '缺少考核流程 id(flowId)');
|
|
87
|
+
const { data, column } = await loadDetail(env, flowId, 'performance.flow.score.submit.prepare');
|
|
88
|
+
const built = buildScoreRequest(data, args.rows, column);
|
|
89
|
+
const fingerprint = schemeFingerprint(built.body);
|
|
90
|
+
const continuation = await env.continuation.issue({
|
|
91
|
+
operation: 'performance.flow.score.submit.apply',
|
|
92
|
+
fingerprint,
|
|
93
|
+
});
|
|
94
|
+
return pfSuccess('performance.flow.score.submit.prepare', {
|
|
95
|
+
continuation,
|
|
96
|
+
fingerprint,
|
|
97
|
+
preview: {
|
|
98
|
+
flowId,
|
|
99
|
+
name: built.meta.name,
|
|
100
|
+
kpiUserName: built.meta.kpiUserName,
|
|
101
|
+
assessmentCycle: built.meta.assessmentCycle,
|
|
102
|
+
maxScore: built.meta.maxScore,
|
|
103
|
+
estimatedTotal: estimateTotal(data, built.body.kpiFlowStepLinkList),
|
|
104
|
+
rows: built.rows,
|
|
105
|
+
missingRemark: (Array.isArray(args.rows) ? args.rows : []).filter((row) => !row?.remark).map((row) => row?.dataRow),
|
|
106
|
+
impact: '提交会流转评分节点;所有节点评完将结束考核(finished),可能触发 ESB 动作流与消息提醒',
|
|
107
|
+
},
|
|
108
|
+
}, {
|
|
109
|
+
continuation,
|
|
110
|
+
fingerprint,
|
|
111
|
+
confirmHint: '提交为高风险写入:向用户展示 preview 并取得明确同意后,带 confirm=true 与 continuation 调用 performance.flow.score.submit.apply',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** submit.apply:确认后写入评分(updateScore),成功自动回读核验。 */
|
|
115
|
+
async function submitApply(args, env) {
|
|
116
|
+
if (args.confirm !== true) {
|
|
117
|
+
throw pfConfirmationError('performance.flow.score.submit.apply', {
|
|
118
|
+
hint: '提交会流转考核流程节点,必须用户明确同意',
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
if (typeof args.continuation !== 'string' || !args.continuation) {
|
|
122
|
+
throw pfValidationError('continuation_missing', '缺少 continuation(先运行 performance.flow.score.submit.prepare)');
|
|
123
|
+
}
|
|
124
|
+
const verified = await env.continuation.verify(args.continuation, 'performance.flow.score.submit.apply');
|
|
125
|
+
const flowId = String(args.flowId ?? '');
|
|
126
|
+
if (!flowId)
|
|
127
|
+
throw pfValidationError('flow_id_missing', '缺少考核流程 id(flowId)');
|
|
128
|
+
const { data, column } = await loadDetail(env, flowId, 'performance.flow.score.submit.apply');
|
|
129
|
+
const built = buildScoreRequest(data, args.rows, column);
|
|
130
|
+
const fingerprint = schemeFingerprint(built.body);
|
|
131
|
+
if (String(verified.fingerprint) !== fingerprint) {
|
|
132
|
+
throw pfValidationError('fingerprint_mismatch', '提交内容与确认摘要不一致(评分或考核数据在 prepare 后发生变化),请重新 prepare 并再次确认', {
|
|
133
|
+
expected: verified.fingerprint,
|
|
134
|
+
actual: fingerprint,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
const body = { ...built.body, distributeCheck: args.skipDistributeCheck === true ? false : true };
|
|
138
|
+
let response;
|
|
139
|
+
try {
|
|
140
|
+
response = await env.host.request({
|
|
141
|
+
path: SUBMIT_PATH,
|
|
142
|
+
body,
|
|
143
|
+
operation: 'performance.flow.score.submit.apply',
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
const message = error?.message ?? String(error);
|
|
148
|
+
if (/数据已更新|182612/.test(message)) {
|
|
149
|
+
// 幂等守卫:同一操作人已提交过(OperateStatus=opKpsEnd)
|
|
150
|
+
throw pfFail('该考核已由你提交过(数据已更新,请刷新后重试)——不要重试,直接回读核对状态', { flowId });
|
|
151
|
+
}
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
// 强制分布冲突:返回 remindType=warning|stop 且未流转
|
|
155
|
+
const remindType = response?.data?.remindType ?? response?.remindType ?? null;
|
|
156
|
+
if (remindType === 'stop') {
|
|
157
|
+
throw pfFail('绩效强制分布校验未通过(stop):本次未流转,请调整评分或联系管理员', { flowId, remindType });
|
|
158
|
+
}
|
|
159
|
+
if (remindType === 'warning') {
|
|
160
|
+
return pfSuccess('performance.flow.score.submit.apply', {
|
|
161
|
+
flowId,
|
|
162
|
+
submitted: false,
|
|
163
|
+
distributeConflict: 'warning',
|
|
164
|
+
message: '绩效分布比例冲突(warning):本次未流转。向用户说明后,可带 skipDistributeCheck=true 重新提交',
|
|
165
|
+
estimatedTotal: estimateTotal(data, built.body.kpiFlowStepLinkList),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
unwrapWeaData(response, '提交评分');
|
|
169
|
+
// 回读核验
|
|
170
|
+
const after = unwrapWeaData(await env.host.request({
|
|
171
|
+
path: `${DETAIL_PATH}/${encodeURIComponent(flowId)}`,
|
|
172
|
+
method: 'GET',
|
|
173
|
+
operation: 'performance.flow.score.submit.apply',
|
|
174
|
+
}), '提交后回读');
|
|
175
|
+
const keys = { kpsKey: `kps${column.stepId}-${column.scoreUserId}` };
|
|
176
|
+
const verifyRows = (Array.isArray(after?.basicData) ? after.basicData : []).map((row) => ({
|
|
177
|
+
dataRow: row?.dataRow,
|
|
178
|
+
name: row?.type ?? null,
|
|
179
|
+
score: row?.[keys.kpsKey] ?? null,
|
|
180
|
+
}));
|
|
181
|
+
return pfSuccess('performance.flow.score.submit.apply', {
|
|
182
|
+
flowId,
|
|
183
|
+
submitted: true,
|
|
184
|
+
total: after?.score ?? null,
|
|
185
|
+
flowStatus: after?.flowStatus ?? null,
|
|
186
|
+
verify: { rows: verifyRows },
|
|
187
|
+
detailUrl: buildDetailUrl(flowId),
|
|
188
|
+
next: '已回读核对;如状态为已结束(finished),该考核本轮已完成',
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
export const flowScoreOperations = [
|
|
192
|
+
{
|
|
193
|
+
name: 'performance.flow.score.stage',
|
|
194
|
+
resource: 'performance.flow',
|
|
195
|
+
method: 'apply',
|
|
196
|
+
action: 'flow.score.stage',
|
|
197
|
+
summary: '评分暂存到考核详情页(低风险预览写:不流转、可覆盖、页面立即可见)',
|
|
198
|
+
capability: 'performance.flow.score',
|
|
199
|
+
risk: 'write',
|
|
200
|
+
requiresConfirmation: true,
|
|
201
|
+
inputSchema: schemaOf({
|
|
202
|
+
flowId: { type: 'string', description: '考核流程 id(字符串)' },
|
|
203
|
+
rows: PAYLOAD_SCHEMA,
|
|
204
|
+
confirm: { type: 'boolean', description: '必须 true(用户已知晓会写入详情页、不流转、可覆盖)' },
|
|
205
|
+
}, { required: ['flowId', 'rows', 'confirm'] }),
|
|
206
|
+
handler: stage,
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: 'performance.flow.score.submit.prepare',
|
|
210
|
+
resource: 'performance.flow',
|
|
211
|
+
method: 'prepare',
|
|
212
|
+
action: 'flow.score.submit',
|
|
213
|
+
summary: '提交评分前组装与校验(不落库):前置校验 kps/目标值/实际值/满分,返回确认摘要与 continuation',
|
|
214
|
+
capability: 'performance.flow.score',
|
|
215
|
+
risk: 'write',
|
|
216
|
+
requiresConfirmation: true,
|
|
217
|
+
inputSchema: schemaOf({
|
|
218
|
+
flowId: { type: 'string', description: '考核流程 id(字符串)' },
|
|
219
|
+
rows: PAYLOAD_SCHEMA,
|
|
220
|
+
}, { required: ['flowId', 'rows'] }),
|
|
221
|
+
handler: submitPrepare,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: 'performance.flow.score.submit.apply',
|
|
225
|
+
resource: 'performance.flow',
|
|
226
|
+
method: 'apply',
|
|
227
|
+
action: 'flow.score.submit',
|
|
228
|
+
summary: '确认后提交评分(流转节点、可能结束考核并触发提醒),成功后自动回读',
|
|
229
|
+
capability: 'performance.flow.score',
|
|
230
|
+
risk: 'write',
|
|
231
|
+
requiresConfirmation: true,
|
|
232
|
+
inputSchema: schemaOf({
|
|
233
|
+
flowId: { type: 'string', description: '考核流程 id(字符串)' },
|
|
234
|
+
rows: PAYLOAD_SCHEMA,
|
|
235
|
+
confirm: { type: 'boolean', description: '必须 true(用户已明确同意提交)' },
|
|
236
|
+
continuation: { type: 'string', description: 'prepare 返回的 continuation' },
|
|
237
|
+
skipDistributeCheck: { type: 'boolean', description: '仅当用户确认接受分布冲突后跳过强制分布校验(warning 时用)' },
|
|
238
|
+
}, { required: ['flowId', 'rows', 'confirm', 'continuation'] }),
|
|
239
|
+
handler: submitApply,
|
|
240
|
+
},
|
|
241
|
+
];
|
|
@@ -3,11 +3,17 @@ import { schemeDraftOperations } from './scheme-draft.js';
|
|
|
3
3
|
import { schemePublishOperations } from './scheme-publish.js';
|
|
4
4
|
import { schemeDetailOperations } from './scheme-detail.js';
|
|
5
5
|
import { hrmResolveOperations } from './hrm-resolve.js';
|
|
6
|
+
import { flowListOperations } from './flow-list.js';
|
|
7
|
+
import { flowDetailOperations } from './flow-detail.js';
|
|
8
|
+
import { flowScoreOperations } from './flow-score.js';
|
|
6
9
|
const definitions = [
|
|
7
10
|
...hrmResolveOperations,
|
|
8
11
|
...schemeDetailOperations,
|
|
9
12
|
...schemeDraftOperations,
|
|
10
13
|
...schemePublishOperations,
|
|
14
|
+
...flowListOperations,
|
|
15
|
+
...flowDetailOperations,
|
|
16
|
+
...flowScoreOperations,
|
|
11
17
|
];
|
|
12
18
|
const registry = new Map();
|
|
13
19
|
for (const definition of definitions) {
|
package/docs/e10-auth.md
CHANGED
|
@@ -118,8 +118,9 @@ XiaoE 宿主(网页端 `XIAOE_CLIENT_TYPE=cloud`、桌面客户端 `client`)
|
|
|
118
118
|
不加后缀,共用一份凭据(同租户没必要维护两份登录态)。显式 `--profile` 始终优先,不再自动改名。
|
|
119
119
|
|
|
120
120
|
`auth login` 和 `auth oidc` 都严格走 E10 OAuth2.0 浏览器授权登录,不会读取或消费 XiaoE 统一登录凭据。本地默认监听
|
|
121
|
-
`http://127.0.0.1:19800/callback
|
|
122
|
-
`--port
|
|
121
|
+
`http://127.0.0.1:19800/callback`。默认端口被占用时自动切到系统分配的可用端口,
|
|
122
|
+
实际端口同时用于授权 URL 和换票请求。也可以使用 `--port 0` 直接选可用端口,或
|
|
123
|
+
`--port 19801` 固定其他端口(显式固定端口被占用时仍报错);如需要区分客户端来源,可以使用
|
|
123
124
|
`--agent_type <value>`。未显式传入时,CLI 会依次读取 `WEAVER_AGENT_TYPE`、
|
|
124
125
|
`WORKBUDDY_AGENT_TYPE`、`CODEX_AGENT_TYPE`,再根据 `WORKBUDDY_*` / `CODEX_*`
|
|
125
126
|
环境变量推断当前宿主,最后回落为 `weaver-work-cli`。浏览器授权地址会同时携带
|
|
@@ -143,8 +144,32 @@ Chrome/Edge 原生确认框。宿主需要返回特定会话时,可以传
|
|
|
143
144
|
返回地址只接受桌面应用自定义协议,不接受 `http(s)`、脚本或本地文件 URL。“始终打开”
|
|
144
145
|
偏好保存在当前本地回调地址的浏览器存储中。本地 CLI 打开通道默认保留 15 分钟;通道
|
|
145
146
|
结束后页面会自动退回浏览器自定义协议打开方式,不直接显示网络请求错误。
|
|
147
|
+
|
|
148
|
+
**`auth init` 不展示该弹层**:无论 stdout 是否为终端、是否配置
|
|
149
|
+
`--agent-return-url` / `WEAVER_AGENT_RETURN_URL`,回调成功写入凭据后立即输出
|
|
150
|
+
`{"status":"authorized",...}` 并退出。进度和授权 URL 只写 stderr。
|
|
151
|
+
豆包等宿主按「进程退出 + stdout」判定授权结果,不能让这一步依赖用户再次点击「打开」。
|
|
152
|
+
`auth login` / `auth oidc` 带 `--is-connector` 或 stdout 不是终端时也跳过默认回跳,
|
|
153
|
+
但显式返回地址仍生效;它们保留原有登录结果输出格式,不使用 `auth init` 的平台 JSON 契约。
|
|
154
|
+
`--agent_type doubao` 继续传给 E10 作为渠道标识,无需更换成其他智能体名称绕过弹层。
|
|
155
|
+
并发或刷新的回调不会重复换票;E10 的 HTTP 200 + `status:400` 也按失败处理,保留业务错误码。
|
|
156
|
+
发布豆包连接器时,需要同步更新 `com.doubao/cli.json` 的 `install.default` 和 `install.linux`
|
|
157
|
+
中的固定 CLI 版本或安装包地址。仅在普通终端安装本地 tgz,不能证明豆包隔离运行环境也已更新;
|
|
158
|
+
应在连接器运行环境中执行 `weaver-work-cli --version`,Windows 下同时用
|
|
159
|
+
`where.exe weaver-work-cli` 确认命中的入口。安装包需重新运行构建以更新实际执行的 `dist/index.js`
|
|
160
|
+
和 `dist/chunks`,仅修改 `dist/internal/e10/auth/commands.js` 不会更新 bundle 入口。
|
|
146
161
|
智能小 E 统一登录不会经过浏览器,也不会显示“返回智能小 E”弹层;该弹层只属于用户另行显式发起的 `auth login` 浏览器 OAuth。
|
|
147
162
|
|
|
163
|
+
唤起系统默认处理器时,CLI 不再依赖 `PATH` 解析可执行文件:Windows 取
|
|
164
|
+
`%SystemRoot%\System32\rundll32.exe`(探测不到再试 `Sysnative`,仍没有才回退裸命令名),
|
|
165
|
+
macOS/Linux 优先 `/usr/bin/open`、`/usr/bin/xdg-open`。连接器或沙箱宿主常把 `PATH` 整体
|
|
166
|
+
重建、不含系统目录,裸命令名会 `spawn rundll32.exe ENOENT`,表现为授权页「打开应用」
|
|
167
|
+
返回 500 且日志只剩「请确认应用已安装」;现在失败日志会带上真实的 `errno` 与命令路径。
|
|
168
|
+
授权成功(`/callback` 或 `/agent-return` 打开动作)后,CLI 会先关空闲连接、最多 500ms 后
|
|
169
|
+
强制关闭残留连接并立即退出,输出 `{"status":"authorized"}`。此前只调用 `server.close()`,
|
|
170
|
+
浏览器的 keep-alive 连接会让回调迟迟不触发,以「进程退出」判定授权结果的宿主(如豆包)
|
|
171
|
+
就会误报鉴权失败。
|
|
172
|
+
|
|
148
173
|
HTTPS E10 授权页跳转到 HTTP loopback 是桌面 OAuth 的标准回调方式:它属于浏览器
|
|
149
174
|
顶层导航,不按 Mixed Content 子资源请求处理。但部分 E10 环境或浏览器安全策略会把
|
|
150
175
|
回调改成 `https://127.0.0.1:<port>`;由于 CLI 本地监听器是 HTTP,此时浏览器会显示
|