From 5a984eb5f87ebe9407787d2e40163ee23c42e993 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Sun, 16 Aug 2026 05:35:23 +0000 Subject: [PATCH] docs(skill): update inkreach-teable skill for fixed field routes + select-choice dependency - cli-reference.md: field get/update/delete now ; new field visible-choices command; note --options goes via convert API - tables-fields.md: correct update/delete signatures; options-rewrite semantics (convert API, whole-replace not merge); new section on select-choice visibilityFilter dependency (read/write/evaluate, backend 400 guards, write-time enforcement message) --- .../inkreach-teable/guides/cli-reference.md | 9 ++++---- .../inkreach-teable/guides/tables-fields.md | 23 +++++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.agents/skills/inkreach-teable/guides/cli-reference.md b/.agents/skills/inkreach-teable/guides/cli-reference.md index ec10bdf..7e32b39 100644 --- a/.agents/skills/inkreach-teable/guides/cli-reference.md +++ b/.agents/skills/inkreach-teable/guides/cli-reference.md @@ -43,12 +43,13 @@ inkreach-teable table create --name [--base-id ] [--fields ''] inkreach-teable table update --name inkreach-teable table delete -# field +# field (get/update/delete take — 2026-08 fix; old /api/field/:id routes never existed) inkreach-teable field list -inkreach-teable field get +inkreach-teable field get inkreach-teable field create --table-id --name --type [--options ''] -inkreach-teable field update [--name ] [--options ''] -inkreach-teable field delete +inkreach-teable field update [--name ] [--options ''] # --options goes via convert API +inkreach-teable field visible-choices # evaluate select-choice visibilityFilter +inkreach-teable field delete # record inkreach-teable record get --table-id [--filter ''] [--projection ''] [--page-size ] [--page ] [--search ] diff --git a/.agents/skills/inkreach-teable/guides/tables-fields.md b/.agents/skills/inkreach-teable/guides/tables-fields.md index c88b808..cc079c5 100644 --- a/.agents/skills/inkreach-teable/guides/tables-fields.md +++ b/.agents/skills/inkreach-teable/guides/tables-fields.md @@ -142,16 +142,31 @@ inkreach-teable field create --table-id tblXXX --name "Project" --type link \ ### Update & Delete ```bash -inkreach-teable field update [--name ""] [--options ''] -inkreach-teable field delete +inkreach-teable field update [--name ""] [--options ''] +inkreach-teable field delete ``` | Detail | Rule | |--------|------| -| `--name` only | Convenience; for other props use `--options` | -| `--options` merge | Partial updates; omitted keys are preserved | +| `--name` only | Uses the PATCH update API (name/description only) | +| `--options` | Rewrites options via the **convert** API (`PUT …/field/:fid/convert`) — the PATCH update API strips `options` by design. CLI auto-fetches the field's current type; omitted keys are **replaced whole**, not merged | +| `--name` + `--options` | Both applied via one convert call | | `field delete` | Irreversible — all cell data in that field is lost | +### Select-choice dependency (visibilityFilter) — 2026-08 + +Single/multiple-select choices may carry a `visibilityFilter` making them visible only when another select field matches: + +```json +{"choices":[{"id":"choA","name":"墨盒","visibilityFilter":{ + "filterSet":[{"fieldId":"fldDeviceType","operator":"is","value":"choPrinter"}]}}]} +``` + +- **Read config**: `inkreach-teable field get ` → `options.choices[].visibilityFilter` +- **Write config**: `field update --options` (convert API). Backend rejects self-reference (`Self-reference in visibilityFilter is not allowed`) and dependency cycles (`Dependency cycle detected…`) with 400 — enforced on both V1 and V2 paths since fix `26ed1f732` +- **Evaluate for a record**: `inkreach-teable field visible-choices ` → choices currently selectable +- **Write-time enforcement**: writing a record value that fails its visibility condition → 400 `Option "X" does not meet the current row conditions and cannot be selected.` + --- ## Records