xparse-cli 2.2.3 → 2.3.0-beta.1
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 +34 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -126,6 +126,34 @@ export XPARSE_SECRET_CODE=your_secret_code
|
|
|
126
126
|
xparse-cli parse report.pdf --api paid
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
### 3. 多文件 Task Runtime(Agent 推荐)
|
|
130
|
+
|
|
131
|
+
Task Runtime 把上传、执行状态和结果交给服务端持久化。默认流程会等待完成并导出 Markdown;Agent 再用 Grep/Read 选择少量相关文档,不需要把全部结果放进上下文。
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
xparse-cli task run --files 'contracts/*.pdf' --out-dir ./task-output
|
|
135
|
+
xparse-cli task status <task-id>
|
|
136
|
+
xparse-cli task export <task-id> --out-dir ./task-output
|
|
137
|
+
xparse-cli task read <task-id> contract-a.pdf
|
|
138
|
+
xparse-cli task debug <task-id>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
某些文件需要密码时,从 stdin 提供按路径或文件名映射的 JSON,避免密码进入进程参数和 shell 历史:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
printf '%s' '{"secret.pdf":"open-password"}' | \
|
|
145
|
+
xparse-cli task run secret.pdf --passwords-stdin --out-dir ./task-output
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
若服务端返回 `40423`,补充失败文件的密码并只重跑对应 Resource:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
printf '%s' '{"<resource-id>":"open-password"}' | \
|
|
152
|
+
xparse-cli task continue <task-id> --passwords-stdin --out-dir ./task-output
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
文件资源只保存加密的文件访问密码;`force_engine`、页范围和 capabilities 属于具体 Run。Runtime 的 MinerU 恢复只覆盖当前失败 RunItem,不会写回可复用资源。`--api auto/free` 不会自动授权付费;需要付费时会停在可见状态并要求人工批准。
|
|
156
|
+
|
|
129
157
|
也可以使用 OAuth。正式二进制默认使用无 Secret 的 public client
|
|
130
158
|
`cli_textin_xparse`;私有部署可以通过 flag、环境变量或配置文件覆盖:
|
|
131
159
|
|
|
@@ -181,6 +209,12 @@ xparse-cli --profile easyclaw parse report.pdf --api paid --auth-method oauth
|
|
|
181
209
|
| 命令 | 说明 |
|
|
182
210
|
|------|------|
|
|
183
211
|
| `xparse-cli parse` | 解析文档,输出 Markdown / JSON |
|
|
212
|
+
| `xparse-cli task run` | 上传并执行多文件持久化 Task |
|
|
213
|
+
| `xparse-cli task status` | 查询 Task 和最新 Run 状态 |
|
|
214
|
+
| `xparse-cli task export` | 批量导出成功结果和 manifest |
|
|
215
|
+
| `xparse-cli task read` | 读取单个文件结果 |
|
|
216
|
+
| `xparse-cli task debug` | 查看逐文件错误与恢复证据 |
|
|
217
|
+
| `xparse-cli task continue` | 补充逐文件密码并选择性续跑 |
|
|
184
218
|
| `xparse-cli auth` | TTY 中进入认证选单;非 TTY 保持旧版 AppKey 输入流程 |
|
|
185
219
|
| `xparse-cli auth app-key` | 配置 AppKey 凭证 |
|
|
186
220
|
| `xparse-cli auth device` | OAuth Device Flow 登录 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xparse-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-beta.1",
|
|
4
4
|
"description": "TextIn xParse command-line client for document parsing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"node": ">=18"
|
|
20
20
|
},
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"xparse-cli-darwin-amd64": "2.
|
|
23
|
-
"xparse-cli-darwin-arm64": "2.
|
|
24
|
-
"xparse-cli-linux-amd64": "2.
|
|
25
|
-
"xparse-cli-linux-arm64": "2.
|
|
26
|
-
"xparse-cli-windows-amd64": "2.
|
|
27
|
-
"xparse-cli-windows-arm64": "2.
|
|
22
|
+
"xparse-cli-darwin-amd64": "2.3.0-beta.1",
|
|
23
|
+
"xparse-cli-darwin-arm64": "2.3.0-beta.1",
|
|
24
|
+
"xparse-cli-linux-amd64": "2.3.0-beta.1",
|
|
25
|
+
"xparse-cli-linux-arm64": "2.3.0-beta.1",
|
|
26
|
+
"xparse-cli-windows-amd64": "2.3.0-beta.1",
|
|
27
|
+
"xparse-cli-windows-arm64": "2.3.0-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|
|
31
|
-
"tag": "
|
|
31
|
+
"tag": "beta"
|
|
32
32
|
}
|
|
33
33
|
}
|