Skip to content

feat(cli): support preview services in discovery and action calls - #83

Merged
dxiongya merged 6 commits into
mainfrom
staging
Nov 26, 2026
Merged

dxiongya merged 6 commits into
mainfrom
staging

Conversation

@dxiongya

Copy link
Copy Markdown
Collaborator

将已在 staging 验收的 #80、#82 合入 main(源提交 7d4f3ba31)。CLI 同时识别 SANDBOX / PREVIEW;显式 --preview 才发送 include_preview。包含代码片段参数传递和旧后端 400 提示的回归测试。

范围限 CLI 及测试;不改变包版本、不合并发版 PR。此前已用该 staging 版本验证真实查询,以及模拟旧后端的 400 和普通 400 的区别。合并前重新运行本 PR 的 verify。

Kanby-Task: KANBY-141

🤖 Generated with Claude Code

dxiongya and others added 6 commits November 24, 2026 00:24
The backend renames the provider lifecycle state SANDBOX to PREVIEW.
`provider wait` rejected PREVIEW as an unknown state and crashed with
"Invalid review response"; it now accepts PREVIEW (and still SANDBOX
during the transition) and reports it like SANDBOX.

Preview services are no longer exposed through a key permission.
`list`, `search` and `services` gain `--preview` (query
include_preview=true) and `call` gains `--preview` (execute body field
include_preview: true, on json/stream/output/output-json paths). The
field is sent only when the flag is given so older backends keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`categories` sends include_preview=true as a query parameter; `get` and
`get-batch` (both POST /v1/actions/batch) add include_preview: true to the
body. As before, the field is sent only when --preview is given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d 400s

- call/get --code --preview now emit include_preview in every generated
  snippet (curl, python, js, ts, go), so the snippet reaches the same
  PREVIEW service the command would.
- A backend that predates preview rejects the body field with 400
  "property include_preview should not exist"; the error now says
  --preview needs a backend with preview support. call --help says so too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(cli): promote the PREVIEW lifecycle state and --preview to staging
call rebuilds its error from the response body in actionErrorDetail, so
the hint withPreviewHint appends to the HttpError message never reached
the output (call, --stream and --output alike). Add it as the detail's
hint field when a 400 mentions include_preview; other 400s are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(cli): promote the call --preview old-backend hint to staging
@dxiongya
dxiongya merged commit ad476ba into main Nov 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant