openxiangda-skill-kit 2.0.0-alpha.58 → 2.0.0-alpha.60
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.
|
|
3
|
+
"version": "2.0.0-alpha.60",
|
|
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.
|
|
20
|
+
"openxiangda-devkit-core": "2.0.0-alpha.45"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"tsx": "4.23.12",
|
|
@@ -10,6 +10,27 @@ application-owned `NestFactory` or `FastifyAdapter`: the SDK bootstrap owns the
|
|
|
10
10
|
exact raw request bytes required by gateway signatures, proxy trust, shutdown
|
|
11
11
|
hooks, and the runtime listen contract.
|
|
12
12
|
|
|
13
|
+
Connected development and release builds deliberately use different compilers,
|
|
14
|
+
so application Nest classes must never depend on emitted constructor metadata.
|
|
15
|
+
Every constructor dependency in a `@Controller` or `@Injectable` class uses an
|
|
16
|
+
explicit token:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { Controller, Inject } from '@nestjs/common';
|
|
20
|
+
import { OpenXiangdaStandardOperations } from 'openxiangda-nest';
|
|
21
|
+
|
|
22
|
+
@Controller('/api/visitor-reservations')
|
|
23
|
+
export class VisitorReservationsController {
|
|
24
|
+
constructor(
|
|
25
|
+
@Inject(OpenXiangdaStandardOperations)
|
|
26
|
+
private readonly operations: OpenXiangdaStandardOperations,
|
|
27
|
+
) {}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`openxiangda check` and `openxiangda dev` reject implicit constructor injection.
|
|
32
|
+
Do not silence that diagnostic or replace the connected-development compiler.
|
|
33
|
+
|
|
13
34
|
Backend routes are private to the application unless their operation declaration contains an explicit `ai` block. Never infer AI exposure or risk from the HTTP method. A write action declares its touched resources and non-empty side effects, for example:
|
|
14
35
|
|
|
15
36
|
```ts
|
|
@@ -33,3 +54,22 @@ Backend routes are private to the application unless their operation declaration
|
|
|
33
54
|
```
|
|
34
55
|
|
|
35
56
|
Generated CRUD and custom actions use the same platform Catalog, current-user authorization, Preview/Confirm boundary and idempotent execution path. Do not create an application-owned MCP server, preview store, AI role or database client.
|
|
57
|
+
|
|
58
|
+
For visitor duplicates, meeting-time conflicts, and course capacity, use
|
|
59
|
+
`OpenXiangdaStandardOperations`. These helpers submit the whole rule as one
|
|
60
|
+
platform transaction. Do not query mutable rows before calling them and do not
|
|
61
|
+
calculate replacement counters in application code. Course selection is a
|
|
62
|
+
locked `record-assert` plus a bounded `increment`; replay must reach the
|
|
63
|
+
platform idempotency receipt even after the course becomes full.
|
|
64
|
+
|
|
65
|
+
When declaring a lower-level transaction directly, use only the current
|
|
66
|
+
contract:
|
|
67
|
+
|
|
68
|
+
- every guard has a stable `OPENXIANGDA_*` `errorCode`;
|
|
69
|
+
- `query-empty` protects a business-key uniqueness rule;
|
|
70
|
+
- `record-assert` locks one exact record and checks declared field values or
|
|
71
|
+
declared field-to-field comparisons;
|
|
72
|
+
- `increment` targets one declared integer field and must have a matching
|
|
73
|
+
same-resource, same-record `record-assert` guard;
|
|
74
|
+
- never send SQL, table names, expressions, old guards without `errorCode`, or
|
|
75
|
+
a pre-read/absolute-update fallback.
|