bailinghub 0.5.1 → 0.6.1
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 -207
- 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_CLIENT_QUICKSTART.en.md +29 -8
- package/docs/AGENT_CLIENT_QUICKSTART.md +25 -6
- package/docs/AGENT_CONVERSATION_AUDIT.en.md +194 -0
- package/docs/AGENT_CONVERSATION_AUDIT.md +111 -0
- package/docs/CHANGELOG.en.md +21 -0
- package/docs/CHANGELOG.md +21 -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.6.0.en.md +53 -0
- package/docs/RELEASE_NOTES_v0.6.0.md +53 -0
- package/docs/RELEASE_NOTES_v0.6.1.en.md +53 -0
- package/docs/RELEASE_NOTES_v0.6.1.md +53 -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 +2 -2
- 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/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-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-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 +3 -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-r10QUjLQ.js → Accounts-Ca_VnSu9.js} +1 -1
- package/web/console/assets/{AgentClients-UTTqbkjy.js → AgentClients-BPIvlLYY.js} +1 -1
- package/web/console/assets/{Approvals-BGKkYIya.js → Approvals-CMvPWacY.js} +1 -1
- package/web/console/assets/{Audit-CQmjOAoO.js → Audit-CIRqOCnL.js} +1 -1
- package/web/console/assets/{BrandLockup-BF_0pCa3.js → BrandLockup-BrytmTTH.js} +1 -1
- package/web/console/assets/{Channels-C4yZE67F.js → Channels-CApxH2TB.js} +1 -1
- package/web/console/assets/{ChatEntries-OqsqLjU6.js → ChatEntries-CJon3bWJ.js} +1 -1
- package/web/console/assets/{Clients-Dv3sv51C.js → Clients-BSA1rlTB.js} +1 -1
- package/web/console/assets/{Cost-C_-kiH59.js → Cost-BbhlQFP8.js} +1 -1
- package/web/console/assets/{Credentials-CPTEAiV6.js → Credentials-kqr1W0K7.js} +1 -1
- package/web/console/assets/{Diagnostics-O-NKFOeI.js → Diagnostics-Kljt9XTH.js} +1 -1
- package/web/console/assets/{Executors-GVIAiNgv.js → Executors-DnsB-Xz4.js} +1 -1
- package/web/console/assets/{Kb-BsCWkJI1.js → Kb-DLZSAFWP.js} +2 -2
- package/web/console/assets/{Login-VFjkHNMr.js → Login-DiTjPWmN.js} +1 -1
- package/web/console/assets/{Projects-Ds-sJwfy.js → Projects-CXcVCgCD.js} +1 -1
- package/web/console/assets/{Routes-Wwurw2UU.js → Routes-DN9_d9Po.js} +1 -1
- package/web/console/assets/Runs-Cwbe6thL.js +3 -0
- package/web/console/assets/Runs-D8UmjP5G.css +1 -0
- package/web/console/assets/{Setup-BLelw0_V.js → Setup-FqoCKmfZ.js} +1 -1
- package/web/console/assets/{Shell-CvaeK4j_.js → Shell-BEqpONiy.js} +1 -1
- package/web/console/assets/{StorageBuckets-Dv6u47yO.js → StorageBuckets-CkORbYXY.js} +1 -1
- package/web/console/assets/{SystemSettings-B9K7zaDU.js → SystemSettings-gTQAazu7.js} +1 -1
- package/web/console/assets/{SystemStatus-H-oKDo-y.js → SystemStatus-DAmUUNqO.js} +1 -1
- package/web/console/assets/{Targets-CCFhjPKf.js → Targets-CZmDcjsE.js} +1 -1
- package/web/console/assets/{Tools-D0H9xpFH.js → Tools-CIHInlHL.js} +1 -1
- package/web/console/assets/{index-CuoTgf6q.js → index-BkLbd7Cc.js} +2 -2
- package/web/console/assets/{index-DyX9Bz3V.js → index-QnmD7N7F.js} +1 -1
- package/web/console/assets/{request-F5lXa7Ro.js → request-r7GHVJzw.js} +1 -1
- package/web/console/assets/{schema-DUWaWqPn.js → schema-BVn_hB7M.js} +1 -1
- package/web/console/assets/vendor-mammoth-BUEEDX6A.js +231 -0
- package/web/console/index.html +1 -1
- package/web-admin/package-lock.json +3 -3
- package/web-admin/src/components/ClientConversations.vue +244 -0
- package/web-admin/src/components/conversation-audit.ts +121 -0
- package/web-admin/src/pages/Runs.vue +73 -17
- package/web-admin/tests/conversation-audit.fixture.mjs +182 -0
- package/web-admin/tests/conversation-audit.test.mjs +93 -0
- package/web/console/assets/Runs-4zDD9VOC.css +0 -1
- package/web/console/assets/Runs-DLPzXmSy.js +0 -3
- package/web/console/assets/vendor-mammoth-nXG51Cg7.js +0 -231
package/README.en.md
CHANGED
|
@@ -5,265 +5,226 @@
|
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="README.md">简体中文</a> · <strong>English</strong>
|
|
10
|
+
</p>
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
# BailingHub: Let Agents Operate Your Business System Through Conversation
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
BailingHub is open-source software that lets people operate an existing commerce, SaaS, CRM, or ERP system through conversation while keeping every action under control. A user can ask an agent to look up an order, update a staff profile, prepare an after-sales action, or complete another permitted workflow without learning every screen in the back office.
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
You choose which business APIs become available. BailingHub connects the conversation to those capabilities and keeps identity, permissions, approvals, signatures, execution records, and audit evidence under your control.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
> **Let AI take over repetitive operations, not business authority.**
|
|
17
19
|
|
|
18
|
-
>
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://trial.bailinghub.com/register/"><strong>Try Online</strong></a>
|
|
22
|
+
· <a href="docs/DEMO.en.md"><strong>Run the Demo</strong></a>
|
|
23
|
+
· <a href="docs/QUICKSTART.en.md"><strong>Deploy BailingHub</strong></a>
|
|
24
|
+
· <a href="docs/INTEGRATION.en.md"><strong>Connect Your System</strong></a>
|
|
25
|
+
</p>
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
<picture>
|
|
28
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/readme-product-overview.en-dark.svg">
|
|
29
|
+
<img src="assets/readme-product-overview.en.svg" width="100%" alt="BailingHub connects conversational entry points to governed business capabilities while the business system remains the authority">
|
|
30
|
+
</picture>
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
## v0.6.1: Follow the Conversation Through Its Business Actions
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
- Which tools is the agent allowed to see?
|
|
26
|
-
- How do we prevent unsafe writes, over-permissioned tools, or accidental damage?
|
|
27
|
-
- Where do approval requests, audit trails, and trace logs live?
|
|
28
|
-
- How do we switch models or agent runtimes without rewriting business code?
|
|
29
|
-
- How do we let the business system remain the final authority for user permissions?
|
|
34
|
+
Select accounts A and B from the same business system in a compatible client, then ask: “Check orders for both stores, but update the contact for Store A only.” The agent can choose the corresponding authorization for each action within that selection. Your business system must expose those operations and still decides whether each call is allowed.
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
In **Tasks → Conversations**, administrators can read the text synchronized by the client—user requests, intermediate explanations and final replies—then open each account's original calls and approvals. Unsynchronized text and missing history are identified separately from business results.
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
This experience uses **BailingHub 0.6.1 + MCP/Agent Client SDK 0.4.0 + DSH plugin 0.4.0**, or your own client implementing the same host APIs. These are separate packages. Multi-account scope currently covers one business system and one workspace.
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
[Start with the user guide](docs/user-guide/conversations.en.md) · [Upgrade and compatible versions](docs/RELEASE_NOTES_v0.6.1.en.md)
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
- A governed tool runtime for OpenAPI/SDK business tools.
|
|
39
|
-
- A routing layer for `/run`, web chat widgets, and inbound channels.
|
|
40
|
-
- A runtime ledger for jobs, messages, approvals, audit events, and trace data.
|
|
41
|
-
- A way to let AI act on behalf of a real business user without bypassing your existing permission model.
|
|
42
|
+
## Operate the System by Conversation
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
Most business software already has the data, permission model, and APIs it needs. What it lacks is a safe bridge between a natural-language request and the exact operation the current user is allowed to perform.
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
- A generic low-code workflow engine.
|
|
47
|
-
- A replacement for your business backend.
|
|
48
|
-
- A replacement for MCP.
|
|
46
|
+
BailingHub provides that bridge for scenarios such as:
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
| Team or system | Example conversational operations |
|
|
49
|
+
|---|---|
|
|
50
|
+
| Commerce operations | Find products, inspect inventory, query orders, or start an allowed after-sales action. |
|
|
51
|
+
| Customer service | Look up a member, summarize an order, check fulfillment, or collect the information needed for the next step. |
|
|
52
|
+
| SaaS administration | Query tenant-scoped data or update an allowed setting without bypassing the existing role model. |
|
|
53
|
+
| CRM and sales | Find a customer, review activity, add a permitted follow-up, or prepare a handoff. |
|
|
54
|
+
| Internal operations | Query staff records, update allowed profile fields, or run a governed administrative action. |
|
|
55
|
+
| Reporting | Ask for current business data and receive text, tables, a built-in follow-up form, or charts when the host registers a trusted renderer. |
|
|
51
56
|
|
|
52
|
-
|
|
57
|
+
These are integration patterns, not bundled access to a specific product. Your business system exposes the selected operations, and it remains the final authority on every call.
|
|
53
58
|
|
|
54
|
-
|
|
59
|
+
## Three Ways to Start a Conversation
|
|
55
60
|
|
|
56
|
-
|
|
61
|
+
<picture>
|
|
62
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/readme-entry-points.en-dark.svg">
|
|
63
|
+
<img src="assets/readme-entry-points.en.svg" width="100%" alt="Three BailingHub entry points: embedded assistant, API and automation clients, and a local agent client">
|
|
64
|
+
</picture>
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
### 1. Embedded assistant
|
|
59
67
|
|
|
60
|
-
|
|
68
|
+
Add the zero-dependency web widget to an existing back office, customer portal, or SaaS page. A signed visitor ticket can carry the trusted business identity, while page context helps the agent understand where the conversation started.
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
### 2. API, workflow, and channel clients
|
|
63
71
|
|
|
64
|
-
|
|
65
|
-
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
66
|
-
docker compose up --build
|
|
67
|
-
```
|
|
72
|
+
Use the versioned Client API and `/run` flow from your own application, Dify, n8n, an inbound channel, or another compatible client. The caller starts the task; BailingHub selects the configured route, context, tools, and delivery policy.
|
|
68
73
|
|
|
69
|
-
|
|
74
|
+
### 3. Local agent client
|
|
70
75
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
Let a desktop or CLI agent plan locally after browser authorization through the business system's existing login. BailingHub provides the permitted workspace and capabilities, then governs each invocation and records the visible result and execution trail.
|
|
77
|
+
|
|
78
|
+
The independent [BailingHub MCP Server](https://github.com/bailinghub/bailinghub-mcp-server) provides a host-neutral SDK and MCP surface. DeepSeek Harness users can install the independent community plugin [dsh-bailinghub](https://github.com/bailinghub/bailinghub-dsh-plugin). Neither package is part of the BailingHub Core distribution.
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
## The Simple Flow
|
|
76
81
|
|
|
77
82
|
```text
|
|
78
|
-
|
|
83
|
+
User or business event
|
|
84
|
+
↓
|
|
85
|
+
Widget / Client API / local Agent Client
|
|
86
|
+
↓
|
|
87
|
+
BailingHub route or Agent workspace
|
|
88
|
+
↓
|
|
89
|
+
Agent interprets, plans, and selects a permitted capability
|
|
90
|
+
↓
|
|
91
|
+
BailingHub checks identity, allowlist, risk, approval, and idempotency
|
|
92
|
+
↓
|
|
93
|
+
Signed request reaches the existing business API
|
|
94
|
+
↓
|
|
95
|
+
Business system rechecks current permissions and performs the operation
|
|
96
|
+
↓
|
|
97
|
+
Result, conversation, approval, audit, and trace evidence return to BailingHub
|
|
79
98
|
```
|
|
80
99
|
|
|
81
|
-
The
|
|
100
|
+
The model or agent runtime can change without becoming the source of business truth.
|
|
82
101
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- Audit and trace flows
|
|
102
|
+
| Layer | Owns |
|
|
103
|
+
|---|---|
|
|
104
|
+
| Your business system | Accounts, tenants, roles, permissions, authoritative data, and final authorization. |
|
|
105
|
+
| BailingHub | Routes, capability projection, governed invocation, approvals, jobs, conversations, audit, and trace. |
|
|
106
|
+
| Agent or model | Understanding, planning, tool selection, and response generation inside the granted boundary. |
|
|
107
|
+
| ACC | The portable declaration of what a business capability means and how it should be governed. |
|
|
90
108
|
|
|
91
|
-
|
|
109
|
+
## A2B and ACC
|
|
92
110
|
|
|
93
|
-
|
|
111
|
+
**A2B (Agent-to-Business)** means letting an agent work through an existing business system on behalf of a real business subject, with controls suitable for business actions rather than only text generation.
|
|
94
112
|
|
|
95
|
-
|
|
113
|
+
[ACC, the Agent Capability Contract](https://www.agentcapability.org), is the open capability-declaration contract used by BailingHub. The independent specification repository is [agent-capability/agent-capability-contract](https://github.com/agent-capability/agent-capability-contract).
|
|
96
114
|
|
|
97
|
-
|
|
115
|
+
A business developer can describe an operation through OpenAPI `x-agent-capability` metadata or a BailingHub SDK. BailingHub compiles those declarations into unified `ToolDefinition` records and applies the configured allowlist, risk, approval, rate-limit, signature, and audit rules at runtime.
|
|
98
116
|
|
|
99
|
-
```
|
|
100
|
-
|
|
117
|
+
```text
|
|
118
|
+
ACC describes the business capability.
|
|
119
|
+
BailingHub governs when and how an agent may reach it.
|
|
120
|
+
The business system decides whether the current user may execute it.
|
|
101
121
|
```
|
|
102
122
|
|
|
103
|
-
|
|
123
|
+
## Run the Complete Demo
|
|
104
124
|
|
|
105
|
-
|
|
106
|
-
curl -fsSL https://www.bailinghub.com/install.sh | env BAILING_INSTALL_MODE=image sh
|
|
107
|
-
```
|
|
125
|
+
To explore before installing, use the [online experience](https://trial.bailinghub.com/register/). It is for understanding the product and configuration model only. Do not upload production credentials or sensitive data, and do not connect real workloads.
|
|
108
126
|
|
|
109
|
-
|
|
127
|
+
To run the complete disposable loop locally:
|
|
110
128
|
|
|
111
129
|
```bash
|
|
112
|
-
|
|
130
|
+
git clone --branch v0.6.1 --depth 1 https://github.com/bailinghub/bailinghub.git
|
|
131
|
+
cd bailinghub
|
|
132
|
+
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
133
|
+
docker compose up --build
|
|
113
134
|
```
|
|
114
135
|
|
|
115
|
-
|
|
136
|
+
Open `http://localhost:18900/console/` and sign in with:
|
|
116
137
|
|
|
117
138
|
```text
|
|
118
|
-
|
|
119
|
-
ghcr.io/bailinghub/bailing-demo-business:<version>
|
|
139
|
+
admin / bailing-demo-admin
|
|
120
140
|
```
|
|
121
141
|
|
|
122
|
-
|
|
123
|
-
curl -fsSL https://www.bailinghub.com/install.sh | env \
|
|
124
|
-
BAILING_INSTALL_MODE=image \
|
|
125
|
-
BAILING_IMAGE_REGISTRY=ghcr.io \
|
|
126
|
-
BAILING_IMAGE_NAMESPACE=bailinghub \
|
|
127
|
-
BAILING_MYSQL_IMAGE=mysql:8.4 \
|
|
128
|
-
sh
|
|
129
|
-
```
|
|
142
|
+
The demo starts BailingHub, MySQL, a sample business application, a tool provider, a route, and an integration client. Follow [Docker Demo](docs/DEMO.en.md) for the guided task or [Independent Validation](docs/INDEPENDENT_VALIDATION.en.md) to test the public path without maintainer-only instructions.
|
|
130
143
|
|
|
131
|
-
|
|
144
|
+
### Reproducible Execution Evidence
|
|
132
145
|
|
|
133
|
-
|
|
146
|
+
<picture>
|
|
147
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/readme-demo-evidence.en-dark.svg">
|
|
148
|
+
<img src="assets/readme-demo-evidence.en.svg" width="100%" alt="The public Docker demo uses deterministic order SO-1001 to show a refund request moving through tool governance, business approval, approved execution, and trace evidence">
|
|
149
|
+
</picture>
|
|
134
150
|
|
|
135
|
-
|
|
151
|
+
Everything in this visual comes from the repository's deterministic fixture, not a customer console. Running `npm run demo:e2e` creates the job, freezes the tool arguments, completes approval and execution, and writes reviewable trace evidence in the public demo.
|
|
136
152
|
|
|
137
|
-
|
|
138
|
-
/.well-known/bailing/tools.json
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Tools can be declared by:
|
|
153
|
+
### See the Governed Loop in 15 Seconds
|
|
142
154
|
|
|
143
|
-
-
|
|
144
|
-
- PHP SDK annotations
|
|
145
|
-
- PHP 7 builder SDK
|
|
146
|
-
- Node SDK
|
|
147
|
-
- Python SDK
|
|
148
|
-
- Java SDK
|
|
149
|
-
- Go SDK
|
|
150
|
-
- .NET SDK
|
|
151
|
-
- Future adapters such as MCP
|
|
155
|
+
The animation below was captured from this repository's public Docker demo. A natural-language refund request for deterministic order `SO-1001` is stopped before execution, sent to the sample business system with frozen arguments, approved there, executed, and recorded in Trace. It contains no customer console, real account, or production credential.
|
|
152
156
|
|
|
153
|
-
|
|
157
|
+
<img src=".github/readme-media/bailinghub-public-demo.en.gif" width="100%" alt="BailingHub public Docker demo shows a refund request moving through hub governance, business approval, approved execution, and trace evidence">
|
|
154
158
|
|
|
155
|
-
|
|
156
|
-
- risk level
|
|
157
|
-
- rate limits
|
|
158
|
-
- approval intent
|
|
159
|
-
- audit trail
|
|
160
|
-
- HMAC-signed tool calls
|
|
161
|
-
- on-behalf-of subject propagation
|
|
159
|
+
[Run the Docker Demo](docs/DEMO.en.md) · [Reproduce the independent validation](docs/INDEPENDENT_VALIDATION.en.md)
|
|
162
160
|
|
|
163
|
-
|
|
161
|
+
For a fresh Ubuntu or Debian server, the auditable installer uses official prebuilt images by default:
|
|
164
162
|
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Your business system controls authority.
|
|
163
|
+
```bash
|
|
164
|
+
curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
168
165
|
```
|
|
169
166
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
```js
|
|
173
|
-
import { buildOpenApiSpec, param, tool } from '@bailinghub/connect';
|
|
174
|
-
|
|
175
|
-
export default buildOpenApiSpec({
|
|
176
|
-
title: 'CRM Tools',
|
|
177
|
-
version: '1.0.0',
|
|
178
|
-
authzProbe: { method: 'POST', path: '/.well-known/bailing/authz-probe' },
|
|
179
|
-
tools: [
|
|
180
|
-
tool({
|
|
181
|
-
name: 'member_query',
|
|
182
|
-
method: 'GET',
|
|
183
|
-
path: '/api/members/{id}',
|
|
184
|
-
description: 'Query member profile',
|
|
185
|
-
scope: 'member.read',
|
|
186
|
-
requiresSubject: true,
|
|
187
|
-
params: [param('id', { in: 'path', required: true, description: 'Member ID' })],
|
|
188
|
-
}),
|
|
189
|
-
],
|
|
190
|
-
});
|
|
191
|
-
```
|
|
167
|
+
Use [Quickstart](docs/QUICKSTART.en.md) for registry selection, source-mode installation, production secrets, MySQL, the first route, and upgrade checks.
|
|
192
168
|
|
|
193
|
-
##
|
|
169
|
+
## Connect an Existing System
|
|
194
170
|
|
|
195
|
-
|
|
196
|
-
<source media="(prefers-color-scheme: dark)" srcset="assets/architecture-overview.en-dark.png">
|
|
197
|
-
<img src="assets/architecture-overview.en.png" width="100%" alt="BailingHub architecture from business triggers through routing, context assembly, brain dispatch, governance, and result delivery">
|
|
198
|
-
</picture>
|
|
171
|
+
Start with one small, well-understood read operation and one carefully governed write operation:
|
|
199
172
|
|
|
200
|
-
|
|
173
|
+
1. **Declare the operations.** Publish OpenAPI with `x-agent-capability`, or build the specification with the PHP, PHP 7, Node, Python, Java, Go, or .NET SDK.
|
|
174
|
+
2. **Establish identity at the entry point.** A signed widget ticket, trusted `/run` request, or Agent Auth approval binds the business subject when an operation requires one. The receiving API then verifies the BailingHub signature and rechecks the subject's current tenant, role, and permission.
|
|
175
|
+
3. **Register the tool provider and route.** Choose the model or executor, knowledge, memory, tool allowlist, approval policy, and delivery target in the BailingHub console.
|
|
176
|
+
4. **Choose an entry point.** Embed the widget, call the Client API, connect an automation platform, or authorize a local Agent Client.
|
|
177
|
+
5. **Verify the evidence.** Test one read, one permitted write, one denied action, approval when required, replay behavior, and the resulting audit and trace records.
|
|
201
178
|
|
|
202
|
-
|
|
203
|
-
|---|---|
|
|
204
|
-
| Trigger routes | Route a business scenario to a model, executor, memory policy, knowledge base, tools, and delivery target. |
|
|
205
|
-
| Tool governance | Govern OpenAPI/SDK tools with allowlists, risk levels, rate limits, approvals, audit, and signatures. |
|
|
206
|
-
| Business authority | Tool calls carry `X-Bailing-On-Behalf-Of`; the business system keeps final permission control. |
|
|
207
|
-
| Runtime ledger | Jobs, messages, approvals, audit records, and trace data live in the hub state database. |
|
|
208
|
-
| Knowledge injection | Route-level knowledge retrieval before dispatch. |
|
|
209
|
-
| Web widget | Embed a zero-dependency chat widget into any web page. |
|
|
210
|
-
| SDKs | PHP, PHP 7, Node, Python, Java, Go, and .NET helper SDKs for tool specs, tickets, HMAC verification, authz probes, callbacks, and hub API calls. |
|
|
211
|
-
| Self-hosted | Run in your own environment with MySQL and Docker. |
|
|
179
|
+
The conventional tool manifest endpoint is:
|
|
212
180
|
|
|
213
|
-
|
|
181
|
+
```text
|
|
182
|
+
/.well-known/bailing/tools.json
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The SDK helpers cover capability specifications, tickets, `sha256=` HMAC verification, authorization probes, callbacks, and Hub API calls. They do not replace your application's login or permission system.
|
|
186
|
+
|
|
187
|
+
## Safety and Authority Boundaries
|
|
214
188
|
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
221
|
-
- [Agent Auth v1](docs/AGENT_AUTH_API.en.md)
|
|
222
|
-
- [Agent Client Runtime v1](docs/AGENT_CLIENT_RUNTIME_API.en.md)
|
|
223
|
-
- [Kernel Host API v1](docs/KERNEL_HOST_API.en.md)
|
|
224
|
-
- [Business Tools and Governance](docs/TOOLS.en.md)
|
|
225
|
-
- [SDK Guide](docs/SDK.en.md)
|
|
226
|
-
- [Dify Integration Recipe](docs/integrations/dify/README.en.md)
|
|
227
|
-
- [JeecgBoot Integration Recipe](docs/integrations/jeecgboot/README.en.md)
|
|
228
|
-
- [English Documentation Map](docs/README.en.md)
|
|
229
|
-
- [Architecture](docs/ARCHITECTURE.en.md)
|
|
230
|
-
- [Pipeline](docs/PIPELINE.en.md)
|
|
231
|
-
- [Tool Model](docs/TOOLS_MODEL.en.md)
|
|
232
|
-
- [Tool Governance](docs/TOOLS_DESIGN.en.md)
|
|
233
|
-
- [AI-Friendly Tool Design](docs/AI_FRIENDLY_TOOLS.en.md)
|
|
234
|
-
- [Third-Party Integration](docs/INTEGRATION.en.md)
|
|
235
|
-
- [Latest Release Notes](docs/RELEASE_NOTES_v0.5.1.en.md)
|
|
236
|
-
- [v0.1.7 Release Notes](docs/RELEASE_NOTES_v0.1.7.en.md)
|
|
237
|
-
- [v0.1.6 Release Notes](docs/RELEASE_NOTES_v0.1.6.en.md)
|
|
238
|
-
- [v0.1.5 Release Notes](docs/RELEASE_NOTES_v0.1.5.en.md)
|
|
239
|
-
- [v0.1.4 Release Notes](docs/RELEASE_NOTES_v0.1.4.en.md)
|
|
240
|
-
- [v0.1.3 Release Notes](docs/RELEASE_NOTES_v0.1.3.en.md)
|
|
241
|
-
- [v0.1.2 Release Notes](docs/RELEASE_NOTES_v0.1.2.en.md)
|
|
242
|
-
- [First Public Release Notes](docs/RELEASE_NOTES_v0.1.0.en.md)
|
|
243
|
-
- [Compatibility And Upgrade Policy](docs/COMPATIBILITY.en.md)
|
|
189
|
+
- **The business system is the final authority.** When an operation requires an acting subject, `X-Bailing-On-Behalf-Of` carries the bound identity; the receiving API still verifies the signature and current permission before doing work.
|
|
190
|
+
- **Capabilities are projected, not assumed.** Every tool must be declared and pass the route allowlist and any subject requirement. Agent Client mode additionally intersects route, workspace, and Agent Session scope; its direct write tools use exact operation IDs and do not accept wildcards.
|
|
191
|
+
- **Approval cannot weaken business policy.** ACC metadata supplies the default risk and approval intent; BailingHub may add stricter approval requirements but cannot grant authority the business system did not provide.
|
|
192
|
+
- **Credentials have separate roles.** Business-backend Client Tokens do not enter the browser or local plugin. Agent authorization uses browser login, PKCE, short-lived access, refresh rotation, and revocable sessions.
|
|
193
|
+
- **Side effects are traceable.** Idempotency, frozen approval snapshots, audit events, task state, visible conversation messages, and tool traces support review and recovery. Hidden model reasoning is neither required nor stored.
|
|
194
|
+
- **Production secrets stay outside public configuration.** Use environment variables or a secret manager, restrict management access, configure retention, and test the pause switch before production use.
|
|
244
195
|
|
|
245
|
-
|
|
196
|
+
See [Security Policy](SECURITY.md), [Business Tools and Governance](docs/TOOLS.en.md), and [Agent Client v1](docs/AGENT_CLIENT_QUICKSTART.en.md) for the operational details.
|
|
246
197
|
|
|
247
|
-
|
|
198
|
+
## Deployment Scope
|
|
199
|
+
|
|
200
|
+
The open-source edition is designed for **one organization per deployment**. One hub may connect multiple business systems, clients, routes, and tool providers when they share one management and audit boundary.
|
|
248
201
|
|
|
249
|
-
|
|
202
|
+
Run separate BailingHub deployments for mutually isolated organizations. A `client`, `route`, `workspace`, or `tool_provider` is not an organization-level security boundary.
|
|
250
203
|
|
|
251
|
-
|
|
204
|
+
## Documentation
|
|
252
205
|
|
|
253
|
-
|
|
206
|
+
- [Quickstart](docs/QUICKSTART.en.md) — deploy and run the first route.
|
|
207
|
+
- [Docker Demo](docs/DEMO.en.md) — complete the sample business-operation loop.
|
|
208
|
+
- [Integration Guide](docs/INTEGRATION.en.md) — connect an existing application.
|
|
209
|
+
- [Agent Client v1](docs/AGENT_CLIENT_QUICKSTART.en.md) — browser authorization and local planning.
|
|
210
|
+
- [Business Tools and Governance](docs/TOOLS.en.md) — declare, sign, approve, and audit tools.
|
|
211
|
+
- [HTTP Contract](docs/CONTRACT.en.md) — stable network and identity boundaries.
|
|
212
|
+
- [Architecture](docs/ARCHITECTURE.en.md) — runtime layers and dependency direction.
|
|
213
|
+
- [English Documentation Map](docs/README.en.md) — the complete public documentation index.
|
|
214
|
+
- [Changelog](docs/CHANGELOG.en.md) and [v0.6.1 Release Notes](docs/RELEASE_NOTES_v0.6.1.en.md) — current release changes and upgrade notes.
|
|
254
215
|
|
|
255
|
-
|
|
216
|
+
## Feedback and Ecosystem
|
|
256
217
|
|
|
257
|
-
|
|
218
|
+
BailingHub is an early public project. If an integration is unclear, a safety boundary deserves scrutiny, or a scenario is missing, open a [bug report](https://github.com/bailinghub/bailinghub/issues/new?template=bug_report.yml), [feature request](https://github.com/bailinghub/bailinghub/issues/new?template=feature_request.yml), or pull request.
|
|
258
219
|
|
|
259
|
-
|
|
220
|
+
For one sanitized real API operation, use the [integration evaluation](https://github.com/bailinghub/bailinghub/issues/new?template=integration_evaluation.yml) form. It is a public pre-integration review, not hosted integration work, certification, or permission to connect production. Never include secrets, private hostnames, customer data, or a complete internal specification.
|
|
260
221
|
|
|
261
|
-
|
|
222
|
+
Independent distributions, industry adaptations, executors, connectors, and ACC implementations are welcome. A listing or compatibility reference is not certification, a service warranty, adoption by another project, or a transfer of maintenance responsibility. See [Community Derivatives and Ecosystem Collaboration](docs/ECOSYSTEM.en.md).
|
|
262
223
|
|
|
263
|
-
|
|
224
|
+
## Open-Source Foundations and License
|
|
264
225
|
|
|
265
|
-
|
|
226
|
+
BailingHub uses the open ACC contract, Node.js and TypeScript for the service, and Vue with Element Plus and Pinia for the console. Complete Docker and production deployments use an independent MySQL service for persistent runtime state; JSONL is for local smoke testing only. ACC attribution is preserved in [NOTICE](NOTICE); locked dependencies, licenses, and external runtimes are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
266
227
|
|
|
267
|
-
|
|
228
|
+
Names such as Dify, n8n, MCP, OpenClaw, DeepSeek, and DeepSeek Harness identify compatibility targets or independent integrations only. They do not imply development, certification, adoption, or endorsement by the corresponding upstream projects.
|
|
268
229
|
|
|
269
|
-
|
|
230
|
+
BailingHub is licensed under the [Apache License 2.0](LICENSE). See [NOTICE](NOTICE), [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md), [SECURITY.md](SECURITY.md), and [CONTRIBUTING.md](CONTRIBUTING.md). The license does not grant trademark rights to “BailingHub”, “百灵中枢”, or related marks.
|