@open-livex-wiki/graph-ui 0.0.0-stage → 0.1.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.
@@ -0,0 +1,668 @@
1
+ /**
2
+ * Rich synthetic `livex-graph/v1` dataset used ONLY when `?demo=1` is explicitly passed in URL
3
+ * or inside automated unit tests.
4
+ */
5
+ export function createDemoGraphData() {
6
+ const nodes = [
7
+ {
8
+ id: "business-infrastructure",
9
+ type: "domain",
10
+ domainId: "business-infrastructure",
11
+ title: "基建域",
12
+ aliases: ["业务基础设施", "公共底座", "business-infrastructure"],
13
+ summary: "沉淀跨业务域复用的动态配置、AB 实验分流、限流防刷与账本幂等客户端等共享知识。",
14
+ maintainers: ["@infra-arch", "@livex-core"],
15
+ path: "domains/business-infrastructure/index.md",
16
+ dependsOn: [],
17
+ repositories: [],
18
+ markdown: `## 域身份与边界
19
+
20
+ 基建域(\`business-infrastructure\`)承载跨互动业务域复用的公共 SDK、接入契约与平台护栏规范。
21
+
22
+ - **准入标准**:被 2 个及以上业务场景直接依赖的公共能力,独立建档为 \`infrastructure-index/v1\`。
23
+ - **治理规则**:所有针对共享知识的变更默认触发 Owner 人工审批,禁止自动合并。`,
24
+ },
25
+ {
26
+ id: "demo-growth",
27
+ type: "domain",
28
+ domainId: "demo-growth",
29
+ title: "示例互动增长",
30
+ aliases: ["互动增长", "用户促活", "签到领积分"],
31
+ summary: "负责用户日常签到、积分商城兑换、裂变拉新与首播促活等增长闭环场景。",
32
+ maintainers: ["@growth-owner", "@checkin-dev"],
33
+ path: "domains/demo-growth/index.md",
34
+ dependsOn: [],
35
+ repositories: [],
36
+ markdown: `## 域身份与边界
37
+
38
+ \`demo-growth\` 聚焦直播间外与直播间内的用户促活与积分留存闭环。
39
+
40
+ - **核心场景**:签到领积分、积分商城兑换、裂变助力领券、新客首播礼包。
41
+ - **外部边界**:底层权益发放统一走基建域 \`reward-ledger-client\` 幂等入账。`,
42
+ },
43
+ {
44
+ id: "live-interaction",
45
+ type: "domain",
46
+ domainId: "live-interaction",
47
+ title: "直播间互动玩法",
48
+ aliases: ["互动玩法", "红包雨", "主播PK"],
49
+ summary: "覆盖直播间高并发实时互动场景,包含红包雨、主播连麦 PK 投票与答题冲顶。",
50
+ maintainers: ["@live-play-owner", "@realtime-dev"],
51
+ path: "domains/live-interaction/index.md",
52
+ dependsOn: [],
53
+ repositories: [],
54
+ markdown: `## 域身份与边界
55
+
56
+ \`live-interaction\` 负责直播间百万级并发下的实时互动玩法编排与状态同步。`,
57
+ },
58
+ {
59
+ id: "creator-incentive",
60
+ type: "domain",
61
+ domainId: "creator-incentive",
62
+ title: "主播成长激励",
63
+ aliases: ["主播激励", "流量加热", "等级结算"],
64
+ summary: "围绕开播任务、主播等级日结与流量加热卡发放构建供给侧激励体系。",
65
+ maintainers: ["@creator-ops-tech"],
66
+ path: "domains/creator-incentive/index.md",
67
+ dependsOn: [],
68
+ repositories: [],
69
+ markdown: `## 域身份与边界
70
+
71
+ \`creator-incentive\` 管理主播侧任务激励计算、开播时长核销与加热券投放。`,
72
+ },
73
+ // Shared Infrastructure (03 知识)
74
+ {
75
+ id: "business-infrastructure/demo-config-sdk",
76
+ type: "infrastructure",
77
+ domainId: "business-infrastructure",
78
+ sceneId: "demo-config-sdk",
79
+ title: "通用动态配置 SDK",
80
+ aliases: ["ConfigSDK", "动态开关", "initBiz"],
81
+ summary: "提供毫秒级热更新的业务参数读取、分桶灰度覆盖与默认值兜底契约。",
82
+ maintainers: ["@infra-arch"],
83
+ path: "domains/business-infrastructure/demo-config-sdk/index.md",
84
+ confidence: 0.96,
85
+ confidenceBreakdown: { architecture: 0.98, chain: 0.96, config: 0.97, experiment: 0.96 },
86
+ dependsOn: [],
87
+ dependents: [
88
+ "creator-incentive/anchor-level-settlement",
89
+ "demo-growth/daily-check-in",
90
+ "demo-growth/invite-fission-task",
91
+ "demo-growth/points-mall-exchange",
92
+ "live-interaction/anchor-pk-vote",
93
+ "live-interaction/red-packet-rain",
94
+ ],
95
+ repositories: [
96
+ {
97
+ repo: "demo-common-libs",
98
+ gitUrl: "https://github.com/example/demo-common-libs.git",
99
+ branch: "main",
100
+ commitId: "a7c16bf6c9ba4d1088e12ef0192b34c190a1b2c3",
101
+ paths: ["packages/config-sdk/src/"],
102
+ },
103
+ ],
104
+ hasPendingConfirmations: false,
105
+ stale: false,
106
+ detailPaths: [
107
+ "domains/business-infrastructure/demo-config-sdk/initBiz.md",
108
+ "domains/business-infrastructure/demo-config-sdk/getData.md",
109
+ ],
110
+ markdown: `## 接入指南与公共约束
111
+
112
+ 1. 业务启动期必须调用 \`ConfigClient.initBiz(namespace)\` 完成本地快照预热。
113
+ 2. 读取配置统一通过 \`ConfigClient.getData<T>(key, fallback)\`,严禁裸读未设兜底值的远程键。
114
+
115
+ | 接口 | 用途 | 详情文档 |
116
+ | --- | --- | --- |
117
+ | \`initBiz\` | 注册命名空间与监听热更新 | \`initBiz.md\` |
118
+ | \`getData\` | 类型安全读取与兜底回退 | \`getData.md\` |`,
119
+ },
120
+ {
121
+ id: "business-infrastructure/experiment-ab-sdk",
122
+ type: "infrastructure",
123
+ domainId: "business-infrastructure",
124
+ sceneId: "experiment-ab-sdk",
125
+ title: "直播 AB 实验分流 SDK",
126
+ aliases: ["ABSDK", "实验分桶", "hitLayer"],
127
+ summary: "统一正交实验层人群命中判定、曝光埋点染色与白名单强制命中逻辑。",
128
+ maintainers: ["@infra-arch", "@data-exp"],
129
+ path: "domains/business-infrastructure/experiment-ab-sdk/index.md",
130
+ confidence: 0.94,
131
+ confidenceBreakdown: { architecture: 0.95, chain: 0.95, config: 0.94, experiment: 0.94 },
132
+ dependsOn: ["business-infrastructure/demo-config-sdk"],
133
+ dependents: [
134
+ "demo-growth/daily-check-in",
135
+ "demo-growth/new-user-welcome-pack",
136
+ "live-interaction/quiz-challenge",
137
+ "live-interaction/red-packet-rain",
138
+ ],
139
+ repositories: [
140
+ {
141
+ repo: "demo-common-libs",
142
+ gitUrl: "https://github.com/example/demo-common-libs.git",
143
+ branch: "main",
144
+ commitId: "a7c16bf6c9ba4d1088e12ef0192b34c190a1b2c3",
145
+ paths: ["packages/experiment-ab-sdk/src/"],
146
+ },
147
+ ],
148
+ hasPendingConfirmations: false,
149
+ stale: false,
150
+ markdown: `## 接入指南与公共约束
151
+
152
+ 调用 \`ExperimentClient.evaluate(uid, layerKey)\` 获取正交分层实验桶参数并自动写入曝光 traceId。`,
153
+ },
154
+ {
155
+ id: "business-infrastructure/rate-limiter-starter",
156
+ type: "infrastructure",
157
+ domainId: "business-infrastructure",
158
+ sceneId: "rate-limiter-starter",
159
+ title: "分布式限流防刷组件",
160
+ aliases: ["RateLimiter", "防刷限流", "滑窗限流"],
161
+ summary: "基于 Redis Lua 令牌桶与房间级本地降级开关的高并发脉冲削峰组件。",
162
+ maintainers: ["@stability-team"],
163
+ path: "domains/business-infrastructure/rate-limiter-starter/index.md",
164
+ confidence: 0.93,
165
+ dependsOn: [],
166
+ dependents: ["live-interaction/anchor-pk-vote", "live-interaction/red-packet-rain"],
167
+ repositories: [
168
+ {
169
+ repo: "demo-common-libs",
170
+ gitUrl: "https://github.com/example/demo-common-libs.git",
171
+ branch: "main",
172
+ commitId: "a7c16bf6c9ba4d1088e12ef0192b34c190a1b2c3",
173
+ paths: ["packages/rate-limiter/"],
174
+ },
175
+ ],
176
+ hasPendingConfirmations: false,
177
+ stale: false,
178
+ markdown: `## 接入指南与公共约束
179
+
180
+ 秒杀与红包雨入口必须同时配置 UID 维度频控与 RoomID 维度总吞吐阈值。`,
181
+ },
182
+ {
183
+ id: "business-infrastructure/reward-ledger-client",
184
+ type: "infrastructure",
185
+ domainId: "business-infrastructure",
186
+ sceneId: "reward-ledger-client",
187
+ title: "权益账本幂等客户端",
188
+ aliases: ["积分账本", "RewardLedger", "幂等发奖"],
189
+ summary: "提供基于业务幂等单号(bizOrderId)的积分入账、扣减与冲正流水能力。",
190
+ maintainers: ["@ledger-owner"],
191
+ path: "domains/business-infrastructure/reward-ledger-client/index.md",
192
+ confidence: 0.95,
193
+ dependsOn: [],
194
+ dependents: [
195
+ "creator-incentive/anchor-level-settlement",
196
+ "demo-growth/daily-check-in",
197
+ "demo-growth/points-mall-exchange",
198
+ "live-interaction/red-packet-rain",
199
+ ],
200
+ repositories: [
201
+ {
202
+ repo: "demo-common-libs",
203
+ gitUrl: "https://github.com/example/demo-common-libs.git",
204
+ branch: "main",
205
+ commitId: "a7c16bf6c9ba4d1088e12ef0192b34c190a1b2c3",
206
+ paths: ["packages/reward-ledger-client/"],
207
+ },
208
+ ],
209
+ hasPendingConfirmations: false,
210
+ stale: false,
211
+ markdown: `## 接入指南与公共约束
212
+
213
+ 所有积分与红包入账调用必须携带确定性 \`bizOrderId = "{scene}:{uid}:{bizDate}"\` 防止重复发放。`,
214
+ },
215
+ // Scenes in demo-growth (02 场景)
216
+ {
217
+ id: "demo-growth/daily-check-in",
218
+ type: "scene",
219
+ domainId: "demo-growth",
220
+ sceneId: "daily-check-in",
221
+ title: "签到领积分",
222
+ aliases: ["每日签到", "连签奖励", "checkin"],
223
+ summary: "用户每日进入活动页查询连签进度并完成签到领奖,支持连签阶梯翻倍实验。",
224
+ maintainers: ["@growth-owner", "@checkin-dev"],
225
+ path: "domains/demo-growth/daily-check-in/index.md",
226
+ confidence: 0.92,
227
+ confidenceBreakdown: { architecture: 0.96, chain: 0.92, config: 0.94, experiment: 0.92 },
228
+ dependsOn: [
229
+ "business-infrastructure/demo-config-sdk",
230
+ "business-infrastructure/experiment-ab-sdk",
231
+ "business-infrastructure/reward-ledger-client",
232
+ ],
233
+ dependents: ["demo-growth/points-mall-exchange", "live-interaction/red-packet-rain"],
234
+ repositories: [
235
+ {
236
+ repo: "demo-app-server",
237
+ gitUrl: "https://github.com/example/demo-app-server.git",
238
+ branch: "main",
239
+ commitId: "4f8b92e17c3a65d09e1123456789abcdef012345",
240
+ paths: ["src/modules/checkin/"],
241
+ },
242
+ ],
243
+ hasPendingConfirmations: false,
244
+ stale: false,
245
+ markdown: `## 1. 业务背景
246
+
247
+ 签到领积分(\`demo-growth/daily-check-in\`)是用户每日促活主入口,暴露两个核心接口:
248
+ - \`mtop.example.checkin.init\`:面板状态与连签阶梯预览
249
+ - \`mtop.example.checkin.do\`:执行当日签到并发放积分
250
+
251
+ ## 2. 变更历史
252
+
253
+ - \`2026-11-18\`:接入 \`experiment-ab-sdk\` 支持 7 日连签惊喜翻倍实验。
254
+
255
+ ## 3. 链路详解
256
+
257
+ \`\`\`mermaid
258
+ flowchart LR
259
+ L1["L1 CheckInController"] --> L2["L2 CheckInOrchestrator"]
260
+ L2 --> L3["L3 StreakDomainService"]
261
+ L3 --> L4A["L4 demo-config-sdk"]
262
+ L3 --> L4B["L4 reward-ledger-client"]
263
+ \`\`\`
264
+
265
+ - **L1 接口层**:\`CheckInController.doCheckIn\` 校验登录态与基础参数。
266
+ - **L2 编排层**:\`CheckInOrchestrator\` 串联分桶实验、连签计算与账本发放。
267
+ - **L3 核心模块**:\`StreakDomainService\` 计算自然日窗口连签天数。
268
+ - **L4 下游与配置**:读取 \`checkin.streak_rewards\` 动态配置并调用 \`reward-ledger-client\` 入账。
269
+
270
+ ## 4. 待确认项
271
+
272
+ 无`,
273
+ },
274
+ {
275
+ id: "demo-growth/points-mall-exchange",
276
+ type: "scene",
277
+ domainId: "demo-growth",
278
+ sceneId: "points-mall-exchange",
279
+ title: "积分商城兑换",
280
+ aliases: ["积分兑券", "商城核销"],
281
+ summary: "校验用户可用积分余额与连签等级门槛,原子扣减积分并发放实物/虚拟权益券。",
282
+ maintainers: ["@growth-owner"],
283
+ path: "domains/demo-growth/points-mall-exchange/index.md",
284
+ confidence: 0.9,
285
+ confidenceBreakdown: { architecture: 0.93, chain: 0.9, config: 0.92, experiment: 0.91 },
286
+ dependsOn: [
287
+ "demo-growth/daily-check-in",
288
+ "business-infrastructure/demo-config-sdk",
289
+ "business-infrastructure/reward-ledger-client",
290
+ ],
291
+ dependents: [],
292
+ repositories: [
293
+ {
294
+ repo: "demo-app-server",
295
+ gitUrl: "https://github.com/example/demo-app-server.git",
296
+ branch: "main",
297
+ commitId: "4f8b92e17c3a65d09e1123456789abcdef012345",
298
+ paths: ["src/modules/mall/"],
299
+ },
300
+ ],
301
+ hasPendingConfirmations: false,
302
+ stale: true,
303
+ staleReason: "demo-app-server HEAD 新增库存预占脚本,距锚定 commit 落后 2 个提交",
304
+ markdown: `## 1. 业务背景
305
+
306
+ 承接用户签到沉淀的积分资产,提供限时秒杀券与主播粉丝牌兑换。
307
+
308
+ ## 2. 变更历史
309
+
310
+ - \`2026-11-22\`:新增连签满 3 天专属兑换门槛校验。
311
+
312
+ ## 3. 链路详解
313
+
314
+ - **L1 接口层**:\`PointsMallController.exchange\`
315
+ - **L2 编排层**:\`MallExchangeWorkflow\` 先查连签资格,再冻结库存并扣减账本积分。
316
+
317
+ ## 4. 待确认项
318
+
319
+ 无`,
320
+ },
321
+ {
322
+ id: "demo-growth/invite-fission-task",
323
+ type: "scene",
324
+ domainId: "demo-growth",
325
+ sceneId: "invite-fission-task",
326
+ title: "裂变助力领券",
327
+ aliases: ["好友助力", "拉新裂变"],
328
+ summary: "发起人与被邀好友绑定助力关系,通过风控反作弊核验后阶梯开奖。",
329
+ maintainers: ["@growth-owner"],
330
+ path: "domains/demo-growth/invite-fission-task/index.md",
331
+ confidence: 0.84,
332
+ confidenceBreakdown: { architecture: 0.9, chain: 0.86, config: 0.88, experiment: 0.84 },
333
+ dependsOn: ["business-infrastructure/demo-config-sdk"],
334
+ dependents: [],
335
+ repositories: [
336
+ {
337
+ repo: "demo-app-server",
338
+ gitUrl: "https://github.com/example/demo-app-server.git",
339
+ branch: "main",
340
+ commitId: "4f8b92e17c3a65d09e1123456789abcdef012345",
341
+ paths: ["src/modules/fission/"],
342
+ },
343
+ ],
344
+ hasPendingConfirmations: true,
345
+ stale: false,
346
+ markdown: `## 1. 业务背景
347
+
348
+ 负责大促期社交分享拉新助力任务与设备指纹去重校验。
349
+
350
+ ## 2. 变更历史
351
+
352
+ - \`2026-11-15\`:初始化场景文档。
353
+
354
+ ## 3. 链路详解
355
+
356
+ - **L1 接口层**:\`FissionController.assist\`
357
+ - **L2 编排层**:\`FissionAssistService\` 调用风控评分与进度累加。
358
+
359
+ ## 4. 待确认项
360
+
361
+ - [待核实] 跨端唤端场景下渠道归因超时阈值在配置中心线上真实取值待运营平台核对。`,
362
+ },
363
+ {
364
+ id: "demo-growth/new-user-welcome-pack",
365
+ type: "scene",
366
+ domainId: "demo-growth",
367
+ sceneId: "new-user-welcome-pack",
368
+ title: "新客首播礼包",
369
+ aliases: ["首进直播间礼包", "新人红包"],
370
+ summary: "针对近 30 天未观看直播的召回与纯新客展示首播停留倒计时礼盒。",
371
+ maintainers: ["@checkin-dev"],
372
+ path: "domains/demo-growth/new-user-welcome-pack/index.md",
373
+ confidence: 0.91,
374
+ dependsOn: ["business-infrastructure/experiment-ab-sdk"],
375
+ dependents: [],
376
+ repositories: [
377
+ {
378
+ repo: "demo-app-server",
379
+ gitUrl: "https://github.com/example/demo-app-server.git",
380
+ branch: "main",
381
+ commitId: "4f8b92e17c3a65d09e1123456789abcdef012345",
382
+ paths: ["src/modules/welcome/"],
383
+ },
384
+ ],
385
+ hasPendingConfirmations: false,
386
+ stale: false,
387
+ markdown: `## 1. 业务背景
388
+
389
+ 新客进入直播间停留满 15 秒即可拆开欢迎礼盒。
390
+
391
+ ## 2. 变更历史
392
+
393
+ - \`2026-11-20\`:完成双人群实验合并。
394
+
395
+ ## 3. 链路详解
396
+
397
+ - **L1 接口层**:\`WelcomePackController.claim\`
398
+
399
+ ## 4. 待确认项
400
+
401
+ 无`,
402
+ },
403
+ // Scenes in live-interaction (02 场景)
404
+ {
405
+ id: "live-interaction/red-packet-rain",
406
+ type: "scene",
407
+ domainId: "live-interaction",
408
+ sceneId: "red-packet-rain",
409
+ title: "直播间红包雨",
410
+ aliases: ["整点红包雨", "天降红包"],
411
+ summary: "整点触发全屏红包雨倒计时,支持高并发防刷削峰、连签加成系数与实时入账。",
412
+ maintainers: ["@live-play-owner", "@realtime-dev"],
413
+ path: "domains/live-interaction/red-packet-rain/index.md",
414
+ confidence: 0.93,
415
+ confidenceBreakdown: { architecture: 0.95, chain: 0.93, config: 0.94, experiment: 0.93 },
416
+ dependsOn: [
417
+ "business-infrastructure/demo-config-sdk",
418
+ "business-infrastructure/experiment-ab-sdk",
419
+ "business-infrastructure/rate-limiter-starter",
420
+ "business-infrastructure/reward-ledger-client",
421
+ "demo-growth/daily-check-in",
422
+ ],
423
+ dependents: [],
424
+ repositories: [
425
+ {
426
+ repo: "live-interaction-service",
427
+ gitUrl: "https://github.com/example/live-interaction-service.git",
428
+ branch: "main",
429
+ commitId: "91d0e4f28a3c7b6512340987fedcba6543210fed",
430
+ paths: ["src/plays/red-packet-rain/"],
431
+ },
432
+ ],
433
+ hasPendingConfirmations: false,
434
+ stale: false,
435
+ markdown: `## 1. 业务背景
436
+
437
+ S 级直播间峰值百万 QPS 互动发奖玩法,结合用户连签活跃度动态提升中奖权重。
438
+
439
+ ## 2. 变更历史
440
+
441
+ - \`2026-11-25\`:联动 \`demo-growth/daily-check-in\` 连签加成倍率。
442
+
443
+ ## 3. 链路详解
444
+
445
+ - **L1 接口层**:\`RedPacketRainController.grab\`
446
+ - **L2 编排层**:\`RainGrabOrchestrator\` 先过 \`rate-limiter-starter\`,再算概率并落账本。
447
+
448
+ ## 4. 待确认项
449
+
450
+ 无`,
451
+ },
452
+ {
453
+ id: "live-interaction/anchor-pk-vote",
454
+ type: "scene",
455
+ domainId: "live-interaction",
456
+ sceneId: "anchor-pk-vote",
457
+ title: "主播连麦 PK 投票",
458
+ aliases: ["连麦PK", "助力值PK"],
459
+ summary: "双直播间实时同步 PK 进度条、秒级阵营排行榜广播与绝杀时刻加成。",
460
+ maintainers: ["@realtime-dev"],
461
+ path: "domains/live-interaction/anchor-pk-vote/index.md",
462
+ confidence: 0.91,
463
+ dependsOn: [
464
+ "business-infrastructure/demo-config-sdk",
465
+ "business-infrastructure/rate-limiter-starter",
466
+ ],
467
+ dependents: [],
468
+ repositories: [
469
+ {
470
+ repo: "live-interaction-service",
471
+ gitUrl: "https://github.com/example/live-interaction-service.git",
472
+ branch: "main",
473
+ commitId: "91d0e4f28a3c7b6512340987fedcba6543210fed",
474
+ paths: ["src/plays/pk-vote/"],
475
+ },
476
+ ],
477
+ hasPendingConfirmations: false,
478
+ stale: false,
479
+ markdown: `## 1. 业务背景
480
+
481
+ 主播连麦对战期间观众投票与礼物积分实时汇总。
482
+
483
+ ## 2. 变更历史
484
+
485
+ - \`2026-11-19\`:补充绝杀 30 秒倍率配置说明。
486
+
487
+ ## 3. 链路详解
488
+
489
+ - **L1 接口层**:\`PkVoteController.vote\`
490
+
491
+ ## 4. 待确认项
492
+
493
+ 无`,
494
+ },
495
+ {
496
+ id: "live-interaction/quiz-challenge",
497
+ type: "scene",
498
+ domainId: "live-interaction",
499
+ sceneId: "quiz-challenge",
500
+ title: "答题冲顶瓜分奖励",
501
+ aliases: ["互动答题", "冲顶闯关"],
502
+ summary: "多轮限时出题、淘汰判定、复活卡核销与通关奖池均分结算。",
503
+ maintainers: ["@live-play-owner"],
504
+ path: "domains/live-interaction/quiz-challenge/index.md",
505
+ confidence: 0.9,
506
+ dependsOn: ["business-infrastructure/experiment-ab-sdk"],
507
+ dependents: [],
508
+ repositories: [
509
+ {
510
+ repo: "live-interaction-service",
511
+ gitUrl: "https://github.com/example/live-interaction-service.git",
512
+ branch: "main",
513
+ commitId: "91d0e4f28a3c7b6512340987fedcba6543210fed",
514
+ paths: ["src/plays/quiz/"],
515
+ },
516
+ ],
517
+ hasPendingConfirmations: false,
518
+ stale: false,
519
+ markdown: `## 1. 业务背景
520
+
521
+ 12 题连答通关瓜分直播间奖池。
522
+
523
+ ## 2. 变更历史
524
+
525
+ - \`2026-11-12\`:建档归档。
526
+
527
+ ## 3. 链路详解
528
+
529
+ - **L1 接口层**:\`QuizController.submitAnswer\`
530
+
531
+ ## 4. 待确认项
532
+
533
+ 无`,
534
+ },
535
+ // Scenes in creator-incentive (02 场景)
536
+ {
537
+ id: "creator-incentive/anchor-level-settlement",
538
+ type: "scene",
539
+ domainId: "creator-incentive",
540
+ sceneId: "anchor-level-settlement",
541
+ title: "主播等级日结",
542
+ aliases: ["等级成长分", "日结激励"],
543
+ summary: "每日凌晨汇总有效开播时长、互动率与成交指标,计算主播成长分并发放激励。",
544
+ maintainers: ["@creator-ops-tech"],
545
+ path: "domains/creator-incentive/anchor-level-settlement/index.md",
546
+ confidence: 0.94,
547
+ dependsOn: [
548
+ "business-infrastructure/demo-config-sdk",
549
+ "business-infrastructure/reward-ledger-client",
550
+ ],
551
+ dependents: ["creator-incentive/traffic-boost-card"],
552
+ repositories: [
553
+ {
554
+ repo: "creator-incentive-job",
555
+ gitUrl: "https://github.com/example/creator-incentive-job.git",
556
+ branch: "main",
557
+ commitId: "77c2d9a1b04e88f1234567890abcdef123456789",
558
+ paths: ["src/jobs/daily-settlement/"],
559
+ },
560
+ ],
561
+ hasPendingConfirmations: false,
562
+ stale: false,
563
+ markdown: `## 1. 业务背景
564
+
565
+ T+1 计算主播成长等级积分与保级状态。
566
+
567
+ ## 2. 变更历史
568
+
569
+ - \`2026-11-10\`:全量切换新等级系数表。
570
+
571
+ ## 3. 链路详解
572
+
573
+ - **L1 调度入口**:\`DailyLevelSettlementJob.execute\`
574
+
575
+ ## 4. 待确认项
576
+
577
+ 无`,
578
+ },
579
+ {
580
+ id: "creator-incentive/traffic-boost-card",
581
+ type: "scene",
582
+ domainId: "creator-incentive",
583
+ sceneId: "traffic-boost-card",
584
+ title: "流量加热卡发放",
585
+ aliases: ["加热券", "开播助推卡"],
586
+ summary: "根据主播日结达标档位自动配发次日开播曝光助推卡。",
587
+ maintainers: ["@creator-ops-tech"],
588
+ path: "domains/creator-incentive/traffic-boost-card/index.md",
589
+ confidence: 0.91,
590
+ dependsOn: ["creator-incentive/anchor-level-settlement"],
591
+ dependents: [],
592
+ repositories: [
593
+ {
594
+ repo: "creator-incentive-job",
595
+ gitUrl: "https://github.com/example/creator-incentive-job.git",
596
+ branch: "main",
597
+ commitId: "77c2d9a1b04e88f1234567890abcdef123456789",
598
+ paths: ["src/modules/boost-card/"],
599
+ },
600
+ ],
601
+ hasPendingConfirmations: false,
602
+ stale: false,
603
+ markdown: `## 1. 业务背景
604
+
605
+ 衔接主播等级日结结果,向晋级主播自动发放公域流量加热权益。
606
+
607
+ ## 2. 变更历史
608
+
609
+ - \`2026-11-14\`:支持分时段使用限制。
610
+
611
+ ## 3. 链路详解
612
+
613
+ - **L1 消息消费**:\`LevelUpEventConsumer.onMessage\`
614
+
615
+ ## 4. 待确认项
616
+
617
+ 无`,
618
+ },
619
+ ];
620
+ const edges = [];
621
+ const nodeMap = new Map(nodes.map((n) => [n.id, n]));
622
+ let dependencyEdgeCount = 0;
623
+ for (const node of nodes) {
624
+ if (node.type === "domain") {
625
+ continue;
626
+ }
627
+ if (nodeMap.has(node.domainId)) {
628
+ edges.push({
629
+ id: `belongs_to:${node.domainId}->${node.id}`,
630
+ source: node.domainId,
631
+ target: node.id,
632
+ type: "belongs_to",
633
+ crossDomain: false,
634
+ });
635
+ }
636
+ for (const depId of node.dependsOn) {
637
+ const depNode = nodeMap.get(depId);
638
+ if (!depNode) {
639
+ continue;
640
+ }
641
+ dependencyEdgeCount += 1;
642
+ edges.push({
643
+ id: `depends_on:${node.id}->${depId}`,
644
+ source: node.id,
645
+ target: depId,
646
+ type: "depends_on",
647
+ crossDomain: node.domainId !== depNode.domainId,
648
+ });
649
+ }
650
+ }
651
+ return {
652
+ schema: "livex-graph/v1",
653
+ generatedAt: "2026-11-30T04:00:00.000Z",
654
+ snapshot: "a7c16bf6c9ba",
655
+ wikiName: "LiveX Demo Wiki",
656
+ stats: {
657
+ domainCount: nodes.filter((n) => n.type === "domain").length,
658
+ sceneCount: nodes.filter((n) => n.type === "scene").length,
659
+ infrastructureCount: nodes.filter((n) => n.type === "infrastructure").length,
660
+ dependencyEdgeCount,
661
+ totalNodes: nodes.length,
662
+ totalEdges: edges.length,
663
+ },
664
+ nodes,
665
+ edges,
666
+ };
667
+ }
668
+ //# sourceMappingURL=demo-data.js.map