refactor: rename CLI command 'inkreach' -> 'inkreach-teable'
Rename the command (and its config namespace) to match the project name: - bin: inkreach -> inkreach-teable - program name: inkreach -> inkreach-teable - config dir: ~/.inkreach/ -> ~/.inkreach-teable/ - env vars: INKREACH_* -> INKREACH_TEABLE_* - all docs (SKILL.md, guides, api-reference, AGENTS.md, design doc, install.sh) Unchanged (intentional): - npm package name: @inkreach/teable-cli - package directory: packages/inkreach-cli/ - skill name: inkreach-teable-ops - organization/authors: 'inkreach' (npm scope @inkreach) Existing config auto-migrated (~/.inkreach -> ~/.inkreach-teable). Verified end-to-end: auth status, workflow list (636), build clean.
This commit is contained in:
+14
-14
@@ -8,7 +8,7 @@
|
||||
|
||||
inkreach-teable(本项目)自研了一套自动化(workflow)引擎,与官方 teable 的自动化**完全不兼容**:
|
||||
|
||||
| 维度 | 官方 teable | 本项目(inkreach) |
|
||||
| 维度 | 官方 teable | 本项目(inkreach-teable) |
|
||||
|---|---|---|
|
||||
| 过滤条件键名 | `filter` | `conditions` |
|
||||
| 监听字段键名 | `watchFieldIds` | `fieldIds` |
|
||||
@@ -19,11 +19,11 @@ inkreach-teable(本项目)自研了一套自动化(workflow)引擎,与
|
||||
|
||||
官方 `teable` CLI(v0.6.22)按官方契约调用,**无法操作本项目自动化**(已实测:列自动化时 404/契约不匹配)。表格/字段/记录/视图的 REST API 则与官方完全兼容。
|
||||
|
||||
**结论**:必须自研一个 `inkreach` CLI 包装本项目真实契约,并配套一个 skill 教 Agent 如何使用。
|
||||
**结论**:必须自研一个 `inkreach-teable` CLI 包装本项目真实契约,并配套一个 skill 教 Agent 如何使用。
|
||||
|
||||
## 2. 目标
|
||||
|
||||
1. **`inkreach` CLI**(`packages/inkreach-cli/`):Node.js 命令行工具,封装本项目全部 REST API,重点是自研自动化契约。
|
||||
1. **`inkreach-teable` CLI**(`packages/inkreach-cli/`):Node.js 命令行工具,封装本项目全部 REST API,重点是自研自动化契约。
|
||||
2. **`inkreach-teable-ops` skill**(`.agents/skills/inkreach-teable-ops/`):教 Agent 何时用哪个 CLI 命令、配置表格与自动化的正确姿势、本项目的部署/开发约定。
|
||||
3. **端到端验证**:在本地实例真实跑通"建表 → 建自动化 → 配 buttonClick 触发器 → 激活 → 查执行历史"全链路。
|
||||
|
||||
@@ -34,14 +34,14 @@ inkreach-teable(本项目)自研了一套自动化(workflow)引擎,与
|
||||
- **运行时**:Node.js(无额外运行时依赖,项目已是 Node 栈)。
|
||||
- **框架**:`commander`(成熟、零学习成本、官方 teable CLI 也用 commander)。
|
||||
- **HTTP**:`node:https`/`node:http`(**不用** `fetch`——Node v24 全局 fetch 会吞 Authorization 头,这是本会话已确认的坑)。封装一个 `request()`。
|
||||
- **配置存储**:`~/.inkreach/config.json`(endpoint + token),支持环境变量覆盖 `INKREACH_ENDPOINT` / `INKREACH_TOKEN`。
|
||||
- **配置存储**:`~/.inkreach-teable/config.json`(endpoint + token),支持环境变量覆盖 `INKREACH_TEABLE_ENDPOINT` / `INKREACH_TEABLE_TOKEN`。
|
||||
- **输出**:默认人类可读(表格/着色),`--json` 输出原始 JSON 供 Agent 解析。
|
||||
- **零运行时依赖**优先(commander 是唯一依赖),便于 `node bin.js` 直接跑、便于打包。
|
||||
|
||||
### 3.2 命令树
|
||||
|
||||
```
|
||||
inkreach [全局选项] <命令>
|
||||
inkreach-teable [全局选项] <命令>
|
||||
|
||||
全局选项:
|
||||
--endpoint <url> 覆盖配置的 endpoint(默认 http://localhost:3000)
|
||||
@@ -142,7 +142,7 @@ YAML frontmatter(name + 极详细的 description 触发条件)+ 以下章节
|
||||
├── SKILL.md 入口
|
||||
├── metadata.json 版本元数据
|
||||
├── scripts/
|
||||
│ └── install.sh 安装/升级 inkreach CLI(pnpm build + link)
|
||||
│ └── install.sh 安装/升级 inkreach-teable CLI(pnpm build + link)
|
||||
└── guides/ 与 api-reference/ 按需加载
|
||||
├── guides/
|
||||
│ ├── instance-access.md 本实例访问信息(endpoint、服务状态、凭据获取)
|
||||
@@ -177,14 +177,14 @@ YAML frontmatter(name + 极详细的 description 触发条件)+ 以下章节
|
||||
|
||||
## 6. 验证标准
|
||||
|
||||
- `inkreach auth status` 返回当前用户。
|
||||
- `inkreach workflow list --base-id bseeZR7yiDNeMPCa4CN` 列出自动化。
|
||||
- `inkreach workflow create --name "CLI测试" --base-id bseeZR7yiDNeMPCa4CN` 创建成功。
|
||||
- `inkreach trigger set <wfId> --type buttonClick --table-id tblXXX --field-ids '["fldXXX"]'` 正确配置。
|
||||
- `inkreach action add <wfId> --type script --code '...'` 正确添加节点。
|
||||
- `inkreach workflow activate <wfId>` 激活成功(返回 snapshotId)。
|
||||
- `inkreach fire button-click ...` 触发执行。
|
||||
- `inkreach runs list <wfId>` 能看到刚才的执行。
|
||||
- `inkreach-teable auth status` 返回当前用户。
|
||||
- `inkreach-teable workflow list --base-id bseeZR7yiDNeMPCa4CN` 列出自动化。
|
||||
- `inkreach-teable workflow create --name "CLI测试" --base-id bseeZR7yiDNeMPCa4CN` 创建成功。
|
||||
- `inkreach-teable trigger set <wfId> --type buttonClick --table-id tblXXX --field-ids '["fldXXX"]'` 正确配置。
|
||||
- `inkreach-teable action add <wfId> --type script --code '...'` 正确添加节点。
|
||||
- `inkreach-teable workflow activate <wfId>` 激活成功(返回 snapshotId)。
|
||||
- `inkreach-teable fire button-click ...` 触发执行。
|
||||
- `inkreach-teable runs list <wfId>` 能看到刚才的执行。
|
||||
- skill 被 Agent 正确加载(出现在 available_skills)。
|
||||
|
||||
## 7. 非目标
|
||||
|
||||
Reference in New Issue
Block a user