bailinghub 0.5.0 → 0.6.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/README.en.md +146 -185
- package/README.md +135 -206
- package/THIRD_PARTY_NOTICES.md +6 -7
- package/assets/readme-demo-evidence.en-dark.svg +82 -0
- package/assets/readme-demo-evidence.en.svg +82 -0
- package/assets/readme-demo-evidence.zh-CN-dark.svg +82 -0
- package/assets/readme-demo-evidence.zh-CN.svg +82 -0
- package/assets/readme-entry-points.en-dark.svg +71 -0
- package/assets/readme-entry-points.en.svg +71 -0
- package/assets/readme-entry-points.zh-CN-dark.svg +71 -0
- package/assets/readme-entry-points.zh-CN.svg +71 -0
- package/assets/readme-product-overview.en-dark.svg +87 -0
- package/assets/readme-product-overview.en.svg +87 -0
- package/assets/readme-product-overview.zh-CN-dark.svg +87 -0
- package/assets/readme-product-overview.zh-CN.svg +87 -0
- package/docker-compose.images.yml +2 -2
- package/docs/AGENT_AUTH_API.en.md +25 -9
- package/docs/AGENT_AUTH_API.md +17 -5
- package/docs/AGENT_CLIENT_QUICKSTART.en.md +90 -18
- package/docs/AGENT_CLIENT_QUICKSTART.md +74 -16
- package/docs/AGENT_CONVERSATION_AUDIT.en.md +194 -0
- package/docs/AGENT_CONVERSATION_AUDIT.md +111 -0
- package/docs/CHANGELOG.en.md +23 -0
- package/docs/CHANGELOG.md +23 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +4 -4
- package/docs/INDEPENDENT_VALIDATION.md +4 -4
- package/docs/README.en.md +7 -0
- package/docs/README.md +7 -0
- package/docs/RELEASE_NOTES_v0.5.1.en.md +45 -0
- package/docs/RELEASE_NOTES_v0.5.1.md +45 -0
- package/docs/RELEASE_NOTES_v0.6.0.en.md +51 -0
- package/docs/RELEASE_NOTES_v0.6.0.md +51 -0
- package/docs/user-guide/README.en.md +1 -0
- package/docs/user-guide/README.md +1 -0
- package/docs/user-guide/console-map.en.md +2 -0
- package/docs/user-guide/console-map.md +2 -1
- package/docs/user-guide/conversations.en.md +40 -0
- package/docs/user-guide/conversations.md +40 -0
- package/package.json +1 -1
- package/scripts/check-doc-links.mjs +3 -0
- package/scripts/check-image-tags.sh +1 -1
- package/scripts/check-release-consistency.test.mjs +5 -5
- package/scripts/e2e-console.mjs +89 -0
- package/scripts/generate-readme-assets.mjs +488 -7
- package/scripts/install.sh +1 -1
- package/scripts/publish-images.sh +1 -1
- package/scripts/release-audit.mjs +2 -0
- package/scripts/verify-github-repo.mjs +2 -0
- package/sql/057_agent_conversation_audit.sql +55 -0
- package/src/app/agent-conversation-audit.ts +30 -0
- package/src/app/oss-edition.ts +1 -0
- package/src/core/config/agent-direct-console-selection.test.ts +22 -0
- package/src/core/runtime/agent-conversation-audit.test.ts +38 -0
- package/src/core/runtime/agent-conversation-audit.ts +159 -0
- package/src/infrastructure/config/config-agent-auth-repository.test.ts +36 -0
- package/src/infrastructure/config/config-agent-auth-repository.ts +97 -0
- package/src/infrastructure/config/config-agent-client-runtime-repository.test.ts +38 -0
- package/src/infrastructure/config/config-agent-client-runtime-repository.ts +54 -0
- package/src/infrastructure/config/config-agent-conversation-audit-repository.test.ts +146 -0
- package/src/infrastructure/config/config-agent-conversation-audit-repository.ts +262 -0
- package/src/infrastructure/config/configstore.ts +5 -0
- package/src/routes/admin-agent-clients.test.ts +120 -0
- package/src/routes/admin-agent-clients.ts +161 -0
- package/src/routes/admin-conversation-audit.ts +46 -0
- package/src/routes/admin-runtime.test.ts +38 -0
- package/src/routes/admin-runtime.ts +14 -3
- package/src/routes/admin.ts +6 -0
- package/src/routes/agent-api.ts +2 -0
- package/src/routes/agent-conversation-audit.test.ts +131 -0
- package/src/routes/agent-conversation-audit.ts +33 -0
- package/src/test-support/agent-conversation-audit-fixture.ts +123 -0
- package/web/console/assets/{Accounts-D4RRm5D1.js → Accounts-Ca_VnSu9.js} +1 -1
- package/web/console/assets/AgentClients-BPIvlLYY.js +1 -0
- package/web/console/assets/AgentClients-DsWADpzr.css +1 -0
- package/web/console/assets/{Approvals-CsTTKb8o.js → Approvals-CMvPWacY.js} +1 -1
- package/web/console/assets/{Audit-BzvZ7JZw.js → Audit-CIRqOCnL.js} +1 -1
- package/web/console/assets/{BrandLockup-CYcA93wh.js → BrandLockup-BrytmTTH.js} +1 -1
- package/web/console/assets/{Channels-DRQZggqM.js → Channels-CApxH2TB.js} +1 -1
- package/web/console/assets/{ChatEntries-BUB7BWKU.js → ChatEntries-CJon3bWJ.js} +1 -1
- package/web/console/assets/Clients-BSA1rlTB.js +3 -0
- package/web/console/assets/Clients-CNIVs7Qn.css +1 -0
- package/web/console/assets/{Cost-BZgFf1yM.js → Cost-BbhlQFP8.js} +1 -1
- package/web/console/assets/{Credentials-BTe2Q07j.js → Credentials-kqr1W0K7.js} +1 -1
- package/web/console/assets/{Diagnostics-WL-buYli.js → Diagnostics-Kljt9XTH.js} +1 -1
- package/web/console/assets/{Executors-CGZ-7Xmp.js → Executors-DnsB-Xz4.js} +1 -1
- package/web/console/assets/{HelpTip-CT07o3kB.js → HelpTip-i-KJhf5s.js} +1 -1
- package/web/console/assets/{Kb-VVw8oGsT.js → Kb-DLZSAFWP.js} +2 -2
- package/web/console/assets/{Login-rwvmBBPl.js → Login-DiTjPWmN.js} +1 -1
- package/web/console/assets/{Projects-CexaCEY1.js → Projects-CXcVCgCD.js} +1 -1
- package/web/console/assets/Routes-CXGl9SMM.css +1 -0
- package/web/console/assets/Routes-DN9_d9Po.js +124 -0
- package/web/console/assets/Runs-Cwbe6thL.js +3 -0
- package/web/console/assets/Runs-D8UmjP5G.css +1 -0
- package/web/console/assets/{Setup-Djh5yadQ.js → Setup-FqoCKmfZ.js} +1 -1
- package/web/console/assets/Shell-BEqpONiy.js +1 -0
- package/web/console/assets/Shell-D9Uw-fsa.css +1 -0
- package/web/console/assets/{StorageBuckets-CQBR41W1.js → StorageBuckets-CkORbYXY.js} +1 -1
- package/web/console/assets/{SystemSettings-DgnopekD.js → SystemSettings-gTQAazu7.js} +1 -1
- package/web/console/assets/{SystemStatus-Bj8-kPt2.js → SystemStatus-DAmUUNqO.js} +1 -1
- package/web/console/assets/{Targets-BAfCt_nH.js → Targets-CZmDcjsE.js} +1 -1
- package/web/console/assets/{Tools-xjd0NZdE.js → Tools-CIHInlHL.js} +1 -1
- package/web/console/assets/index-BkLbd7Cc.js +2 -0
- package/web/console/assets/{index-DZEQL_yy.js → index-QnmD7N7F.js} +1 -1
- package/web/console/assets/{request-DkNPOweH.js → request-r7GHVJzw.js} +1 -1
- package/web/console/assets/{schema-CgPWAu1_.js → schema-BVn_hB7M.js} +1 -1
- package/web/console/assets/{util-SiQC2MJh.js → util-4bN2dv7B.js} +1 -1
- package/web/console/assets/{vendor-element-D7WRzHhy.js → vendor-element-CZoEjZr8.js} +1 -1
- package/web/console/assets/vendor-mammoth-BUEEDX6A.js +231 -0
- package/web/console/index.html +2 -2
- package/web-admin/package-lock.json +3 -3
- package/web-admin/src/agent-direct-selection.ts +21 -0
- package/web-admin/src/components/ClientConversations.vue +244 -0
- package/web-admin/src/components/conversation-audit.ts +121 -0
- package/web-admin/src/layout/Shell.vue +1 -1
- package/web-admin/src/pages/AgentClients.vue +254 -0
- package/web-admin/src/pages/Clients.vue +4 -2
- package/web-admin/src/pages/Routes.vue +54 -5
- package/web-admin/src/pages/Runs.vue +73 -17
- package/web-admin/src/router.ts +2 -0
- package/web-admin/tests/conversation-audit.fixture.mjs +182 -0
- package/web-admin/tests/conversation-audit.test.mjs +93 -0
- package/web/console/assets/Clients-CQ_MonGL.css +0 -1
- package/web/console/assets/Clients-HhCyrxfz.js +0 -3
- package/web/console/assets/Routes-B9ZHbQAp.js +0 -124
- package/web/console/assets/Routes-BbkFpi6Y.css +0 -1
- package/web/console/assets/Runs-4zDD9VOC.css +0 -1
- package/web/console/assets/Runs-BzFNPTwD.js +0 -3
- package/web/console/assets/Shell-BVIjmoY8.css +0 -1
- package/web/console/assets/Shell-kn763smL.js +0 -1
- package/web/console/assets/index-DfJA7iJS.js +0 -2
- package/web/console/assets/vendor-mammoth-DvgsHdlx.js +0 -231
|
@@ -13,6 +13,10 @@ const themes = {
|
|
|
13
13
|
green: '#1f883d',
|
|
14
14
|
greenSoft: '#dafbe1',
|
|
15
15
|
greenText: '#116329',
|
|
16
|
+
accent: '#0969da',
|
|
17
|
+
accentSoft: '#ddf4ff',
|
|
18
|
+
warning: '#9a6700',
|
|
19
|
+
warningSoft: '#fff8c5',
|
|
16
20
|
},
|
|
17
21
|
dark: {
|
|
18
22
|
background: '#0d1117',
|
|
@@ -24,6 +28,10 @@ const themes = {
|
|
|
24
28
|
green: '#3fb950',
|
|
25
29
|
greenSoft: '#12261a',
|
|
26
30
|
greenText: '#56d364',
|
|
31
|
+
accent: '#58a6ff',
|
|
32
|
+
accentSoft: '#0c2d4a',
|
|
33
|
+
warning: '#d29922',
|
|
34
|
+
warningSoft: '#3d2f13',
|
|
27
35
|
},
|
|
28
36
|
};
|
|
29
37
|
|
|
@@ -82,6 +90,161 @@ const copy = {
|
|
|
82
90
|
},
|
|
83
91
|
};
|
|
84
92
|
|
|
93
|
+
const productOverviewCopy = {
|
|
94
|
+
'zh-CN': {
|
|
95
|
+
title: '把一句话变成可核对的后台操作',
|
|
96
|
+
desc: '用户通过自然语言提出目标,BailingHub 处理可信身份、能力范围、审批和审计,已有业务系统完成最终授权与真实执行。',
|
|
97
|
+
eyebrow: 'BAILINGHUB · 不只回答问题',
|
|
98
|
+
subtitle: '不用重做商城、SaaS、CRM 或 ERP,也不用让 AI 直连数据库。',
|
|
99
|
+
requestLabel: '01 · 直接说目标',
|
|
100
|
+
requestSystem: '我已连接当前业务后台',
|
|
101
|
+
requestLines: ['查询未发货订单,', '为异常订单创建待处理工单。'],
|
|
102
|
+
requestMeta: '自然语言会话',
|
|
103
|
+
hubLabel: '02 · BAILINGHUB',
|
|
104
|
+
hubTitle: '把目标变成受控业务动作',
|
|
105
|
+
hubSteps: [
|
|
106
|
+
['可信身份', '这次操作代表谁'],
|
|
107
|
+
['能力选择', '只使用已接入能力'],
|
|
108
|
+
['风险与审批', '该停下时先交给人'],
|
|
109
|
+
['审计留痕', '对话与执行过程可查'],
|
|
110
|
+
],
|
|
111
|
+
systemLabel: '03 · 已有业务系统',
|
|
112
|
+
systemTitle: '原系统完成真实执行',
|
|
113
|
+
systems: [
|
|
114
|
+
['商城', '商品 · 订单 · 售后'],
|
|
115
|
+
['SaaS', '账号 · 门店 · 工单'],
|
|
116
|
+
['CRM', '客户 · 跟进 · 标签'],
|
|
117
|
+
['ERP', '库存 · 采购 · 申请'],
|
|
118
|
+
],
|
|
119
|
+
systemResult: '结果写回原系统,并留下任务记录',
|
|
120
|
+
path: ['自然语言会话', '可信业务身份', '已允许的能力', '原系统权限校验', '真实结果与留痕'],
|
|
121
|
+
boundary: 'BailingHub 管“AI 能够到哪里”,最终权限和业务规则仍由你的系统判断。',
|
|
122
|
+
},
|
|
123
|
+
en: {
|
|
124
|
+
title: 'Turn a request into a verifiable business action',
|
|
125
|
+
desc: 'A user states a goal in natural language. BailingHub applies trusted identity, capability scope, approval, and audit controls, while the existing system keeps final authority and performs the action.',
|
|
126
|
+
eyebrow: 'BAILINGHUB · BEYOND ANSWERS',
|
|
127
|
+
subtitle: 'Keep your commerce, SaaS, CRM, or ERP—and never give an agent raw database access.',
|
|
128
|
+
requestLabel: '01 · STATE THE GOAL',
|
|
129
|
+
requestSystem: 'Connected to the current business system',
|
|
130
|
+
requestLines: ['Find unshipped orders.', 'Create tickets for exceptions.'],
|
|
131
|
+
requestMeta: 'Natural-language request',
|
|
132
|
+
hubLabel: '02 · BAILINGHUB',
|
|
133
|
+
hubTitle: 'Turn the goal into a governed action',
|
|
134
|
+
hubSteps: [
|
|
135
|
+
['Trusted identity', 'Who this action represents'],
|
|
136
|
+
['Capability scope', 'Only connected actions'],
|
|
137
|
+
['Risk & approval', 'Pause when a person must decide'],
|
|
138
|
+
['Audit trail', 'Conversation and execution evidence'],
|
|
139
|
+
],
|
|
140
|
+
systemLabel: '03 · EXISTING SYSTEMS',
|
|
141
|
+
systemTitle: 'Your system performs the real action',
|
|
142
|
+
systems: [
|
|
143
|
+
['Commerce', 'Products · orders'],
|
|
144
|
+
['SaaS', 'Accounts · tickets'],
|
|
145
|
+
['CRM', 'Customers · follow-ups'],
|
|
146
|
+
['ERP', 'Inventory · purchasing'],
|
|
147
|
+
],
|
|
148
|
+
systemResult: 'Write back to the system of record and keep a task trail',
|
|
149
|
+
path: ['Natural language', 'Trusted identity', 'Allowed capability', 'Business authorization', 'Result & trace'],
|
|
150
|
+
boundary: 'BailingHub controls what the agent can reach. Your system remains the final authority.',
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const entryPointsCopy = {
|
|
155
|
+
'zh-CN': {
|
|
156
|
+
title: '一个中枢,接住三种 AI 操作入口',
|
|
157
|
+
desc: '网页聊天、本地智能体和 API 自动化入口汇入同一套 BailingHub 身份、路由、工具、审批与审计能力,再调用已有业务系统。',
|
|
158
|
+
eyebrow: 'BAILINGHUB · 多入口,同一套业务能力',
|
|
159
|
+
subtitle: '用户从哪里发起可以不同,权限、业务规则和最终执行仍统一回到原系统。',
|
|
160
|
+
entries: [
|
|
161
|
+
['网页聊天', '嵌入商城、SaaS 或内部后台', '用户留在当前页面直接说目标'],
|
|
162
|
+
['本地智能体', '浏览器授权后在桌面 Agent 中办事', '显式选择已授权的业务身份'],
|
|
163
|
+
['API / 自动化', '后端事件、定时任务或工作流触发', '用稳定接口接入现有自动化'],
|
|
164
|
+
],
|
|
165
|
+
hub: 'BailingHub',
|
|
166
|
+
hubMeta: '统一的 Agent 业务控制面',
|
|
167
|
+
hubSteps: ['身份绑定', '路由与上下文', '工具范围', '审批与审计'],
|
|
168
|
+
business: '已有业务系统',
|
|
169
|
+
businessMeta: '数据、账号和权限继续归你',
|
|
170
|
+
systems: ['商城', 'SaaS', 'CRM', 'ERP', '内部系统'],
|
|
171
|
+
result: '同一套已接入能力 · 同一条授权边界 · 同一份执行记录',
|
|
172
|
+
boundary: '入口可以更换,业务身份不能由模型伪造,业务权限也不会被绕过。',
|
|
173
|
+
},
|
|
174
|
+
en: {
|
|
175
|
+
title: 'Three agent entry points, one business control plane',
|
|
176
|
+
desc: 'Embedded web chat, local agents, and API automation share the same BailingHub identity, routing, tool, approval, and audit controls before reaching existing business systems.',
|
|
177
|
+
eyebrow: 'BAILINGHUB · MANY ENTRY POINTS, ONE CAPABILITY LAYER',
|
|
178
|
+
subtitle: 'Start from different interfaces while keeping authorization, business rules, and execution in your system.',
|
|
179
|
+
entries: [
|
|
180
|
+
['Embedded web chat', 'Add it to commerce, SaaS, or internal admin UIs', 'Users state goals without leaving the page'],
|
|
181
|
+
['Local agent', 'Authorize in browser; use a desktop agent', 'Explicitly select an authorized business identity'],
|
|
182
|
+
['API / automation', 'Backend events, schedules, or workflows', 'Connect existing automation through a stable API'],
|
|
183
|
+
],
|
|
184
|
+
hub: 'BailingHub',
|
|
185
|
+
hubMeta: 'One Agent-to-Business control plane',
|
|
186
|
+
hubSteps: ['Identity binding', 'Route & context', 'Tool scope', 'Approval & audit'],
|
|
187
|
+
business: 'Existing systems',
|
|
188
|
+
businessMeta: 'Your data, accounts, and permissions stay yours',
|
|
189
|
+
systems: ['Commerce', 'SaaS', 'CRM', 'ERP', 'Internal'],
|
|
190
|
+
result: 'Shared capabilities · shared authorization boundary · shared execution record',
|
|
191
|
+
boundary: 'Entry points may change. Models cannot invent business identity or bypass business authorization.',
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const demoEvidenceCopy = {
|
|
196
|
+
'zh-CN': {
|
|
197
|
+
eyebrow: '公开 Docker Demo · 确定性示例数据',
|
|
198
|
+
title: '从 SO-1001 到审批、执行与 Trace,完整链路可复现',
|
|
199
|
+
desc: 'BailingHub 公开 Docker Demo 使用固定订单 SO-1001 演示退款请求经过可信身份、工具治理、业务审批、获批执行和 Trace 留痕的完整链路。',
|
|
200
|
+
subtitle: '无需真实业务系统或模型 Key;运行开源 Demo 即可生成真实任务与留痕。',
|
|
201
|
+
requestLabel: '01 · 用户请求',
|
|
202
|
+
request: '帮 SO-1001 申请退款 199 元',
|
|
203
|
+
orderLabel: '公开 fixture 订单',
|
|
204
|
+
orderRows: [['订单', 'SO-1001'], ['商品', 'AI 咨询套餐'], ['金额', '¥199'], ['状态', '已支付 · 待发货']],
|
|
205
|
+
governanceLabel: '02 · 治理闸门',
|
|
206
|
+
toolLabel: '调用工具',
|
|
207
|
+
tool: 'request_demo_refund',
|
|
208
|
+
risk: '高风险写操作',
|
|
209
|
+
approval: '需要业务审批',
|
|
210
|
+
waiting: '等待业务审批',
|
|
211
|
+
approved: '业务侧已批准',
|
|
212
|
+
frozen: '批准的是冻结后的这一组参数',
|
|
213
|
+
evidenceLabel: '03 · 执行与留痕',
|
|
214
|
+
resultTitle: '退款申请已写入 Demo Business',
|
|
215
|
+
resultMeta: '原业务系统完成最终授权与真实执行',
|
|
216
|
+
traceTitle: 'DEMO TRACE',
|
|
217
|
+
trace: ['任务接收', '可信主体绑定', '工具调用冻结', '业务审批决定', '获批调用执行'],
|
|
218
|
+
summary: '1 次工具调用 · 1 次审批 · 0 个错误 · 可回查',
|
|
219
|
+
boundary: '这是公开 fixture 的可复现流程证据,不包含客户后台、真实账号或私密凭据。',
|
|
220
|
+
},
|
|
221
|
+
en: {
|
|
222
|
+
eyebrow: 'PUBLIC DEMO · DETERMINISTIC FIXTURE',
|
|
223
|
+
title: 'SO-1001: request → approval → execution → trace',
|
|
224
|
+
desc: 'The public BailingHub Docker demo uses deterministic order SO-1001 to reproduce a refund request through trusted identity, tool governance, business approval, approved execution, and trace evidence.',
|
|
225
|
+
subtitle: 'No production system or model key. Reproduce the governed path locally.',
|
|
226
|
+
requestLabel: '01 · REQUEST',
|
|
227
|
+
request: 'Request ¥199 refund for SO-1001',
|
|
228
|
+
orderLabel: 'FIXTURE ORDER',
|
|
229
|
+
orderRows: [['Order', 'SO-1001'], ['Item', 'AI consulting plan'], ['Amount', '¥199'], ['Status', 'Paid · awaiting shipment']],
|
|
230
|
+
governanceLabel: '02 · GOVERNANCE',
|
|
231
|
+
toolLabel: 'TOOL CALL',
|
|
232
|
+
tool: 'request_demo_refund',
|
|
233
|
+
risk: 'High-risk write',
|
|
234
|
+
approval: 'Approval required',
|
|
235
|
+
waiting: 'Awaiting approval',
|
|
236
|
+
approved: 'Approved',
|
|
237
|
+
frozen: 'Arguments frozen before approval',
|
|
238
|
+
evidenceLabel: '03 · RESULT & TRACE',
|
|
239
|
+
resultTitle: 'Refund request recorded',
|
|
240
|
+
resultMeta: 'Demo Business authorized and executed',
|
|
241
|
+
traceTitle: 'DEMO TRACE',
|
|
242
|
+
trace: ['Request received', 'Subject bound', 'Arguments frozen', 'Approved', 'Executed'],
|
|
243
|
+
summary: '1 tool call · 1 approval · 0 errors',
|
|
244
|
+
boundary: 'Public fixture evidence—no customer console, real account, or private credential.',
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
|
|
85
248
|
function escapeXml(value) {
|
|
86
249
|
return String(value).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>');
|
|
87
250
|
}
|
|
@@ -156,15 +319,333 @@ function render(locale, themeName) {
|
|
|
156
319
|
return `${parts.join('\n')}\n`;
|
|
157
320
|
}
|
|
158
321
|
|
|
322
|
+
function renderProductOverview(locale, themeName) {
|
|
323
|
+
const c = themes[themeName];
|
|
324
|
+
const t = productOverviewCopy[locale];
|
|
325
|
+
const family = locale === 'zh-CN'
|
|
326
|
+
? `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif`
|
|
327
|
+
: `-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`;
|
|
328
|
+
const mono = `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`;
|
|
329
|
+
const parts = [];
|
|
330
|
+
const addText = (x, y, value, options = {}) => parts.push(text(x, y, value, { fill: c.text, family, ...options }));
|
|
331
|
+
const addPanel = (x, y, width, height, { fill = c.surface, stroke = c.border, radius = 18, strokeWidth = 2 } = {}) => {
|
|
332
|
+
parts.push(`<rect x="${x}" y="${y}" width="${width}" height="${height}" rx="${radius}" fill="${fill}" stroke="${stroke}" stroke-width="${strokeWidth}"/>`);
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
parts.push(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" role="img" aria-labelledby="title desc">`);
|
|
336
|
+
parts.push(`<title id="title">${escapeXml(t.title)}</title>`);
|
|
337
|
+
parts.push(`<desc id="desc">${escapeXml(t.desc)}</desc>`);
|
|
338
|
+
parts.push(`<defs><marker id="overview-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${c.green}"/></marker></defs>`);
|
|
339
|
+
parts.push(`<rect width="1600" height="900" fill="${c.background}"/>`);
|
|
340
|
+
parts.push(`<path d="M 0 0 H 1600 V 7 H 0 Z" fill="${c.green}"/>`);
|
|
341
|
+
|
|
342
|
+
addText(80, 55, t.eyebrow, { size: 17, weight: 750, fill: c.green, family: mono });
|
|
343
|
+
addText(80, 108, t.title, { size: locale === 'zh-CN' ? 46 : 44, weight: 800 });
|
|
344
|
+
addText(80, 148, t.subtitle, { size: 21, fill: c.muted });
|
|
345
|
+
|
|
346
|
+
addPanel(80, 185, 410, 455);
|
|
347
|
+
addText(110, 225, t.requestLabel, { size: 17, weight: 750, fill: c.green, family: mono });
|
|
348
|
+
addPanel(110, 255, 350, 315, { fill: c.background, radius: 14 });
|
|
349
|
+
parts.push(`<circle cx="132" cy="278" r="5" fill="${c.green}"/>`);
|
|
350
|
+
addText(148, 284, t.requestSystem, { size: locale === 'zh-CN' ? 16 : 15, weight: 650, fill: c.muted });
|
|
351
|
+
addPanel(130, 315, 270, 58, { fill: c.surfaceStrong, stroke: c.surfaceStrong, radius: 15, strokeWidth: 1 });
|
|
352
|
+
addText(150, 351, locale === 'zh-CN' ? '今天先处理哪些订单?' : 'What should I handle today?', { size: 17, fill: c.muted });
|
|
353
|
+
addPanel(160, 400, 270, 104, { fill: c.greenSoft, stroke: c.green, radius: 15, strokeWidth: 2 });
|
|
354
|
+
addText(180, 439, t.requestLines[0], { size: locale === 'zh-CN' ? 19 : 17, weight: 700, fill: c.greenText });
|
|
355
|
+
addText(180, 470, t.requestLines[1], { size: locale === 'zh-CN' ? 19 : 17, weight: 700, fill: c.greenText });
|
|
356
|
+
parts.push(`<rect x="130" y="532" width="210" height="10" rx="5" fill="${c.surfaceStrong}"/>`);
|
|
357
|
+
addText(110, 610, t.requestMeta, { size: 17, weight: 700, fill: c.muted });
|
|
358
|
+
|
|
359
|
+
parts.push(`<path d="M 490 412 H 550" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#overview-arrow)"/>`);
|
|
360
|
+
|
|
361
|
+
addPanel(565, 185, 470, 455, { fill: c.greenSoft, stroke: c.green, radius: 18, strokeWidth: 3 });
|
|
362
|
+
addText(595, 225, t.hubLabel, { size: 17, weight: 750, fill: c.greenText, family: mono });
|
|
363
|
+
addText(595, 265, t.hubTitle, { size: locale === 'zh-CN' ? 25 : 23, weight: 800 });
|
|
364
|
+
t.hubSteps.forEach((step, index) => {
|
|
365
|
+
const y = 294 + index * 78;
|
|
366
|
+
addPanel(595, y, 410, 64, { fill: c.background, radius: 12 });
|
|
367
|
+
parts.push(`<rect x="611" y="${y + 17}" width="30" height="30" rx="8" fill="${index === 2 ? c.warningSoft : c.accentSoft}"/>`);
|
|
368
|
+
addText(626, y + 39, String(index + 1), { size: 15, weight: 800, fill: index === 2 ? c.warning : c.accent, anchor: 'middle', family: mono });
|
|
369
|
+
addText(657, y + 27, step[0], { size: 19, weight: 750 });
|
|
370
|
+
addText(657, y + 50, step[1], { size: locale === 'zh-CN' ? 15 : 14, fill: c.muted });
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
parts.push(`<path d="M 1035 412 H 1095" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#overview-arrow)"/>`);
|
|
374
|
+
|
|
375
|
+
addPanel(1110, 185, 410, 455);
|
|
376
|
+
addText(1140, 225, t.systemLabel, { size: 17, weight: 750, fill: c.green, family: mono });
|
|
377
|
+
addText(1140, 265, t.systemTitle, { size: locale === 'zh-CN' ? 25 : 22, weight: 800 });
|
|
378
|
+
t.systems.forEach((system, index) => {
|
|
379
|
+
const x = 1140 + (index % 2) * 180;
|
|
380
|
+
const y = 295 + Math.floor(index / 2) * 112;
|
|
381
|
+
addPanel(x, y, 160, 92, { fill: index === 0 ? c.accentSoft : c.background, radius: 12 });
|
|
382
|
+
addText(x + 18, y + 35, system[0], { size: 20, weight: 800, fill: index === 0 ? c.accent : c.text });
|
|
383
|
+
addText(x + 18, y + 65, system[1], { size: locale === 'zh-CN' ? 14 : 13, fill: c.muted });
|
|
384
|
+
});
|
|
385
|
+
addPanel(1140, 526, 340, 76, { fill: c.greenSoft, stroke: c.green, radius: 12 });
|
|
386
|
+
addText(1310, 558, locale === 'zh-CN' ? '执行完成' : 'ACTION COMPLETE', { size: 16, weight: 800, fill: c.greenText, anchor: 'middle', family: mono });
|
|
387
|
+
addText(1310, 584, t.systemResult, { size: locale === 'zh-CN' ? 14 : 12, fill: c.muted, anchor: 'middle' });
|
|
388
|
+
|
|
389
|
+
addPanel(80, 685, 1440, 112, { fill: c.surfaceStrong, radius: 16 });
|
|
390
|
+
t.path.forEach((stage, index) => {
|
|
391
|
+
const x = 115 + index * 287;
|
|
392
|
+
parts.push(`<circle cx="${x + 20}" cy="730" r="20" fill="${index === t.path.length - 1 ? c.green : c.background}" stroke="${c.green}" stroke-width="2"/>`);
|
|
393
|
+
addText(x + 20, 736, String(index + 1), { size: 15, weight: 800, fill: index === t.path.length - 1 ? c.background : c.greenText, anchor: 'middle', family: mono });
|
|
394
|
+
addText(x + 50, 736, stage, { size: locale === 'zh-CN' ? 17 : 15, weight: 700 });
|
|
395
|
+
if (index < t.path.length - 1) {
|
|
396
|
+
parts.push(`<path d="M ${x + 242} 730 H ${x + 272}" fill="none" stroke="${c.green}" stroke-width="3" marker-end="url(#overview-arrow)"/>`);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
addText(800, 770, locale === 'zh-CN' ? '从一句话到真实业务结果,每一步都能回头核对' : 'From one request to a real business result, every step remains verifiable', { size: locale === 'zh-CN' ? 17 : 15, fill: c.muted, anchor: 'middle' });
|
|
400
|
+
addText(800, 854, t.boundary, { size: locale === 'zh-CN' ? 18 : 17, weight: 650, fill: c.muted, anchor: 'middle' });
|
|
401
|
+
|
|
402
|
+
parts.push('</svg>');
|
|
403
|
+
return `${parts.join('\n')}\n`;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
function renderEntryPoints(locale, themeName) {
|
|
407
|
+
const c = themes[themeName];
|
|
408
|
+
const t = entryPointsCopy[locale];
|
|
409
|
+
const family = locale === 'zh-CN'
|
|
410
|
+
? `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif`
|
|
411
|
+
: `-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`;
|
|
412
|
+
const mono = `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`;
|
|
413
|
+
const parts = [];
|
|
414
|
+
const addText = (x, y, value, options = {}) => parts.push(text(x, y, value, { fill: c.text, family, ...options }));
|
|
415
|
+
const addPanel = (x, y, width, height, { fill = c.surface, stroke = c.border, radius = 18, strokeWidth = 2 } = {}) => {
|
|
416
|
+
parts.push(`<rect x="${x}" y="${y}" width="${width}" height="${height}" rx="${radius}" fill="${fill}" stroke="${stroke}" stroke-width="${strokeWidth}"/>`);
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
parts.push(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" role="img" aria-labelledby="title desc">`);
|
|
420
|
+
parts.push(`<title id="title">${escapeXml(t.title)}</title>`);
|
|
421
|
+
parts.push(`<desc id="desc">${escapeXml(t.desc)}</desc>`);
|
|
422
|
+
parts.push(`<defs><marker id="entry-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${c.green}"/></marker></defs>`);
|
|
423
|
+
parts.push(`<rect width="1600" height="900" fill="${c.background}"/>`);
|
|
424
|
+
parts.push(`<path d="M 0 0 H 1600 V 7 H 0 Z" fill="${c.green}"/>`);
|
|
425
|
+
|
|
426
|
+
addText(80, 55, t.eyebrow, { size: 17, weight: 750, fill: c.green, family: mono });
|
|
427
|
+
addText(80, 108, t.title, { size: locale === 'zh-CN' ? 46 : 43, weight: 800 });
|
|
428
|
+
addText(80, 148, t.subtitle, { size: locale === 'zh-CN' ? 20 : 19, fill: c.muted });
|
|
429
|
+
|
|
430
|
+
t.entries.forEach((entry, index) => {
|
|
431
|
+
const y = 185 + index * 205;
|
|
432
|
+
addPanel(80, y, 430, 155, { fill: index === 1 ? c.accentSoft : c.surface, stroke: index === 1 ? c.accent : c.border, radius: 16 });
|
|
433
|
+
parts.push(`<circle cx="128" cy="${y + 48}" r="25" fill="${index === 1 ? c.accent : c.green}"/>`);
|
|
434
|
+
if (index === 0) {
|
|
435
|
+
parts.push(`<path d="M 114 ${y + 39} h 28 v 17 h -13 l -8 7 v -7 h -7 z" fill="none" stroke="${c.background}" stroke-width="3" stroke-linejoin="round"/>`);
|
|
436
|
+
} else if (index === 1) {
|
|
437
|
+
parts.push(`<rect x="113" y="${y + 34}" width="30" height="21" rx="3" fill="none" stroke="${c.background}" stroke-width="3"/><path d="M 123 ${y + 61} h 10 M 128 ${y + 55} v 6" stroke="${c.background}" stroke-width="3" stroke-linecap="round"/>`);
|
|
438
|
+
} else {
|
|
439
|
+
addText(128, y + 55, '</>', { size: 14, weight: 800, fill: c.background, anchor: 'middle', family: mono });
|
|
440
|
+
}
|
|
441
|
+
addText(170, y + 43, entry[0], { size: locale === 'zh-CN' ? 23 : 21, weight: 800 });
|
|
442
|
+
addText(170, y + 77, entry[1], { size: locale === 'zh-CN' ? 17 : 15, weight: 650, fill: c.muted });
|
|
443
|
+
addText(110, y + 123, entry[2], { size: locale === 'zh-CN' ? 16 : 14, fill: c.muted });
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
parts.push(`<path d="M 510 262 C 560 262 560 330 610 330" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#entry-arrow)"/>`);
|
|
447
|
+
parts.push(`<path d="M 510 467 C 560 467 560 450 610 450" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#entry-arrow)"/>`);
|
|
448
|
+
parts.push(`<path d="M 510 672 C 560 672 560 570 610 570" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#entry-arrow)"/>`);
|
|
449
|
+
|
|
450
|
+
addPanel(610, 235, 440, 430, { fill: c.greenSoft, stroke: c.green, radius: 20, strokeWidth: 3 });
|
|
451
|
+
addText(640, 282, t.hub, { size: 31, weight: 850, fill: c.greenText });
|
|
452
|
+
addText(640, 316, t.hubMeta, { size: locale === 'zh-CN' ? 17 : 16, fill: c.muted });
|
|
453
|
+
t.hubSteps.forEach((step, index) => {
|
|
454
|
+
const x = 640 + (index % 2) * 190;
|
|
455
|
+
const y = 355 + Math.floor(index / 2) * 125;
|
|
456
|
+
addPanel(x, y, 170, 96, { fill: c.background, radius: 13 });
|
|
457
|
+
parts.push(`<rect x="${x + 18}" y="${y + 18}" width="28" height="28" rx="7" fill="${index === 3 ? c.warningSoft : c.accentSoft}"/>`);
|
|
458
|
+
addText(x + 32, y + 38, String(index + 1), { size: 14, weight: 800, fill: index === 3 ? c.warning : c.accent, anchor: 'middle', family: mono });
|
|
459
|
+
addText(x + 18, y + 74, step, { size: locale === 'zh-CN' ? 18 : 15, weight: 750 });
|
|
460
|
+
});
|
|
461
|
+
addText(830, 625, locale === 'zh-CN' ? '路由、知识、工具和记录只维护一套' : 'Maintain routes, knowledge, tools, and records once', { size: locale === 'zh-CN' ? 16 : 14, fill: c.muted, anchor: 'middle' });
|
|
462
|
+
|
|
463
|
+
parts.push(`<path d="M 1050 450 H 1145" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#entry-arrow)"/>`);
|
|
464
|
+
|
|
465
|
+
addPanel(1160, 235, 360, 430);
|
|
466
|
+
addText(1190, 282, t.business, { size: locale === 'zh-CN' ? 27 : 25, weight: 800 });
|
|
467
|
+
addText(1190, 316, t.businessMeta, { size: locale === 'zh-CN' ? 16 : 14, fill: c.muted });
|
|
468
|
+
t.systems.forEach((system, index) => {
|
|
469
|
+
const row = Math.floor(index / 2);
|
|
470
|
+
const x = 1190 + (index % 2) * 150;
|
|
471
|
+
const y = 360 + row * 78;
|
|
472
|
+
const width = index === 4 ? 280 : 130;
|
|
473
|
+
addPanel(index === 4 ? 1190 : x, y, width, 56, { fill: index === 4 ? c.greenSoft : c.background, stroke: index === 4 ? c.green : c.border, radius: 12 });
|
|
474
|
+
addText((index === 4 ? 1190 : x) + width / 2, y + 36, system, { size: locale === 'zh-CN' ? 18 : 16, weight: 750, fill: index === 4 ? c.greenText : c.text, anchor: 'middle' });
|
|
475
|
+
});
|
|
476
|
+
addText(1340, 620, locale === 'zh-CN' ? '最终授权 · 真实执行 · 原生数据' : 'Final authority · real execution · system data', { size: locale === 'zh-CN' ? 15 : 13, weight: 650, fill: c.muted, anchor: 'middle' });
|
|
477
|
+
|
|
478
|
+
addPanel(610, 705, 910, 74, { fill: c.surfaceStrong, radius: 14 });
|
|
479
|
+
parts.push(`<circle cx="650" cy="742" r="19" fill="${c.green}"/>`);
|
|
480
|
+
parts.push(`<path d="M 640 742 l 7 7 14 -16" fill="none" stroke="${c.background}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>`);
|
|
481
|
+
addText(690, 749, t.result, { size: locale === 'zh-CN' ? 17 : 15, weight: 700 });
|
|
482
|
+
addText(800, 854, t.boundary, { size: locale === 'zh-CN' ? 18 : 16, weight: 650, fill: c.muted, anchor: 'middle' });
|
|
483
|
+
|
|
484
|
+
parts.push('</svg>');
|
|
485
|
+
return `${parts.join('\n')}\n`;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
function renderGitHubSocialPreview() {
|
|
489
|
+
const c = themes.dark;
|
|
490
|
+
const family = `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif`;
|
|
491
|
+
const mono = `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`;
|
|
492
|
+
const parts = [];
|
|
493
|
+
const addText = (x, y, value, options = {}) => parts.push(text(x, y, value, { fill: c.text, family, ...options }));
|
|
494
|
+
const addPill = (x, y, width, label, { fill = c.surfaceStrong, stroke = c.border, color = c.text } = {}) => {
|
|
495
|
+
parts.push(`<rect x="${x}" y="${y}" width="${width}" height="58" rx="29" fill="${fill}" stroke="${stroke}" stroke-width="2"/>`);
|
|
496
|
+
addText(x + width / 2, y + 38, label, { size: 21, weight: 750, fill: color, anchor: 'middle' });
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
parts.push(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 640" role="img" aria-labelledby="title desc">`);
|
|
500
|
+
parts.push('<title id="title">让 Agent 通过对话操作你的业务后台</title>');
|
|
501
|
+
parts.push('<desc id="desc">BailingHub 将自然语言请求连接到商城、SaaS、CRM 和 ERP,同时保留可信身份、权限、审批、审计与业务系统最终授权。</desc>');
|
|
502
|
+
parts.push(`<defs><linearGradient id="social-glow" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#12261a"/><stop offset="1" stop-color="#0d1117"/></linearGradient><marker id="social-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${c.green}"/></marker></defs>`);
|
|
503
|
+
parts.push('<rect width="1280" height="640" fill="url(#social-glow)"/>');
|
|
504
|
+
parts.push(`<path d="M 0 0 H 1280 V 8 H 0 Z" fill="${c.green}"/>`);
|
|
505
|
+
parts.push('<circle cx="1140" cy="78" r="170" fill="#3fb950" opacity="0.05"/>');
|
|
506
|
+
parts.push('<circle cx="1120" cy="600" r="260" fill="#58a6ff" opacity="0.04"/>');
|
|
507
|
+
|
|
508
|
+
parts.push('<g transform="translate(84 60) scale(0.315) translate(-42 -44)">');
|
|
509
|
+
parts.push('<path fill="#3fb950" fill-rule="evenodd" d="M42 44h34v152H54l-12-12zM76 44h58v34H76zM76 103h22v34H76zM76 162h58v34H76zM150 44h22l12 12v8h-34zM150 86h34v110h-34z"/>');
|
|
510
|
+
parts.push('<path fill="#56d364" fill-rule="evenodd" d="M116 103h68v34h-68zM76 162h58v34H76z"/>');
|
|
511
|
+
parts.push('</g>');
|
|
512
|
+
addText(152, 95, 'BailingHub', { size: 31, weight: 850, fill: c.greenText });
|
|
513
|
+
addText(330, 94, 'AGENT-TO-BUSINESS', { size: 17, weight: 750, fill: c.muted, family: mono });
|
|
514
|
+
|
|
515
|
+
addText(80, 188, '让 Agent 通过对话', { size: 58, weight: 850 });
|
|
516
|
+
addText(80, 258, '操作你的业务后台', { size: 58, weight: 850 });
|
|
517
|
+
addText(80, 310, '商城 · SaaS · CRM · ERP|权限、审批与审计仍在你手里', { size: 25, weight: 650, fill: c.muted });
|
|
518
|
+
addText(80, 348, 'Connect natural-language agents to existing business systems—without bypassing authorization.', { size: 18, fill: c.muted });
|
|
519
|
+
|
|
520
|
+
addPill(80, 414, 230, '自然语言目标');
|
|
521
|
+
parts.push(`<path d="M 310 443 H 365" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#social-arrow)"/>`);
|
|
522
|
+
parts.push(`<rect x="380" y="382" width="390" height="126" rx="24" fill="${c.greenSoft}" stroke="${c.green}" stroke-width="3"/>`);
|
|
523
|
+
addText(575, 424, 'BailingHub', { size: 30, weight: 850, fill: c.greenText, anchor: 'middle' });
|
|
524
|
+
addText(575, 462, '身份 · 能力 · 审批 · 审计', { size: 21, weight: 700, fill: c.muted, anchor: 'middle' });
|
|
525
|
+
addText(575, 489, 'Identity · capability · approval · audit', { size: 14, fill: c.muted, anchor: 'middle', family: mono });
|
|
526
|
+
parts.push(`<path d="M 770 443 H 825" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#social-arrow)"/>`);
|
|
527
|
+
addPill(840, 414, 360, '商城 · SaaS · CRM · ERP', { fill: c.accentSoft, stroke: c.accent, color: c.accent });
|
|
528
|
+
|
|
529
|
+
parts.push(`<rect x="80" y="552" width="1120" height="2" fill="${c.border}"/>`);
|
|
530
|
+
parts.push(`<circle cx="98" cy="590" r="13" fill="${c.warningSoft}" stroke="${c.warning}" stroke-width="2"/>`);
|
|
531
|
+
addText(98, 596, '!', { size: 16, weight: 850, fill: c.warning, anchor: 'middle', family: mono });
|
|
532
|
+
addText(124, 597, '不是让 AI 直连数据库;最终权限和业务规则仍由你的系统判断。', { size: 20, weight: 650, fill: c.muted });
|
|
533
|
+
|
|
534
|
+
parts.push('</svg>');
|
|
535
|
+
return `${parts.join('\n')}\n`;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function renderDemoEvidence(locale, themeName) {
|
|
539
|
+
const c = themes[themeName];
|
|
540
|
+
const t = demoEvidenceCopy[locale];
|
|
541
|
+
const family = locale === 'zh-CN'
|
|
542
|
+
? `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif`
|
|
543
|
+
: `Arial, 'Helvetica Neue', sans-serif`;
|
|
544
|
+
const mono = `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`;
|
|
545
|
+
const parts = [];
|
|
546
|
+
const addText = (x, y, value, options = {}) => parts.push(text(x, y, value, { fill: c.text, family, ...options }));
|
|
547
|
+
const addPanel = (x, y, width, height, { fill = c.surface, stroke = c.border, radius = 18, strokeWidth = 2 } = {}) => {
|
|
548
|
+
parts.push(`<rect x="${x}" y="${y}" width="${width}" height="${height}" rx="${radius}" fill="${fill}" stroke="${stroke}" stroke-width="${strokeWidth}"/>`);
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
parts.push(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 900" role="img" aria-labelledby="title desc">`);
|
|
552
|
+
parts.push(`<title id="title">${escapeXml(t.title)}</title>`);
|
|
553
|
+
parts.push(`<desc id="desc">${escapeXml(t.desc)}</desc>`);
|
|
554
|
+
parts.push(`<defs><marker id="demo-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="${c.green}"/></marker></defs>`);
|
|
555
|
+
parts.push(`<rect width="1600" height="900" fill="${c.background}"/>`);
|
|
556
|
+
parts.push(`<path d="M 0 0 H 1600 V 7 H 0 Z" fill="${c.green}"/>`);
|
|
557
|
+
|
|
558
|
+
addText(80, 53, t.eyebrow, { size: locale === 'zh-CN' ? 17 : 15, weight: 750, fill: c.green, family: mono });
|
|
559
|
+
addText(80, 104, t.title, { size: locale === 'zh-CN' ? 39 : 34, weight: locale === 'zh-CN' ? 820 : 700 });
|
|
560
|
+
addText(80, 142, t.subtitle, { size: locale === 'zh-CN' ? 19 : 16, fill: c.muted });
|
|
561
|
+
|
|
562
|
+
addPanel(80, 180, 410, 535);
|
|
563
|
+
addText(110, 220, t.requestLabel, { size: locale === 'zh-CN' ? 17 : 15, weight: 750, fill: c.green, family: mono });
|
|
564
|
+
addPanel(110, 250, 350, 96, { fill: c.greenSoft, stroke: c.green, radius: 16 });
|
|
565
|
+
addText(135, 292, t.request, { size: locale === 'zh-CN' ? 20 : 16, weight: 750, fill: c.greenText });
|
|
566
|
+
addText(135, 320, locale === 'zh-CN' ? '自然语言请求' : 'Natural-language request', { size: 14, fill: c.muted });
|
|
567
|
+
addText(110, 386, t.orderLabel, { size: 15, weight: 750, fill: c.muted, family: mono });
|
|
568
|
+
addPanel(110, 405, 350, 255, { fill: c.background, radius: 14 });
|
|
569
|
+
t.orderRows.forEach((row, index) => {
|
|
570
|
+
const y = 446 + index * 55;
|
|
571
|
+
addText(135, y, row[0], { size: 15, weight: 650, fill: c.muted });
|
|
572
|
+
addText(435, y, row[1], { size: locale === 'zh-CN' ? 17 : 15, weight: 750, anchor: 'end', family: index === 0 ? mono : family });
|
|
573
|
+
if (index < t.orderRows.length - 1) parts.push(`<path d="M 135 ${y + 20} H 435" stroke="${c.border}" stroke-width="1"/>`);
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
parts.push(`<path d="M 490 447 H 545" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#demo-arrow)"/>`);
|
|
577
|
+
|
|
578
|
+
addPanel(560, 180, 480, 535, { fill: c.greenSoft, stroke: c.green, radius: 18, strokeWidth: 3 });
|
|
579
|
+
addText(590, 220, t.governanceLabel, { size: locale === 'zh-CN' ? 17 : 15, weight: 750, fill: c.greenText, family: mono });
|
|
580
|
+
addText(590, 264, t.toolLabel, { size: 14, weight: 750, fill: c.muted, family: mono });
|
|
581
|
+
addPanel(590, 282, 420, 66, { fill: c.background, radius: 12 });
|
|
582
|
+
addText(615, 324, t.tool, { size: locale === 'zh-CN' ? 19 : 17, weight: 750, family: mono });
|
|
583
|
+
addPanel(590, 370, 195, 58, { fill: c.warningSoft, stroke: c.warning, radius: 29 });
|
|
584
|
+
addText(688, 407, t.risk, { size: locale === 'zh-CN' ? 17 : 14, weight: 750, fill: c.warning, anchor: 'middle' });
|
|
585
|
+
addPanel(805, 370, 205, 58, { fill: c.warningSoft, stroke: c.warning, radius: 29 });
|
|
586
|
+
addText(908, 407, t.approval, { size: locale === 'zh-CN' ? 17 : 14, weight: 750, fill: c.warning, anchor: 'middle' });
|
|
587
|
+
addPanel(590, 460, 175, 82, { fill: c.warningSoft, stroke: c.warning, radius: 13 });
|
|
588
|
+
addText(678, 495, '1', { size: 15, weight: 850, fill: c.warning, anchor: 'middle', family: mono });
|
|
589
|
+
addText(678, 522, t.waiting, { size: locale === 'zh-CN' ? 16 : 14, weight: 750, fill: c.warning, anchor: 'middle' });
|
|
590
|
+
parts.push(`<path d="M 765 501 H 830" fill="none" stroke="${c.green}" stroke-width="3" marker-end="url(#demo-arrow)"/>`);
|
|
591
|
+
addPanel(845, 460, 165, 82, { fill: c.greenSoft, stroke: c.green, radius: 13 });
|
|
592
|
+
parts.push(`<path d="M 887 495 l 9 9 18 -22" fill="none" stroke="${c.green}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>`);
|
|
593
|
+
addText(928, 522, t.approved, { size: locale === 'zh-CN' ? 16 : 13, weight: 750, fill: c.greenText, anchor: 'middle' });
|
|
594
|
+
addPanel(590, 580, 420, 74, { fill: c.surfaceStrong, radius: 12 });
|
|
595
|
+
parts.push(`<rect x="612" y="601" width="32" height="32" rx="8" fill="${c.accentSoft}"/>`);
|
|
596
|
+
addText(628, 624, '{}', { size: 13, weight: 850, fill: c.accent, anchor: 'middle', family: mono });
|
|
597
|
+
addText(660, 624, t.frozen, { size: locale === 'zh-CN' ? 16 : 13, weight: 700 });
|
|
598
|
+
|
|
599
|
+
parts.push(`<path d="M 1040 447 H 1095" fill="none" stroke="${c.green}" stroke-width="4" marker-end="url(#demo-arrow)"/>`);
|
|
600
|
+
|
|
601
|
+
addPanel(1110, 180, 410, 535);
|
|
602
|
+
addText(1140, 220, t.evidenceLabel, { size: locale === 'zh-CN' ? 17 : 15, weight: 750, fill: c.green, family: mono });
|
|
603
|
+
addPanel(1140, 250, 350, 104, { fill: c.greenSoft, stroke: c.green, radius: 14 });
|
|
604
|
+
parts.push(`<circle cx="1172" cy="287" r="17" fill="${c.green}"/>`);
|
|
605
|
+
parts.push(`<path d="M 1163 287 l 7 7 13 -16" fill="none" stroke="${c.background}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>`);
|
|
606
|
+
addText(1203, 286, t.resultTitle, { size: locale === 'zh-CN' ? 17 : 15, weight: 800, fill: c.greenText });
|
|
607
|
+
addText(1172, 326, t.resultMeta, { size: locale === 'zh-CN' ? 14 : 12, fill: c.muted });
|
|
608
|
+
addText(1140, 397, t.traceTitle, { size: 15, weight: 800, fill: c.muted, family: mono });
|
|
609
|
+
t.trace.forEach((stage, index) => {
|
|
610
|
+
const y = 432 + index * 48;
|
|
611
|
+
parts.push(`<circle cx="1160" cy="${y - 6}" r="12" fill="${index === t.trace.length - 1 ? c.green : c.background}" stroke="${c.green}" stroke-width="2"/>`);
|
|
612
|
+
addText(1160, y - 1, String(index + 1), { size: 11, weight: 850, fill: index === t.trace.length - 1 ? c.background : c.greenText, anchor: 'middle', family: mono });
|
|
613
|
+
addText(1185, y, stage, { size: locale === 'zh-CN' ? 16 : 14, weight: 700 });
|
|
614
|
+
if (index < t.trace.length - 1) parts.push(`<path d="M 1160 ${y + 7} V ${y + 30}" stroke="${c.green}" stroke-width="2"/>`);
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
addPanel(80, 750, 1440, 68, { fill: c.surfaceStrong, radius: 14 });
|
|
618
|
+
parts.push(`<circle cx="118" cy="784" r="18" fill="${c.green}"/>`);
|
|
619
|
+
parts.push(`<path d="M 108 784 l 7 7 14 -17" fill="none" stroke="${c.background}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>`);
|
|
620
|
+
addText(150, 791, t.summary, { size: locale === 'zh-CN' ? 18 : 16, weight: 750 });
|
|
621
|
+
addText(800, 858, t.boundary, { size: locale === 'zh-CN' ? 16 : 14, weight: 650, fill: c.muted, anchor: 'middle' });
|
|
622
|
+
|
|
623
|
+
parts.push('</svg>');
|
|
624
|
+
return `${parts.join('\n')}\n`;
|
|
625
|
+
}
|
|
626
|
+
|
|
159
627
|
const outputs = [
|
|
160
|
-
['assets/architecture-overview.zh-CN.svg', 'zh-CN', 'light'],
|
|
161
|
-
['assets/architecture-overview.zh-CN-dark.svg', 'zh-CN', 'dark'],
|
|
162
|
-
['assets/architecture-overview.en.svg', 'en', 'light'],
|
|
163
|
-
['assets/architecture-overview.en-dark.svg', 'en', 'dark'],
|
|
628
|
+
['assets/architecture-overview.zh-CN.svg', () => render('zh-CN', 'light')],
|
|
629
|
+
['assets/architecture-overview.zh-CN-dark.svg', () => render('zh-CN', 'dark')],
|
|
630
|
+
['assets/architecture-overview.en.svg', () => render('en', 'light')],
|
|
631
|
+
['assets/architecture-overview.en-dark.svg', () => render('en', 'dark')],
|
|
632
|
+
['assets/readme-product-overview.zh-CN.svg', () => renderProductOverview('zh-CN', 'light')],
|
|
633
|
+
['assets/readme-product-overview.zh-CN-dark.svg', () => renderProductOverview('zh-CN', 'dark')],
|
|
634
|
+
['assets/readme-product-overview.en.svg', () => renderProductOverview('en', 'light')],
|
|
635
|
+
['assets/readme-product-overview.en-dark.svg', () => renderProductOverview('en', 'dark')],
|
|
636
|
+
['assets/readme-entry-points.zh-CN.svg', () => renderEntryPoints('zh-CN', 'light')],
|
|
637
|
+
['assets/readme-entry-points.zh-CN-dark.svg', () => renderEntryPoints('zh-CN', 'dark')],
|
|
638
|
+
['assets/readme-entry-points.en.svg', () => renderEntryPoints('en', 'light')],
|
|
639
|
+
['assets/readme-entry-points.en-dark.svg', () => renderEntryPoints('en', 'dark')],
|
|
640
|
+
['.github/social-preview/bailinghub-social-preview.svg', renderGitHubSocialPreview],
|
|
641
|
+
['assets/readme-demo-evidence.zh-CN.svg', () => renderDemoEvidence('zh-CN', 'light')],
|
|
642
|
+
['assets/readme-demo-evidence.zh-CN-dark.svg', () => renderDemoEvidence('zh-CN', 'dark')],
|
|
643
|
+
['assets/readme-demo-evidence.en.svg', () => renderDemoEvidence('en', 'light')],
|
|
644
|
+
['assets/readme-demo-evidence.en-dark.svg', () => renderDemoEvidence('en', 'dark')],
|
|
164
645
|
];
|
|
165
646
|
|
|
166
|
-
for (const [file,
|
|
167
|
-
const expected =
|
|
647
|
+
for (const [file, build] of outputs) {
|
|
648
|
+
const expected = build();
|
|
168
649
|
if (checkOnly) {
|
|
169
650
|
const actual = readFileSync(file, 'utf8');
|
|
170
651
|
if (actual !== expected) {
|
|
@@ -177,5 +658,5 @@ for (const [file, locale, theme] of outputs) {
|
|
|
177
658
|
}
|
|
178
659
|
|
|
179
660
|
if (!process.exitCode) {
|
|
180
|
-
console.log(`✓ README
|
|
661
|
+
console.log(`✓ README assets ${checkOnly ? 'are current' : 'generated'} (${outputs.length} files)`);
|
|
181
662
|
}
|
package/scripts/install.sh
CHANGED
|
@@ -275,7 +275,7 @@ write_env() {
|
|
|
275
275
|
TOOL_SECRET="${DEMO_TOOL_SECRET:-$(secret)}"
|
|
276
276
|
CLIENT_TOKEN="${DEMO_CLIENT_TOKEN:-$(secret)}"
|
|
277
277
|
IMAGE_TAG="${BAILING_IMAGE_TAG:-$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$APP_DIR/package.json" | head -1)}"
|
|
278
|
-
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.
|
|
278
|
+
[ -n "$IMAGE_TAG" ] || IMAGE_TAG="0.6.0"
|
|
279
279
|
IMAGE_REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_IMAGE_REGISTRY}"
|
|
280
280
|
IMAGE_NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_IMAGE_NAMESPACE}"
|
|
281
281
|
cat > "$ENV_FILE" <<EOF
|
|
@@ -9,7 +9,7 @@ REGISTRY="${BAILING_IMAGE_REGISTRY:-$DEFAULT_REGISTRY}"
|
|
|
9
9
|
NAMESPACE="${BAILING_IMAGE_NAMESPACE:-$DEFAULT_NAMESPACE}"
|
|
10
10
|
PACKAGE_VERSION="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' package.json | head -1)"
|
|
11
11
|
TAG="${BAILING_IMAGE_TAG:-$PACKAGE_VERSION}"
|
|
12
|
-
[ -n "$TAG" ] || TAG="0.
|
|
12
|
+
[ -n "$TAG" ] || TAG="0.6.0"
|
|
13
13
|
NODE_IMAGE="${BAILING_NODE_IMAGE:-node:22-bookworm-slim}"
|
|
14
14
|
PLATFORM="${BAILING_IMAGE_PLATFORM:-linux/amd64}"
|
|
15
15
|
PUSH="${BAILING_PUSH_IMAGES:-0}"
|
|
@@ -36,6 +36,8 @@ const requiredRepoFiles = [
|
|
|
36
36
|
'docs/RELEASE_NOTES_v0.3.3.md',
|
|
37
37
|
'docs/RELEASE_NOTES_v0.3.4.md',
|
|
38
38
|
'docs/RELEASE_NOTES_v0.5.0.md',
|
|
39
|
+
'docs/RELEASE_NOTES_v0.5.1.md',
|
|
40
|
+
'docs/RELEASE_NOTES_v0.6.0.md',
|
|
39
41
|
'docs/CHANGELOG.md',
|
|
40
42
|
'docs/CLIENT_API.md',
|
|
41
43
|
'config.example.json',
|
|
@@ -128,6 +128,8 @@ const requiredFiles = [
|
|
|
128
128
|
'docs/RELEASE_NOTES_v0.3.3.md',
|
|
129
129
|
'docs/RELEASE_NOTES_v0.3.4.md',
|
|
130
130
|
'docs/RELEASE_NOTES_v0.5.0.md',
|
|
131
|
+
'docs/RELEASE_NOTES_v0.5.1.md',
|
|
132
|
+
'docs/RELEASE_NOTES_v0.6.0.md',
|
|
131
133
|
'docs/CHANGELOG.md',
|
|
132
134
|
];
|
|
133
135
|
for (const file of requiredFiles) requireFile(file);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
-- Complete visible conversations are admin-only audit records. Authorization
|
|
2
|
+
-- threads, runtime memory, Agent Sessions, runs and tool ownership stay separate.
|
|
3
|
+
CREATE TABLE IF NOT EXISTS `bz_agent_conversation_audits` (
|
|
4
|
+
`conversation_id` CHAR(36) NOT NULL,
|
|
5
|
+
`creator_session_id` CHAR(36) NOT NULL,
|
|
6
|
+
`client_app_id` VARCHAR(64) NOT NULL,
|
|
7
|
+
`route_key` VARCHAR(64) NOT NULL,
|
|
8
|
+
`client_archive_id` CHAR(36) NOT NULL,
|
|
9
|
+
`client_conversation_id` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
|
10
|
+
`enrollment_hash` CHAR(64) NOT NULL,
|
|
11
|
+
`state` VARCHAR(16) NOT NULL,
|
|
12
|
+
`member_count` SMALLINT UNSIGNED NOT NULL,
|
|
13
|
+
`confirmed_count` SMALLINT UNSIGNED NOT NULL,
|
|
14
|
+
`last_sequence` INT UNSIGNED NOT NULL DEFAULT 0,
|
|
15
|
+
`content_bytes` INT UNSIGNED NOT NULL DEFAULT 0,
|
|
16
|
+
`message_count` INT UNSIGNED NOT NULL DEFAULT 0,
|
|
17
|
+
`turn_count` INT UNSIGNED NOT NULL DEFAULT 0,
|
|
18
|
+
`last_turn_id` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
19
|
+
`last_turn_status` VARCHAR(16) DEFAULT NULL,
|
|
20
|
+
`created_at` DATETIME NOT NULL,
|
|
21
|
+
`updated_at` DATETIME NOT NULL,
|
|
22
|
+
PRIMARY KEY (`conversation_id`),
|
|
23
|
+
UNIQUE KEY `uk_conversation_archive` (`creator_session_id`,`route_key`,`client_archive_id`),
|
|
24
|
+
KEY `idx_conversation_recent` (`updated_at`,`conversation_id`)
|
|
25
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Administrator-only visible conversation audit';
|
|
26
|
+
|
|
27
|
+
CREATE TABLE IF NOT EXISTS `bz_agent_conversation_members` (
|
|
28
|
+
`conversation_id` CHAR(36) NOT NULL,
|
|
29
|
+
`session_id` CHAR(36) NOT NULL,
|
|
30
|
+
`display_label` VARCHAR(128) NOT NULL,
|
|
31
|
+
`identity_hash` CHAR(64) DEFAULT NULL,
|
|
32
|
+
`principal_json` JSON DEFAULT NULL,
|
|
33
|
+
`on_behalf_of` VARCHAR(191) DEFAULT NULL,
|
|
34
|
+
`confirmed_at` DATETIME DEFAULT NULL,
|
|
35
|
+
PRIMARY KEY (`conversation_id`,`session_id`)
|
|
36
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Frozen members confirmed by their own Agent bearer';
|
|
37
|
+
|
|
38
|
+
CREATE TABLE IF NOT EXISTS `bz_agent_conversation_events` (
|
|
39
|
+
`conversation_id` CHAR(36) NOT NULL,
|
|
40
|
+
`sequence` INT UNSIGNED NOT NULL,
|
|
41
|
+
`event_id` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
|
42
|
+
`client_turn_id` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
|
43
|
+
`kind` VARCHAR(24) NOT NULL,
|
|
44
|
+
`content` MEDIUMTEXT DEFAULT NULL,
|
|
45
|
+
`run_id` CHAR(36) DEFAULT NULL,
|
|
46
|
+
`member_session_id` CHAR(36) DEFAULT NULL,
|
|
47
|
+
`thread_id` BIGINT UNSIGNED DEFAULT NULL,
|
|
48
|
+
`status` VARCHAR(16) DEFAULT NULL,
|
|
49
|
+
`event_hash` CHAR(64) NOT NULL,
|
|
50
|
+
`created_at` DATETIME NOT NULL,
|
|
51
|
+
PRIMARY KEY (`conversation_id`,`sequence`),
|
|
52
|
+
UNIQUE KEY `uk_conversation_event` (`conversation_id`,`event_id`),
|
|
53
|
+
UNIQUE KEY `uk_conversation_run` (`run_id`),
|
|
54
|
+
KEY `idx_conversation_turn` (`conversation_id`,`client_turn_id`,`kind`)
|
|
55
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Idempotent visible text and verified run links, never Agent memory';
|