openxiangda 1.0.174 → 1.0.176
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 +35 -2
- package/lib/cli.js +1118 -98
- package/lib/content-cache.js +97 -0
- package/lib/dependency-capsule.js +246 -0
- package/lib/integration-bundle.js +204 -0
- package/lib/policy.js +97 -0
- package/lib/release-explain.js +75 -0
- package/lib/release-plan.js +65 -2
- package/lib/sdd.js +163 -13
- package/lib/task-status.js +267 -0
- package/lib/worktree-owner.js +7 -1
- package/openxiangda-skills/SKILL.md +3 -2
- package/openxiangda-skills/skills/openxiangda-core/SKILL.md +2 -2
- package/package.json +19 -3
- package/policy/openxiangda-policy.json +51 -0
- package/templates/openxiangda-react-spa/AGENTS.md +2 -1
- package/templates/openxiangda-react-spa/app-workspace.config.ts +1 -0
- package/templates/sy-lowcode-app-workspace/AGENTS.md +2 -1
- package/templates/sy-lowcode-app-workspace/app-workspace.config.ts +1 -0
- package/templates/sy-lowcode-app-workspace/src/types/app-workspace.types.ts +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- OpenXiangda-Policy-Version: 3 -->
|
|
1
2
|
# OpenXiangda
|
|
2
3
|
|
|
3
4
|
OpenXiangda is a lightweight CLI and skill package for private low-code platforms.
|
|
@@ -37,12 +38,17 @@ openxiangda sdd context --change add-customer-page --changed --json
|
|
|
37
38
|
openxiangda sdd propose add-customer-page --pages customer --runtime
|
|
38
39
|
openxiangda sdd approve add-customer-page --summary "用户确认"
|
|
39
40
|
openxiangda sdd verify add-customer-page --changed --stage implementation --profile dev
|
|
41
|
+
openxiangda sdd ready add-customer-page --profile dev
|
|
42
|
+
openxiangda task status --change add-customer-page
|
|
40
43
|
openxiangda resource validate function --only customer_get,customer_save --profile dev
|
|
41
44
|
openxiangda resource plan function --only customer_get,customer_save --profile dev
|
|
42
45
|
# merge/push approved task commits to main, then create and push one release bundle
|
|
43
46
|
openxiangda sdd bundle mainline-release --changes add-customer-page,fix-customer-api
|
|
44
47
|
# verify, wait for the lease, stage exact children, atomically finalize, and release
|
|
45
48
|
openxiangda release publish --change mainline-release --profile dev
|
|
49
|
+
openxiangda release status --change mainline-release --watch
|
|
50
|
+
openxiangda release explain --change mainline-release --profile dev
|
|
51
|
+
openxiangda policy check
|
|
46
52
|
openxiangda resource explain public-access --json
|
|
47
53
|
openxiangda inspect app --profile dev --json
|
|
48
54
|
openxiangda app snapshot APP_XXXX --profile dev --json
|
|
@@ -58,6 +64,33 @@ Parallel tasks develop and test in isolated worktrees, but feature worktrees do
|
|
|
58
64
|
|
|
59
65
|
Because promotion starts from an already-pushed authoritative mainline commit, `openxiangda release integration-status --profile <name>` should pass immediately after activation. Run it and `release end`; there is no post-release merge step.
|
|
60
66
|
|
|
67
|
+
`openxiangda task status --change <id>` is the compact, read-only answer to
|
|
68
|
+
“现在到哪一步”:it combines SDD、TaskResult、IntegrationBundle、execution
|
|
69
|
+
journal、lease 和 post-commit outbox,输出进度、ETA、是否已经发生平台写入、
|
|
70
|
+
当前阻塞层和下一条动作。`release status --watch` only polls those read APIs; it
|
|
71
|
+
does not renew leases, retry writes, or change release state. A successful
|
|
72
|
+
`sdd ready` releases the worktree owner only when the current thread/change owns
|
|
73
|
+
that exact record; stale owners expire after the canonical two-hour TTL.
|
|
74
|
+
|
|
75
|
+
Workflow changes participate through an immutable WorkflowRelease child. Generic
|
|
76
|
+
resources that do not yet have an immutable staged/versioned platform model are
|
|
77
|
+
rejected by the unified atomic release before any live write. Use their explicit
|
|
78
|
+
direct maintenance commands only when a reviewed non-atomic operation is intended;
|
|
79
|
+
OpenXiangda never silently falls back from `--stage-only` or Root App release to
|
|
80
|
+
direct publishing.
|
|
81
|
+
|
|
82
|
+
The canonical engineering rules are machine-readable:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
openxiangda policy show --json
|
|
86
|
+
openxiangda policy check
|
|
87
|
+
openxiangda policy render
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`policy check` detects drift in installed skills, workspace templates, and AI
|
|
91
|
+
entrypoints. Generated documents carry `OpenXiangda-Policy-Version`; edit the
|
|
92
|
+
canonical policy first instead of independently changing duplicate instructions.
|
|
93
|
+
|
|
61
94
|
Source-triggered Function and Automation publishing is source-only by default. Backend Release v2 can mix create, source-only update, and manifest replacement update in one immutable child; a stale target therefore causes zero resource writes instead of failing halfway through 88 Functions and 11 Automations. `--stage-only` stops after verification, reports all handled selectors, and never falls back to direct Function/Automation writes when the platform is missing or incompatible. The release preserves online `resourceBindings`, input/output contracts, descriptive metadata, trigger/view configuration, and enabled/published state, and planned noops do not advance resource versions or timestamps. To intentionally make a complete local manifest replace the online definition, select exact codes and opt in explicitly with `--replace-manifest --reason "<why this replacement is safe>"`; `--sdd-bypass` does not widen that scope. Standard workspaces use the CLI-bundled scoped builder without spawning workspace `pnpm`, and `source_lineage_v1` compares authored source/dependencies independently from generated bundle bytes.
|
|
62
95
|
|
|
63
96
|
React SPA templates include stable Vite manual chunk grouping for React, antd, ECharts, editor dependencies, and OpenXiangda runtime/component entrypoints. The SDK keeps large UI dependencies such as `antd-mobile` and `dayjs` external so the application bundler can split them by route. Applications should import from public package entrypoints such as `openxiangda`, `openxiangda/runtime`, and `openxiangda/runtime/react`; do not import `openxiangda/packages/sdk/dist/...` internals to chase bundle size.
|
|
@@ -92,9 +125,9 @@ Domestic npm mirrors may lag and return an older OpenXiangda version. `openxiang
|
|
|
92
125
|
|
|
93
126
|
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.
|
|
94
127
|
|
|
95
|
-
Risk is tiered. Read-only/docs/tests are L0. Narrow reversible fixes are L1 and use `sdd quick`; L2/L3 retain explicit approval and exact structured coverage. SDD is
|
|
128
|
+
Risk is tiered. Read-only/docs/tests are L0. Narrow reversible fixes are L1 and use `sdd quick`; L2/L3 retain explicit approval and exact structured coverage. SDD is structured-first by default: `change.json`, `coverage.json`, and `release.json` are authoritative, while proposal/design/tasks/evidence/spec prose is generated only by `openxiangda sdd render <change>` or `documentationMode: 'full'`. Workspaces that intentionally require prose completion may set `strictDocumentation: true`. Actual argv, exact scope, mainline identity, lease, CAS, destructive operations, Secrets, and Root App atomic activation remain hard gates.
|
|
96
129
|
|
|
97
|
-
L1 quick records are generated in a compact form and should not be expanded into design essays. Mainline bundles may keep `<profile>` in reviewed command templates; `release publish --profile <name>` binds the real profile to actual argv without rewriting tracked SDD. React SPA page codes remain logical coverage and activate through one Runtime child. `release app-head`
|
|
130
|
+
L1 quick records are generated in a compact form and should not be expanded into design essays. Mainline bundles may keep `<profile>` in reviewed command templates; `release publish --profile <name>` binds the real profile to actual argv without rewriting tracked SDD. React SPA page codes remain logical coverage and activate through one Runtime child. `release app-head` and `runtime releases` return compact summaries by default; add `--full` for the complete manifest.
|
|
98
131
|
|
|
99
132
|
Every concurrent task uses its own Git worktree/branch and development change. The mainline release coordinator bundles selected approved changes after merge; dependency impact outside the approved scope is reported as a warning rather than silently widening a small release. Live commands still require canonical exact selectors, and app-wide/delete operations need explicit authority.
|
|
100
133
|
|