openxiangda-skill-kit 2.0.0-alpha.55 → 2.0.0-alpha.57
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 +3 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/dist/internal/skill-installer.d.ts +0 -2
- package/dist/internal/skill-installer.d.ts.map +1 -1
- package/dist/internal/skill-installer.js +1 -6
- package/dist/internal/skill-installer.js.map +1 -1
- package/package.json +2 -2
- package/skills/manifest.json +1 -1
- package/skills/openxiangda-v2/SKILL.md +7 -2
- package/skills/openxiangda-v2/references/architecture.md +1 -1
- package/skills/openxiangda-v2/references/backend.md +25 -1
- package/skills/openxiangda-v2/references/data-authz.md +3 -1
- package/skills/openxiangda-v2/references/delivery.md +3 -3
- package/skills/openxiangda-v2/references/frontend.md +6 -1
- package/skills/openxiangda-v2/references/workspace.md +14 -0
package/README.md
CHANGED
|
@@ -5,4 +5,6 @@ Validates OpenXiangda 2.0 skill metadata, links, command references, version bou
|
|
|
5
5
|
The package exposes a library for release validation and controlled installation.
|
|
6
6
|
It contains exactly one installable Skill, `openxiangda-v2`; architecture,
|
|
7
7
|
frontend, backend, authorization and delivery guidance live as nested references
|
|
8
|
-
inside that Skill. It publishes no executable and no Workflow/Event Skill.
|
|
8
|
+
inside that Skill. It publishes no executable and no Workflow/Event Skill. The
|
|
9
|
+
installer only replaces that exact Skill and never recognizes or migrates an
|
|
10
|
+
older 2.0 Skill layout.
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ export interface InstallSkillsInput {
|
|
|
18
18
|
force?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const OPENXIANGDA_SKILL_NAME = "openxiangda-v2";
|
|
21
|
-
export declare const RETIRED_OPENXIANGDA_SKILL_NAMES: readonly ["openxiangda-v2-architecture", "openxiangda-v2-backend", "openxiangda-v2-data-authz", "openxiangda-v2-delivery", "openxiangda-v2-frontend", "openxiangda-v2-workflow-events"];
|
|
22
21
|
export declare function resolveDefaultSkillsRoot(): string;
|
|
23
22
|
export declare function validateSkills(skillsRoot: string): Promise<SkillValidationIssue[]>;
|
|
24
23
|
export declare function createSkillManifest(skillsRoot: string): Promise<SkillManifest>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,wBAAgB,wBAAwB,WAIvC;AAmBD,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAwExF;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAepF;AAuBD,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,SAAuC,0BAIzG;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB;;;;GAoB5D"}
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,6 @@ import { dirname, relative, resolve } from 'node:path';
|
|
|
5
5
|
import { DEVKIT_COMMANDS } from 'openxiangda-devkit-core';
|
|
6
6
|
import { installSkillTransaction } from './internal/skill-installer.js';
|
|
7
7
|
export const OPENXIANGDA_SKILL_NAME = 'openxiangda-v2';
|
|
8
|
-
export const RETIRED_OPENXIANGDA_SKILL_NAMES = [
|
|
9
|
-
'openxiangda-v2-architecture',
|
|
10
|
-
'openxiangda-v2-backend',
|
|
11
|
-
'openxiangda-v2-data-authz',
|
|
12
|
-
'openxiangda-v2-delivery',
|
|
13
|
-
'openxiangda-v2-frontend',
|
|
14
|
-
'openxiangda-v2-workflow-events',
|
|
15
|
-
];
|
|
16
8
|
export function resolveDefaultSkillsRoot() {
|
|
17
9
|
const packaged = resolve(import.meta.dirname, '../skills');
|
|
18
10
|
const development = resolve(import.meta.dirname, '../../../skills');
|
|
@@ -144,7 +136,6 @@ export async function installSkills(input) {
|
|
|
144
136
|
source: resolve(input.skillsRoot, skill.directory),
|
|
145
137
|
destination: input.destination,
|
|
146
138
|
name: OPENXIANGDA_SKILL_NAME,
|
|
147
|
-
retiredNames: RETIRED_OPENXIANGDA_SKILL_NAMES,
|
|
148
139
|
});
|
|
149
140
|
return {
|
|
150
141
|
destination: input.destination,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAyBxE,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAyBxE,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACvD,MAAM,UAAU,wBAAwB;IACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,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AC;QACvE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;IACvD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,IAAY;IACrC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -2,8 +2,6 @@ export interface SkillInstallTransactionInput {
|
|
|
2
2
|
source: string;
|
|
3
3
|
destination: string;
|
|
4
4
|
name: string;
|
|
5
|
-
retiredNames: readonly string[];
|
|
6
|
-
afterRetiredBackup?: (count: number) => void | Promise<void>;
|
|
7
5
|
}
|
|
8
6
|
export declare function installSkillTransaction(input: SkillInstallTransactionInput): Promise<string>;
|
|
9
7
|
//# sourceMappingURL=skill-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-installer.d.ts","sourceRoot":"","sources":["../../src/internal/skill-installer.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-installer.d.ts","sourceRoot":"","sources":["../../src/internal/skill-installer.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,mBAkChF"}
|
|
@@ -11,18 +11,13 @@ export async function installSkillTransaction(input) {
|
|
|
11
11
|
try {
|
|
12
12
|
await cp(input.source, stagedSkill, { recursive: true });
|
|
13
13
|
await mkdir(backupRoot, { recursive: true });
|
|
14
|
-
|
|
15
|
-
for (const name of [input.name, ...input.retiredNames]) {
|
|
14
|
+
for (const name of [input.name]) {
|
|
16
15
|
const source = resolve(input.destination, name);
|
|
17
16
|
if (!(await pathExists(source)))
|
|
18
17
|
continue;
|
|
19
18
|
const backup = resolve(backupRoot, name);
|
|
20
19
|
await rename(source, backup);
|
|
21
20
|
backedUp.push({ source, backup });
|
|
22
|
-
if (name !== input.name) {
|
|
23
|
-
retiredBackupCount += 1;
|
|
24
|
-
await input.afterRetiredBackup?.(retiredBackupCount);
|
|
25
|
-
}
|
|
26
21
|
}
|
|
27
22
|
await rename(stagedSkill, target);
|
|
28
23
|
installedNewSkill = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-installer.js","sourceRoot":"","sources":["../../src/internal/skill-installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-installer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C,UAAU,EAAE,IAAI,CAAC,CAAC;YACzC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAClC,iBAAiB,GAAG,IAAI,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,iBAAiB,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;YACpD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;YACvC,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
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.57",
|
|
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.43"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"tsx": "4.23.12",
|
package/skills/manifest.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"name": "openxiangda-v2",
|
|
6
6
|
"description": "Use when building, inspecting, validating, or delivering a complete OpenXiangda 2.0 CRUD application workspace.",
|
|
7
|
-
"sha256": "
|
|
7
|
+
"sha256": "bea42173a9685a971392f3a8d2cd317dfe9c11afbe56e8eeaa468342b04bf2a4"
|
|
8
8
|
}
|
|
9
9
|
]
|
|
10
10
|
}
|
|
@@ -5,15 +5,20 @@ description: Use when building, inspecting, validating, or delivering a complete
|
|
|
5
5
|
|
|
6
6
|
# OpenXiangda 2.0
|
|
7
7
|
|
|
8
|
-
Use the generated React, NestJS and Data API workspace as one application.
|
|
8
|
+
Use the generated React, NestJS and Data API workspace as one application. Before a workspace exists, invoke the 2.0 package explicitly with `pnpm dlx openxiangda-cli@latest`. Inside an application use only its locked CLI through `pnpm openxiangda`; never invoke a bare global `openxiangda`, because that executable may belong to 1.x.
|
|
9
|
+
|
|
10
|
+
Start with `pnpm dlx openxiangda-cli@latest login`, then `pnpm dlx openxiangda-cli@latest create <directory>`. Run `pnpm openxiangda dev` for the local feedback loop and `pnpm openxiangda check` before delivery.
|
|
9
11
|
|
|
10
12
|
Keep ordinary CRUD on the platform Data API. Use NestJS only for real business actions. Page and field guards improve the interface; the platform remains authoritative for rows, fields and actions.
|
|
11
13
|
|
|
12
|
-
Deploy test data first with `openxiangda deploy`. Inspect it with `openxiangda status` and `openxiangda logs`. Select production explicitly only after the same tested version succeeds. Use `openxiangda rollback --to <app-version-id>` when a verified prior version must be restored.
|
|
14
|
+
Deploy test data first with `pnpm openxiangda deploy`. Inspect it with `pnpm openxiangda status` and `pnpm openxiangda logs`. Select production explicitly only after the same tested version succeeds. Use `pnpm openxiangda rollback --to <app-version-id>` when a verified prior version must be restored.
|
|
15
|
+
|
|
16
|
+
OpenXiangda 2.0 has no compatibility surface. Do not add Umi, ProComponents, RoleSession, Function CRUD, underscore resource codes, `fieldPolicies.write`, legacy Skill routing, package aliases or migration branches. Replace a wrong alpha contract directly.
|
|
13
17
|
|
|
14
18
|
Read only the reference needed for the current change:
|
|
15
19
|
|
|
16
20
|
- [Architecture](references/architecture.md)
|
|
21
|
+
- [Workspace agent contract](references/workspace.md)
|
|
17
22
|
- [Backend actions](references/backend.md)
|
|
18
23
|
- [Data and authorization](references/data-authz.md)
|
|
19
24
|
- [Delivery](references/delivery.md)
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Keep one React application, one ordinary NestJS service and one platform-owned data contract. Declare resources, routes, capabilities, row policies and operation-aware field policies in `openxiangda.config.ts`.
|
|
4
4
|
|
|
5
|
-
Ordinary list, detail, create, update and delete operations go directly through Data API. Add a NestJS endpoint only for a business action that cannot be represented as CRUD. Run `openxiangda check` after every contract change.
|
|
5
|
+
Ordinary list, detail, create, update and delete operations go directly through Data API. Add a NestJS endpoint only for a business action that cannot be represented as CRUD. Run `pnpm openxiangda check` after every contract change.
|
|
@@ -2,4 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Keep normal record CRUD in the platform Data API. Use `apps/server` only for typed business actions that need server-side logic. The platform gateway supplies verified current-user role and capability unions; controllers bind operations and capabilities through the Nest SDK.
|
|
4
4
|
|
|
5
|
-
Do not duplicate resource persistence in controllers. Keep actions bounded and side-effect behavior explicit. Run `openxiangda dev` for the connected loop and `openxiangda check` before delivery.
|
|
5
|
+
Do not duplicate resource persistence in controllers. Keep actions bounded and side-effect behavior explicit. Run `pnpm openxiangda dev` for the connected loop and `pnpm openxiangda check` before delivery.
|
|
6
|
+
|
|
7
|
+
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:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
{
|
|
11
|
+
code: 'reservation.enroll',
|
|
12
|
+
method: 'POST',
|
|
13
|
+
path: '/api/reservations/enroll',
|
|
14
|
+
capability: 'app:visitor-app:reservation:enroll',
|
|
15
|
+
requestSchema: { type: 'object', properties: { visitorName: { type: 'string' } } },
|
|
16
|
+
responseSchema: { type: 'object' },
|
|
17
|
+
ai: {
|
|
18
|
+
name: '预约访客',
|
|
19
|
+
description: '校验预约规则并创建访客预约',
|
|
20
|
+
risk: 'write',
|
|
21
|
+
resources: ['reservations'],
|
|
22
|
+
sideEffects: ['reservations:create'],
|
|
23
|
+
concurrency: 'none',
|
|
24
|
+
timeoutMs: 10000,
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
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.
|
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Declare stable capabilities and application roles. Express row access with platform-enforced predicates such as unrestricted school access, college field matching and current-user membership in an instrument manager array.
|
|
4
4
|
|
|
5
|
-
Declare field access separately for read, create and update.
|
|
5
|
+
Declare restricted field access separately for read, create and update. There is no shared `write` field and no fallback. A resource create capability owns unrestricted fields; generated update access is denied until the field declares update capabilities. Capability arrays are all-of. Frontend filtering is presentation only. Run `pnpm openxiangda check` after every policy change.
|
|
6
|
+
|
|
7
|
+
One resource field owns storage and selector semantics together. A single `directory-user` reference uses `type: 'string'`; a single `directory-department` or same-application `resource` reference uses `type: 'uuid'`; every reference with `multiple: true` uses `type: 'json'`. Resource references must target a declared resource and a `string` or `text` label field. File limits belong only on `type: 'file'`. Never save labels or copied directory objects. Any role that reads or edits directory-backed fields must explicitly include `app:<app-code>:directory:read`.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# OpenXiangda 2.0 Delivery
|
|
2
2
|
|
|
3
|
-
Run `openxiangda check`; it owns generation, static checks, tests and production builds. Deploy to test with `openxiangda deploy`. The CLI uses the official application Dockerfile and the platform-provided repository target to build and push the Nest image, then seals only its immutable digest. Never ask the developer for an image tag, digest, registry password, Docker configuration, or another public build command. If Docker, Buildx, repository configuration, or registry login is missing, preserve the stable machine error and retry with the same `openxiangda deploy` command after fixing that prerequisite.
|
|
3
|
+
Run `pnpm openxiangda check`; it owns generation, static checks, tests and production builds. Deploy to test with `pnpm openxiangda deploy`. The CLI uses the official application Dockerfile and the platform-provided repository target to build and push the Nest image, then seals only its immutable digest. Never ask the developer for an image tag, digest, registry password, Docker configuration, or another public build command. If Docker, Buildx, repository configuration, or registry login is missing, preserve the stable machine error and retry with the same `pnpm openxiangda deploy` command after fixing that prerequisite.
|
|
4
4
|
|
|
5
|
-
Use `openxiangda status` and `openxiangda logs` without an ID for the most recent run, or pass an explicit run ID.
|
|
5
|
+
Use `pnpm openxiangda status` and `pnpm openxiangda logs` without an ID for the most recent run, or pass an explicit run ID.
|
|
6
6
|
|
|
7
7
|
For the AI-native MCP entrypoint, `build_app` and `deployment_plan` are explicitly unsealed previews. After the user authorizes deployment, call `deploy_app` without any image coordinate; it owns the same automatic Buildx, push, digest and sealing path as the CLI.
|
|
8
8
|
|
|
9
9
|
Applications with Native Data Resources automatically require `data.native-golden-crud`. If deployment returns `OPENXIANGDA_REQUIRED_CAPABILITY_UNAVAILABLE`, preserve the remediation to upgrade the platform and retry the same deploy command. Never remove the requirement, edit the AppPackage, fall back to RoleSession, or create Function-based CRUD.
|
|
10
10
|
|
|
11
|
-
After a successful test run, deploy the exact same version with `openxiangda deploy --environment production --from <test-deployment-id>`. Roll back with `openxiangda rollback --environment production --to <app-version-id>`. The platform owns durable deployment state.
|
|
11
|
+
After a successful test run, deploy the exact same version with `pnpm openxiangda deploy --environment production --from <test-deployment-id>`. Roll back with `pnpm openxiangda rollback --environment production --to <app-version-id>`. The platform owns durable deployment state.
|
|
@@ -2,4 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Use the official Vite + React Router + Refine Core + Ant Design template. Route all CRUD through the replaceable Data API adapter under `/service`; do not add per-resource function wrappers.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Generated desktop lists already own row selection, atomic batch update/delete,
|
|
6
|
+
CSV/XLS/XLSX preview import, export, filters, column settings and density. Keep
|
|
7
|
+
imports at 100 rows per transaction, use exact declared labels or field codes,
|
|
8
|
+
and leave attachment values to the platform managed-file component.
|
|
9
|
+
|
|
10
|
+
Read the current user, role union and capabilities from the platform bootstrap contract. Use capabilities and field access only to present or disable UI. Strip unauthorized fields from create and update payloads; never treat a disabled input as server authorization. Verify with `pnpm openxiangda check`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# OpenXiangda 2.0 Application Agent Contract
|
|
2
|
+
|
|
3
|
+
- Use only the workspace-pinned CLI: `pnpm openxiangda <command>`. Never invoke a bare global `openxiangda` inside a 2.0 task.
|
|
4
|
+
- Use Vite, React Router, Refine Core and Ant Design. Do not add Umi, ProComponents or another admin shell.
|
|
5
|
+
- Declare each resource once in `openxiangda.config.ts`. Resource codes are lower kebab-case. The same declaration owns storage, Surface metadata, permissions and generated AI Schema.
|
|
6
|
+
- 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.
|
|
7
|
+
- Add NestJS only for a named business action that needs a cross-resource transaction, an invariant or an external side effect.
|
|
8
|
+
- A NestJS backend declares only `enabled`, `isolation: 'shared' | 'dedicated'` and `resourceProfile: 'light' | 'standard'`. Never put raw Kubernetes resources, replicas, ports or environment maps in application metadata; the platform owns capacity and scaling.
|
|
9
|
+
- Use the current logged-in user and the union of application roles. Do not select RoleSession, persist platform Token or implement a second authorization path.
|
|
10
|
+
- Declare restricted field read, create and update permissions explicitly. There is no `write` fallback; generated update permission is denied unless explicitly granted.
|
|
11
|
+
- Desktop and mobile pages share values, validation and authorization, but use separate renderers. Members, departments, resources and attachments use platform-owned selectors and stable IDs.
|
|
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
|
+
- 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
|
+
- 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.
|