@stackonward/cli 1.6.0 → 1.8.0
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/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/resources/components/nuxt/site-source/app/assets/css/site-shell.css +14 -2
- package/dist/resources/components/nuxt/site-source/app/components/content/CallToAction.vue +3 -1
- package/dist/resources/components/nuxt/site-source/app/components/content/Faq.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/content/Reviews.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/components/steps/Showcase.vue +2 -2
- package/dist/resources/components/nuxt/site-source/app/composables/useWebPush.ts +4 -0
- package/dist/resources/components/nuxt/site-source/app/plugins/web-push.ts +52 -0
- package/dist/resources/components/nuxt/site-source/app/theme/button.ts +18 -22
- package/dist/resources/components/nuxt/site-source/app/theme/index.ts +24 -0
- package/dist/resources/components/nuxt/site-source/app/theme/input.ts +32 -17
- package/dist/resources/components/nuxt/site-source/app/theme/modal.ts +1 -1
- package/dist/resources/components/nuxt/site-source/app/theme/select.ts +62 -18
- package/dist/resources/components/nuxt/site-source/app/theme/textarea.ts +73 -1
- package/dist/resources/components/nuxt/site-source/app/web-push/worker.ts +8 -0
- package/dist/resources/components/registry.json +11 -1
- package/dist/resources/registry.json +15 -3
- package/dist/resources/templates/base/{.claude → .codex}/docs/architecture-template.md +1 -1
- package/dist/resources/templates/base/{.claude → .codex}/docs/architecture.md +1 -1
- package/dist/resources/templates/base/{.claude → .codex}/docs/index.md +3 -3
- package/dist/resources/templates/base/{.claude → .codex}/docs/verification.md +1 -1
- package/dist/resources/templates/base/AGENTS.md +24 -24
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/api-design.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/architecture-template.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/check-list.md +3 -3
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/database.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/error-handling.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/index.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/logging.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/mediagen-provider-onboarding-sop.md +2 -2
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/mediagen-provider-quick-reference.md +1 -1
- package/dist/resources/templates/go-backend/{.claude → .codex}/docs/module-standards.md +1 -1
- package/dist/resources/templates/go-backend/.dockerignore +1 -2
- package/dist/resources/templates/go-backend/AGENTS.md +19 -19
- package/dist/resources/templates/go-backend/README.md +5 -1
- package/dist/resources/templates/go-backend/deployments/onex/product-onboarding.example.json +201 -0
- package/dist/resources/templates/go-backend/docs/onex-notifications.md +85 -0
- package/dist/resources/templates/go-backend/docs/openapi-provenance.json +1 -1
- package/dist/resources/templates/go-backend/docs/runtime-provenance.json +23 -2
- package/dist/resources/templates/go-backend/docs/source-provenance.json +124 -6
- package/dist/resources/templates/go-backend/docs/standards-provenance.json +30 -30
- package/dist/resources/templates/go-backend/internal/common/middleware/cors.go +1 -0
- package/dist/resources/templates/go-backend/internal/common/middleware/middleware_test.go +1 -0
- package/dist/resources/templates/go-backend/internal/core/httpclient/safe_post.go +28 -0
- package/dist/resources/templates/go-backend/internal/core/httpclient/safe_post_test.go +56 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/client.go +453 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/client_test.go +772 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/codec.go +33 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/error.go +146 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/error_notification_test.go +29 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/notification/client.go +132 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/notification/client_test.go +222 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/notification/contracts.go +219 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/resilience.go +23 -0
- package/dist/resources/templates/go-backend/internal/integrations/onex/v1/transport_policy.go +96 -0
- package/dist/resources/templates/go-backend/internal/products/README.md +1 -1
- package/dist/resources/templates/go-backend/internal/sharedevents/README.md +1 -1
- package/dist/resources/templates/go-backend/scripts/check-openapi-clean-deletion.sh +3 -3
- package/dist/resources/templates/mcp-server/.prettierignore +1 -0
- package/dist/resources/templates/nuxt/{.claude → .codex}/docs/stack.md +17 -1
- package/dist/resources/templates/nuxt/.dockerignore +1 -1
- package/dist/resources/templates/nuxt/.env.example +6 -0
- package/dist/resources/templates/nuxt/.prettierignore +2 -1
- package/dist/resources/templates/nuxt/DESIGN.md +55 -10
- package/dist/resources/templates/nuxt/README.md +8 -0
- package/dist/resources/templates/nuxt/nuxt.config.ts +13 -1
- package/dist/resources/templates/nuxt/package.json +4 -2
- package/package.json +1 -1
- package/dist/resources/templates/base/CLAUDE.md +0 -437
- package/dist/resources/templates/go-backend/CLAUDE.md +0 -1139
- /package/dist/resources/templates/base/{.claude → .codex}/docs/security-lifecycle.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/e2e-standards.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/event-runtime-boundary.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/identifier-contract.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/openapi-contract.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/payment-gateway-onboarding.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/platform-boundary.md +0 -0
- /package/dist/resources/templates/go-backend/{.claude → .codex}/docs/quality-gates.md +0 -0
- /package/dist/resources/templates/mcp-server/{.claude → .codex}/docs/stack.md +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"environment": "development",
|
|
4
|
+
"product": {
|
|
5
|
+
"code": "example_product",
|
|
6
|
+
"name": "Example Product",
|
|
7
|
+
"product_kind": "content_ai",
|
|
8
|
+
"default_currency": "USD",
|
|
9
|
+
"supported_currencies": [
|
|
10
|
+
"USD"
|
|
11
|
+
],
|
|
12
|
+
"reason": "Register the Example Product product and its isolated service identities"
|
|
13
|
+
},
|
|
14
|
+
"applications": [
|
|
15
|
+
{
|
|
16
|
+
"application_code": "consumer_web",
|
|
17
|
+
"display_name": "Example Product Web",
|
|
18
|
+
"client_kind": "web",
|
|
19
|
+
"platform": "web",
|
|
20
|
+
"identifiers": [
|
|
21
|
+
{
|
|
22
|
+
"namespace": "web.origin",
|
|
23
|
+
"identifier_value": "http://127.0.0.1:3000",
|
|
24
|
+
"is_primary": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"identity": {
|
|
30
|
+
"clients": {
|
|
31
|
+
"example_product-web": {
|
|
32
|
+
"application_code": "consumer_web",
|
|
33
|
+
"allowed_principal_types": [
|
|
34
|
+
"user"
|
|
35
|
+
],
|
|
36
|
+
"registration_source": "example_product_web",
|
|
37
|
+
"oidc": {
|
|
38
|
+
"display_name": "Example Product",
|
|
39
|
+
"hosted_path_prefix": "/example-product",
|
|
40
|
+
"login_uri": "http://127.0.0.1:3000/auth/sign-in",
|
|
41
|
+
"terms_uri": "https://example.invalid/terms",
|
|
42
|
+
"privacy_uri": "https://example.invalid/privacy",
|
|
43
|
+
"redirect_uris": [
|
|
44
|
+
"http://127.0.0.1:3000/api/auth/callback"
|
|
45
|
+
],
|
|
46
|
+
"post_logout_redirect_uris": [
|
|
47
|
+
"http://127.0.0.1:3000/"
|
|
48
|
+
],
|
|
49
|
+
"token_endpoint_auth_method": "client_secret_basic",
|
|
50
|
+
"scopes": [
|
|
51
|
+
"openid",
|
|
52
|
+
"profile",
|
|
53
|
+
"email",
|
|
54
|
+
"offline_access"
|
|
55
|
+
],
|
|
56
|
+
"client_secret_hash_ref": "example_product-oidc-hash"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"resource": {
|
|
61
|
+
"audience": "urn:onex:resource:example_product",
|
|
62
|
+
"user_scopes": [
|
|
63
|
+
"profile:read"
|
|
64
|
+
],
|
|
65
|
+
"guest_scopes": [
|
|
66
|
+
"profile:read"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"protected_resource": {
|
|
70
|
+
"resource_identifier": "http://127.0.0.1:3000/api",
|
|
71
|
+
"audience": "urn:onex:resource:example_product",
|
|
72
|
+
"resource_name": "Example Product API"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"enrollment": {
|
|
76
|
+
"mode": "self_service"
|
|
77
|
+
},
|
|
78
|
+
"workloads": [
|
|
79
|
+
{
|
|
80
|
+
"id": "api",
|
|
81
|
+
"display_name": "Example Product API",
|
|
82
|
+
"credential_ref": "example_product-api-credential",
|
|
83
|
+
"audience": "urn:onex:resource:platform-internal-api",
|
|
84
|
+
"route_scopes": [
|
|
85
|
+
"GET /internal/v1/storage/assets/{storage_asset_ref}",
|
|
86
|
+
"POST /internal/v1/storage/upload-sessions",
|
|
87
|
+
"POST /internal/v1/storage/assets/{storage_asset_ref}/confirmations"
|
|
88
|
+
],
|
|
89
|
+
"denied_route_scope": "POST /internal/v1/storage/assets/{storage_asset_ref}/deletion-commands",
|
|
90
|
+
"statements": [
|
|
91
|
+
{
|
|
92
|
+
"sid": "AssetAccess",
|
|
93
|
+
"effect": "Allow",
|
|
94
|
+
"actions": [
|
|
95
|
+
"system:asset:create",
|
|
96
|
+
"system:asset:read",
|
|
97
|
+
"system:asset:update"
|
|
98
|
+
],
|
|
99
|
+
"resources": [
|
|
100
|
+
"onex:product:example_product:system:asset/*"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "worker",
|
|
107
|
+
"display_name": "Example Product worker",
|
|
108
|
+
"credential_ref": "example_product-worker-credential",
|
|
109
|
+
"audience": "urn:onex:resource:platform-internal-api",
|
|
110
|
+
"route_scopes": [
|
|
111
|
+
"POST /internal/v1/mediagen/runtime-executions",
|
|
112
|
+
"GET /internal/v1/mediagen/runtime-executions/{id}"
|
|
113
|
+
],
|
|
114
|
+
"denied_route_scope": "POST /internal/v1/storage/upload-sessions",
|
|
115
|
+
"statements": [
|
|
116
|
+
{
|
|
117
|
+
"sid": "GenerationExecution",
|
|
118
|
+
"effect": "Allow",
|
|
119
|
+
"actions": [
|
|
120
|
+
"ai:runtime-execution:run",
|
|
121
|
+
"ai:runtime-execution:read"
|
|
122
|
+
],
|
|
123
|
+
"resources": [
|
|
124
|
+
"onex:product:example_product:ai:runtime-execution/*"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"capabilities": [],
|
|
131
|
+
"communication": {
|
|
132
|
+
"product_config": {
|
|
133
|
+
"display_name": "Example Product",
|
|
134
|
+
"branding": {},
|
|
135
|
+
"urls": {
|
|
136
|
+
"app_url": "http://127.0.0.1:3000",
|
|
137
|
+
"support_email": "support@example.invalid"
|
|
138
|
+
},
|
|
139
|
+
"is_active": false
|
|
140
|
+
},
|
|
141
|
+
"sender_profiles": [
|
|
142
|
+
{
|
|
143
|
+
"product_code": "example_product",
|
|
144
|
+
"channel": "in_app",
|
|
145
|
+
"profile_code": "default",
|
|
146
|
+
"display_name": "Example Product",
|
|
147
|
+
"purpose": "transactional",
|
|
148
|
+
"reply_policy": "no_reply",
|
|
149
|
+
"in_app_sender_name": "Example Product",
|
|
150
|
+
"activate": false
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"templates": [
|
|
154
|
+
{
|
|
155
|
+
"template_key": "example_product.account.ready",
|
|
156
|
+
"category": "account",
|
|
157
|
+
"purpose": "transactional",
|
|
158
|
+
"name": "Account ready",
|
|
159
|
+
"context_root": "user",
|
|
160
|
+
"default_locale": "en",
|
|
161
|
+
"supported_channels": ["in_app"],
|
|
162
|
+
"sender_profile": "default",
|
|
163
|
+
"reply_policy": "no_reply",
|
|
164
|
+
"lawful_basis": "contract",
|
|
165
|
+
"topic_key": null,
|
|
166
|
+
"draft_content": {
|
|
167
|
+
"channels": {
|
|
168
|
+
"default": {
|
|
169
|
+
"en": {
|
|
170
|
+
"in_app": {
|
|
171
|
+
"title": "Your account is ready",
|
|
172
|
+
"body": "You can now use your account."
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"example_product": {
|
|
177
|
+
"en": {
|
|
178
|
+
"in_app": {
|
|
179
|
+
"title": "Welcome to {{product_name}}",
|
|
180
|
+
"body": "Your account is ready."
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"variable_bindings": [
|
|
186
|
+
{
|
|
187
|
+
"variable_name": "product_name",
|
|
188
|
+
"required": true,
|
|
189
|
+
"owner": "platform",
|
|
190
|
+
"sensitivity": "public"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"publish": false
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"bindings": [],
|
|
198
|
+
"dispatch_policies": [],
|
|
199
|
+
"provider_references": []
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# 可选 OneX 产品与通知配置
|
|
2
|
+
|
|
3
|
+
本模板附带 [OneX 原生接入 profile 示例](../deployments/onex/product-onboarding.example.json),用于已有 OneX 平台上的产品登记和通知配置。它是可编辑输入,不是自动执行步骤;初始化、构建和启动 Go 项目不会调用平台或发送消息。执行器仍由 OneX 的 `deployments/scripts/products/onboard.py` 唯一拥有,本项目不复制 runner。
|
|
4
|
+
|
|
5
|
+
## 能力边界
|
|
6
|
+
|
|
7
|
+
示例包含产品、Web 应用、Identity client、独立 API/Worker workload,以及可选 `communication`:通知产品品牌、站内发送身份和一个产品独有草稿。`product_config.is_active`、sender 的 `activate` 和模板的 `publish` 均为 `false`;没有 provider、绑定、分派策略或营销旅程,不会自动发布、启用或补发。
|
|
8
|
+
|
|
9
|
+
Go 模板的 `internal/integrations/onex/v1` 已包含通用认证传输,`notification` 子包提供原生通知的类型化 HTTP 客户端与测试;不包含产品事件生产者、收件箱 BFF、用户映射或客户端接收流程。完成配置或构造客户端不代表这些业务链路已装配或已验收;`NewSafePostClient` 仍是独立的通用安全出站传输,不替代通知协议客户端。
|
|
10
|
+
|
|
11
|
+
## 产品服务装配
|
|
12
|
+
|
|
13
|
+
产品 composition owner 向 `v1.NewClient(httpClient, signer, Config)` 注入既有 HTTP 客户端、面向真实目标的 `internalservice.Signer`、产品码、以 `/internal/v1` 结尾的服务地址和有界超时,再通过 `notification.NewClient(transport, timeout)` 借用该传输。构造过程不访问网络;模板没有自动注册此客户端的 Wire provider、业务路由或后台任务。服务身份与精确 IAM 权限须来自产品登记,不能把 App 会话令牌或其他产品的身份当作 signer。
|
|
14
|
+
|
|
15
|
+
| 协议能力 | 已分发方法 |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| 收件箱与未读 | `QueryInbox`、`GetMessage`、`CountUnread` |
|
|
18
|
+
| 已读确认 | `AcknowledgeMessages`、`AcknowledgeScope` |
|
|
19
|
+
| 设备生命周期 | `RegisterDevice`、`RevokeDevice`、`ListDevices` |
|
|
20
|
+
| 推送偏好 | `GetPreferences`、`PutPreferences` |
|
|
21
|
+
| 显式诊断 | `SendTestPush` |
|
|
22
|
+
| 产品事实与失效 | `StartDispatch`、`AdvanceSource` |
|
|
23
|
+
|
|
24
|
+
产品应从可信服务端上下文提供用户和会话,按实际已查看的 `message_no`/`source_version` 确认消息;范围确认是独立显式操作。设备注销只携带安装能力,不要求保留退出账号的会话。分派输入由产品冻结来源事件、目标和变量,不在协议层生成事件、选择模板或解读导航地址;入队结果不等于设备收到。
|
|
25
|
+
|
|
26
|
+
传输保留严格响应解码、无重定向、稳定错误和 GET 有界重试。POST/PUT 不自动重试;结果未知时由产品持久流程携带原事实与原命令键恢复,不能生成新键重发。设备版本冲突只返回受控的 `CurrentRegistrationRevision`。产品负责授权、输入校验和生命周期,不能把 wire DTO 直接公开为 BFF 合同。
|
|
27
|
+
|
|
28
|
+
## 填写输入
|
|
29
|
+
|
|
30
|
+
1. 将示例另存为产品拥有的公开 profile,替换 `example_product`、名称、应用标识、环境、真实 origin、法务和支持地址。产品码和项目目录名不是同一标识,不自动转换 `{{projectName}}`。`example.invalid` 不能用于上线。
|
|
31
|
+
2. 按实际产品选择 Identity client、workload、精确 route scope 和产品资源权限。示例里的存储/生成权限只演示原生 IAM 结构,并不授权通知调用;不需要的声明不应带入首次登记。
|
|
32
|
+
3. 在 OneX 的 [执行器说明](https://onedev.yhy.gd.cn/platform/onex/~files/main/deployments/scripts/products/README.md)中按「产品声明与登记连接」准备私有 connection:目录 `0700`、文件 `0600`、绝对路径、无符号链接。Admin 凭据、OIDC hash、独立 workload 秘密输出和 state root 均留在该私有位置;不要写入 profile、Git、App 或命令行。运行配置指向目标真实配置,不能用空文件代替。
|
|
33
|
+
4. 产品事件、收件人、用途、变量合同和接收端存在后,才声明相应 binding/policy 和精确权限。邮件、APNs/FCM、Web Push 的 provider 配置来自原生 schema 与私有引用,不从其他产品复制。营销同意按产品与目的隔离,系统 Push 许可不替代营销同意。
|
|
34
|
+
|
|
35
|
+
`{{product_name}}` 是通知运行时变量,保留原样;它由 Communication 的 `owner=platform` 合同提供,不是项目初始化变量。模板保留 `channels.default` 和产品块,产品自行维护品牌与文案。
|
|
36
|
+
|
|
37
|
+
## 使用既有执行器
|
|
38
|
+
|
|
39
|
+
以下路径均由操作者替换为实际绝对路径。`ONEX_ROOT` 指向具备可选 `communication` 合同的 OneX checkout;使用同一执行器版本完成计划和恢复。示例只演示调用,不要求立即执行线上写入。
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
ONEX_ROOT=/absolute/onex
|
|
43
|
+
PRODUCT_ROOT=/absolute/product/backend
|
|
44
|
+
PROFILE=/absolute/product/backend/deployments/onex/product.json
|
|
45
|
+
CONNECTION=/private/onboarding/connection.json
|
|
46
|
+
PLAN=/private/onboarding/initial.plan.json
|
|
47
|
+
|
|
48
|
+
# 纯本地校验,无需连接、登录或网络写入。
|
|
49
|
+
python3 -B "$ONEX_ROOT/deployments/scripts/products/onboard.py" validate \
|
|
50
|
+
--profile "$PRODUCT_ROOT/deployments/onex/product-onboarding.example.json"
|
|
51
|
+
python3 -B "$ONEX_ROOT/deployments/scripts/products/onboard.py" validate --profile "$PROFILE"
|
|
52
|
+
|
|
53
|
+
# 首次登记:读回目标后生成受保护计划,随后按确认的目标执行。
|
|
54
|
+
python3 -B "$ONEX_ROOT/deployments/scripts/products/onboard.py" plan --scope all \
|
|
55
|
+
--profile "$PROFILE" --connection "$CONNECTION" --plan "$PLAN"
|
|
56
|
+
python3 -B "$ONEX_ROOT/deployments/scripts/products/onboard.py" apply --scope all \
|
|
57
|
+
--profile "$PROFILE" --connection "$CONNECTION" --plan "$PLAN"
|
|
58
|
+
python3 -B "$ONEX_ROOT/deployments/scripts/products/onboard.py" readback --scope all \
|
|
59
|
+
--profile "$PROFILE" --connection "$CONNECTION"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`plan` 访问原生管理 owner 并保存私有计划,`apply` 才配置目标资源。先核对 plan 中的产品、环境、动作、激活目标和冲突;配置命令不授予当前操作者额外权限。
|
|
63
|
+
|
|
64
|
+
已有登记产品只更新通知时,对同一完整 profile 使用 `--scope communication`,选择一个新的通知计划路径,并在 plan/apply/readback 中保持该 scope;保留原 state root 和受管声明。此 scope 不写 Identity runtime,也不建立 SSH。不要用它代替首次 Product/Application 登记。
|
|
65
|
+
|
|
66
|
+
部分成功或未知结果时,用**原 profile、连接、scope、计划和 state root**恢复:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python3 -B "$ONEX_ROOT/deployments/scripts/products/onboard.py" recover --scope all \
|
|
70
|
+
--profile "$PROFILE" --connection "$CONNECTION" --plan "$PLAN"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
不要编辑计划、删除 journal 或换凭据路径来绕过冲突。内容声明改变后另建计划;已完成对象由原生 owner 读回确认。模板发布、sender/产品启用和真实发送分别是显式动作,不因配置成功自动获得授权。
|
|
74
|
+
|
|
75
|
+
## 配置之后
|
|
76
|
+
|
|
77
|
+
由产品完成事务事件、来源版本失效、受限服务调用、用户资源授权和接收端生命周期;由部署 owner 加载运行配置。再单独验证真实用户的投递、点击、退出/换号和撤销。保存文件、`readback` 一致、provider accepted 与用户实际看到消息是不同证据;本示例不承诺任何一个真实发送结果。
|
|
78
|
+
|
|
79
|
+
原生入口和操作依据:
|
|
80
|
+
|
|
81
|
+
- [通知能力与责任](https://onedev.yhy.gd.cn/platform/onex/~files/main/.codex/skills/product-project-onboarding/references/capabilities/notification/overview.md)
|
|
82
|
+
- [接入执行边界](https://onedev.yhy.gd.cn/platform/onex/~files/main/.codex/skills/product-project-onboarding/references/execution.md)
|
|
83
|
+
- [OneX 执行器与私有连接格式](https://onedev.yhy.gd.cn/platform/onex/~files/main/deployments/scripts/products/README.md)
|
|
84
|
+
|
|
85
|
+
以上链接需要相应源码仓库权限;本地同一路径以 `ONEX_ROOT` 为根。执行前以选定 OneX 版本的原生合同为准,不将本说明当作自动注册四个渠道的保证。
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
"target": "scripts/check-openapi-clean-deletion.sh",
|
|
366
|
-
"target_template_sha256": "
|
|
366
|
+
"target_template_sha256": "9a4db713cedf52129d9479b491c91cd72a4835b7e06e1240457af80467521061",
|
|
367
367
|
"source": "backend/scripts/check-openapi-clean-deletion.sh",
|
|
368
368
|
"source_sha256": "88dca649e4600fb09d2859b409233c7f2a27d3f7d97429c19c43bcbed79db835",
|
|
369
369
|
"adaptation": "Limit scan to backend-owned paths, use module-independent import matching, and fail on scanner errors."
|
|
@@ -2,11 +2,32 @@
|
|
|
2
2
|
"source_repository": "https://onedev.yhy.gd.cn/platform/onex",
|
|
3
3
|
"source_commit": "4fd93f675a6579773d16ab8272395cab8c761670",
|
|
4
4
|
"hash_scope": {
|
|
5
|
-
"source_sha256": "Exact source file bytes at source_commit.",
|
|
5
|
+
"source_sha256": "Exact source file bytes at the entry source_commit when present, otherwise the manifest source_commit. Entries marked source_state=working-tree record exact observed bytes over source_base_commit, not committed source bytes.",
|
|
6
6
|
"target_template_sha256": "Exact unrendered template bytes; product generation substitutes template variables.",
|
|
7
|
-
"coverage": "Runtime composition, configuration, deployment, migrations and runtime verification. Entries with empty origins are product-template-owned verification."
|
|
7
|
+
"coverage": "Runtime composition, configuration, deployment, migrations, optional onboarding inputs and runtime verification. Entries with empty origins are product-template-owned documentation or verification."
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
+
{
|
|
11
|
+
"target": "deployments/onex/product-onboarding.example.json",
|
|
12
|
+
"target_template_sha256": "843c73acb416ae133783548aa3c8290e4b3206ea1693ec73160833c5698697f0",
|
|
13
|
+
"transformation": "Exact optional native onboarding example. Keep explicit example identities and runtime template variables; no project-name inference, credentials, runner, automatic activation, publication or sends.",
|
|
14
|
+
"source": "deployments/config/products/product-onboarding.example.json",
|
|
15
|
+
"source_state": "working-tree",
|
|
16
|
+
"source_base_commit": "320d9600417e851b6f30dee0c1dbdca2fd5829df",
|
|
17
|
+
"source_sha256": "843c73acb416ae133783548aa3c8290e4b3206ea1693ec73160833c5698697f0"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"target": "docs/onex-notifications.md",
|
|
21
|
+
"target_template_sha256": "19a63b4e6dabd82f6cf825e4653aad4b01a14ecf0c95b354b31b5e63e0d0099b",
|
|
22
|
+
"transformation": "Template-owned opt-in instructions delegate to the existing OneX onboarding executor and document explicit generic wire client composition separately from product event, BFF and client implementation.",
|
|
23
|
+
"origins": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"target": "README.md",
|
|
27
|
+
"target_template_sha256": "4e68c39257ef22d4ea41a76705a053322b421c92242b28616a7ab716d08c1d1d",
|
|
28
|
+
"transformation": "Template-owned product foundation guide and explicit opt-in link to the native onboarding example; no runtime activation is performed by generation.",
|
|
29
|
+
"origins": []
|
|
30
|
+
},
|
|
10
31
|
{
|
|
11
32
|
"target": "cmd/internal/runtime/resources.go",
|
|
12
33
|
"target_template_sha256": "7d68e3092430713a9f4f44faa347b0091f4520d47314d37f6998571680b5a0e2",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"source_repository": "https://onedev.yhy.gd.cn/platform/onex",
|
|
3
3
|
"source_commit": "4fd93f675a6579773d16ab8272395cab8c761670",
|
|
4
4
|
"hash_scope": {
|
|
5
|
-
"source_sha256": "SHA-256 of exact source file bytes under source_repository at source_commit; source paths include backend/.",
|
|
5
|
+
"source_sha256": "SHA-256 of exact source file bytes under the entry source_repository when present, otherwise the manifest source_repository, at the entry source_commit when present, otherwise the manifest source_commit. Entries marked source_state=working-tree record observed bytes over source_base_commit, not committed source bytes; source paths include backend/.",
|
|
6
6
|
"target_template_sha256": "SHA-256 of exact unrendered template file bytes, including {{module}} tokens; target paths relative to go-backend template root.",
|
|
7
|
-
"coverage": "Core/common foundation, IAM consumer protocol value closure, public apierror, Go module dependencies. Concrete platform bindings are
|
|
7
|
+
"coverage": "Core/common foundation, IAM consumer protocol value closure, public apierror, Go module dependencies and generic OneX notification wire transport. Concrete platform bindings and product event/BFF/session orchestration are excluded. Runtime/configuration/deployment files have separate ownership."
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
@@ -2620,9 +2620,10 @@
|
|
|
2620
2620
|
{
|
|
2621
2621
|
"source": "backend/internal/common/middleware/cors.go",
|
|
2622
2622
|
"target": "internal/common/middleware/cors.go",
|
|
2623
|
+
"source_commit": "320d9600417e851b6f30dee0c1dbdca2fd5829df",
|
|
2623
2624
|
"transformation": "module/import namespace only",
|
|
2624
|
-
"source_sha256": "
|
|
2625
|
-
"target_template_sha256": "
|
|
2625
|
+
"source_sha256": "3c1e037fcd86f1ae3d6d1c514857068155d158a3199f4229c7716e1dab760c67",
|
|
2626
|
+
"target_template_sha256": "b61e85daab20aa875bf9058d7521773b96bad857ad14da8412ec8df6cfef20ba"
|
|
2626
2627
|
},
|
|
2627
2628
|
{
|
|
2628
2629
|
"source": "backend/internal/common/middleware/event_context.go",
|
|
@@ -2725,9 +2726,10 @@
|
|
|
2725
2726
|
{
|
|
2726
2727
|
"source": "backend/internal/common/middleware/middleware_test.go",
|
|
2727
2728
|
"target": "internal/common/middleware/middleware_test.go",
|
|
2729
|
+
"source_commit": "320d9600417e851b6f30dee0c1dbdca2fd5829df",
|
|
2728
2730
|
"transformation": "module/import namespace only",
|
|
2729
|
-
"source_sha256": "
|
|
2730
|
-
"target_template_sha256": "
|
|
2731
|
+
"source_sha256": "1f90dd0fdfd8ce4c24c95c4b530b84920208b35a1fecc1da324d10fe7ba38655",
|
|
2732
|
+
"target_template_sha256": "2faebb32e4bd7fa6be02ffe69412ef84b221b6a4842c94479fdff1f20687c5d4"
|
|
2731
2733
|
},
|
|
2732
2734
|
{
|
|
2733
2735
|
"source": "backend/internal/common/middleware/principal_context.go",
|
|
@@ -3574,6 +3576,122 @@
|
|
|
3574
3576
|
"target": "internal/core/cache/redis_test.go",
|
|
3575
3577
|
"target_template_sha256": "21be5f1685dd2b4a2a69e9b69971784e8c109b0e48220d960e549ccd1fff9864",
|
|
3576
3578
|
"transformation": "added regression for source constructor failure connection cleanup"
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
"source": "backend/internal/core/httpclient/safe_post.go",
|
|
3582
|
+
"target": "internal/core/httpclient/safe_post.go",
|
|
3583
|
+
"source_commit": "320d9600417e851b6f30dee0c1dbdca2fd5829df",
|
|
3584
|
+
"transformation": "Exact source; reuse retained safe download DNS validation, pinned connection and TLS helpers for HTTPS POST without redirects or automatic retries.",
|
|
3585
|
+
"source_sha256": "ffa3a83b30e23242290409a1b258f121fbba768aa597820d72ec62ceb26d3331",
|
|
3586
|
+
"target_template_sha256": "ffa3a83b30e23242290409a1b258f121fbba768aa597820d72ec62ceb26d3331"
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
"source": "backend/internal/core/httpclient/safe_post_test.go",
|
|
3590
|
+
"target": "internal/core/httpclient/safe_post_test.go",
|
|
3591
|
+
"source_commit": "320d9600417e851b6f30dee0c1dbdca2fd5829df",
|
|
3592
|
+
"transformation": "Exact source tests; retain pinned public destination, body preservation, no redirect, unsafe DNS and HTTPS-only regressions.",
|
|
3593
|
+
"source_sha256": "c8683bbe1e2a7ffd4a707683cd9c72f1dd4e63caa2e536629493cca50c95dda3",
|
|
3594
|
+
"target_template_sha256": "c8683bbe1e2a7ffd4a707683cd9c72f1dd4e63caa2e536629493cca50c95dda3"
|
|
3595
|
+
},
|
|
3596
|
+
{
|
|
3597
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3598
|
+
"source_state": "working-tree",
|
|
3599
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3600
|
+
"source": "backend/internal/integrations/onex/v1/client.go",
|
|
3601
|
+
"target": "internal/integrations/onex/v1/client.go",
|
|
3602
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3603
|
+
"source_sha256": "6412bf093e0da191133b19fd297116f44d579949bba4ae038154788b9f0b8934",
|
|
3604
|
+
"target_template_sha256": "ce544b18c56f5ec6cc6add272ac71044c3d4233ba97408bcecae4d07bdc0f683"
|
|
3605
|
+
},
|
|
3606
|
+
{
|
|
3607
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3608
|
+
"source_state": "working-tree",
|
|
3609
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3610
|
+
"source": "backend/internal/integrations/onex/v1/codec.go",
|
|
3611
|
+
"target": "internal/integrations/onex/v1/codec.go",
|
|
3612
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3613
|
+
"source_sha256": "48f8a31bea64d175c394a5f637dd362cdac2405579293b9fc1061a3b7f0395b4",
|
|
3614
|
+
"target_template_sha256": "d8f2188bb9b5ffa7b0ed5fc4ee91804ef17aae85a46bb9d35d1219eb622b567a"
|
|
3615
|
+
},
|
|
3616
|
+
{
|
|
3617
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3618
|
+
"source_state": "working-tree",
|
|
3619
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3620
|
+
"source": "backend/internal/integrations/onex/v1/error.go",
|
|
3621
|
+
"target": "internal/integrations/onex/v1/error.go",
|
|
3622
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3623
|
+
"source_sha256": "70a954eee75dc658d53f51733fef931e946cfdeafe6a44d56ad455f872d973a6",
|
|
3624
|
+
"target_template_sha256": "11c4dc6a3f154bf62238c51ca7da529d94ebbb9b99320eccbb7c78abb277a48b"
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3628
|
+
"source_state": "working-tree",
|
|
3629
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3630
|
+
"source": "backend/internal/integrations/onex/v1/resilience.go",
|
|
3631
|
+
"target": "internal/integrations/onex/v1/resilience.go",
|
|
3632
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3633
|
+
"source_sha256": "db3d5e31d99e48d2ecffd86d935634579e1dd2b57e6db8729f8c1e7b64839746",
|
|
3634
|
+
"target_template_sha256": "db3d5e31d99e48d2ecffd86d935634579e1dd2b57e6db8729f8c1e7b64839746"
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3638
|
+
"source_state": "working-tree",
|
|
3639
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3640
|
+
"source": "backend/internal/integrations/onex/v1/transport_policy.go",
|
|
3641
|
+
"target": "internal/integrations/onex/v1/transport_policy.go",
|
|
3642
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3643
|
+
"source_sha256": "a522fb3e0d7d2d928078967cfe049fefe35627f0a390e46bc45ca1bf712f9167",
|
|
3644
|
+
"target_template_sha256": "a522fb3e0d7d2d928078967cfe049fefe35627f0a390e46bc45ca1bf712f9167"
|
|
3645
|
+
},
|
|
3646
|
+
{
|
|
3647
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3648
|
+
"source_state": "working-tree",
|
|
3649
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3650
|
+
"source": "backend/internal/integrations/onex/v1/client_test.go",
|
|
3651
|
+
"target": "internal/integrations/onex/v1/client_test.go",
|
|
3652
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3653
|
+
"source_sha256": "675472bbc44efa7a83b2027a32e1c846319d8dbec7a99304c47de961b6ec74ff",
|
|
3654
|
+
"target_template_sha256": "503399109f58423a778c973e2e5cbda0b0208f521b0b11075f9ad4d56b7dd2ec"
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3658
|
+
"source_state": "working-tree",
|
|
3659
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3660
|
+
"source": "backend/internal/integrations/onex/v1/error_notification_test.go",
|
|
3661
|
+
"target": "internal/integrations/onex/v1/error_notification_test.go",
|
|
3662
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3663
|
+
"source_sha256": "f4437470420beae1f239227a5db5eeaaf5d6331b8a76abf96fa3227f375f13d0",
|
|
3664
|
+
"target_template_sha256": "309df48e5aa2c1b5975cd486bbb4059e1e7cace3b73e237f3555b678af7b4549"
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3668
|
+
"source_state": "working-tree",
|
|
3669
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3670
|
+
"source": "backend/internal/integrations/onex/v1/notification/client.go",
|
|
3671
|
+
"target": "internal/integrations/onex/v1/notification/client.go",
|
|
3672
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3673
|
+
"source_sha256": "accbddeec1cc06175a45fc733509efc145d9453b7a2091f935d70cf3cb597264",
|
|
3674
|
+
"target_template_sha256": "ac841c50f719670f836d733d5e26d22fd626d83ffbcdaaa883e348166e2d6642"
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3678
|
+
"source_state": "working-tree",
|
|
3679
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3680
|
+
"source": "backend/internal/integrations/onex/v1/notification/contracts.go",
|
|
3681
|
+
"target": "internal/integrations/onex/v1/notification/contracts.go",
|
|
3682
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3683
|
+
"source_sha256": "dec9d4bf3c0957a0bb29c4677f7c7b4c2048d9e7b265bacdbf2b7e146dd21be0",
|
|
3684
|
+
"target_template_sha256": "dec9d4bf3c0957a0bb29c4677f7c7b4c2048d9e7b265bacdbf2b7e146dd21be0"
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"source_repository": "https://onedev.yhy.gd.cn/stikumi",
|
|
3688
|
+
"source_state": "working-tree",
|
|
3689
|
+
"source_base_commit": "b4b299dd2a0777f71d0ff1ee7a7809df3e1acec6",
|
|
3690
|
+
"source": "backend/internal/integrations/onex/v1/notification/client_test.go",
|
|
3691
|
+
"target": "internal/integrations/onex/v1/notification/client_test.go",
|
|
3692
|
+
"transformation": "Module namespace to {{module}}; OneX idempotency header constant to existing HeaderIdempotencyKey; product command header test literal preserved as Idempotency-Key; transport test product fixtures to sample_product/SampleProduct; gofmt. No product adapter, event producer, BFF or dispatch orchestration copied.",
|
|
3693
|
+
"source_sha256": "a16eecc0818fad0b804b9e3876e032cdb6c63765f329f5ff8fb222152c3eda4d",
|
|
3694
|
+
"target_template_sha256": "80f288ebc40fd8f3d3722f99fdad3a5fe2377e60b65808b4b5dbd97655504816"
|
|
3577
3695
|
}
|
|
3578
3696
|
]
|
|
3579
3697
|
}
|