openxiangda 2.0.0-alpha.38 → 2.0.0-alpha.39
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/dist/browser/Shell.js +2 -2
- package/dist/browser/Shell.js.map +1 -1
- package/dist/browser/admin-contributions.d.ts +14 -0
- package/dist/browser/admin-contributions.d.ts.map +1 -1
- package/dist/browser/admin-contributions.js +37 -3
- package/dist/browser/admin-contributions.js.map +1 -1
- package/dist/browser/application.d.ts.map +1 -1
- package/dist/browser/application.js +2 -2
- package/dist/browser/application.js.map +1 -1
- package/dist/browser/authentication.d.ts +46 -0
- package/dist/browser/authentication.d.ts.map +1 -0
- package/dist/browser/authentication.js +204 -0
- package/dist/browser/authentication.js.map +1 -0
- package/dist/browser/platform-client.d.ts +45 -2
- package/dist/browser/platform-client.d.ts.map +1 -1
- package/dist/browser/platform-client.js +185 -4
- package/dist/browser/platform-client.js.map +1 -1
- package/dist/browser/runtime.d.ts +7 -1
- package/dist/browser/runtime.d.ts.map +1 -1
- package/dist/browser/runtime.js +55 -4
- package/dist/browser/runtime.js.map +1 -1
- package/dist/react.d.ts +1 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +1 -0
- package/dist/react.js.map +1 -1
- package/package.json +7 -7
- package/skills/openxiangda-v2/SKILL.md +3 -3
- package/skills/openxiangda-v2/references/frontend.md +30 -0
- package/skills/openxiangda-v2/references/workspace.md +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openxiangda",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.39",
|
|
4
4
|
"description": "Unified OpenXiangda 2.0 CLI, SDK, React runtime, NestJS integration and AI skill distribution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"dayjs": "1.11.18",
|
|
51
51
|
"docx-preview": "0.3.7",
|
|
52
|
-
"openxiangda-cli": "2.0.0-alpha.
|
|
53
|
-
"openxiangda-contracts": "2.0.0-alpha.
|
|
54
|
-
"openxiangda-devkit-core": "2.0.0-alpha.
|
|
55
|
-
"openxiangda-mcp": "2.0.0-alpha.
|
|
56
|
-
"openxiangda-nest": "2.0.0-alpha.
|
|
57
|
-
"openxiangda-skill-kit": "2.0.0-alpha.
|
|
52
|
+
"openxiangda-cli": "2.0.0-alpha.125",
|
|
53
|
+
"openxiangda-contracts": "2.0.0-alpha.61",
|
|
54
|
+
"openxiangda-devkit-core": "2.0.0-alpha.79",
|
|
55
|
+
"openxiangda-mcp": "2.0.0-alpha.79",
|
|
56
|
+
"openxiangda-nest": "2.0.0-alpha.72",
|
|
57
|
+
"openxiangda-skill-kit": "2.0.0-alpha.100",
|
|
58
58
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
@@ -10,14 +10,14 @@ Treat requirement discovery, architecture, authorization, development, testing a
|
|
|
10
10
|
Before a workspace exists, use this Skill's exact npm version:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
pnpm dlx openxiangda@2.0.0-alpha.
|
|
14
|
-
pnpm dlx openxiangda@2.0.0-alpha.
|
|
13
|
+
pnpm dlx openxiangda@2.0.0-alpha.39 login --base-url <platform>
|
|
14
|
+
pnpm dlx openxiangda@2.0.0-alpha.39 create <directory>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Inside an application, use only its locked executable through `pnpm openxiangda`. Never invoke a bare global `openxiangda`, because that executable may belong to stable 1.x. Moving tags such as `latest` and `alpha` are forbidden. To install or refresh this same Skill from the package, run:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
pnpm dlx openxiangda@2.0.0-alpha.
|
|
20
|
+
pnpm dlx openxiangda@2.0.0-alpha.39 skill install --force
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Use this order:
|
|
@@ -69,6 +69,36 @@ operation pages under `/admin/operations`; parameterized routes remain
|
|
|
69
69
|
reachable but cannot be menu references. `defineAdminContributions` remains an
|
|
70
70
|
admin-only helper and intentionally rejects `user` routes.
|
|
71
71
|
|
|
72
|
+
Declare application-owned login visuals with optional
|
|
73
|
+
`frontend.authentication`. The only supported account contract is
|
|
74
|
+
`existing-platform-users-only` with `registration.mode: 'reject'`; use exact
|
|
75
|
+
desktop `/login` and mobile `/m/login`, each pointing to a static protected user
|
|
76
|
+
default route. Import generated `authenticationSurfaces` and bind an exact
|
|
77
|
+
desktop/mobile renderer map alongside `appRoutes`:
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
const contributions = defineApplicationContributions(
|
|
81
|
+
{ routes: appRoutes, authenticationSurfaces },
|
|
82
|
+
{
|
|
83
|
+
pages,
|
|
84
|
+
authentication: {
|
|
85
|
+
applicationLogin: DesktopLogin,
|
|
86
|
+
applicationLoginMobile: MobileLogin,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Renderers receive only `ApplicationLoginSurfaceProps`: safe method descriptors,
|
|
93
|
+
state/error metadata, normalized `returnTo`, and platform callbacks. They never
|
|
94
|
+
receive credentials, provider configuration, OAuth state, tokens, roles, or
|
|
95
|
+
authorization facts. The platform owns the one Router and authentication
|
|
96
|
+
boundary, tokenless v2 facade, Secure HttpOnly session/refresh family and
|
|
97
|
+
logout. Do not put login in `appRoutes`, call v1 auth APIs, persist tokens, or
|
|
98
|
+
translate network/5xx and authenticated 403 states into login. Generated
|
|
99
|
+
`platformAuthManifest` is the independent login QA denominator and does not
|
|
100
|
+
change protected user route counts.
|
|
101
|
+
|
|
72
102
|
This is also the whole-application composition contract: pass the resulting
|
|
73
103
|
`contributions` to `OpenXiangdaApplication` and let that component remain the
|
|
74
104
|
only owner of `BrowserRouter`, `RuntimeBoundary`, Refine, generated resource and
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
- `appspec/` is the optional OpenXiangda 2.0 business-intent layer. Before changing observable behavior, read the bounded index with `pnpm openxiangda spec context --json`, then select only the relevant stable ID; use no ChangeSpec for L0 work, one short ChangeSpec for L1, and add permission/rollback/concurrency detail only for L2/L3. Before close, the user—not AI—confirms `currentSpec=merged` or `not-applicable`. AppSpec is advisory and never a release gate. Never read, import or migrate 1.x `openspec/` or SDD.
|
|
5
5
|
- Use Vite, React Router, Refine Core and Ant Design. Do not add Umi, ProComponents or another admin shell.
|
|
6
6
|
- Bind every generated `appRoutes` entry to its local page with `defineApplicationContributions`; desktop `admin` routes stay inside the platform Shell, while `user` routes render without an admin Shell for independent mobile/user experiences. Generated resource CRUD routes are compiler-owned under `/admin/resources/<resourceCode>...` and `/m/admin/resources/<resourceCode>...`; never recreate root resource paths, aliases or redirects. Explicit routes that have the same canonical shape as another explicit or generated route fail compilation, even when dynamic parameter names differ. Use only the typed `toolbar`, `row` and `detail` resource slots for generated resource actions. Declare the complete editable admin menu with `defineAdminNavigation` and its page/group helpers; the Shell renders only generated `adminNavigation` references and permissions only filter them. Do not create another router, menu store, layout, identity provider, permission store or copied CRUD page; route/action access uses capability or `allOf`/`anyOf`, while Data/App API and Workflow authorization remain server-owned.
|
|
7
|
+
- Application login is optional `frontend.authentication`: existing platform users only, registration rejected, exact desktop `/login` and mobile `/m/login`. Bind generated `authenticationSurfaces` to separate PC/mobile renderers through `defineApplicationContributions`; renderers own only brand visuals and call `ApplicationLoginSurfaceProps`. The platform alone owns passwords, providers, OAuth state/callbacks, secure cookies, current identity and authorization. Never put login in protected `appRoutes`, call a v1 auth route, store tokens, create users/roles, or add another Router/identity provider. Keep QA in generated `platformAuthManifest`, outside the protected route denominator.
|
|
7
8
|
- Declare each resource once in `openxiangda.config.ts` with only `code`, `name`, `fields` and optional `mutationOwner`, generated/list/layout/data-policy settings. Each field owns type, label, required state, Surface flags, reference/file metadata and access. Resource codes are lower kebab-case. Use `native` for direct Data API mutations, `action`, `readonly` or `workflow` for non-Native ownership; never grant or generate Native mutation for a non-Native owner.
|
|
8
9
|
- Never write resource-level `schemaVersion`, `appCode`, `schema`, `surface`, `capabilities`, `fieldPolicies` or `platform/data` modules. The compiler derives the strict DataResource, CRUD capabilities, Surface and AI Schema. The application manifest still starts with its one top-level `schemaVersion: 3`.
|
|
9
10
|
- Ordinary list/get/create/update/delete, filters, export and batch operations use the platform Native Data API. Do not create Function CRUD or NestJS wrappers.
|