openxiangda 1.0.92 → 1.0.93

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 CHANGED
@@ -31,9 +31,12 @@ openxiangda permission role-list --profile dev
31
31
  openxiangda settings get customer --profile dev
32
32
  openxiangda data-view list --profile dev
33
33
  openxiangda data-view status ticket_with_customer --profile dev
34
+ openxiangda doctor --profile dev --json
35
+ openxiangda design gates --topic public-access --json
34
36
  openxiangda resource validate --profile dev
35
37
  openxiangda resource plan --profile dev
36
38
  openxiangda resource publish --profile dev
39
+ openxiangda resource explain public-access --json
37
40
  openxiangda runtime deploy --profile dev
38
41
  openxiangda inspect app --profile dev --json
39
42
  openxiangda app snapshot APP_XXXX --profile dev --json
@@ -69,6 +72,45 @@ openxiangda update install
69
72
 
70
73
  Domestic npm mirrors may lag and return an older OpenXiangda version. `openxiangda update check --json` is designed for AI agents: it returns the installed version, latest official npm version, whether an update is available, and the compatibility commands to run after updating. `openxiangda update install` installs from the official registry and refreshes OpenXiangda skills by default.
71
74
 
75
+ ## AI design gate and resource CLI
76
+
77
+ Architecture-class requests are plan-gated by default. For new apps, complex pages, login/register, public/no-login access, role/data-scope design, workflow/automation, App Function, connector, notification, and external integration work, AI agents must plan first and implement only after the user confirms the design.
78
+
79
+ Before confirmation, agents may read, inspect, snapshot, dry-run, ask questions, and output/write the architecture document. They must not edit source files, mutate platform resources, publish, deploy, send notifications, or call live write/delete endpoints.
80
+
81
+ Use the discoverable gate commands:
82
+
83
+ ```bash
84
+ openxiangda doctor --profile dev --json
85
+ openxiangda design gates --topic new-app,public-access --json
86
+ openxiangda design template --topic auth,public-access
87
+ openxiangda commands --json
88
+ ```
89
+
90
+ For formal multi-resource development, keep the repository as the source of truth and use `src/resources/**`:
91
+
92
+ ```bash
93
+ openxiangda resource validate --profile dev
94
+ openxiangda resource plan --profile dev
95
+ openxiangda resource publish --profile dev
96
+ ```
97
+
98
+ For small live fixes, diagnosis, or AI command discovery, use first-class resource commands. They all accept `--profile`, `--app-type`, `--json`, `--json-file`, `--dry-run`, and write commands can use `--write-manifest` to avoid repo/platform drift:
99
+
100
+ ```bash
101
+ openxiangda route upsert --json-file src/resources/routes/public_register.json --dry-run
102
+ openxiangda public-access upsert --json-file src/resources/public-access/public_register.json --write-manifest
103
+ openxiangda public-access session-test public_register --path /view/APP_XXX/public/register --json
104
+ openxiangda public-access grant-check public_register --form-code registration_form --json
105
+ openxiangda auth-config methods --json
106
+ openxiangda function invoke submit_public_registration --body-json '{"input":{}}'
107
+ openxiangda connector invoke sms.sendCode --body-json '{"body":{"phone":"13800000000"}}'
108
+ openxiangda notification preview public_register_notice --body-json '{"variables":{"title":"测试"}}'
109
+ openxiangda permission audit --json
110
+ ```
111
+
112
+ 调用和测试类命令会检查 JSON envelope。HTTP 200 但 `code: "PUBLIC_GRANT_DENIED"`、`success: false` 或其他字符串业务错误码会被当作失败。
113
+
72
114
  Codex skills are installed separately from login/profile state. Run `openxiangda skill install` after installing or linking the CLI. It installs the `openxiangda` root skill plus the 8 top-level subskills into `${CODEX_HOME:-~/.codex}/skills` by default:
73
115
 
74
116
  - `openxiangda`