openxiangda-cli 2.0.0-alpha.77 → 2.0.0-alpha.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +1 -1
- package/template/AGENTS.md +1 -0
- package/template/README.md +2 -3
- package/template/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,4 +4,10 @@ OpenXiangda 2.0 installs one developer CLI with exactly eight top-level commands
|
|
|
4
4
|
|
|
5
5
|
The CLI disables user, development and JIT plugin loading. A clean build removes orphaned command output before TypeScript compilation. `--json` emits one stable result envelope and never mixes progress logs into machine output.
|
|
6
6
|
|
|
7
|
+
AI-native development clients use the same pinned executable in pre-command
|
|
8
|
+
stdio mode: `pnpm exec openxiangda --mcp-stdio --cwd <workspace>`. They can read
|
|
9
|
+
`openxiangda://workspace/contracts` or call `contract_describe` to obtain the
|
|
10
|
+
compiler-owned `aiCatalog` and `aiCatalogDigest`. This transport does not add a
|
|
11
|
+
ninth Oclif command and applications must not implement a second MCP server.
|
|
12
|
+
|
|
7
13
|
`dev` starts local Web/Nest hot reload and a loopback connected proxy. `deploy` defaults to test; production explicitly reuses a successful test AppVersion. Application binding, initialization, generation, tests and builds are internal stages rather than separate commands.
|
package/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -12,3 +12,4 @@
|
|
|
12
12
|
- A single directory user reference uses a `string` field; a single department or same-app resource reference uses `uuid`; every `multiple: true` reference uses `json`. Roles that consume directory-backed fields explicitly include `app:<app-code>:directory:read`.
|
|
13
13
|
- Do not add compatibility aliases, migration branches or silent fallbacks for an earlier 2.0 alpha contract. Replace an incorrect contract and regenerate the application.
|
|
14
14
|
- Run `pnpm openxiangda check` after contract changes. Deploy with `pnpm openxiangda deploy`, inspect with `pnpm openxiangda status` and `pnpm openxiangda logs`, and use the platform rollback command rather than mutating K3s directly.
|
|
15
|
+
- AI-native clients start the workspace protocol through the same pinned binary: `pnpm exec openxiangda --mcp-stdio --cwd <workspace>`. Read `openxiangda://workspace/contracts` or call `contract_describe`, and require its `aiCatalog` and `aiCatalogDigest` to match the normal compiler output. This is a stdio transport mode, not a ninth CLI command. Never write an application MCP server, Catalog file, preview store or second authorization path.
|
package/template/README.md
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
这是干净的资源 CRUD 模板:Vite + React Router + Refine Core + Ant Design 前端、NestJS 平台启动层,以及平台 Data/AuthZ 声明。
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
pnpm dlx openxiangda-cli@latest login --base-url https://platform.example.com
|
|
7
|
-
pnpm dlx openxiangda-cli@latest create visitor-reservations
|
|
8
|
-
cd visitor-reservations
|
|
9
6
|
pnpm openxiangda dev
|
|
10
7
|
```
|
|
11
8
|
|
|
9
|
+
当前应用已经把 CLI 和全部 2.0 包精确锁定在 `package.json` 与 lockfile 中。创建另一个应用时使用当前安装的 OpenXiangda 2.0 Skill 给出的精确 CLI 版本,不使用 `latest`、`alpha` 或全局命令。
|
|
10
|
+
|
|
12
11
|
在 `platform/data` 中声明 `DataResource` 和字段即可生成标准后台列表、筛选、表单、详情、审计、文件上传和独立移动端页面。成员、部门和资源关系分别使用 `reference: { kind: 'directory-user' }`、`directory-department`、`resource`,只保存稳定 ID,不复制目录数据。单选成员字段使用 `string`,单选部门和资源引用使用 `uuid`,多选引用统一使用 `json`。需要目录选择器的业务角色必须显式拥有 `app:<app-code>:directory:read` 能力。
|
|
13
12
|
|
|
14
13
|
所有 CRUD 位于 `apps/web/src/platform-client.ts` 的 Data API adapter;Nest 只在需要复杂事务或外部集成时增加 App API。选择器显式携带当前环境、使用同源 Cookie,浏览器不读取 Token,也不发送 RoleSession header。
|
package/template/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build": "pnpm --recursive build"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"openxiangda-cli": "2.0.0-alpha.
|
|
25
|
+
"openxiangda-cli": "2.0.0-alpha.79",
|
|
26
26
|
"openxiangda-contracts": "2.0.0-alpha.35",
|
|
27
27
|
"openxiangda-devkit-core": "2.0.0-alpha.46",
|
|
28
28
|
"typescript": "5.9.3"
|