weaver-work-cli 0.1.52 → 0.1.54
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/{attachment-content-MBYYSQIX.js → attachment-content-2EPEI4HV.js} +3 -3
- package/dist/chunks/{chunk-DZOC77ZD.js → chunk-6LGLI46Q.js} +1 -1
- package/dist/chunks/{chunk-RWFRZSIP.js → chunk-7KKI5KDY.js} +2 -2
- package/dist/chunks/{chunk-KLZ3ULQQ.js → chunk-CNVZETM5.js} +1 -1
- package/dist/chunks/{chunk-RPRFIG6I.js → chunk-FE3CQAAM.js} +23 -23
- package/dist/chunks/{chunk-ZRHKGQRQ.js → chunk-JJRIT2ZN.js} +2 -2
- package/dist/chunks/{chunk-LTRLF6MM.js → chunk-LYOFRYC4.js} +4 -4
- package/dist/chunks/{chunk-7UOXOGFL.js → chunk-O6RIBG5E.js} +4 -4
- package/dist/chunks/{chunk-LM2H7SZI.js → chunk-QUDHSMG3.js} +37 -25
- package/dist/chunks/{chunk-IRMA3GVP.js → chunk-XHMJBRLZ.js} +1 -1
- package/dist/chunks/{chunk-LALWNK6M.js → chunk-XPQN4E5O.js} +41 -19
- package/dist/chunks/{chunk-D3TDNRFE.js → chunk-Z7B7QSR2.js} +7 -7
- package/dist/chunks/{conflict-D2HYKBMH.js → conflict-K2IAKKFR.js} +2 -2
- package/dist/chunks/{contract-MFOFMM2J.js → contract-LJRAXVZU.js} +5448 -1857
- package/dist/chunks/{create-flow-7ZATJVTM.js → create-flow-UL37MZGP.js} +6 -6
- package/dist/chunks/{env-5DO4YENS.js → env-BZDB5OVZ.js} +2 -2
- package/dist/chunks/{factory-3M7D7WJC.js → factory-VD3YI6N7.js} +1 -1
- package/dist/chunks/{group-chat-B2HT5NEO.js → group-chat-DHNVO76L.js} +3 -3
- package/dist/chunks/{meeting-HZOX3CBB.js → meeting-OWG4O2XH.js} +10 -10
- package/dist/chunks/{registry-SJHSBO5G.js → registry-ASYCWF2U.js} +10 -10
- package/dist/chunks/{registry-KYPFFQIH.js → registry-CJOVECZD.js} +1 -1
- package/dist/chunks/{room-recommend-5AHR4YQV.js → room-recommend-LSVAMGKV.js} +4 -4
- package/dist/chunks/{schedule-KZPJUPC2.js → schedule-7QOPRUU4.js} +4 -4
- package/dist/chunks/{smart-extract-IXHCZE4R.js → smart-extract-FOUYNIG3.js} +44 -8
- package/dist/chunks/{workflow-UHKCZJMY.js → workflow-YHXFIU63.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/shortcuts/contract/manifest.js +105 -5
- package/dist/shortcuts/contract/ooxml/docx-table.js +233 -0
- package/dist/shortcuts/contract/operations/card-action.js +597 -17
- package/dist/shortcuts/contract/operations/card-ebdf-list.js +258 -2
- package/dist/shortcuts/contract/operations/card.js +6 -5
- package/dist/shortcuts/contract/operations/docx-fillfromquote.js +532 -0
- package/dist/shortcuts/contract/operations/docx-verify.js +258 -0
- package/dist/shortcuts/contract/operations/elements-build.js +47 -0
- package/dist/shortcuts/contract/operations/first-screen.js +28 -3
- package/dist/shortcuts/contract/operations/ledger.js +438 -0
- package/dist/shortcuts/contract/operations/performance.js +104 -3
- package/dist/shortcuts/contract/operations/quotescreen.js +529 -0
- package/dist/shortcuts/contract/operations/registry.js +10 -0
- package/dist/shortcuts/contract/operations/triage.js +1100 -0
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +21 -0
- package/dist/shortcuts/smart-extract/operations/fill.js +10 -7
- package/dist/shortcuts/smart-extract/operations/validate.js +49 -3
- package/dist/shortcuts/workflow/operations/form.js +68 -33
- package/docs/smart-extract.md +5 -5
- package/package.json +1 -1
- package/skills/weaver-e10-jinchengda/SKILL.md +139 -99
- package/skills/weaver-e10-jinchengda/references/contract-action-card.md +43 -482
- package/skills/weaver-e10-jinchengda/references/contract-action-engine.md +7 -8
- package/skills/weaver-e10-jinchengda/references/contract-agent-entry.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-ai-assistant.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-ai-review.md +32 -16
- package/skills/weaver-e10-jinchengda/references/contract-card-render-internals.md +478 -0
- package/skills/weaver-e10-jinchengda/references/contract-command-index.md +4 -4
- package/skills/weaver-e10-jinchengda/references/contract-disabled-capabilities.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-doc-triage.md +39 -61
- package/skills/weaver-e10-jinchengda/references/contract-element-save-record.md +13 -9
- package/skills/weaver-e10-jinchengda/references/contract-execution-rules.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-new-customer.md +2 -2
- package/skills/weaver-e10-jinchengda/references/contract-field-extract-other-flows.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-flow-launch.md +3 -3
- package/skills/weaver-e10-jinchengda/references/contract-ledger-catalog.md +263 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-query-playbook.md +525 -0
- package/skills/weaver-e10-jinchengda/references/contract-ledger-rules.md +36 -0
- package/skills/weaver-e10-jinchengda/references/contract-modeltext-library.md +1 -1
- package/skills/weaver-e10-jinchengda/references/contract-multi-file.md +3 -6
- package/skills/weaver-e10-jinchengda/references/contract-performance-query.md +80 -54
- package/skills/weaver-e10-jinchengda/references/contract-quote-to-contract.md +53 -76
- package/skills/weaver-e10-jinchengda/references/contract-template-selector.md +19 -21
- package/skills/weaver-e10-jinchengda/references/orchestration.md +12 -12
- package/skills/weaver-e10-jinchengda/references/source-manifest.json +1 -6
- package/skills/weaver-e10-jinchengda/scripts/fill_plan.py +2 -1
- package/skills/weaver-e10-meeting/SKILL.md +2 -1
- package/skills/weaver-e10-smart-extract/SKILL.md +15 -4
- package/skills/weaver-e10-smart-extract/references/result-format.md +2 -2
- package/skills/weaver-e10-smart-extract/references/troubleshooting.md +2 -1
- package/skills/weaver-e10-workflow/references/workflow-create.md +6 -5
- package/skills/weaver-e10-workflow/references/workflow-edit.md +1 -1
- package/skills/weaver-e10-jinchengda/scripts/contract_first_screen.py +0 -200
- package/skills/weaver-e10-jinchengda/scripts/fill_contract_from_quote.py +0 -572
- package/skills/weaver-e10-jinchengda/scripts/quote_screen.py +0 -560
- package/skills/weaver-e10-jinchengda/scripts/triage_contract.py +0 -894
- package/skills/weaver-e10-jinchengda/scripts/validate_action_card.py +0 -598
- package/skills/weaver-e10-jinchengda/scripts/verify_docx_placeholders.py +0 -118
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
resolveWorkflowId,
|
|
23
23
|
shapeBrowserValues,
|
|
24
24
|
shouldAutoPickFlow
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-QUDHSMG3.js";
|
|
26
|
+
import "./chunk-O6RIBG5E.js";
|
|
27
|
+
import "./chunk-LYOFRYC4.js";
|
|
28
|
+
import "./chunk-CNVZETM5.js";
|
|
29
|
+
import "./chunk-6LGLI46Q.js";
|
|
30
|
+
import "./chunk-XHMJBRLZ.js";
|
|
31
31
|
import "./chunk-7BDPM5ST.js";
|
|
32
32
|
import "./chunk-UG5G54VL.js";
|
|
33
33
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
meetingStateDir,
|
|
7
7
|
readCache,
|
|
8
8
|
resolveMeetingEnvMode
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-6LGLI46Q.js";
|
|
10
|
+
import "./chunk-XHMJBRLZ.js";
|
|
11
11
|
import "./chunk-7BDPM5ST.js";
|
|
12
12
|
import "./chunk-UG5G54VL.js";
|
|
13
13
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
ensureMeetingGroupChat,
|
|
7
7
|
meetingEbGroupChatOperations,
|
|
8
8
|
savePendingForm
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-Z7B7QSR2.js";
|
|
10
|
+
import "./chunk-6LGLI46Q.js";
|
|
11
|
+
import "./chunk-XHMJBRLZ.js";
|
|
12
12
|
import "./chunk-7BDPM5ST.js";
|
|
13
13
|
import "./chunk-UG5G54VL.js";
|
|
14
14
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -3,19 +3,19 @@ const require = __esbuildCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
meetingOperationDefinitions
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-FE3CQAAM.js";
|
|
7
|
+
import "./chunk-JJRIT2ZN.js";
|
|
8
|
+
import "./chunk-Z7B7QSR2.js";
|
|
9
|
+
import "./chunk-QUDHSMG3.js";
|
|
10
|
+
import "./chunk-O6RIBG5E.js";
|
|
11
|
+
import "./chunk-7KKI5KDY.js";
|
|
12
|
+
import "./chunk-LYOFRYC4.js";
|
|
13
|
+
import "./chunk-CNVZETM5.js";
|
|
14
14
|
import {
|
|
15
15
|
degradeMeetingEnvToStandard,
|
|
16
16
|
meetingStateDir,
|
|
17
17
|
readCache
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6LGLI46Q.js";
|
|
19
19
|
import {
|
|
20
20
|
MeetingCliError,
|
|
21
21
|
asObject,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
meetingAuthError,
|
|
24
24
|
meetingNetworkError,
|
|
25
25
|
meetingValidationError
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XHMJBRLZ.js";
|
|
27
27
|
import {
|
|
28
28
|
reportPlatformError
|
|
29
29
|
} from "./chunk-6N4JPNFL.js";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
getMeetingOperation,
|
|
5
5
|
hasMeetingOperation,
|
|
6
6
|
meetingOperationDefinitions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-FE3CQAAM.js";
|
|
8
|
+
import "./chunk-JJRIT2ZN.js";
|
|
9
|
+
import "./chunk-Z7B7QSR2.js";
|
|
10
|
+
import "./chunk-QUDHSMG3.js";
|
|
11
|
+
import "./chunk-O6RIBG5E.js";
|
|
12
|
+
import "./chunk-7KKI5KDY.js";
|
|
13
|
+
import "./chunk-LYOFRYC4.js";
|
|
14
|
+
import "./chunk-CNVZETM5.js";
|
|
15
|
+
import "./chunk-6LGLI46Q.js";
|
|
16
|
+
import "./chunk-XHMJBRLZ.js";
|
|
17
17
|
import "./chunk-7BDPM5ST.js";
|
|
18
18
|
import "./chunk-UG5G54VL.js";
|
|
19
19
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -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-LYOFRYC4.js";
|
|
11
|
+
import "./chunk-CNVZETM5.js";
|
|
12
|
+
import "./chunk-6LGLI46Q.js";
|
|
13
|
+
import "./chunk-XHMJBRLZ.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-7KKI5KDY.js";
|
|
12
|
+
import "./chunk-CNVZETM5.js";
|
|
13
|
+
import "./chunk-6LGLI46Q.js";
|
|
14
|
+
import "./chunk-XHMJBRLZ.js";
|
|
15
15
|
import "./chunk-7BDPM5ST.js";
|
|
16
16
|
import "./chunk-UG5G54VL.js";
|
|
17
17
|
import "./chunk-BUSC6UAE.js";
|
|
@@ -1241,9 +1241,11 @@ function isNumberField(fieldType) {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
var DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/u;
|
|
1243
1243
|
var NUMBER_PATTERN = /^-?\d+(\.\d+)?$/u;
|
|
1244
|
-
function checkFieldValue(field, values, path, strict, errors, warnings) {
|
|
1244
|
+
function checkFieldValue(field, values, path, strict, errors, warnings, options = {}) {
|
|
1245
1245
|
if (values.length === 0) {
|
|
1246
|
-
|
|
1246
|
+
if (!options.allowEmpty) {
|
|
1247
|
+
warnings.push({ path, code: "empty_value", message: "\u7A7A\u503C\u5B57\u6BB5\u4E0D\u5E94\u51FA\u73B0\u5728\u7ED3\u679C\u91CC\uFF08fieldResults \u53EA\u653E\u6709\u6548\u503C\uFF09" });
|
|
1248
|
+
}
|
|
1247
1249
|
return;
|
|
1248
1250
|
}
|
|
1249
1251
|
if (field.single && values.length > 1) {
|
|
@@ -1357,6 +1359,39 @@ function checkOrigins(origin, path, knownIds, errors, warnings) {
|
|
|
1357
1359
|
}
|
|
1358
1360
|
}
|
|
1359
1361
|
}
|
|
1362
|
+
function normalizeResult(result, structureRaw) {
|
|
1363
|
+
const structure = coerceStructure(structureRaw);
|
|
1364
|
+
const normalized = JSON.parse(JSON.stringify(result ?? {}));
|
|
1365
|
+
const order = new Map(structure.mainFields.map((field, index) => [field.fieldId, index]));
|
|
1366
|
+
const rows = Array.isArray(normalized.mainTable?.rows) ? normalized.mainTable.rows : [];
|
|
1367
|
+
for (const rowRaw of rows) {
|
|
1368
|
+
const row = rowRaw && typeof rowRaw === "object" && !Array.isArray(rowRaw) ? rowRaw : null;
|
|
1369
|
+
if (!row || !Array.isArray(row.fieldResults)) continue;
|
|
1370
|
+
const kept = row.fieldResults.filter(
|
|
1371
|
+
(item) => item && typeof item === "object" && !Array.isArray(item) && valuesOf(item.value).length > 0
|
|
1372
|
+
);
|
|
1373
|
+
kept.sort((left, right) => {
|
|
1374
|
+
const leftIndex = order.get(String(left.fieldInfo ?? "").split("#")[0].trim()) ?? Number.MAX_SAFE_INTEGER;
|
|
1375
|
+
const rightIndex = order.get(String(right.fieldInfo ?? "").split("#")[0].trim()) ?? Number.MAX_SAFE_INTEGER;
|
|
1376
|
+
return leftIndex - rightIndex;
|
|
1377
|
+
});
|
|
1378
|
+
row.fieldResults = kept;
|
|
1379
|
+
}
|
|
1380
|
+
if (Array.isArray(normalized.subTables)) {
|
|
1381
|
+
for (const table of normalized.subTables) {
|
|
1382
|
+
if (!table || typeof table !== "object") continue;
|
|
1383
|
+
const subTable = table;
|
|
1384
|
+
if (!Array.isArray(subTable.rows)) continue;
|
|
1385
|
+
subTable.rows = subTable.rows.filter((rowRaw) => {
|
|
1386
|
+
const row = rowRaw && typeof rowRaw === "object" ? rowRaw : null;
|
|
1387
|
+
if (!row) return true;
|
|
1388
|
+
if (!Array.isArray(row.values)) return true;
|
|
1389
|
+
return row.values.some((value) => valuesOf(value).length > 0);
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
return normalized;
|
|
1394
|
+
}
|
|
1360
1395
|
function validateExtraction(result, structureRaw, options = {}) {
|
|
1361
1396
|
const structure = coerceStructure(structureRaw);
|
|
1362
1397
|
const strict = options.strict !== false;
|
|
@@ -1519,7 +1554,7 @@ function validateExtraction(result, structureRaw, options = {}) {
|
|
|
1519
1554
|
if (expected && Array.isArray(subRow.values)) {
|
|
1520
1555
|
for (const [fieldIndex, field] of expected.fields.entries()) {
|
|
1521
1556
|
const values = valuesOf(subRow.values[fieldIndex]);
|
|
1522
|
-
checkFieldValue(field, values, `${rowPath}.values[${fieldIndex}]`, strict, errors, warnings);
|
|
1557
|
+
checkFieldValue(field, values, `${rowPath}.values[${fieldIndex}]`, strict, errors, warnings, { allowEmpty: true });
|
|
1523
1558
|
}
|
|
1524
1559
|
}
|
|
1525
1560
|
if (Array.isArray(subRow.origins)) {
|
|
@@ -2257,7 +2292,7 @@ var fill = {
|
|
|
2257
2292
|
var fillSave = {
|
|
2258
2293
|
name: "smart-extract.fill.save",
|
|
2259
2294
|
risk: "high-risk-write",
|
|
2260
|
-
summary: "\u4E00\u6B65\u6536\u5C3E\uFF1A\u6309 sessionFile \u53D6\u56DE\u7ED3\u6784\u4E0E\u89C4\u5219 \u2192 \u786E\u5B9A\u6027\u6821\u9A8C\
|
|
2295
|
+
summary: "\u4E00\u6B65\u6536\u5C3E\uFF1A\u6309 sessionFile \u53D6\u56DE\u7ED3\u6784\u4E0E\u89C4\u5219 \u2192 \u81EA\u52A8\u6574\u7406\u7ED3\u679C\uFF08\u4E3B\u8868\u5254\u9664\u7A7A\u503C\u5E76\u6309 fields.main \u6392\u5E8F\u3001\u660E\u7EC6\u5220\u5168\u7A7A\u884C\uFF09\u2192 \u786E\u5B9A\u6027\u6821\u9A8C\uFF08\u4E0D\u901A\u8FC7\u76F4\u63A5\u62D2\u5199\u5E76\u56DE\u9519\u8BEF\u6E05\u5355\uFF09\u2192 \u5199\u6279\u6B21\u8BB0\u5F55 \u2192 \u56DE\u67E5\u9A8C\u8BC1\uFF0C\u8FD4\u56DE aiExtraId\u3002\u6BCF\u6B21\u90FD\u65B0\u5EFA\u4E00\u6761\u8BB0\u5F55\uFF0C\u4E0D\u5224\u65AD\u662F\u5426\u5DF2\u5B58\u5728\uFF1B\u4E0D\u9700\u8981\u9884\u89C8\u4E0E\u4EBA\u5DE5\u786E\u8BA4\u3002",
|
|
2261
2296
|
inputSchema: schemaOf({
|
|
2262
2297
|
sessionFile: { type: "string", description: "smart-extract.fill \u8FD4\u56DE\u7684 sessionFile \u8DEF\u5F84" },
|
|
2263
2298
|
result: { type: "object", description: "\u62BD\u53D6\u7ED3\u679C\uFF08\u5185\u8054\uFF09" },
|
|
@@ -2285,7 +2320,8 @@ var fillSave = {
|
|
|
2285
2320
|
}
|
|
2286
2321
|
const result = await readObjectInput(args, "result", "resultPath", { required: true });
|
|
2287
2322
|
if (!result) throw smartExtractValidationError("result_required", "\u5FC5\u987B\u63D0\u4F9B result \u6216 resultPath");
|
|
2288
|
-
const
|
|
2323
|
+
const normalized = normalizeResult(result, session.structure);
|
|
2324
|
+
const report = validateExtraction(normalized, session.structure, {
|
|
2289
2325
|
knownAttachmentIds: session.attachmentIds
|
|
2290
2326
|
});
|
|
2291
2327
|
if (!report.ok) {
|
|
@@ -2329,7 +2365,7 @@ var fillSave = {
|
|
|
2329
2365
|
...nodeId ? { nodeId } : {},
|
|
2330
2366
|
formModeType: "wf",
|
|
2331
2367
|
requestId,
|
|
2332
|
-
recognizeResult: JSON.stringify(
|
|
2368
|
+
recognizeResult: JSON.stringify(normalized),
|
|
2333
2369
|
dataSource,
|
|
2334
2370
|
fillStatus: "0",
|
|
2335
2371
|
...attachmentIds ? { attachmentIds } : {},
|
|
@@ -2374,8 +2410,8 @@ var fillSave = {
|
|
|
2374
2410
|
} catch {
|
|
2375
2411
|
verified = false;
|
|
2376
2412
|
}
|
|
2377
|
-
const mainRows = Array.isArray(record(
|
|
2378
|
-
const subRows = Array.isArray(
|
|
2413
|
+
const mainRows = Array.isArray(record(normalized.mainTable).rows) ? record(normalized.mainTable).rows.length : 0;
|
|
2414
|
+
const subRows = Array.isArray(normalized.subTables) ? normalized.subTables.reduce((total, table) => total + (Array.isArray(table?.rows) ? table.rows.length : 0), 0) : 0;
|
|
2379
2415
|
return smartExtractSuccess("smart-extract.fill.save", {
|
|
2380
2416
|
aiExtraId,
|
|
2381
2417
|
verified,
|
package/dist/index.js
CHANGED
|
@@ -90,7 +90,7 @@ var builtinShortcuts = [
|
|
|
90
90
|
lazyShortcut({
|
|
91
91
|
name: "meeting",
|
|
92
92
|
description: "\u6CDB\u5FAEE10\u4F1A\u8BAE\u7BA1\u7406 CLI\uFF08\u6807\u51C6\u7248\uFF1A\u67E5\u8BE2/\u51B2\u7A81/\u9884\u7EA6/\u56DE\u6267/\u7B7E\u5230\uFF09",
|
|
93
|
-
load: async () => (await import("./chunks/meeting-
|
|
93
|
+
load: async () => (await import("./chunks/meeting-OWG4O2XH.js")).meetingShortcut
|
|
94
94
|
}),
|
|
95
95
|
lazyShortcut({
|
|
96
96
|
name: "okr",
|
|
@@ -140,7 +140,7 @@ var builtinShortcuts = [
|
|
|
140
140
|
lazyShortcut({
|
|
141
141
|
name: "workflow",
|
|
142
142
|
description: "\u6CDB\u5FAEE10\u6D41\u7A0B\u667A\u80FD\u52A9\u624B CLI\uFF08\u67E5\u8BE2/\u67E5\u770B/\u64CD\u4F5C/\u6279\u91CF/\u53D1\u8D77/\u4FEE\u6539\uFF09",
|
|
143
|
-
load: async () => (await import("./chunks/workflow-
|
|
143
|
+
load: async () => (await import("./chunks/workflow-YHXFIU63.js")).workflowShortcut
|
|
144
144
|
}),
|
|
145
145
|
lazyShortcut({
|
|
146
146
|
name: "blog",
|
|
@@ -155,7 +155,7 @@ var builtinShortcuts = [
|
|
|
155
155
|
lazyShortcut({
|
|
156
156
|
name: "contract",
|
|
157
157
|
description: "\u6CDB\u5FAEE10\u4ECA\u627F\u8FBE\u5408\u540C\u7BA1\u7406 CLI",
|
|
158
|
-
load: async () => (await import("./chunks/contract-
|
|
158
|
+
load: async () => (await import("./chunks/contract-LJRAXVZU.js")).contractShortcut
|
|
159
159
|
}),
|
|
160
160
|
lazyShortcut({
|
|
161
161
|
name: "reception",
|
|
@@ -165,7 +165,7 @@ var builtinShortcuts = [
|
|
|
165
165
|
lazyShortcut({
|
|
166
166
|
name: "smart-extract",
|
|
167
167
|
description: "\u6CDB\u5FAEE10\u667A\u80FD\u62BD\u53D6 CLI\uFF08\u8868\u5355\u7ED3\u6784 / \u9644\u4EF6\u6B63\u6587 / \u6821\u9A8C\u5E76\u843D\u5E93\uFF0C\u8FD4\u56DE aiExtraId\uFF09",
|
|
168
|
-
load: async () => (await import("./chunks/smart-extract-
|
|
168
|
+
load: async () => (await import("./chunks/smart-extract-FOUYNIG3.js")).smartExtractShortcut
|
|
169
169
|
}),
|
|
170
170
|
lazyShortcut({
|
|
171
171
|
name: "data",
|
|
@@ -434,6 +434,105 @@ const quoteContracts = [
|
|
|
434
434
|
fixed: { local: true, kind: 'rmb-upper' },
|
|
435
435
|
inputSchema: readSchema({ num: { type: 'string', minLength: 1 } }, ['num']),
|
|
436
436
|
},
|
|
437
|
+
{
|
|
438
|
+
name: 'contract.docx.fillfromquote',
|
|
439
|
+
risk: 'local-file-write',
|
|
440
|
+
fixed: { local: true, kind: 'docx-fill-from-quote' },
|
|
441
|
+
inputSchema: readSchema({
|
|
442
|
+
template: { type: 'string', minLength: 1, maxLength: 4096, description: '模板 docx 绝对路径' },
|
|
443
|
+
data: {
|
|
444
|
+
anyOf: [{ type: 'object' }, { type: 'string' }],
|
|
445
|
+
description: '报价数据对象,或其 JSON 文件路径(customer/our_company/sign_date/sign_place/title/product_total/service_total/grand_total/product_items/service_items/payment_ratios)',
|
|
446
|
+
},
|
|
447
|
+
out: { type: 'string', maxLength: 4096, description: '输出 docx 绝对路径(scanOnly / dryRun 时可省)' },
|
|
448
|
+
scanOnly: { type: 'boolean', description: '只扫描占位符清单,不做任何替换' },
|
|
449
|
+
dryRun: { type: 'boolean', description: '只填不存,用于确认行位' },
|
|
450
|
+
expect: { type: 'array', items: { type: 'string' }, description: '追加需要扫描/校验的占位模式' },
|
|
451
|
+
detailTable: { type: 'integer', minimum: 0, description: '明细表索引(0 基);不传按表头特征探测' },
|
|
452
|
+
titleCount: { type: 'integer', minimum: 0, description: '合同名称期望出现次数;不传只要求 >=1' },
|
|
453
|
+
}, ['template']),
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: 'contract.docx.verify',
|
|
457
|
+
risk: 'read',
|
|
458
|
+
fixed: { local: true, kind: 'docx-verify' },
|
|
459
|
+
inputSchema: readSchema({
|
|
460
|
+
path: { type: 'string', minLength: 1, maxLength: 4096, description: 'docx 绝对路径' },
|
|
461
|
+
patterns: { type: 'array', items: { type: 'string' }, description: '需要检查残留的占位文本;缺省用内置集合(xxx公司/***有限公司/年 月 日/【】/____/{{ 等)' },
|
|
462
|
+
title: { type: 'string', description: '应出现的合同名称,用于校验标题替换是否完整' },
|
|
463
|
+
titleCount: { type: 'integer', minimum: 0, description: '标题期望出现次数;传了就要求精确相等,不传只要求至少 1 次' },
|
|
464
|
+
out: { type: 'string', maxLength: 4096, description: '可选:校验报告 JSON 输出路径' },
|
|
465
|
+
}, ['path']),
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: 'contract.quotescreen.run',
|
|
469
|
+
risk: 'local-file-write',
|
|
470
|
+
fixed: { local: true, kind: 'quote-screen' },
|
|
471
|
+
inputSchema: readSchema({
|
|
472
|
+
file: { type: 'string', minLength: 1, maxLength: 4096, description: '报价单 .xlsx 绝对路径' },
|
|
473
|
+
outDir: { type: 'string', minLength: 1, maxLength: 4096, description: '中间产物与卡片输出目录' },
|
|
474
|
+
mode: { type: 'string', enum: ['auto', 'stage1', 'stage2'], description: '默认 auto:提取→解析→自动识客户→金额校验→出卡片;stage1 只出网格与骨架;stage2 只出文字摘要与卡片' },
|
|
475
|
+
sheet: { type: 'string', description: '指定工作表名;不传取第一个(多 sheet 时会写 warnings 提示)' },
|
|
476
|
+
summaryData: { type: 'string', maxLength: 4096, description: 'mode=stage2 时的摘要 JSON 路径(模型产出)' },
|
|
477
|
+
docType: { type: 'string', description: 'quote | tender,默认 quote' },
|
|
478
|
+
title: { type: 'string', description: '卡片标题,默认由动作引擎计算' },
|
|
479
|
+
companyName: { type: 'string', description: '对方企业全称(模型判定后传入),用于追加「查对方资信」卡' },
|
|
480
|
+
baseUrl: { type: 'string', description: '当前环境 baseUrl;缺省取内置默认值' },
|
|
481
|
+
head: { type: 'integer', minimum: 1, maximum: 200, description: '网格预览头部行数,默认 12' },
|
|
482
|
+
}, ['file', 'outDir']),
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
name: 'contract.triage.extract',
|
|
486
|
+
risk: 'local-file-write',
|
|
487
|
+
fixed: { local: true, kind: 'triage-extract' },
|
|
488
|
+
inputSchema: readSchema({
|
|
489
|
+
file: { type: 'string', minLength: 1, maxLength: 4096, description: '主合同文件绝对路径(.docx/.doc/.txt/.md;.pdf 需先用 parse_document 兜底)' },
|
|
490
|
+
attach: { type: 'array', items: { type: 'string' }, description: '随附文件(补充协议/清单等);正文按序合并在主文件之后,flowKey 判定仍只看主文件' },
|
|
491
|
+
outDir: { type: 'string', minLength: 1, maxLength: 4096, description: '产物目录:contract_text.txt / triage.json / summary_skeleton.json / ai_fill.json / contract_sections.txt / text_sources.json' },
|
|
492
|
+
elements: { type: 'string', maxLength: 4096, description: '模型语义提取的 elements.json;给了就合并进 triage.json 供 elements.build 使用' },
|
|
493
|
+
summaryData: { type: 'string', maxLength: 4096, description: '模型语义生成的 summary_data.json;给了就落地为最终摘要数据' },
|
|
494
|
+
aiFill: { type: 'string', maxLength: 4096, description: '模型填好的 ai_fill.json(含 elements + summary);等价于同时传 elements 与 summaryData' },
|
|
495
|
+
reuse: { type: 'boolean', description: '阶段2 复用已有 triage.json:只合并 elements/summary_data,跳过正文抽取与指纹打分' },
|
|
496
|
+
}, ['file', 'outDir']),
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: 'contract.ledger.aggregate',
|
|
500
|
+
risk: 'read',
|
|
501
|
+
fixed: { local: true, kind: 'ledger-aggregate' },
|
|
502
|
+
inputSchema: readSchema({
|
|
503
|
+
ref: { type: 'string', minLength: 1, description: '单个 refId(weaver-work-cli refs 暂存结果)' },
|
|
504
|
+
refs: { type: 'array', items: { type: 'string' }, description: '多个 refId:分批取数后合并统计' },
|
|
505
|
+
file: { type: 'string', maxLength: 4096, description: '直接给结果 JSON 文件路径(与 ref/refs 可同时使用)' },
|
|
506
|
+
refsDir: { type: 'string', maxLength: 4096, description: 'refs 根目录;默认 ~/.weaver-work-cli/state/refs' },
|
|
507
|
+
by: { type: 'array', items: { type: 'string' }, description: '分组字段(语义键,如 xsjl / khmc);不传只出总计' },
|
|
508
|
+
sum: { type: 'array', items: { type: 'string' }, description: '求和字段(金额,如 htzje / yxje)' },
|
|
509
|
+
where: { type: 'array', items: { type: 'string' }, description: '过滤条件,形如 xsjl=吴洋洋(子串匹配)' },
|
|
510
|
+
dedupe: { type: 'boolean', description: '按 id / form_data_id / rowKey / ebrecord_rowkey 去重(分批窗口重叠时使用)' },
|
|
511
|
+
detail: { type: 'boolean', description: '输出命中明细(签订日期/合同号/客户/销售经理/合同总金额)' },
|
|
512
|
+
limit: { type: 'integer', minimum: 1, maximum: 1000, description: '明细最多返回条数,默认 20' },
|
|
513
|
+
}),
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: 'contract.ledger.guard',
|
|
517
|
+
risk: 'read',
|
|
518
|
+
fixed: { local: true, kind: 'ledger-guard' },
|
|
519
|
+
inputSchema: readSchema({
|
|
520
|
+
menu: { type: 'string', minLength: 1, description: '台账名(直销合同/直销业绩/合同收款/项目验收/渠道订单/渠道订单-商务)' },
|
|
521
|
+
total: { type: 'integer', minimum: 0, description: '探量(pageSize=1&maxPages=1)得到的真实总数 getListDataCount' },
|
|
522
|
+
condition: {
|
|
523
|
+
type: 'string',
|
|
524
|
+
enum: ['none', 'time', 'person', 'customer', 'contract'],
|
|
525
|
+
description: '本次已带的约束类型;none 表示无条件,直接拒绝',
|
|
526
|
+
},
|
|
527
|
+
rowsPerRecord: { type: 'number', description: '单条记录体积估算(KB),默认 3.3' },
|
|
528
|
+
comParams: {
|
|
529
|
+
anyOf: [{ type: 'string' }, { type: 'object' }],
|
|
530
|
+
description: '兜底卡片要预置的筛选条件(JSON 对象或其字符串);ebdf 列表卡必须用 field_<字段id>',
|
|
531
|
+
},
|
|
532
|
+
comParamsFile: { type: 'string', maxLength: 4096, description: '同 comParams,但从 UTF-8 JSON 文件读取' },
|
|
533
|
+
origin: { type: 'string', description: '兜底卡片的 scheme+host;不传时取当前会话 baseUrl' },
|
|
534
|
+
}, ['menu', 'total']),
|
|
535
|
+
},
|
|
437
536
|
{
|
|
438
537
|
name: 'contract.summary.render',
|
|
439
538
|
risk: 'local-file-write',
|
|
@@ -473,13 +572,13 @@ const quoteContracts = [
|
|
|
473
572
|
risk: 'local-file-write',
|
|
474
573
|
fixed: { local: true, kind: 'ebdf-list-card' },
|
|
475
574
|
inputSchema: readSchema({
|
|
476
|
-
menu: { type: 'string', description: '
|
|
477
|
-
pageId: { type: 'string', pattern: '^\\d{6,}$', description: '直接给 pageId;与 menu 二选一,同时给时以 pageId
|
|
575
|
+
menu: { type: 'string', description: '菜单名或别名(直销合同/直销业绩/合同收款/项目验收/渠道订单/渠道订单-商务);前四个用台账页卡,合同收款与项目验收用列表卡' },
|
|
576
|
+
pageId: { type: 'string', pattern: '^\\d{6,}$', description: '直接给 pageId;与 menu 二选一,同时给时以 pageId 为准(按列表卡生成)' },
|
|
478
577
|
origin: { type: 'string', minLength: 1, description: '必填:scheme+host,不带路径或 query,不含 {baseUrl}' },
|
|
479
578
|
title: { type: 'string', description: '卡片标题,默认取菜单名' },
|
|
480
|
-
callId: { type: 'string', description: '默认 ebdf-list-<菜单>-<YYYYMMDDHHmm>-01' },
|
|
481
|
-
comParamPairs: { type: 'array', items: { type: 'string' }, description: '
|
|
482
|
-
comParamsJson: { type: 'string', description: '
|
|
579
|
+
callId: { type: 'string', description: '默认 ledger-<菜单>-<YYYYMMDDHHmm>-01;列表卡为 ebdf-list-<菜单>-<YYYYMMDDHHmm>-01' },
|
|
580
|
+
comParamPairs: { type: 'array', items: { type: 'string' }, description: '台账页:形如 khmc=泛微 的台账键(日期/金额区间请用 comParamsJson);列表卡:形如 field_<字段id>=<值>;与 comParamsJson 互斥' },
|
|
581
|
+
comParamsJson: { type: 'string', description: '筛选对象的 JSON 字符串:台账页传 { "khmc": "泛微", "qdrq": ["2024-01-01", "2024-12-31"] };列表卡传 comParams 对象;与 comParamPairs 互斥' },
|
|
483
582
|
out: { type: 'string', maxLength: 4096, description: '可选:卡片 JSON 输出路径' },
|
|
484
583
|
}, ['origin']),
|
|
485
584
|
},
|
|
@@ -524,6 +623,7 @@ const quoteContracts = [
|
|
|
524
623
|
compareHtml: { type: 'string', maxLength: 4096, description: '比对报告 HTML 文件路径(内嵌为「生成比对报告」内容)' },
|
|
525
624
|
aiExtraId: { type: 'string', description: '要素预填识别记录 ID;缺省从 context 的 aiExtraId 取' },
|
|
526
625
|
attachmentFieldId: { type: 'string', description: '合同文件在表单上的附件字段 ID;缺省从 context 取' },
|
|
626
|
+
fieldAssignKeys: { type: 'string', description: '赋值字段 ID,逗号拼接字符串(非数组);缺省取合同文件字段或 context 的 fieldAssignKeys' },
|
|
527
627
|
baseUrl: { type: 'string', maxLength: 2048, description: 'E10 地址,默认 https://www.e-cology.com.cn' },
|
|
528
628
|
aiid: { type: 'string', description: '审查助手 id,默认 1326842382967570463' },
|
|
529
629
|
cardId: { type: 'string', description: '卡片唯一 id,默认 card-<YYYYMMDDHHmm>' },
|