feat(cli+skill): make documented field UX real + fix skill doc drift

CLI (packages/inkreach-cli):
- new src/lib/field-normalize.ts: type aliases (sel/num/text/mul/…),
  select string-choices -> {name}, compact --fields 'Name:type:choices'
  expansion, smart type inference from --options shape / --name
  (--type now optional), name->ID resolution for foreignTableName /
  linkFieldName / lookupFieldName (incl. link-field foreignTableId
  backfill + unknown-key stripping), rating/number/button required-
  option defaults
- field create: +--description/--lookup-options/--is-lookup
- field update --options + table create --fields route through the
  normalizer; DEFAULT_ENDPOINT :3000 -> :3003
- 20 unit tests (field-normalize.spec.ts, vitest); live-verified:
  string choices, alias, foreignTableName, lookup-by-names, compact
  format, inference (priority->singleSelect, max:5->rating)

Skill docs (.agents/skills/inkreach-teable):
- ports :3000 -> :3003 everywhere (backend real port; :3000 is an
  unrelated container on this host)
- remove dead hr_admin account; note throwaway signup + real admin
- plugin register: actual URL-based flags; document plugin csp
  list/set; view/dashboard install requires config enable first
- field-types.md marked verified-2026-08 (aliases/inference/name
  resolution now implemented + tested)
- development.md: webpack dist/index.js cache trap; PGPASSWORD
  placeholder instead of wrong literal
This commit is contained in:
yeuimu
2026-08-16 05:58:01 +00:00
parent 5a984eb5f8
commit e1a91dfa84
13 changed files with 1015 additions and 34 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ const path = __importStar(require("node:path"));
const os = __importStar(require("node:os"));
const CONFIG_DIR = path.join(os.homedir(), '.inkreach-teable');
const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
exports.DEFAULT_ENDPOINT = 'http://localhost:3000';
exports.DEFAULT_ENDPOINT = 'http://localhost:3003';
function readConfigFile() {
try {
const raw = fs.readFileSync(CONFIG_FILE, 'utf8');