weaver-work-cli 0.1.22 → 0.1.24
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/README.md +23 -2
- package/dist/internal/e10/auth/commands.js +194 -16
- package/dist/internal/e10/auth/xiaoe.js +15 -6
- package/dist/internal/e10/context.js +3 -3
- package/dist/internal/e10/request-runtime.js +46 -4
- package/dist/shortcuts/caizhilian/file-upload/metadata.js +124 -0
- package/dist/shortcuts/caizhilian/file-upload/multipart.js +47 -0
- package/dist/shortcuts/caizhilian/file-upload/protocol.js +116 -0
- package/dist/shortcuts/caizhilian/file-upload/receipt.js +37 -0
- package/dist/shortcuts/caizhilian/host.js +13 -5
- package/dist/shortcuts/caizhilian/operations/handlers/file-upload.js +72 -179
- package/dist/shortcuts/caizhilian/operations/handlers/folder.js +701 -4
- package/dist/shortcuts/caizhilian/operations/registry.js +5 -1
- package/dist/shortcuts/caizhilian/operations/specs.js +52 -0
- package/dist/shortcuts/meeting/operations/change.js +7 -4
- package/dist/shortcuts/meeting/operations/create.js +5 -3
- package/dist/shortcuts/meeting/operations/eb/decision.js +22 -2
- package/dist/shortcuts/meeting/operations/lifecycle.js +8 -6
- package/dist/shortcuts/meeting/operations/receipts.js +54 -21
- package/dist/shortcuts/meeting/operations/shared.js +28 -0
- package/dist/shortcuts/meeting/operations/signs.js +14 -4
- package/dist/shortcuts/project/operations/read.js +7 -6
- package/dist/shortcuts/workflow/continuation.js +14 -9
- package/dist/shortcuts/workflow/endpoints.js +11 -1
- package/dist/shortcuts/workflow/operations/flow-status.js +63 -0
- package/dist/shortcuts/workflow/operations/form.js +650 -518
- package/dist/shortcuts/workflow/operations/read.js +374 -13
- package/dist/shortcuts/workflow/operations/shared.js +3 -0
- package/dist/shortcuts/workflow/operations/write.js +5 -5
- package/dist/shortcuts/workflow/operations.js +8 -6
- package/docs/caizhilian.md +8 -2
- package/docs/e10-auth.md +18 -3
- package/package.json +1 -1
- package/skills/weaver-e10-caizhilian/SKILL.md +8 -3
- package/skills/weaver-e10-caizhilian/references/file-upload.md +100 -295
- package/skills/weaver-e10-caizhilian/references/folder.md +31 -3
- package/skills/weaver-e10-caizhilian/references/source-manifest.json +536 -25
- package/skills/weaver-e10-jiuchuanhui/SKILL.md +9 -1
- package/skills/weaver-e10-meeting/SKILL.md +3 -2
- package/skills/weaver-e10-meeting/references/meeting-eb.md +10 -0
- package/skills/weaver-e10-meeting/references/meeting-receipts-signs.md +7 -2
- package/skills/weaver-e10-meeting/references/meeting-verification.md +1 -1
- package/skills/weaver-e10-meeting.zip +0 -0
- package/skills/weaver-e10-shared/SKILL.md +12 -2
- package/skills/weaver-e10-shared/references/e10-auth-and-session.md +21 -3
- package/skills/weaver-e10-shijingran/SKILL.md +68 -3
- package/skills/weaver-e10-shijingran/references/disabled-capabilities.md +22 -0
- package/skills/weaver-e10-shijingran/references/source-manifest.json +12 -4
- package/skills/weaver-e10-workflow/SKILL.md +10 -8
- package/skills/weaver-e10-workflow/references/source-manifest.json +36 -31
- package/skills/weaver-e10-workflow/references/workflow-batch.md +2 -4
- package/skills/weaver-e10-workflow/references/workflow-create.md +58 -36
- package/skills/weaver-e10-workflow/references/workflow-edit.md +2 -1
- package/skills/weaver-e10-workflow/references/workflow-memory.md +2 -2
- package/skills/weaver-e10-workflow/references/workflow-operate.md +2 -1
- package/skills/weaver-e10-workflow/references/workflow-query.md +9 -7
- package/skills/weaver-e10-workflow/references/workflow-share.md +2 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 流程状态(`flowstatus`)系统条件。
|
|
3
|
+
*
|
|
4
|
+
* ★ `flowstatus` 是**选项类**系统条件,服务端只认 `[{term, multiContent:[<代码>]}]`
|
|
5
|
+
* —— **不是** `[{content, term}]`。`content` 形态是给"文本类"条件(requestname /
|
|
6
|
+
* requestmark)用的;把取值塞进 `content`,服务端会**静默忽略**该条件
|
|
7
|
+
* ⇒ 按流程状态筛选恒不生效、退化成全量。
|
|
8
|
+
*
|
|
9
|
+
* 来源对照:V11.3 `e10_workflow.py:8519 flow_status_condition` 产出的就是
|
|
10
|
+
* `[{"term": "in", "multiContent": [...]}]`;V12.1 移植时退化成了 `[{content, term}]`
|
|
11
|
+
* (2026-09-28 用户实测预期结构为 `[{"term":"in","multiContent":["notFinish","finish"]}]`)。
|
|
12
|
+
*
|
|
13
|
+
* ★★ 取值口径(2026-09-28 用户裁定=方案 C):**只认四个选项代码,不做中文口语词识别**。
|
|
14
|
+
* 说明层(schema 描述 / 报错文案 / `workflow-query.md` 的筛选条件表)已经列出四个代码及其
|
|
15
|
+
* 含义,"用户口语 → 代码"的翻译由**模型**完成;CLI 只做代码的校验与纯归一,且:
|
|
16
|
+
* - 出现任何一个非代码取值 ⇒ **整体报错并停止**,不静默丢弃——丢掉一个取值就少一层筛选,
|
|
17
|
+
* 等于把结果静默放大到全量,与本项目"禁止静默丢条件"的纪律相悖;
|
|
18
|
+
* - 大小写不敏感(`Finish` → `finish`)属纯归一,不做任何语义猜测。
|
|
19
|
+
*/
|
|
20
|
+
/** 服务端认可的流程状态选项(唯一定义处,说明文案由它派生,避免两处口径漂移)。 */
|
|
21
|
+
const FLOW_STATUS_OPTIONS = [
|
|
22
|
+
{ code: 'finish', meaning: '已结束' },
|
|
23
|
+
{ code: 'normalFinish', meaning: '正常结束' },
|
|
24
|
+
{ code: 'forceFinish', meaning: '强制结束' },
|
|
25
|
+
{ code: 'notFinish', meaning: '未结束·审批中' },
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* 模型可见的取值说明(schema 描述与报错文案共用同一份,避免两处口径漂移)。
|
|
29
|
+
*
|
|
30
|
+
* ★ **代码在前、含义在后**(`finish(已结束)`):与本条契约"传的就是这个 key"一致,
|
|
31
|
+
* 也和 `workflow-query.md` 筛选条件表的写法逐字对齐(2026-09-28 用户要求统一)。
|
|
32
|
+
*/
|
|
33
|
+
export const FLOW_STATUS_HINT = `${FLOW_STATUS_OPTIONS.map((item) => `${item.code}(${item.meaning})`).join('、')}`
|
|
34
|
+
+ ';只接受上述四个代码、不接受中文,可逗号分隔多值';
|
|
35
|
+
/**
|
|
36
|
+
* `--flow-status` 取值 → `formDatas.flowstatus` 条件项。
|
|
37
|
+
*
|
|
38
|
+
* 返回 `null` 仅代表**输入为空**(调用方不设该条件)。取值非法一律通过 `invalid` 上报,
|
|
39
|
+
* 由调用方报错——**绝不静默丢弃条件**(丢弃会退化成全量查询)。
|
|
40
|
+
*/
|
|
41
|
+
export function flowStatusCondition(value, term) {
|
|
42
|
+
const text = String(value ?? '').trim();
|
|
43
|
+
if (!text)
|
|
44
|
+
return null;
|
|
45
|
+
const byLowerCode = new Map(FLOW_STATUS_OPTIONS.map((item) => [item.code.toLowerCase(), item.code]));
|
|
46
|
+
const codes = [];
|
|
47
|
+
const invalid = [];
|
|
48
|
+
for (const partRaw of text.split(/[,,、]/u)) {
|
|
49
|
+
const part = partRaw.trim();
|
|
50
|
+
if (!part)
|
|
51
|
+
continue;
|
|
52
|
+
const code = byLowerCode.get(part.toLowerCase());
|
|
53
|
+
if (code)
|
|
54
|
+
codes.push(code);
|
|
55
|
+
else
|
|
56
|
+
invalid.push(part);
|
|
57
|
+
}
|
|
58
|
+
if (invalid.length || !codes.length) {
|
|
59
|
+
return { condition: [], invalid: invalid.length ? invalid : [text] };
|
|
60
|
+
}
|
|
61
|
+
const normalizedTerm = String(term ?? '').trim().toLowerCase() === 'notin' ? 'notin' : 'in';
|
|
62
|
+
return { condition: [{ term: normalizedTerm, multiContent: [...new Set(codes)] }], invalid: [] };
|
|
63
|
+
}
|