zcode-app-cli 3.11.2-24 → 3.12.3-26
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 +35 -8
- package/bin/zcode.js +265 -133
- package/docs/CONFIGURATION.md +387 -0
- package/docs/CONFIGURATION.zh-CN.md +324 -0
- package/docs/PROVIDER_CONFIG.md +271 -0
- package/docs/PROVIDER_CONFIG.zh-CN.md +245 -0
- package/package.json +15 -6
- package/provider.example.json +151 -0
- package/{config.example.json → setting.example.json} +0 -47
- package/vendor/cli-config.cjs +161 -0
- package/vendor/extraction.json +17 -4
- package/vendor/node_modules/@zcode/tui/dist/index.js +495 -1095
- package/vendor/packages/browser-use-plugin/dist/mcp/server.js +35543 -34422
- package/vendor/packages/document-skills-plugin/.zcode-plugin/plugin.json +2 -2
- package/vendor/packages/document-skills-plugin/package.json +4 -4
- package/vendor/packages/document-skills-plugin/skills/docx/SKILL.md +34 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-advanced.md +9 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/edit.md +11 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/format.md +7 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/read.md +7 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/SKILL.md +10 -1
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process.md +19 -4
- package/vendor/packages/document-skills-plugin/skills/pdf/env_setup/env_check.sh +6 -2
- package/vendor/packages/document-skills-plugin/skills/pdf/env_setup/setup.md +12 -3
- package/vendor/packages/document-skills-plugin/skills/pdf/env_setup/setup_mac_linux.sh +9 -3
- package/vendor/packages/document-skills-plugin/skills/pdf/env_setup/setup_windows.ps1 +8 -3
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf.py +30 -6
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/setup.sh +9 -3
- package/vendor/packages/document-skills-plugin/skills/pptx/SKILL.md +33 -0
- package/vendor/packages/document-skills-plugin/skills/xlsx/env_setup/setup.md +29 -4
- package/vendor/packages/document-skills-plugin/skills/xlsx/env_setup/setup_mac_linux.sh +8 -3
- package/vendor/packages/document-skills-plugin/skills/xlsx/env_setup/setup_windows.ps1 +8 -3
- package/vendor/packages/document-skills-plugin/skills/xlsx/quality/pipeline.md +9 -0
- package/vendor/packages/document-skills-plugin/skills/xlsx/setup.sh +8 -3
- package/vendor/packages/document-skills-plugin/skills/xlsx/xlsx.py +15 -1
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/restore-conversation.mjs +13 -8
- package/vendor/provider/zcode-builtin.json +6296 -0
- package/vendor/zcode.cjs +1159 -840
- package/zcode-runtime.lock.json +3 -3
|
@@ -115,18 +115,23 @@ if [ ${#MISSING_PY[@]} -gt 0 ]; then
|
|
|
115
115
|
fi
|
|
116
116
|
fi
|
|
117
117
|
|
|
118
|
-
# ── 4. LibreOffice (
|
|
118
|
+
# ── 4. LibreOffice (install-on-demand, NOT substitutable) ──
|
|
119
119
|
echo ""
|
|
120
|
-
echo "--- LibreOffice (
|
|
120
|
+
echo "--- LibreOffice (CSV/PDF conversion + formula recalc) ---"
|
|
121
121
|
if command -v soffice &>/dev/null; then
|
|
122
122
|
LO_VER=$(soffice --version 2>/dev/null | head -1)
|
|
123
123
|
ok "libreoffice ($LO_VER)"
|
|
124
124
|
else
|
|
125
|
-
warn "libreoffice not installed
|
|
125
|
+
warn "libreoffice not installed — REQUIRED for recalc, .xlsx→PDF, .csv→.xlsx"
|
|
126
|
+
info "You MUST install it. FORBIDDEN: using Excel/WPS/Numbers instead of installing."
|
|
127
|
+
info "A large download is NOT a reason to skip. REQUIRED: explain the necessity to"
|
|
128
|
+
info "the user, say the package is large, THEN install it."
|
|
126
129
|
case "$OS" in
|
|
127
130
|
Darwin) info "Install: brew install --cask libreoffice" ;;
|
|
128
131
|
Linux) info "Install: sudo apt install libreoffice-core (Debian/Ubuntu)" ;;
|
|
129
132
|
esac
|
|
133
|
+
info "Another program is allowed ONLY after an install attempt has FAILED. Report it."
|
|
134
|
+
info "No install attempt = no substitute program."
|
|
130
135
|
fi
|
|
131
136
|
|
|
132
137
|
# ── Summary ──
|
|
@@ -232,7 +232,21 @@ def _libreoffice_recalc(filename: str, timeout: int = 30) -> Dict[str, Any]:
|
|
|
232
232
|
# Locate soffice binary (cross-platform)
|
|
233
233
|
soffice_bin = _find_soffice()
|
|
234
234
|
if not soffice_bin:
|
|
235
|
-
return {"error":
|
|
235
|
+
return {"error": (
|
|
236
|
+
"LibreOffice not found — you MUST install it, not substitute it. "
|
|
237
|
+
"FORBIDDEN: using Excel / WPS / Numbers / any program already on this machine INSTEAD "
|
|
238
|
+
"of installing LibreOffice. FORBIDDEN: deciding the download is too large to bother "
|
|
239
|
+
"with — being large is NOT a reason to skip it. FORBIDDEN: skipping recalculation. "
|
|
240
|
+
"REQUIRED, in order: (1) explain to the user that LibreOffice is what actually "
|
|
241
|
+
"recalculates the formulas so errors surface; (2) tell them the package is large "
|
|
242
|
+
"(several hundred MB) and may take a while — information for them, not a decision "
|
|
243
|
+
"point for you; (3) install it NOW: macOS 'brew install --cask libreoffice'; "
|
|
244
|
+
"Debian/Ubuntu 'sudo apt install libreoffice-core'; "
|
|
245
|
+
"Windows 'winget install TheDocumentFoundation.LibreOffice'. "
|
|
246
|
+
"ONLY after that install has been attempted AND failed may you use another program — "
|
|
247
|
+
"report the failure and which checks were skipped. "
|
|
248
|
+
"No install attempt = no substitute program."
|
|
249
|
+
)}
|
|
236
250
|
|
|
237
251
|
lo_cmd: List[str] = [
|
|
238
252
|
soffice_bin, "--headless", "--norestore",
|
|
@@ -261,7 +261,9 @@ function buildPartDataList(message, messageId, messageTimestamp) {
|
|
|
261
261
|
partDataList.push(buildTextPartData(content, messageTimestamp, completedAt));
|
|
262
262
|
}
|
|
263
263
|
for (const [toolIndex, tool] of tools.entries()) {
|
|
264
|
-
partDataList.push(
|
|
264
|
+
partDataList.push(
|
|
265
|
+
buildToolPartData(tool, messageId, toolIndex, messageTimestamp, completedAt),
|
|
266
|
+
);
|
|
265
267
|
}
|
|
266
268
|
}
|
|
267
269
|
|
|
@@ -490,15 +492,15 @@ function writeMessages(cliDb, plan) {
|
|
|
490
492
|
}),
|
|
491
493
|
agent: "zcode-agent",
|
|
492
494
|
};
|
|
493
|
-
// Bugfix:
|
|
494
|
-
//
|
|
495
|
+
// Bugfix: 恢复脚本必须写当前消息契约;继续生成旧消息身份字段会迫使正常读取链依赖 legacy codec,
|
|
496
|
+
// 并让新恢复的数据再次成为待迁移数据。
|
|
495
497
|
const messageData =
|
|
496
498
|
role === "assistant"
|
|
497
499
|
? {
|
|
498
500
|
...baseMessageData,
|
|
499
501
|
content: message.content,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
+
modelId: message.model || plan.model || "unknown",
|
|
503
|
+
providerId: ZCODE_PROVIDER,
|
|
502
504
|
mode: plan.mode,
|
|
503
505
|
path: {
|
|
504
506
|
cwd: plan.workspacePath,
|
|
@@ -534,10 +536,13 @@ function writeMessages(cliDb, plan) {
|
|
|
534
536
|
: {
|
|
535
537
|
...baseMessageData,
|
|
536
538
|
content: message.content,
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
539
|
+
modelSelection: {
|
|
540
|
+
providerId: ZCODE_PROVIDER,
|
|
541
|
+
modelId: message.model || plan.model || "unknown",
|
|
540
542
|
},
|
|
543
|
+
// 旧 Reader 无条件访问 User.model;显式导入绕过普通 Writer,也必须补最小对象防止回滚打不开正文。
|
|
544
|
+
// 不复制模型身份:当前选择只有 modelSelection,旧版允许模型失效但不能读取抛错。
|
|
545
|
+
model: {},
|
|
541
546
|
...(message.characterCount !== undefined
|
|
542
547
|
? { characterCount: message.characterCount }
|
|
543
548
|
: {}),
|