openxiangda-skill-kit 2.0.0-alpha.94 → 2.0.0-alpha.97

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openxiangda-skill-kit",
3
- "version": "2.0.0-alpha.94",
3
+ "version": "2.0.0-alpha.97",
4
4
  "description": "Validation and deterministic packaging for OpenXiangda 2.0 AI skills.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "README.md"
18
18
  ],
19
19
  "dependencies": {
20
- "openxiangda-devkit-core": "2.0.0-alpha.75"
20
+ "openxiangda-devkit-core": "2.0.0-alpha.76"
21
21
  },
22
22
  "devDependencies": {
23
23
  "tsx": "4.23.12",
@@ -14,6 +14,15 @@ for this exact application, environment, version and operation. Do not forward
14
14
  the caller's resource, row or field permissions into that internal Data call,
15
15
  and do not author an `authorizationJSON` permission mirror. The platform still
16
16
  records the initiating user and action code in records, files, events and audit.
17
+ The platform models this internal hop as the request-bounded
18
+ `native-business-action` principal. It is neither an OAuth client nor a Native
19
+ runtime credential: PostgreSQL accepts it only after the platform has verified
20
+ the signed Gateway invocation, exact target/Head, published
21
+ `code + requiredCapability`, application data scope and initiating user. Never
22
+ copy an invocation token into application data, construct the action headers
23
+ yourself, or fall back to `OpenXiangdaApplicationDataApiService` when this
24
+ channel is rejected; a rejection means the platform/package combination is not
25
+ compatible or the invocation is stale.
17
26
 
18
27
  For an informational business notification, inject
19
28
  `OpenXiangdaBusinessNotificationService` in the same declared action. The SDK
@@ -109,6 +109,12 @@ generated UI and platform field policies.
109
109
 
110
110
  Field types are semantic, not PostgreSQL storage aliases. Use the catalog in the generated `AGENTS.md`: for example `text.short`, `number.integer`, `user.single`, `department.multiple`, `resource-ref.single`, `file`, `address` and `subtable`. The compiler alone chooses storage columns and constraints. Reference fields store JSON display values. For `resource-ref.*`, `resourceCode`, `value`, `label`, optional `description` and optional `snapshot` are convenient historical display data only: the target resource remains authoritative, the platform does not create a foreign key or refresh/check the stored JSON, and business actions that need current target state must query it by `resourceCode` plus `value`. A resource source `labelField` must point to `text.short` or `text.long`; a `serial-number` field can be listed in `searchFields`, `descriptionFields` or `snapshotFields`, but it is not a display label. File limits exist only under `file`; `maxCount` owns the single/multiple bound and `maxSizeMb` owns the per-file size bound. There is no `file.multiple` key.
111
111
 
112
+ Generated list, detail, audit and preview surfaces render the stored canonical
113
+ `label` snapshots for `option.*`, `user.*`, `department.*` and
114
+ `resource-ref.*`, including multiple arrays and the first linked list column.
115
+ Do not add application formatters, directory re-queries or browser-side joins
116
+ for these standard fields.
117
+
112
118
  Numeric bounds belong on the field declaration and are enforced by the
113
119
  platform for every write path. They are inclusive, and only valid on
114
120
  `number.integer` or `number.decimal`:
@@ -43,6 +43,18 @@ discovery, and permission logic cannot create entries. Read
43
43
  proposal is deterministic and editable; the compiler/runtime never invokes it
44
44
  or appends newly added resources later.
45
45
 
46
+ Generated desktop resource CRUD routes use the compiler-owned
47
+ `/admin/resources/<resourceCode>...` namespace and always render inside the
48
+ platform's one Shell. Their independent mobile admin surface is projected from
49
+ the same generated route catalog under `/m/admin/resources/<resourceCode>...`.
50
+ Generated pages consume that catalog for every list/create/detail/edit/back
51
+ navigation; do not reconstruct root resource paths in application code. Root
52
+ and ordinary `/m/...` paths remain available to explicit user routes. The
53
+ compiler rejects an explicit route whose canonical path shape conflicts with
54
+ any explicit or platform-generated route, including dynamic routes that differ
55
+ only by parameter name. Do not add aliases, redirects or route-order branches
56
+ for earlier alpha paths.
57
+
46
58
  Declare custom routes in `openxiangda.config.ts`, import the generated
47
59
  `appRoutes`, and bind every route key to exactly one local React page with
48
60
  `defineApplicationContributions` from `openxiangda/react`. Pass the result to
@@ -3,7 +3,7 @@
3
3
  - Use only the workspace-pinned CLI: `pnpm openxiangda <command>`. Never invoke a bare global `openxiangda` inside a 2.0 task.
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
- - 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. Use only its 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.
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
7
  - 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
8
  - 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
9
  - 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.