xparse-cli 2.5.1-beta.1 → 2.5.1-beta.3

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.
Files changed (2) hide show
  1. package/README.md +16 -21
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -69,6 +69,19 @@ make mcp-image MCP_IMAGE=registry.example/xparse-mcp:tag
69
69
  取得短时委托 Token 调用公开 xParse API;不会调用 workflow-backend 内部 MCP 路由,
70
70
  也不识别平台或维护 T币确认状态。
71
71
 
72
+ MCP 服务使用 `gopkg/tlog` 输出 JSON 日志,通过 `gopkg/ttrace` 将请求 trace
73
+ 发送到 OTLP HTTP 采集器。部署时配置 `OTEL_PROVIDER_ENDPOINT`,值为 `host:port`
74
+ (不带协议和路径);国内 TEST/PRE 与现有后端一致,使用 `jaeger-collector:4318`。
75
+ 本地调试可指向本机采集器,例如 `OTEL_PROVIDER_ENDPOINT=localhost:4318`。
76
+ trace 服务名为 `xparse-mcp`;请求日志和后台遥测发送日志保留同一 `trace_id`,
77
+ 请求取消不影响后台发送原有的超时和关闭逻辑。退出时先等待遥测发送,再刷新 trace。
78
+
79
+ 构建依赖私有模块 `gitlab.intsig.net/ke_wang/gopkg`。本地 Go 开发需配置
80
+ `GOPRIVATE=gitlab.intsig.net` 和 GitLab 读取权限;镜像构建通过 BuildKit secret
81
+ `gitlab_token` 传入可读取该模块的 `CI_JOB_TOKEN`,令牌不写入镜像或源码。
82
+ `make mcp-image` 同样读取该环境变量;GitLab 的 `gopkg` 项目需允许此项目的 Job Token
83
+ 读取仓库。
84
+
72
85
  ## 开发与发布 Make 命令
73
86
 
74
87
  仓库根目录的 `Makefile` 统一管理 WorkBuddy Connector 组包和 npm 发布。
@@ -325,11 +338,8 @@ xparse-cli --profile workbuddy auth device --open-browser=always
325
338
  xparse-cli --profile workbuddy parse report.pdf --api paid --auth-method oauth
326
339
  ```
327
340
 
328
- 该 Profile 默认将凭证保存在 `~/.workbuddy/xparse/`,文档状态保存在
329
- `~/.workbuddy/xparse/state/`,无需任务 Shell 继承连接器环境变量。
330
- `XPARSE_CONFIG_DIR` 与 `XPARSE_STATE_DIR` 分别优先覆盖对应目录,互不改变对方的默认值。
331
- 旧目录中的凭证和缓存不会自动迁移;仅在旧目录登录的用户需要重新连接 WorkBuddy 连接器。
332
- 其登录和登出不会影响终端中默认的 `~/.xparse-cli` 凭证;请求会自动携带 `X-From: workbuddy`。
341
+ 该 Profile 的凭证保存在 `~/.xparse-cli/profiles/workbuddy/`,其登录和登出不会影响
342
+ 终端中默认的 `~/.xparse-cli` 凭证;请求会自动携带 `X-From: workbuddy`。
333
343
 
334
344
  Larkoffice 使用相同的认证和 Task 命令行为,凭证保存在独立的
335
345
  `~/.xparse-cli/profiles/larkoffice/`。OAuth 默认使用国内公开客户端
@@ -392,7 +402,7 @@ xparse-cli --profile easyclaw parse report.pdf --api paid --auth-method oauth
392
402
 
393
403
  全局参数 `--profile workbuddy` 或 `--profile easyclaw` 可放在子命令前后,用于选择隔离凭证。
394
404
 
395
- 除 WorkBuddy profile 外,文档解析缓存和 `doc_id` 元数据默认保存在 `~/.xparse-cli/cache` 与
405
+ 文档解析缓存和 `doc_id` 元数据默认保存在 `~/.xparse-cli/cache` 与
396
406
  `~/.xparse-cli/docinfo`。Harness 或其他受沙箱管理的宿主可以为每个 session 设置绝对路径
397
407
  `XPARSE_STATE_DIR`,此时两类状态分别写入该目录下的 `cache/` 与 `docinfo/`。
398
408
  该变量只改变文档状态目录,不改变 AppKey、OAuth 或 CLI 配置位置;相对路径会被拒绝。
@@ -688,18 +698,3 @@ return upload identities for recovery and use the page's managed import pipeline
688
698
  returns the exact server-issued URL; never build grants in the client.
689
699
 
690
700
  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.
691
-
692
- ### OAuth 状态与保存诊断
693
-
694
- `xparse-cli auth status --output json` 默认仅检查本地凭证,不联网、不刷新,
695
- `logged_in=true` 不代表服务端验证成功。需要在线验证时运行
696
- `xparse-cli auth status --verify --output json`;该命令仅检查 OAuth,必要时刷新并保存,
697
- 不回退 AppKey 或匿名身份。`verification` 区分 `verified`、`failed` 和 `unknown`;
698
- 后两者退出非零。当前访问成功不保证未来 refresh token 有效。
699
-
700
- 认证错误保留 `AUTHENTICATION_FAILED`,在 `details` 中区分凭证读取、锁、刷新请求和保存阶段,
701
- 提供安全的 OAuth 错误、HTTP 状态或文件操作、路径、errno。缓存写入错误保留 `OUTPUT_FAILED`,
702
- 并说明服务端解析是否已经完成。不要在缓存失败后盲目重复解析,先检查目录权限。
703
- WorkBuddy profile 默认使用 `~/.workbuddy/xparse/` 凭证目录和
704
- `~/.workbuddy/xparse/state/` 状态目录;两个目录均可由对应环境变量独立覆盖。
705
- 后续导航命令需使用同一 profile 和目录。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xparse-cli",
3
- "version": "2.5.1-beta.1",
3
+ "version": "2.5.1-beta.3",
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.5.1-beta.1",
23
- "xparse-cli-darwin-arm64": "2.5.1-beta.1",
24
- "xparse-cli-linux-amd64": "2.5.1-beta.1",
25
- "xparse-cli-linux-arm64": "2.5.1-beta.1",
26
- "xparse-cli-windows-amd64": "2.5.1-beta.1",
27
- "xparse-cli-windows-arm64": "2.5.1-beta.1"
22
+ "xparse-cli-darwin-amd64": "2.5.1-beta.3",
23
+ "xparse-cli-darwin-arm64": "2.5.1-beta.3",
24
+ "xparse-cli-linux-amd64": "2.5.1-beta.3",
25
+ "xparse-cli-linux-arm64": "2.5.1-beta.3",
26
+ "xparse-cli-windows-amd64": "2.5.1-beta.3",
27
+ "xparse-cli-windows-arm64": "2.5.1-beta.3"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public",