From d81d14bd52c3ae596b77dd9d23873207cf351349 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Wed, 23 Sep 2026 05:54:15 +0000 Subject: [PATCH] =?UTF-8?q?docs(skill):=20=E5=8E=BB=E9=99=A4=E5=85=A8?= =?UTF-8?q?=E9=83=A8=20localhost:3003=20=E2=80=94=E2=80=94=20=E4=B8=80?= =?UTF-8?q?=E5=BE=8B=E4=BD=BF=E7=94=A8=E5=85=AC=E7=BD=91=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=20table.inkreach.cc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit skill 面向公开分发,不应包含部署机内网地址。SKILL.md / cli-reference / rest-api / instance-access 共 10 处替换;rest-api 双源表与 ssh 隧道 兜底整段删除(前端 rewrite 已让域名全功能可用)。 --- skills/inkreach-teable/SKILL.md | 4 ++-- .../inkreach-teable/api-reference/rest-api.md | 21 ++++--------------- .../inkreach-teable/guides/cli-reference.md | 2 +- .../inkreach-teable/guides/instance-access.md | 6 +++--- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/skills/inkreach-teable/SKILL.md b/skills/inkreach-teable/SKILL.md index 243afa4..ed1204d 100644 --- a/skills/inkreach-teable/SKILL.md +++ b/skills/inkreach-teable/SKILL.md @@ -25,7 +25,7 @@ Respond in the user's language. Keep answers concise and action-oriented. ## 1. Prerequisites - Install the CLI if missing: `npm i -g git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git` (the `git+` prefix is REQUIRED for npm/npx; ad-hoc without installing: `npx git+https://gitea.inkreach.cc/inkreachhub/inkreach-teable-cli.git `). Offline fallback: `bash scripts/install.sh` relative to this skill dir in a repo clone. -- **Configure once**: `inkreach-teable auth login --endpoint http://localhost:3003 --token [--base-id bseXXX]`; verify with `auth status`. PAT comes from `auth token create --name x` (full token shown **once**) or the web UI (Settings → Personal Access Tokens). +- **Configure once**: `inkreach-teable auth login --endpoint https://table.inkreach.cc --token [--base-id bseXXX]`; verify with `auth status`. PAT comes from `auth token create --name x` (full token shown **once**) or the web UI (Settings → Personal Access Tokens). - `--json` on any command returns raw JSON (for agent parsing). Fallback for unknown commands: `inkreach-teable --help`. - **Read on demand**: consult the guide linked for your module when doing non-trivial work — no need to read everything up front. @@ -88,7 +88,7 @@ These differ from official teable and from the (stale) `docs/automation/triggers ## 4. Quick Syntax ```bash -inkreach-teable auth login --endpoint http://localhost:3003 --token # once +inkreach-teable auth login --endpoint https://table.inkreach.cc --token # once inkreach-teable table create --name "Tasks" --fields '[{"name":"Title","type":"text"},{"name":"Status","type":"singleSelect","options":{"choices":["Todo","Done"]}}]' inkreach-teable workflow create --name "On Go click" # → wflXXX inkreach-teable trigger set wflXXX --type buttonClick --table-id tblXXX --field-ids '["fldXXX"]' diff --git a/skills/inkreach-teable/api-reference/rest-api.md b/skills/inkreach-teable/api-reference/rest-api.md index ac1337e..8c27f33 100644 --- a/skills/inkreach-teable/api-reference/rest-api.md +++ b/skills/inkreach-teable/api-reference/rest-api.md @@ -11,15 +11,8 @@ the CLI. For one-off table/automation operations, prefer the CLI. ## 1. Base URL & Authentication -Two origins — pick by where you run: - -| Origin | API (`/api/*`) | Swagger (`/docs`, `/docs-json`) | -|---|---|---| -| Public domain, e.g. `https://table.inkreach.cc` | ✅ works (proxied to backend) | ✅ works (frontend rewrite, since 2026-09-23) | -| Backend origin, e.g. `http://localhost:3003` (reference deployment) | ✅ | ✅ | - ```bash -BASE=https://table.inkreach.cc # or http://localhost:3003 on the backend host +BASE=https://table.inkreach.cc TOKEN=teable_xxx_yyy # PAT; web UI Settings → Personal Access Tokens curl -s "$BASE/api/auth/user" -H "Authorization: Bearer $TOKEN" # verify → 200 + user JSON ``` @@ -99,7 +92,7 @@ MUST be the `search[]` tuple form, plain `search=` is ignored), `skip` / `take` ## 3. Canonical Examples ```bash -BASE=http://localhost:3003; AUTH="Authorization: Bearer $TOKEN" +BASE=https://table.inkreach.cc; AUTH="Authorization: Bearer $TOKEN" # create records (single + bulk). typecast: accepts strings for non-text # fields; fieldKeyType 'id' = keys are fld ids ('name' = field names) @@ -165,16 +158,10 @@ const res = await fetch(triggerInput._apiBaseUrl + "/api/table/tblB/record", { The backend exposes **~362 paths**; this guide documents the agent-operational core (what the CLI wraps). The authoritative full spec is -the live OpenAPI JSON — served on the backend origin, and on the public -domain via the frontend rewrite (`/docs`, `/docs-json`; verified 2026-09-23): +the live OpenAPI JSON at `$BASE/docs-json` (browsable UI: `$BASE/docs`): ```bash curl -s "$BASE/docs-json" | python3 -c "import json,sys; [print(m.upper(), p) for p,o in json.load(sys.stdin)['paths'].items() for m in o]" -# browsable UI: $BASE/docs - -# deployments WITHOUT that rewrite: docs-json only exists on the backend -# origin — reach it via an ssh tunnel from other machines: -ssh -L 3003:localhost:3003 # then use http://localhost:3003/docs-json ``` ### ⚠️ Swagger is a curated registry, NOT an auto-scan (audited 2026-09-23) @@ -219,7 +206,7 @@ automation webhook route), plugin UI endpoints (`/api/plugin/*` panels, chart, proxy), `/api/v2/integrity`, `/api/v1/ai-proxy`. When you use one of these, verify the exact param shape before calling — -from docs-json (backend origin / domain / ssh tunnel), or from the backend +from docs-json, or from the backend source: `grep -rh "@Controller(\|@Get(\|@Post(\|@Patch(\|@Put(\|@Delete(" apps/nestjs-backend/src/features --include='*.controller.ts'` in the inkreach-teable app repo. Do not guess key names (the automation diff --git a/skills/inkreach-teable/guides/cli-reference.md b/skills/inkreach-teable/guides/cli-reference.md index 217909a..0ab93aa 100644 --- a/skills/inkreach-teable/guides/cli-reference.md +++ b/skills/inkreach-teable/guides/cli-reference.md @@ -6,7 +6,7 @@ Complete command reference for `inkreach-teable`. Global options apply to all co | Option | Description | |--------|-------------| -| `--endpoint ` | Backend URL (default `http://localhost:3003`) | +| `--endpoint ` | Backend URL, e.g. `https://table.inkreach.cc` | | `--token ` | Personal Access Token | | `--base-id ` | Default base id | | `--json` | Output raw JSON (for agent parsing) | diff --git a/skills/inkreach-teable/guides/instance-access.md b/skills/inkreach-teable/guides/instance-access.md index 2f4c0e5..973ab96 100644 --- a/skills/inkreach-teable/guides/instance-access.md +++ b/skills/inkreach-teable/guides/instance-access.md @@ -9,7 +9,7 @@ endpoint/ports for your own deployment. | Service | URL / Port | Mode | Purpose | |---------|-----------|------|---------| | Public domain | `https://table.inkreach.cc` | — | Frontend UI + `/api/*` and `/docs`+`/docs-json` proxied to backend (frontend next.config.js rewrites, since 2026-09-23) | -| Backend API | `http://localhost:3003` | production (`NODE_ENV=production`) | REST API, automation engine, websocket, swagger `/docs` + `/docs-json` | +| Backend API | `https://table.inkreach.cc` | production (`NODE_ENV=production`) | REST API, automation engine, websocket, swagger `/docs` + `/docs-json` | | Frontend | `http://localhost:3002` | production | End-user web UI (Next.js) | | PostgreSQL | `localhost:5432` | — | Database (db: `teable`, user: `teable`) | | Redis | `localhost:6379` | — | BullMQ queue for automation runs, distributed lock | @@ -22,7 +22,7 @@ endpoint/ports for your own deployment. ```bash # Backend API up? -curl -s -o /dev/null -w '%{http_code}' http://localhost:3003/api/auth/signin -X POST \ +curl -s -o /dev/null -w '%{http_code}' https://table.inkreach.cc/api/auth/signin -X POST \ -H 'Content-Type: application/json' -d '{}' # expect 401 (endpoint exists, bad creds) # Frontend up? @@ -60,7 +60,7 @@ Note: `auth token list/create` may require a **session** (browser login) rather ### Configure the CLI ```bash -inkreach-teable auth login --endpoint http://localhost:3003 --token --base-id bseXXX +inkreach-teable auth login --endpoint https://table.inkreach.cc --token --base-id bseXXX inkreach-teable auth status # verify ```