xparse-cli 2.4.6 → 2.5.0-beta.2
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 +74 -13
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -319,17 +319,6 @@ xparse-cli --profile workbuddy parse report.pdf --api paid --auth-method oauth
|
|
|
319
319
|
该 Profile 的凭证保存在 `~/.xparse-cli/profiles/workbuddy/`,其登录和登出不会影响
|
|
320
320
|
终端中默认的 `~/.xparse-cli` 凭证;请求会自动携带 `X-From: workbuddy`。
|
|
321
321
|
|
|
322
|
-
Larkoffice 使用相同的认证和 Task 命令行为,凭证保存在独立的
|
|
323
|
-
`~/.xparse-cli/profiles/larkoffice/`。OAuth 默认使用国内公开客户端
|
|
324
|
-
`cli_textin_xparse_larkoffice`,仍遵循 `--client-id`、环境变量和配置文件的覆盖顺序;
|
|
325
|
-
AppKey 回退与 WorkBuddy 相同。请求自动携带 `X-From: larkoffice`。
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
xparse-cli --profile larkoffice auth device --open-browser=always --output=jsonl
|
|
329
|
-
xparse-cli --profile larkoffice auth status --output=json
|
|
330
|
-
xparse-cli --profile larkoffice parse report.pdf
|
|
331
|
-
```
|
|
332
|
-
|
|
333
322
|
EasyClaw 使用独立的 OAuth-only Profile:
|
|
334
323
|
|
|
335
324
|
```bash
|
|
@@ -364,7 +353,8 @@ xparse-cli --profile easyclaw parse report.pdf --api paid --auth-method oauth
|
|
|
364
353
|
| `xparse-cli auth status` | 只读查看登录状态 |
|
|
365
354
|
| `xparse-cli auth logout` | 删除指定认证方式的本地凭证 |
|
|
366
355
|
| `xparse-cli config` | 管理配置(show / set / reset / path) |
|
|
367
|
-
| `xparse-cli quota` |
|
|
356
|
+
| `xparse-cli quota` | 查看解析与抽取免费额度 |
|
|
357
|
+
| `xparse-cli quota --service manipulation_detection --output json` | 查看国内篡改检测免费套餐次数;不会发起检测 |
|
|
368
358
|
| `xparse-cli download` | 下载解析结果中 elements 的图片 |
|
|
369
359
|
| `xparse-cli cache` | 查看或清理本地文档缓存 |
|
|
370
360
|
| `xparse-cli get_doc_info` | 读取本地 PDF 基础信息 |
|
|
@@ -532,6 +522,8 @@ OAuth 参数优先级:
|
|
|
532
522
|
认证选择顺序为:显式 `--auth-method` / 环境或配置选择 > OAuth > 完整 AppKey >
|
|
533
523
|
匿名(仅可选认证接口)。自动选择 OAuth 时若刷新失败,会先回退完整 AppKey;两者都
|
|
534
524
|
不可用时,quota、免费解析与 telemetry 才匿名继续。显式选择 OAuth 失败不会切换身份。
|
|
525
|
+
篡改检测的命名 quota 查询需要认证,返回的 `free_package.free_remain_count`
|
|
526
|
+
与默认 quota 中的解析套餐和抽取每日额度无关;未返回套餐时额度为未知。
|
|
535
527
|
|
|
536
528
|
本地 PDF 会使用服务端返回的 `max_pages_per_request` 和 `max_file_size_mb` 预检。
|
|
537
529
|
仅页数超限且原文件体积合规时使用页范围分段;文件体积超限时生成真实临时 PDF
|
|
@@ -601,5 +593,74 @@ xparse-cli task retry <task-id> --resource-id <resource-id> --pending-result-id
|
|
|
601
593
|
This settles the saved result without another model call. Replaying the same candidate is safe.
|
|
602
594
|
The Task stays suspended; use `task result` or `task export` for delivered files. Explicit
|
|
603
595
|
`task resume <task-id>` continues remaining Agent work and adds execution budget. Preserve its
|
|
604
|
-
`command_id` and `checkpoint_version` for exact replay. Without a saved candidate, `task retry`
|
|
596
|
+
`command_id` and `checkpoint_version` for exact replay. Without a saved candidate, `task retry --resource-id RESOURCE_ID`
|
|
605
597
|
re-extracts the one resource; do not blindly replay an ambiguous response.
|
|
598
|
+
|
|
599
|
+
## Extraction workspace commands
|
|
600
|
+
|
|
601
|
+
The workspace commands below require a matching CLI build and backend. They do
|
|
602
|
+
not create a replacement Task. Request JSON is read from `--input FILE` or stdin
|
|
603
|
+
with `--input -`; values and version tokens are transmitted without reinterpretation.
|
|
604
|
+
|
|
605
|
+
```bash
|
|
606
|
+
xparse-cli task retry TASK_ID
|
|
607
|
+
xparse-cli task retry TASK_ID --scope selected --resource-id RESOURCE_ID --field-id FIELD_ID
|
|
608
|
+
xparse-cli task retry TASK_ID --only-outdated
|
|
609
|
+
xparse-cli task spec get TASK_ID
|
|
610
|
+
xparse-cli task spec set TASK_ID --input fields.json
|
|
611
|
+
xparse-cli task spec clarify TASK_ID --input clarification.json
|
|
612
|
+
xparse-cli task field set TASK_ID RESOURCE_ID FIELD_ID --input correction.json
|
|
613
|
+
xparse-cli task field confirm TASK_ID RESOURCE_ID FIELD_ID --input confirmation.json
|
|
614
|
+
xparse-cli task history TASK_ID RESOURCE_ID
|
|
615
|
+
xparse-cli task preview TASK_ID RESOURCE_ID
|
|
616
|
+
xparse-cli task copilot show TASK_ID
|
|
617
|
+
xparse-cli task copilot steps TASK_ID --after 0
|
|
618
|
+
xparse-cli task copilot send TASK_ID --text 'Recheck the contract amount'
|
|
619
|
+
xparse-cli task copilot send TASK_ID --input reply.json
|
|
620
|
+
xparse-cli task memory list TASK_ID
|
|
621
|
+
xparse-cli task memory revoke TASK_ID MEMORY_ID
|
|
622
|
+
xparse-cli task list --search contract --limit 20
|
|
623
|
+
xparse-cli task page TASK_ID
|
|
624
|
+
xparse-cli task add TASK_ID new.pdf
|
|
625
|
+
xparse-cli task add TASK_ID --history-id 123
|
|
626
|
+
xparse-cli task add TASK_ID --uploaded-file-id FILE_ID
|
|
627
|
+
xparse-cli task add TASK_ID --reconcile
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
`retry TASK_ID` re-extracts every file using the current definition. File and field
|
|
631
|
+
selectors intersect; with a field definition, only active fields are used. A Task
|
|
632
|
+
without a field definition reruns its original instruction and cannot use field
|
|
633
|
+
selectors or `--only-outdated`. Old results remain until replaced by new results.
|
|
634
|
+
Legacy `retry TASK_ID --resource-id RESOURCE_ID` still recovers one failed file or
|
|
635
|
+
settles its saved result; use `--scope selected` to force re-extraction of that file.
|
|
636
|
+
`resume` continues suspended work and remains separate from re-extraction.
|
|
637
|
+
|
|
638
|
+
`fields.json` is the complete active field list, not a partial patch. Omitting an
|
|
639
|
+
existing field deletes it; use `restore_field_ids` to restore deleted fields:
|
|
640
|
+
|
|
641
|
+
```json
|
|
642
|
+
{"expected_version":7,"task_rules":"Extract contract data","fields":[{"field_id":"amount","name":"Amount","description":"Total including tax"}],"restore_field_ids":[],"apply_to_existing":false}
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
For clarification, send `expected_version`, `name`, and `description`.
|
|
646
|
+
For field correction/confirmation, preserve the reviewed result and spec versions:
|
|
647
|
+
|
|
648
|
+
```json
|
|
649
|
+
{"base_result_version":3,"expected_spec_version":7,"request_id":"review-unique-id","value":{"value":"100.00"},"review":{"apply_to_future":false}}
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
Copilot supports all page interaction kinds, including edited definitions,
|
|
653
|
+
confirm-only, confirm-and-rerun, answers and dismissals. Preserve the original
|
|
654
|
+
identities and reviewed draft values. Example (replace all identifiers/versions):
|
|
655
|
+
|
|
656
|
+
```json
|
|
657
|
+
{"client_message_id":"reply-unique-id","kind":"confirm_and_rerun","text":"","expected_version":7,"draft_id":"draft-id","draft_revision":2}
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
A conflict is not retried with a silently refreshed version. After an ambiguous
|
|
661
|
+
mutation response, query the same Task before any repeat. Managed local additions
|
|
662
|
+
return upload identities for recovery and use the page's managed import pipeline.
|
|
663
|
+
`task page` requires the backend's `page-session?result_page_url=true` support and
|
|
664
|
+
returns the exact server-issued URL; never build grants in the client.
|
|
665
|
+
|
|
666
|
+
Regional availability follows the page: task list, spec set/clarify, whole-task or scoped retry, preview and version history are domestic-only. Other operations retain their existing regional rules. These additions require a matching CLI/Connector build; check the installed CLI's command help before using them.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xparse-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-beta.2",
|
|
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.5.0-beta.2",
|
|
23
|
+
"xparse-cli-darwin-arm64": "2.5.0-beta.2",
|
|
24
|
+
"xparse-cli-linux-amd64": "2.5.0-beta.2",
|
|
25
|
+
"xparse-cli-linux-arm64": "2.5.0-beta.2",
|
|
26
|
+
"xparse-cli-windows-amd64": "2.5.0-beta.2",
|
|
27
|
+
"xparse-cli-windows-arm64": "2.5.0-beta.2"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|
|
31
|
-
"tag": "
|
|
31
|
+
"tag": "beta"
|
|
32
32
|
}
|
|
33
33
|
}
|