xparse-cli 2.3.1-beta.2 → 2.3.1-beta.4

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 CHANGED
@@ -103,6 +103,24 @@ make npm-publish VERSION=2.3.1-beta.1 CONFIRM_PUBLISH=1
103
103
  manifest、staging 目录和七个待发布包完全一致。stable 版本发布到 `latest`,
104
104
  `-beta.*` 版本发布到 `beta`。
105
105
 
106
+ ## DeepSeek Harness
107
+
108
+ 仓库同时包含 `@intsig-xparse/dsh-xparse` Bundle 的实现。当前 Harness RC
109
+ 依赖要求 Node.js 22.19 或更高版本。开发构建和 Docker 验证命令为:
110
+
111
+ ```bash
112
+ python3 scripts/prepare-dsh-xparse.py \
113
+ --skill-dir /path/to/xparse-skills/skills/xparse-parse
114
+ npm run dsh:typecheck
115
+ npm run dsh:test
116
+ npm run dsh:build
117
+ ```
118
+
119
+ 正式装配要求外部 Skill 仓库位于 `release-lock.json` 锁定的 commit 且工作树干净,
120
+ 并要求当前 xparse-client 工作树干净。本地开发可以显式使用
121
+ `--allow-snapshot --allow-dirty`。Bundle 的详细安装、凭据、安全边界和已知限制见
122
+ `packages/dsh-xparse/README.md`。
123
+
106
124
  ## 快速开始
107
125
 
108
126
  ### 1. 零配置解析(自动使用免费额度)
@@ -320,6 +338,11 @@ xparse-cli --profile easyclaw parse report.pdf --api paid --auth-method oauth
320
338
 
321
339
  全局参数 `--profile workbuddy` 或 `--profile easyclaw` 可放在子命令前后,用于选择隔离凭证。
322
340
 
341
+ 文档解析缓存和 `doc_id` 元数据默认保存在 `~/.xparse-cli/cache` 与
342
+ `~/.xparse-cli/docinfo`。Harness 或其他受沙箱管理的宿主可以为每个 session 设置绝对路径
343
+ `XPARSE_STATE_DIR`,此时两类状态分别写入该目录下的 `cache/` 与 `docinfo/`。
344
+ 该变量只改变文档状态目录,不改变 AppKey、OAuth 或 CLI 配置位置;相对路径会被拒绝。
345
+
323
346
  ## parse 命令参数
324
347
 
325
348
  | 参数 | 默认值 | 说明 |
@@ -337,6 +360,7 @@ xparse-cli --profile easyclaw parse report.pdf --api paid --auth-method oauth
337
360
  | `--include-title-tree` | `true` | 文档标题层级目录树 |
338
361
  | `--include-char-details` | `false` | 返回字符级坐标和置信度 |
339
362
  | `--table-view` | `html` | 表格视图:`html`、`markdown` |
363
+ | `--export` | | 额外导出格式:`docx`、`pdf`、`xlsx`,支持逗号分隔或重复传递;需配合 `--api paid --output <目录>` |
340
364
  | `--list` | | 从文件读取输入列表(需配合 `--output`) |
341
365
  | `--output` | _(stdout)_ | 输出文件路径或目录(目录不存在时自动创建) |
342
366
  | `--error-format` | `json` | 错误输出格式:`json`、`text` |
@@ -369,6 +393,17 @@ CLI 默认开启以下能力,Agent 无需额外配置:
369
393
 
370
394
  ## 使用示例
371
395
 
396
+ ### 导出其他格式
397
+
398
+ ```bash
399
+ # 自动下载 DOCX、PDF 和 XLSX 到输出目录
400
+ xparse-cli parse report.pdf --api paid --export docx,pdf,xlsx --output ./results/
401
+ ```
402
+
403
+ `xlsx` 会自动使用 `config.scope=table`。CLI 使用付费解析的 AppKey 或 OAuth 身份
404
+ 下载导出文件,输出为 `<basename>.docx`、`<basename>.pdf` 和 `<basename>.xlsx`。
405
+ 若目标文件会覆盖输入原文,则改用 `<basename>.export.<format>`。
406
+
372
407
  ### 管道组合
373
408
 
374
409
  ```bash
package/bin/xparse-cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xparse-cli",
3
- "version": "2.3.1-beta.2",
3
+ "version": "2.3.1-beta.4",
4
4
  "description": "TextIn xParse command-line client for document parsing",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,12 +19,12 @@
19
19
  "node": ">=18"
20
20
  },
21
21
  "optionalDependencies": {
22
- "xparse-cli-darwin-amd64": "2.3.1-beta.2",
23
- "xparse-cli-darwin-arm64": "2.3.1-beta.2",
24
- "xparse-cli-linux-amd64": "2.3.1-beta.2",
25
- "xparse-cli-linux-arm64": "2.3.1-beta.2",
26
- "xparse-cli-windows-amd64": "2.3.1-beta.2",
27
- "xparse-cli-windows-arm64": "2.3.1-beta.2"
22
+ "xparse-cli-darwin-amd64": "2.3.1-beta.4",
23
+ "xparse-cli-darwin-arm64": "2.3.1-beta.4",
24
+ "xparse-cli-linux-amd64": "2.3.1-beta.4",
25
+ "xparse-cli-linux-arm64": "2.3.1-beta.4",
26
+ "xparse-cli-windows-amd64": "2.3.1-beta.4",
27
+ "xparse-cli-windows-arm64": "2.3.1-beta.4"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public",