bailinghub 0.3.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/.dockerignore +42 -0
- package/.env.example +83 -0
- package/.gitignore +44 -0
- package/.npmignore +56 -0
- package/CODE_OF_CONDUCT.md +24 -0
- package/CONTRIBUTING.md +74 -0
- package/Dockerfile +16 -0
- package/LICENSE +176 -0
- package/LICENSING.md +9 -0
- package/NOTICE +23 -0
- package/README.en.md +264 -0
- package/README.md +279 -0
- package/SECURITY.md +30 -0
- package/THIRD_PARTY_NOTICES.md +254 -0
- package/VISION.md +41 -0
- package/assets/architecture-overview.en-dark.png +0 -0
- package/assets/architecture-overview.en-dark.svg +57 -0
- package/assets/architecture-overview.en.png +0 -0
- package/assets/architecture-overview.en.svg +57 -0
- package/assets/architecture-overview.zh-CN-dark.png +0 -0
- package/assets/architecture-overview.zh-CN-dark.svg +57 -0
- package/assets/architecture-overview.zh-CN.png +0 -0
- package/assets/architecture-overview.zh-CN.svg +57 -0
- package/assets/bailinghub-lockup-dark.png +0 -0
- package/assets/bailinghub-lockup-dark.svg +8 -0
- package/assets/bailinghub-lockup.png +0 -0
- package/assets/bailinghub-lockup.svg +8 -0
- package/brain/README.en.md +23 -0
- package/brain/README.md +45 -0
- package/brain/agents/code-review.md +41 -0
- package/brain/agents/triage.md +37 -0
- package/brain/profiles.json +114 -0
- package/brain/runbooks/ticket-triage.md +24 -0
- package/config.example.json +58 -0
- package/contracts/client-api/consumers.json +28 -0
- package/contracts/client-api/v1/error-response.schema.json +21 -0
- package/contracts/client-api/v1/health-response.schema.json +13 -0
- package/contracts/client-api/v1/job-response.schema.json +49 -0
- package/contracts/client-api/v1/manifest.json +63 -0
- package/contracts/client-api/v1/run-request.schema.json +42 -0
- package/contracts/client-api/v1/submit-response.schema.json +35 -0
- package/contracts/client-api/v1/vectors.json +153 -0
- package/demo/business/Dockerfile +8 -0
- package/demo/business/server.mjs +483 -0
- package/docker-compose.images.yml +67 -0
- package/docker-compose.yml +79 -0
- package/docs/AI_FRIENDLY_TOOLS.en.md +69 -0
- package/docs/AI/345/217/213/345/245/275/345/267/245/345/205/267/350/256/276/350/256/241/346/214/207/345/215/227.md +198 -0
- package/docs/ARCHITECTURE.en.md +81 -0
- package/docs/ARCHITECTURE.md +795 -0
- package/docs/CHANGELOG.en.md +275 -0
- package/docs/CHANGELOG.md +279 -0
- package/docs/CHANNELS.en.md +35 -0
- package/docs/CHANNELS.md +72 -0
- package/docs/CLIENT_API.md +89 -0
- package/docs/COMPATIBILITY.en.md +103 -0
- package/docs/CONTRACT.en.md +254 -0
- package/docs/CONTRACT.md +653 -0
- package/docs/DEMO.en.md +90 -0
- package/docs/DEMO.md +297 -0
- package/docs/ECOSYSTEM.en.md +39 -0
- package/docs/ECOSYSTEM.md +39 -0
- package/docs/INDEPENDENT_VALIDATION.en.md +184 -0
- package/docs/INDEPENDENT_VALIDATION.md +184 -0
- package/docs/INTEGRATION.en.md +120 -0
- package/docs/KERNEL_HOST_API.en.md +59 -0
- package/docs/KERNEL_HOST_API.md +59 -0
- package/docs/OPERATIONS.en.md +182 -0
- package/docs/OPERATIONS.md +231 -0
- package/docs/PIPELINE.en.md +74 -0
- package/docs/PIPELINE.md +67 -0
- package/docs/QUICKSTART.en.md +297 -0
- package/docs/QUICKSTART.md +152 -0
- package/docs/README.en.md +103 -0
- package/docs/README.md +119 -0
- package/docs/RELEASE_NOTES_v0.1.0.en.md +46 -0
- package/docs/RELEASE_NOTES_v0.1.0.md +66 -0
- package/docs/RELEASE_NOTES_v0.1.1.en.md +38 -0
- package/docs/RELEASE_NOTES_v0.1.1.md +38 -0
- package/docs/RELEASE_NOTES_v0.1.10.en.md +102 -0
- package/docs/RELEASE_NOTES_v0.1.10.md +102 -0
- package/docs/RELEASE_NOTES_v0.1.11.en.md +99 -0
- package/docs/RELEASE_NOTES_v0.1.11.md +99 -0
- package/docs/RELEASE_NOTES_v0.1.12.en.md +64 -0
- package/docs/RELEASE_NOTES_v0.1.12.md +64 -0
- package/docs/RELEASE_NOTES_v0.1.13.en.md +46 -0
- package/docs/RELEASE_NOTES_v0.1.13.md +46 -0
- package/docs/RELEASE_NOTES_v0.1.14.en.md +55 -0
- package/docs/RELEASE_NOTES_v0.1.14.md +55 -0
- package/docs/RELEASE_NOTES_v0.1.15.en.md +50 -0
- package/docs/RELEASE_NOTES_v0.1.15.md +50 -0
- package/docs/RELEASE_NOTES_v0.1.16.en.md +106 -0
- package/docs/RELEASE_NOTES_v0.1.16.md +105 -0
- package/docs/RELEASE_NOTES_v0.1.2.en.md +39 -0
- package/docs/RELEASE_NOTES_v0.1.2.md +39 -0
- package/docs/RELEASE_NOTES_v0.1.3.en.md +55 -0
- package/docs/RELEASE_NOTES_v0.1.3.md +55 -0
- package/docs/RELEASE_NOTES_v0.1.4.en.md +55 -0
- package/docs/RELEASE_NOTES_v0.1.4.md +55 -0
- package/docs/RELEASE_NOTES_v0.1.5.en.md +49 -0
- package/docs/RELEASE_NOTES_v0.1.5.md +49 -0
- package/docs/RELEASE_NOTES_v0.1.6.en.md +41 -0
- package/docs/RELEASE_NOTES_v0.1.6.md +41 -0
- package/docs/RELEASE_NOTES_v0.1.7.en.md +39 -0
- package/docs/RELEASE_NOTES_v0.1.7.md +39 -0
- package/docs/RELEASE_NOTES_v0.1.8.en.md +88 -0
- package/docs/RELEASE_NOTES_v0.1.8.md +88 -0
- package/docs/RELEASE_NOTES_v0.1.9.en.md +127 -0
- package/docs/RELEASE_NOTES_v0.1.9.md +127 -0
- package/docs/RELEASE_NOTES_v0.2.0.en.md +95 -0
- package/docs/RELEASE_NOTES_v0.2.0.md +96 -0
- package/docs/RELEASE_NOTES_v0.3.0.en.md +77 -0
- package/docs/RELEASE_NOTES_v0.3.0.md +77 -0
- package/docs/SDK.en.md +177 -0
- package/docs/STREAMING.en.md +78 -0
- package/docs/STREAMING.md +109 -0
- package/docs/TOOLS.en.md +205 -0
- package/docs/TOOLS_DESIGN.en.md +142 -0
- package/docs/TOOLS_DESIGN.md +466 -0
- package/docs/TOOLS_MODEL.en.md +56 -0
- package/docs/TOOLS_MODEL.md +903 -0
- package/docs/WIDGET_RENDERERS.en.md +133 -0
- package/docs/WIDGET_RENDERERS.md +139 -0
- package/docs/examples/bailing-tool-verify.mjs +94 -0
- package/docs/examples/bailing-tool-verify.php +154 -0
- package/docs/examples/bailing-tool-verify.py +107 -0
- package/docs/examples/custom-streaming-chat-client.mjs +108 -0
- package/docs/examples/widget-chart-renderer-adapter.mjs +44 -0
- package/docs/integrations/bailian/README.en.md +181 -0
- package/docs/integrations/bailian/README.md +165 -0
- package/docs/integrations/bailian/bailian-mcp-config.json +17 -0
- package/docs/integrations/bailian/verify_recipe.py +97 -0
- package/docs/integrations/deepseek/README.en.md +225 -0
- package/docs/integrations/deepseek/README.md +225 -0
- package/docs/integrations/deepseek/verify_e2e.py +131 -0
- package/docs/integrations/dify/README.en.md +131 -0
- package/docs/integrations/dify/README.md +131 -0
- package/docs/integrations/dify/bailinghub-control-plane.openapi.json +129 -0
- package/docs/integrations/dify/verify_contract.py +88 -0
- package/docs/integrations/dify/verify_e2e.py +117 -0
- package/docs/integrations/jeecgboot/README.en.md +193 -0
- package/docs/integrations/jeecgboot/README.md +161 -0
- package/docs/integrations/jeecgboot/adapter-contract.v1.json +94 -0
- package/docs/integrations/jeecgboot/jeecgboot-user-adapter.openapi.json +183 -0
- package/docs/integrations/jeecgboot/verify_recipe.mjs +97 -0
- package/docs/integrations/ruoyi-vue-pro/README.en.md +91 -0
- package/docs/integrations/ruoyi-vue-pro/README.md +155 -0
- package/docs/integrations/ruoyi-vue-pro/adapter-contract.v1.json +71 -0
- package/docs/integrations/ruoyi-vue-pro/ruoyi-vue-pro-trade-adapter.openapi.json +148 -0
- package/docs/integrations/ruoyi-vue-pro/verify_recipe.mjs +71 -0
- package/docs/user-guide/README.en.md +39 -0
- package/docs/user-guide/README.md +40 -0
- package/docs/user-guide/concepts.en.md +69 -0
- package/docs/user-guide/concepts.md +225 -0
- package/docs/user-guide/console-map.en.md +58 -0
- package/docs/user-guide/console-map.md +473 -0
- package/docs/user-guide/overview.en.md +61 -0
- package/docs/user-guide/overview.md +156 -0
- package/docs/user-guide/scenarios.en.md +70 -0
- package/docs/user-guide/scenarios.md +398 -0
- package/docs//345/205/274/345/256/271/346/200/247/344/270/216/345/215/207/347/272/247.md +134 -0
- package/docs//347/254/254/344/270/211/346/226/271/345/257/271/346/216/245/346/214/207/345/215/227.md +625 -0
- package/package.json +119 -0
- package/schemas/agent-capability-contract.schema.json +104 -0
- package/schemas/api/approval-decision.schema.json +28 -0
- package/schemas/api/approval-request.schema.json +31 -0
- package/schemas/api/delivery-callback.schema.json +28 -0
- package/schemas/api/job-response.schema.json +6 -0
- package/schemas/api/kb-doc-upsert.schema.json +21 -0
- package/schemas/api/run-request.schema.json +6 -0
- package/schemas/api/run-response.schema.json +6 -0
- package/schemas/api/tool-spec.schema.json +38 -0
- package/schemas/config/alert-rule.schema.json +22 -0
- package/schemas/config/channel.schema.json +91 -0
- package/schemas/config/chat-entry.schema.json +47 -0
- package/schemas/config/client.schema.json +56 -0
- package/schemas/config/common.schema.json +215 -0
- package/schemas/config/credential.schema.json +48 -0
- package/schemas/config/executor-token.schema.json +20 -0
- package/schemas/config/page-context.schema.json +21 -0
- package/schemas/config/route.schema.json +152 -0
- package/schemas/config/storage-bucket.schema.json +31 -0
- package/schemas/config/target.schema.json +17 -0
- package/schemas/config/tool-provider.schema.json +60 -0
- package/schemas/tool-definition.schema.json +188 -0
- package/scripts/check-client-api-ecosystem.mjs +69 -0
- package/scripts/check-doc-links.mjs +136 -0
- package/scripts/check-image-tags.sh +43 -0
- package/scripts/check-package-artifact.mjs +185 -0
- package/scripts/check-release-consistency.mjs +199 -0
- package/scripts/check-release-consistency.test.mjs +63 -0
- package/scripts/client-api-contract-test.ts +127 -0
- package/scripts/create-admin.ts +27 -0
- package/scripts/demo-e2e.ts +133 -0
- package/scripts/docker-entrypoint.sh +33 -0
- package/scripts/doctor.ts +107 -0
- package/scripts/e2e-console.mjs +214 -0
- package/scripts/export-oss.mjs +204 -0
- package/scripts/generate-readme-assets.mjs +181 -0
- package/scripts/generate-third-party-notices.mjs +93 -0
- package/scripts/image-release-policy.mjs +75 -0
- package/scripts/image-release-policy.test.mjs +58 -0
- package/scripts/init-db.ts +21 -0
- package/scripts/install.sh +461 -0
- package/scripts/oss-boundary-check.mjs +183 -0
- package/scripts/publish-images.sh +63 -0
- package/scripts/publish-mysql-image.sh +41 -0
- package/scripts/release-audit.mjs +348 -0
- package/scripts/sdk-contract-test.ts +62 -0
- package/scripts/sdk-p1-check.mjs +58 -0
- package/scripts/sdk-runtime-test.mjs +106 -0
- package/scripts/security-scan.mjs +110 -0
- package/scripts/seed-demo.ts +116 -0
- package/scripts/selftest.ts +226 -0
- package/scripts/smoke.ts +31 -0
- package/scripts/validate-examples.mjs +93 -0
- package/scripts/verify-bootstrap-admin-restart.ts +66 -0
- package/scripts/verify-github-repo.mjs +195 -0
- package/scripts/verify-oss-export.mjs +192 -0
- package/scripts/verify-routing.ts +29 -0
- package/scripts/widget-renderer-test.mjs +206 -0
- package/scripts/write-build-info.mjs +29 -0
- package/sdk/dotnet/Bailing.Connect/Bailing.Connect.csproj +12 -0
- package/sdk/dotnet/Bailing.Connect/BailingConnect.cs +260 -0
- package/sdk/dotnet/README.md +32 -0
- package/sdk/dotnet/examples/BuildSpec/BuildSpec.csproj +11 -0
- package/sdk/dotnet/examples/BuildSpec/Program.cs +36 -0
- package/sdk/go/README.md +33 -0
- package/sdk/go/bailingconnect/connect.go +367 -0
- package/sdk/go/examples/build-spec/main.go +39 -0
- package/sdk/go/go.mod +3 -0
- package/sdk/java/README.md +43 -0
- package/sdk/java/examples/BuildSpec.java +31 -0
- package/sdk/java/src/main/java/com/bailing/connect/BailingConnect.java +376 -0
- package/sdk/node/README.md +107 -0
- package/sdk/node/examples/build-spec.mjs +84 -0
- package/sdk/node/package.json +22 -0
- package/sdk/node/src/index.mjs +250 -0
- package/sdk/php/README.md +204 -0
- package/sdk/php/composer.json +18 -0
- package/sdk/php/examples/DemoStaffController.php +108 -0
- package/sdk/php/examples/build-spec.php +27 -0
- package/sdk/php/examples/thinkphp-integration.php +81 -0
- package/sdk/php/src/Attributes/AiParam.php +40 -0
- package/sdk/php/src/Attributes/AiTool.php +75 -0
- package/sdk/php/src/HubClient.php +122 -0
- package/sdk/php/src/SpecBuilder.php +328 -0
- package/sdk/php/src/SpecServer.php +209 -0
- package/sdk/php/src/Ticket.php +37 -0
- package/sdk/php/src/Verify.php +178 -0
- package/sdk/php7/README.md +191 -0
- package/sdk/php7/composer.json +18 -0
- package/sdk/php7/examples/build-spec.php +68 -0
- package/sdk/php7/examples/well-known.php +33 -0
- package/sdk/php7/src/HubClient.php +111 -0
- package/sdk/php7/src/SpecServer.php +203 -0
- package/sdk/php7/src/Ticket.php +33 -0
- package/sdk/php7/src/ToolDef.php +169 -0
- package/sdk/php7/src/ToolSpec.php +334 -0
- package/sdk/php7/src/Verify.php +165 -0
- package/sdk/python/README.md +107 -0
- package/sdk/python/bailing_connect/__init__.py +307 -0
- package/sdk/python/examples/build_spec.py +90 -0
- package/sdk/python/pyproject.toml +24 -0
- package/sql/001_init_state.sql +66 -0
- package/sql/002_routes.sql +44 -0
- package/sql/003_executor.sql +15 -0
- package/sql/004_clients.sql +22 -0
- package/sql/005_admins.sql +25 -0
- package/sql/006_ledger.sql +57 -0
- package/sql/007_delivery.sql +8 -0
- package/sql/008_kb.sql +66 -0
- package/sql/009_rbac.sql +5 -0
- package/sql/010_targets.sql +28 -0
- package/sql/011_observability.sql +11 -0
- package/sql/012_generic.sql +5 -0
- package/sql/013_tools.sql +24 -0
- package/sql/014_approvals.sql +27 -0
- package/sql/015_chat.sql +21 -0
- package/sql/016_chat_feedback.sql +19 -0
- package/sql/017_provider_autorefresh.sql +6 -0
- package/sql/018_kb_ingest.sql +11 -0
- package/sql/019_kb_datasources.sql +32 -0
- package/sql/022_storage_buckets.sql +25 -0
- package/sql/024_channels.sql +15 -0
- package/sql/025_chat_appearance.sql +7 -0
- package/sql/026_thread_memory.sql +10 -0
- package/sql/027_page_contexts.sql +23 -0
- package/sql/028_executor_capabilities.sql +4 -0
- package/sql/029_executor_tokens.sql +13 -0
- package/sql/030_route_permission.sql +5 -0
- package/sql/031_tool_embeddings.sql +20 -0
- package/sql/032_tool_provider_embed.sql +7 -0
- package/sql/033_alert_rules.sql +21 -0
- package/sql/034_client_allowed_channels.sql +6 -0
- package/sql/035_tool_idempotency.sql +15 -0
- package/sql/036_delivery_dlq.sql +15 -0
- package/sql/038_audit_trace_shape.sql +15 -0
- package/sql/039_runtime_locks.sql +9 -0
- package/sql/040_budget_policy.sql +3 -0
- package/sql/041_approval_intent.sql +14 -0
- package/sql/042_approval_decision_contract.sql +11 -0
- package/sql/043_rate_limits.sql +7 -0
- package/sql/044_job_run_after.sql +3 -0
- package/sql/045_job_claim_lease.sql +7 -0
- package/sql/046_tool_authz_probe.sql +5 -0
- package/sql/047_route_audience.sql +4 -0
- package/sql/048_llm_target.sql +17 -0
- package/sql/049_llm_input_shape.sql +11 -0
- package/sql/050_operational_metrics_indexes.sql +8 -0
- package/sql/051_instance_branding.sql +17 -0
- package/sql/052_tool_execution_journal.sql +19 -0
- package/sql/053_tool_spec_access_policy.sql +9 -0
- package/sql/README.en.md +41 -0
- package/sql/README.md +40 -0
- package/src/adapters/channels/wecom-api.test.ts +77 -0
- package/src/adapters/channels/wecom-api.ts +224 -0
- package/src/adapters/channels/wecom-crypto.test.ts +85 -0
- package/src/adapters/channels/wecom-crypto.ts +77 -0
- package/src/adapters/executors/claudecode.ts +39 -0
- package/src/adapters/executors/profiles.ts +86 -0
- package/src/adapters/executors/report.ts +35 -0
- package/src/adapters/executors/runner.ts +114 -0
- package/src/adapters/executors/wecomnotify.ts +63 -0
- package/src/adapters/llm/file.test.ts +81 -0
- package/src/adapters/llm/file.ts +250 -0
- package/src/adapters/llm/openai-chat-stream.test.ts +74 -0
- package/src/adapters/llm/openai-chat-stream.ts +154 -0
- package/src/adapters/llm/perception.ts +159 -0
- package/src/adapters/llm/speech.test.ts +75 -0
- package/src/adapters/llm/speech.ts +146 -0
- package/src/adapters/storage/object-storage.test.ts +38 -0
- package/src/adapters/storage/object-storage.ts +140 -0
- package/src/adapters/targets/demo-agent.ts +88 -0
- package/src/adapters/targets/llm.test.ts +733 -0
- package/src/adapters/targets/llm.ts +862 -0
- package/src/app/admin-bootstrap.test.ts +112 -0
- package/src/app/admin-bootstrap.ts +48 -0
- package/src/app/auth-default.ts +26 -0
- package/src/app/auth.test.ts +57 -0
- package/src/app/auth.ts +207 -0
- package/src/app/builtin-tools-default.ts +17 -0
- package/src/app/builtin-tools.test.ts +202 -0
- package/src/app/builtin-tools.ts +380 -0
- package/src/app/channels-default.ts +8 -0
- package/src/app/channels.ts +141 -0
- package/src/app/delivery-default.ts +14 -0
- package/src/app/delivery.test.ts +46 -0
- package/src/app/delivery.ts +215 -0
- package/src/app/engine-default.ts +54 -0
- package/src/app/engine.ts +427 -0
- package/src/app/http-mount.test.ts +27 -0
- package/src/app/http-server.test.ts +114 -0
- package/src/app/http-server.ts +127 -0
- package/src/app/http.test.ts +27 -0
- package/src/app/http.ts +118 -0
- package/src/app/kernel.test.ts +191 -0
- package/src/app/kernel.ts +544 -0
- package/src/app/monitor-default.ts +9 -0
- package/src/app/monitor.ts +46 -0
- package/src/app/operational-metrics.test.ts +73 -0
- package/src/app/operational-metrics.ts +124 -0
- package/src/app/oss-edition.test.ts +71 -0
- package/src/app/oss-edition.ts +108 -0
- package/src/app/outbound-default.ts +57 -0
- package/src/app/outbound.ts +133 -0
- package/src/app/readiness.test.ts +37 -0
- package/src/app/readiness.ts +39 -0
- package/src/app/runtime-composition.test.ts +51 -0
- package/src/app/runtime-composition.ts +73 -0
- package/src/app/runtime-context-default.ts +30 -0
- package/src/app/runtime-context.test.ts +60 -0
- package/src/app/runtime-context.ts +79 -0
- package/src/app/runtime-lifecycle-default.ts +48 -0
- package/src/app/runtime-lifecycle.test.ts +322 -0
- package/src/app/runtime-lifecycle.ts +440 -0
- package/src/app/runtime.ts +36 -0
- package/src/app/tool-approvals-default.ts +16 -0
- package/src/app/tool-approvals.ts +214 -0
- package/src/app/tool-assembly-default.ts +11 -0
- package/src/app/tool-assembly.test.ts +112 -0
- package/src/app/tool-assembly.ts +83 -0
- package/src/app/tool-context-default.ts +7 -0
- package/src/app/tool-context.test.ts +82 -0
- package/src/app/tool-context.ts +109 -0
- package/src/app/tool-debug.test.ts +111 -0
- package/src/app/tool-debug.ts +152 -0
- package/src/app/tool-proxy-default.ts +35 -0
- package/src/app/tool-proxy.ts +173 -0
- package/src/app/tool-specs-default.ts +33 -0
- package/src/app/tool-specs.test.ts +322 -0
- package/src/app/tool-specs.ts +555 -0
- package/src/app/tools-runtime-default.ts +14 -0
- package/src/app/tools-runtime.ts +23 -0
- package/src/architecture-boundary.test.ts +119 -0
- package/src/core/config/config-codec.test.ts +105 -0
- package/src/core/config/config-codec.ts +231 -0
- package/src/core/config/config-diagnostics.test.ts +285 -0
- package/src/core/config/config-diagnostics.ts +436 -0
- package/src/core/config/config-models.test.ts +584 -0
- package/src/core/config/config-models.ts +392 -0
- package/src/core/config/config-schema.test.ts +153 -0
- package/src/core/config/config.test.ts +314 -0
- package/src/core/config/config.ts +324 -0
- package/src/core/config/route-config.test.ts +232 -0
- package/src/core/config/route-config.ts +246 -0
- package/src/core/config/target-config.test.ts +139 -0
- package/src/core/config/target-config.ts +219 -0
- package/src/core/config/tools-config.test.ts +124 -0
- package/src/core/config/tools-config.ts +126 -0
- package/src/core/contracts/approval-decision.test.ts +67 -0
- package/src/core/contracts/approval-decision.ts +93 -0
- package/src/core/contracts/openapi-tools.ts +201 -0
- package/src/core/contracts/tool-annotations.ts +121 -0
- package/src/core/contracts/tool-definition.test.ts +147 -0
- package/src/core/contracts/tool-definition.ts +304 -0
- package/src/core/contracts/tools-idempotency.test.ts +435 -0
- package/src/core/contracts/tools.test.ts +487 -0
- package/src/core/contracts/tools.ts +831 -0
- package/src/core/contracts/types.ts +408 -0
- package/src/core/edition/capabilities.ts +6 -0
- package/src/core/edition/context.test.ts +20 -0
- package/src/core/edition/context.ts +78 -0
- package/src/core/edition/index.ts +4 -0
- package/src/core/edition/scope-resolver.ts +24 -0
- package/src/core/edition/store-factory.ts +6 -0
- package/src/core/observability/openmetrics.test.ts +57 -0
- package/src/core/observability/openmetrics.ts +103 -0
- package/src/core/platform/content.test.ts +46 -0
- package/src/core/platform/content.ts +90 -0
- package/src/core/platform/fence.test.ts +31 -0
- package/src/core/platform/fence.ts +11 -0
- package/src/core/platform/instance-branding.test.ts +65 -0
- package/src/core/platform/instance-branding.ts +202 -0
- package/src/core/platform/metrics-token.test.ts +31 -0
- package/src/core/platform/metrics-token.ts +42 -0
- package/src/core/platform/pagecontext.ts +0 -0
- package/src/core/platform/password.test.ts +13 -0
- package/src/core/platform/password.ts +38 -0
- package/src/core/platform/queue.test.ts +59 -0
- package/src/core/platform/queue.ts +75 -0
- package/src/core/platform/serial.test.ts +73 -0
- package/src/core/platform/serial.ts +64 -0
- package/src/core/platform/server-token.test.ts +46 -0
- package/src/core/platform/server-token.ts +60 -0
- package/src/core/platform/signing.test.ts +24 -0
- package/src/core/platform/signing.ts +22 -0
- package/src/core/platform/time.ts +73 -0
- package/src/core/platform/version.test.ts +19 -0
- package/src/core/platform/version.ts +90 -0
- package/src/core/runtime/budget-runtime.test.ts +93 -0
- package/src/core/runtime/budget-runtime.ts +110 -0
- package/src/core/runtime/context-runtime.test.ts +106 -0
- package/src/core/runtime/context-runtime.ts +95 -0
- package/src/core/runtime/credential-resolver.test.ts +129 -0
- package/src/core/runtime/credential-resolver.ts +93 -0
- package/src/core/runtime/credential-verify.test.ts +76 -0
- package/src/core/runtime/credential-verify.ts +161 -0
- package/src/core/runtime/debug-report.test.ts +20 -0
- package/src/core/runtime/debug-report.ts +100 -0
- package/src/core/runtime/execution-runtime.test.ts +350 -0
- package/src/core/runtime/execution-runtime.ts +197 -0
- package/src/core/runtime/finish-runtime.test.ts +168 -0
- package/src/core/runtime/finish-runtime.ts +83 -0
- package/src/core/runtime/identity-runtime.test.ts +38 -0
- package/src/core/runtime/identity-runtime.ts +104 -0
- package/src/core/runtime/inhub-runtime.test.ts +297 -0
- package/src/core/runtime/inhub-runtime.ts +198 -0
- package/src/core/runtime/job-stream.test.ts +55 -0
- package/src/core/runtime/job-stream.ts +187 -0
- package/src/core/runtime/knowledge-runtime.test.ts +120 -0
- package/src/core/runtime/knowledge-runtime.ts +98 -0
- package/src/core/runtime/launch-runtime.test.ts +187 -0
- package/src/core/runtime/launch-runtime.ts +182 -0
- package/src/core/runtime/memory-runtime.test.ts +85 -0
- package/src/core/runtime/memory-runtime.ts +32 -0
- package/src/core/runtime/memory.ts +141 -0
- package/src/core/runtime/redaction-runtime.test.ts +35 -0
- package/src/core/runtime/redaction-runtime.ts +60 -0
- package/src/core/runtime/routing-runtime.test.ts +89 -0
- package/src/core/runtime/routing-runtime.ts +146 -0
- package/src/core/runtime/smoke-runtime.test.ts +65 -0
- package/src/core/runtime/smoke-runtime.ts +237 -0
- package/src/core/runtime/summary-runtime.test.ts +234 -0
- package/src/core/runtime/summary-runtime.ts +153 -0
- package/src/core/runtime/trace-runtime.test.ts +234 -0
- package/src/core/runtime/trace-runtime.ts +330 -0
- package/src/core/state/audit-observability.test.ts +51 -0
- package/src/core/state/audit-observability.ts +74 -0
- package/src/core/state/state-codec.ts +44 -0
- package/src/core/state/state-contracts.ts +59 -0
- package/src/core/targets/adapter.ts +69 -0
- package/src/core/targets/registry.test.ts +65 -0
- package/src/core/targets/registry.ts +153 -0
- package/src/core/targets/resolve.ts +21 -0
- package/src/executor.ts +201 -0
- package/src/extension-api.test.ts +84 -0
- package/src/extension-api.ts +194 -0
- package/src/infrastructure/config/config-admin-repository.test.ts +193 -0
- package/src/infrastructure/config/config-admin-repository.ts +175 -0
- package/src/infrastructure/config/config-alert-rule-repository.ts +38 -0
- package/src/infrastructure/config/config-approval-ledger.ts +74 -0
- package/src/infrastructure/config/config-channel-repository.ts +31 -0
- package/src/infrastructure/config/config-chat-repository.ts +83 -0
- package/src/infrastructure/config/config-client-repository.ts +46 -0
- package/src/infrastructure/config/config-conversation-ledger.ts +222 -0
- package/src/infrastructure/config/config-credential-repository.test.ts +32 -0
- package/src/infrastructure/config/config-credential-repository.ts +47 -0
- package/src/infrastructure/config/config-delivery-dlq-ledger.ts +49 -0
- package/src/infrastructure/config/config-executor-ledger.ts +30 -0
- package/src/infrastructure/config/config-executor-token-repository.ts +44 -0
- package/src/infrastructure/config/config-instance-branding-repository.ts +75 -0
- package/src/infrastructure/config/config-knowledge-repository.ts +249 -0
- package/src/infrastructure/config/config-observability-ledger.ts +262 -0
- package/src/infrastructure/config/config-project-repository.ts +30 -0
- package/src/infrastructure/config/config-rate-limit-ledger.ts +56 -0
- package/src/infrastructure/config/config-route-repository.ts +41 -0
- package/src/infrastructure/config/config-storage-bucket-repository.ts +43 -0
- package/src/infrastructure/config/config-target-repository.ts +25 -0
- package/src/infrastructure/config/config-tool-call-ledger.ts +142 -0
- package/src/infrastructure/config/config-tool-embedding-repository.test.ts +124 -0
- package/src/infrastructure/config/config-tool-embedding-repository.ts +78 -0
- package/src/infrastructure/config/config-tool-provider-repository.test.ts +71 -0
- package/src/infrastructure/config/config-tool-provider-repository.ts +50 -0
- package/src/infrastructure/config/configstore.ts +130 -0
- package/src/infrastructure/config/local-instance-branding-provider.test.ts +94 -0
- package/src/infrastructure/config/local-instance-branding-provider.ts +79 -0
- package/src/infrastructure/mysql/pool-owner.test.ts +36 -0
- package/src/infrastructure/mysql/pool-owner.ts +56 -0
- package/src/infrastructure/schema/core-schema-migrator.test.ts +340 -0
- package/src/infrastructure/schema/core-schema-migrator.ts +461 -0
- package/src/infrastructure/schema/migration-files.test.ts +18 -0
- package/src/infrastructure/schema/migration-files.ts +27 -0
- package/src/infrastructure/schema/retired-migrations.ts +35 -0
- package/src/infrastructure/state/operational-metrics-storage.test.ts +107 -0
- package/src/infrastructure/state/state-jsonl.ts +268 -0
- package/src/infrastructure/state/state-mysql-update-plan.test.ts +54 -0
- package/src/infrastructure/state/state-mysql-update-plan.ts +63 -0
- package/src/infrastructure/state/state-mysql.ts +359 -0
- package/src/infrastructure/state/state.test.ts +319 -0
- package/src/infrastructure/state/state.ts +11 -0
- package/src/kernel-api/v1/artifact.test.ts +46 -0
- package/src/kernel-api/v1/artifact.ts +71 -0
- package/src/kernel-api/v1/contracts.ts +168 -0
- package/src/kernel-api/v1/execution-gate.test.ts +25 -0
- package/src/kernel-api/v1/execution-gate.ts +18 -0
- package/src/kernel-api/v1/index.ts +51 -0
- package/src/openclaw-stdio.test.ts +60 -0
- package/src/routes/admin-access-default.ts +20 -0
- package/src/routes/admin-access.ts +94 -0
- package/src/routes/admin-branding.test.ts +116 -0
- package/src/routes/admin-branding.ts +48 -0
- package/src/routes/admin-chat-default.ts +12 -0
- package/src/routes/admin-chat.ts +84 -0
- package/src/routes/admin-default.ts +35 -0
- package/src/routes/admin-dispatch-config-default.ts +13 -0
- package/src/routes/admin-dispatch-config.ts +121 -0
- package/src/routes/admin-format.ts +12 -0
- package/src/routes/admin-host.test.ts +56 -0
- package/src/routes/admin-infra-default.ts +12 -0
- package/src/routes/admin-infra.ts +142 -0
- package/src/routes/admin-kb-default.ts +13 -0
- package/src/routes/admin-kb.ts +160 -0
- package/src/routes/admin-runtime-default.ts +31 -0
- package/src/routes/admin-runtime.ts +444 -0
- package/src/routes/admin-tool-providers-default.ts +20 -0
- package/src/routes/admin-tool-providers.test.ts +114 -0
- package/src/routes/admin-tool-providers.ts +186 -0
- package/src/routes/admin.ts +246 -0
- package/src/routes/approvals-default.ts +32 -0
- package/src/routes/approvals.ts +120 -0
- package/src/routes/chat-default.ts +61 -0
- package/src/routes/chat-mount.test.ts +58 -0
- package/src/routes/chat.test.ts +222 -0
- package/src/routes/chat.ts +478 -0
- package/src/routes/critical-routes.test.ts +292 -0
- package/src/routes/executor-default.ts +45 -0
- package/src/routes/executor.ts +226 -0
- package/src/routes/kb-default.ts +23 -0
- package/src/routes/kb.ts +92 -0
- package/src/routes/private-default.ts +38 -0
- package/src/routes/private-host-auth.test.ts +84 -0
- package/src/routes/private.ts +210 -0
- package/src/routes/public-default.ts +46 -0
- package/src/routes/public.test.ts +504 -0
- package/src/routes/public.ts +313 -0
- package/src/routes/run-default.ts +25 -0
- package/src/routes/run.ts +188 -0
- package/src/routes/send-default.ts +24 -0
- package/src/routes/send.ts +143 -0
- package/src/routes/wecom-default.ts +27 -0
- package/src/routes/wecom.ts +307 -0
- package/src/server.ts +13 -0
- package/src/services/embedding.test.ts +185 -0
- package/src/services/embedding.ts +138 -0
- package/src/services/kb-repository.ts +79 -0
- package/src/services/kb.ts +328 -0
- package/src/services/kbsync.ts +166 -0
- package/src/services/tool-index-repository.ts +50 -0
- package/src/services/tools-index.test.ts +756 -0
- package/src/services/tools-index.ts +427 -0
- package/tsconfig.json +17 -0
- package/web/connect/bailing-connect-php.tgz +0 -0
- package/web/connect/bailing-connect-php7.tgz +0 -0
- package/web/connect/executor.mjs +152 -0
- package/web/connect/openclaw-stdio.mjs +145 -0
- package/web/connect/skills/connect-bailinghub-executor/SKILL.md +97 -0
- package/web/connect/skills/connect-bailinghub-executor/agents/openai.yaml +4 -0
- package/web/connect/skills/connect-bailinghub-executor/references/direct-protocol.md +99 -0
- package/web/connect/skills/connect-bailinghub-executor/references/openclaw.md +39 -0
- package/web/console/assets/Accounts-B4ePH5jp.css +1 -0
- package/web/console/assets/Accounts-Dwzm4D_V.js +3 -0
- package/web/console/assets/Approvals-BxhuI0ku.js +1 -0
- package/web/console/assets/Approvals-DlTSHl_7.css +1 -0
- package/web/console/assets/Audit-CSu6_3oD.css +1 -0
- package/web/console/assets/Audit-dFAbGynl.js +1 -0
- package/web/console/assets/BrandLockup-BtZyvkM5.js +1 -0
- package/web/console/assets/BrandLockup-DKYBYzKU.css +1 -0
- package/web/console/assets/Channels-CCn0L1jg.css +1 -0
- package/web/console/assets/Channels-Dqg4-_yr.js +105 -0
- package/web/console/assets/ChatEntries-BweMx_CU.css +1 -0
- package/web/console/assets/ChatEntries-CEGZ3NnJ.js +7 -0
- package/web/console/assets/Clients-C0QD1x7g.js +3 -0
- package/web/console/assets/Clients-DcTYN-Js.css +1 -0
- package/web/console/assets/Cost-BAJqLhpK.js +1 -0
- package/web/console/assets/Cost-CjT39DSZ.css +1 -0
- package/web/console/assets/Credentials-D_GDRgWi.js +1 -0
- package/web/console/assets/Credentials-ioLP0qYN.css +1 -0
- package/web/console/assets/Diagnostics-BWYnDxRj.js +1 -0
- package/web/console/assets/Diagnostics-Ya05PTDp.css +1 -0
- package/web/console/assets/Executors-CjhEM54c.css +1 -0
- package/web/console/assets/Executors-Cmryk4Vk.js +1 -0
- package/web/console/assets/HelpTip-CA6Bm7Nx.css +1 -0
- package/web/console/assets/HelpTip-CT07o3kB.js +1 -0
- package/web/console/assets/Kb-BSXQE0Fa.js +5 -0
- package/web/console/assets/Kb-CzIzd9xr.css +1 -0
- package/web/console/assets/Login-BnBPqC8Z.js +1 -0
- package/web/console/assets/Login-xtPwDB5_.css +1 -0
- package/web/console/assets/Projects-Bm8AjsNx.css +1 -0
- package/web/console/assets/Projects-CNHx4L_7.js +1 -0
- package/web/console/assets/Routes-DWGQN5Pv.css +1 -0
- package/web/console/assets/Routes-u5cEAEXQ.js +124 -0
- package/web/console/assets/Runs-BeFUR77_.js +3 -0
- package/web/console/assets/Runs-CUtSsPW-.css +1 -0
- package/web/console/assets/Setup-BjZfrmfN.js +1 -0
- package/web/console/assets/Setup-QjlHZKdB.css +1 -0
- package/web/console/assets/Shell-CbGNTN91.css +1 -0
- package/web/console/assets/Shell-EJuYf3OO.js +1 -0
- package/web/console/assets/StorageBuckets-DMXRJxUA.js +1 -0
- package/web/console/assets/StorageBuckets-GnXnVvF0.css +1 -0
- package/web/console/assets/SystemSettings-B72F-loY.js +1 -0
- package/web/console/assets/SystemSettings-BjiHyrXO.css +1 -0
- package/web/console/assets/SystemStatus-I11I67rw.css +1 -0
- package/web/console/assets/SystemStatus-hOj_TPYE.js +1 -0
- package/web/console/assets/Targets-DTb5tn6z.css +1 -0
- package/web/console/assets/Targets-UVVf7twC.js +1 -0
- package/web/console/assets/Tools-A20oaMaQ.css +1 -0
- package/web/console/assets/Tools-ihkr9R9x.js +2 -0
- package/web/console/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/web/console/assets/docs-DPUOCa7R.js +1 -0
- package/web/console/assets/index-DZEQL_yy.js +1 -0
- package/web/console/assets/index-DxvruykG.js +2 -0
- package/web/console/assets/index-Fi9gkGxV.css +1 -0
- package/web/console/assets/llm-catalog-HwRIrS94.js +1 -0
- package/web/console/assets/request-BisL2T9B.js +1 -0
- package/web/console/assets/schema-CzpUpoLk.js +1 -0
- package/web/console/assets/util-SiQC2MJh.js +1 -0
- package/web/console/assets/vendor-element-D7WRzHhy.js +37 -0
- package/web/console/assets/vendor-mammoth-DvgsHdlx.js +231 -0
- package/web/console/assets/vendor-turndown-kLzRgxYD.js +61 -0
- package/web/console/assets/vendor-vue-B2uhHUfE.js +29 -0
- package/web/console/index.html +16 -0
- package/web/widget/widget.js +1490 -0
- package/web-admin/index.html +13 -0
- package/web-admin/package-lock.json +1854 -0
- package/web-admin/package.json +25 -0
- package/web-admin/src/App.vue +9 -0
- package/web-admin/src/branding.ts +90 -0
- package/web-admin/src/components/BrandLockup.vue +40 -0
- package/web-admin/src/components/HelpTip.vue +51 -0
- package/web-admin/src/components/RichText.vue +35 -0
- package/web-admin/src/docs.ts +16 -0
- package/web-admin/src/layout/Shell.vue +356 -0
- package/web-admin/src/llm-catalog.ts +129 -0
- package/web-admin/src/main.ts +116 -0
- package/web-admin/src/pages/Accounts.vue +162 -0
- package/web-admin/src/pages/Approvals.vue +179 -0
- package/web-admin/src/pages/Audit.vue +110 -0
- package/web-admin/src/pages/Channels.vue +738 -0
- package/web-admin/src/pages/ChatEntries.vue +778 -0
- package/web-admin/src/pages/Clients.vue +353 -0
- package/web-admin/src/pages/Cost.vue +314 -0
- package/web-admin/src/pages/Credentials.vue +418 -0
- package/web-admin/src/pages/Diagnostics.vue +440 -0
- package/web-admin/src/pages/Executors.vue +398 -0
- package/web-admin/src/pages/Kb.vue +698 -0
- package/web-admin/src/pages/Login.vue +314 -0
- package/web-admin/src/pages/Projects.vue +106 -0
- package/web-admin/src/pages/Routes.vue +1661 -0
- package/web-admin/src/pages/Runs.vue +1113 -0
- package/web-admin/src/pages/Setup.vue +354 -0
- package/web-admin/src/pages/StorageBuckets.vue +182 -0
- package/web-admin/src/pages/SystemSettings.vue +281 -0
- package/web-admin/src/pages/SystemStatus.vue +185 -0
- package/web-admin/src/pages/Targets.vue +193 -0
- package/web-admin/src/pages/Tools.vue +1051 -0
- package/web-admin/src/request.ts +18 -0
- package/web-admin/src/router.ts +142 -0
- package/web-admin/src/runtime-path.ts +27 -0
- package/web-admin/src/schema.ts +52 -0
- package/web-admin/src/store.ts +35 -0
- package/web-admin/src/styles/base.css +272 -0
- package/web-admin/src/table-widths.ts +603 -0
- package/web-admin/src/util.ts +16 -0
- package/web-admin/tsconfig.json +15 -0
- package/web-admin/vite.config.ts +35 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# 快速开始:从安装到第一条业务接入
|
|
2
|
+
|
|
3
|
+
> 本文是部署方(开发者)的通用旅程。中枢不预设你的业务——工单、代码审查、客服 FAQ 只是参考场景;
|
|
4
|
+
> 你接什么业务、用什么大脑、往哪个渠道送,全部由下面这些"插座"在控制台配出来。
|
|
5
|
+
|
|
6
|
+
## 心智模型(先看这个)
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
业务系统 ──POST /run──▶ 中枢(路由→排队→派发)──▶ 大脑执行 ──▶ 结果回流(callback/轮询/送达推送)
|
|
10
|
+
│
|
|
11
|
+
├─ inhub 目标:中枢进程内执行(llm,内置)
|
|
12
|
+
└─ executor 目标:你的机器出站长轮询认领(任何本地智能体/脚本)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **路由**=一个业务场景(发给哪个大脑、什么会话策略、注入哪个知识库、结果送哪)
|
|
16
|
+
- **接入方**=一个业务系统的钥匙(路由白名单 + 限速,可吊销)
|
|
17
|
+
- **调度目标**=一个大脑插孔(注册即合法,中枢代码零改动)
|
|
18
|
+
- **工具源**=一个业务系统的“Agent 可调接口清单”(让 Agent 从“会答”升级为“能查、能办”)
|
|
19
|
+
- **对话总账**=所有往来落库,大脑会话只是缓存,可重放可重跑
|
|
20
|
+
|
|
21
|
+
## 旅程:九步,每步都有控制台页面
|
|
22
|
+
|
|
23
|
+
**第 0 步 · 部署**:
|
|
24
|
+
|
|
25
|
+
最快体验用 Docker:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
29
|
+
docker compose up --build
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
请在后续 `docker compose` 命令中沿用同一个 `BAILING_TOKEN`,或把生成值保存到本机 `.env`。仅 `development + 127.0.0.1/localhost/::1` 允许无 token 本地开发;生产模式或非回环监听会拒绝空值、短值和公开占位值。
|
|
33
|
+
|
|
34
|
+
全新 Ubuntu/Debian 服务器默认从国内 ACR 镜像安装:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
curl -fsSL https://www.bailinghub.com/install.sh | env BAILING_INSTALL_MODE=image sh
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
需要使用全球 GHCR 镜像时:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
curl -fsSL https://www.bailinghub.com/install.sh | env \
|
|
44
|
+
BAILING_INSTALL_MODE=image \
|
|
45
|
+
BAILING_IMAGE_REGISTRY=ghcr.io \
|
|
46
|
+
BAILING_IMAGE_NAMESPACE=bailinghub \
|
|
47
|
+
BAILING_MYSQL_IMAGE=mysql:8.4 \
|
|
48
|
+
sh
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
它会启动中枢、MySQL 和 demo 业务系统,并自动创建 `demo_support` 路由、`demo-business` 工具源、`demo-app` 接入方和 `admin` 后台账号。完整演示见 [DEMO.md](DEMO.md)。
|
|
52
|
+
|
|
53
|
+
手动部署:Node ≥ 22 + MySQL。复制 `.env.example` 到部署环境并设置 `BAILING_ENV=production`、`BAILING_TOKEN`、MySQL 连接、模型凭证等变量;按合规要求可设置 `BAILING_AUDIT_RETENTION_DAYS`(默认 0,不自动删除审计)。推荐同时设置 `BAILING_BOOTSTRAP_ADMIN_USERNAME` 与 `BAILING_BOOTSTRAP_ADMIN_PASSWORD`:服务只在管理员表为空时创建首个账号,后续重启、升级和保留数据库的容器重建不会更新已有账号或密码。执行 `npm run db:init` 初始化数据库结构,再启动 `src/server.ts` 并登录 `/console/`。也可用 `npm run admin:create -- <username> [password] [role]` 显式创建或重置账号;该命令不会被启动流程自动调用。本地烟测可直接用 `config.example.json` + jsonl 状态,完整能力请使用 MySQL。
|
|
54
|
+
|
|
55
|
+
**第 1 步 · 模型凭证**(控制台「模型凭证」):填任意 OpenAI 兼容端点 + key(OpenAI / DashScope / OpenRouter / 自建均可)。**到这里 llm 已可用——不需要任何执行器就有完整价值。**
|
|
56
|
+
|
|
57
|
+
**第 2 步 · 知识库**(可选,「知识库」):建库(选 embedding 凭证)→ 传文档 → 命中测试。知识库只在"资料路径"被用到:路由配了 `knowledge` 才检索注入,故障自动降级不阻塞任务。
|
|
58
|
+
|
|
59
|
+
**第 3 步 · 触发路由**(「触发路由」):场景名 → target(先用 llm)→ 会话策略(new/per_key/fixed)→ 可选挂知识库/送达/重试。
|
|
60
|
+
|
|
61
|
+
**第 4 步 · 接入方**(「接入方」):给业务系统发钥匙,限定可调路由与限速。
|
|
62
|
+
|
|
63
|
+
**第 5 步 · 业务接入**:回到路由点「调用代码」——四个页签按需取:
|
|
64
|
+
- 业务后端 PHP / curl:粘到业务事件点,fire-and-forget;
|
|
65
|
+
- 智能体技能·触发:本地智能体、脚本或第三方 agent 装个技能就会调中枢;
|
|
66
|
+
- 本地执行器·干活:见第 6 步。
|
|
67
|
+
|
|
68
|
+
还要网页上直接聊?「聊天入口」页新建入口绑这条路由 → 拿一行 `<script>` 贴进任何网页(或直接发「在线演示页」链接给人试)。同步问答、按访客自动续聊;访客默认匿名。要带登录身份:入口配「票据签发方」,业务后端在登录页用自己的接入方 token 签短票(嵌入代码弹窗含 PHP 样例),组件 `data-ticket` 带上 → 验签通过的 uid 进任务元数据,可作工具调用的操作主体,会话跨设备连续。入口默认可上传图片、语音和常见文件(服务器本地 `data/uploads`),也可关联**媒体存储**切到业务对象存储;路由的**多模态输入策略**决定这些素材是先识别/转写/抽取,还是直送具备对应能力的模型或执行器。还能配**外观**(窗口尺寸/位置/头像/气泡图标/标题对齐)、**页面登记**让 Agent 知道访客在哪个页面提问——见下「可选增强」。
|
|
69
|
+
|
|
70
|
+
**第 6 步 · 接本地大脑**(需要时,「调度目标」):注册一个 executor 类目标。优先在路由的「调用代码 → 执行器接入」复制短引导交给 Agent;完整、版本化的接入 Skill 也可直接读取:`<中枢地址>/connect/skills/connect-bailinghub-executor/SKILL.md`。
|
|
71
|
+
|
|
72
|
+
手工接入时,在你的机器上运行通用执行器:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
curl -fsSL <中枢地址>/connect/executor.mjs -o bailing-executor.mjs
|
|
76
|
+
read -rsp 'BailingHub executor token: ' BAILING_EXECUTOR_TOKEN && printf '\n'
|
|
77
|
+
export BAILING_EXECUTOR_TOKEN
|
|
78
|
+
node bailing-executor.mjs --hub <中枢地址> --targets <目标名> --cmd '<你的命令>'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
约定只有三条:stdin 进任务、stdout 出结果、退出码非 0 = 失败。`--cmd './my-agent.sh'` 可以替换成任何能读 stdin、写 stdout 的命令。出站长轮询,内网机器即可。本仓 `src/executor.ts` 是带会话/能力档的进阶参考实现;可用 `BAILING_EXECUTOR_CONCURRENCY` 或 `executor.concurrency` 开多个本地 worker 并发认领,同 thread 串行仍由中枢调度保证。
|
|
82
|
+
|
|
83
|
+
OpenClaw 已配置好模型 Provider 时,可再下载一个零依赖适配器,把上面的 `--cmd` 直接指向 OpenClaw:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
curl -fsSL <中枢地址>/connect/openclaw-stdio.mjs -o bailing-openclaw.mjs
|
|
87
|
+
node bailing-executor.mjs --hub <中枢地址> --targets <目标名> \
|
|
88
|
+
--runtime openclaw --cmd 'node bailing-openclaw.mjs --agent bailinghub-executor'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
推荐给执行器单独创建 OpenClaw Agent,并使用 `minimal` 工具配置。适配器默认只转交任务正文和会话标识,不把业务工具令牌交给 OpenClaw;工具调用应在领取/回传链路跑通后再单独接入治理代理。
|
|
92
|
+
|
|
93
|
+
**第 7 步 · 结果去哪**(三选一,可叠加):
|
|
94
|
+
- 不取回:fire-and-forget;
|
|
95
|
+
- 拉:`GET /jobs/{job_id}` 轮询,或路由配 `callback`(HMAC 签名回调,验签见 CONTRACT.md);
|
|
96
|
+
- 推(送达层):路由配 `delivery`。`{"type":"webhook","url":...}` 内置;要推自有渠道(企微/钉钉/短信/…)=注册 `X-notify` 执行器目标 + 用第 6 步的执行器接它,中枢零改动。本仓的 wecom-notify 是这个模式的参考实现,部署方需配置自己的发送命令。
|
|
97
|
+
|
|
98
|
+
**第 8 步 · 运维**(「后台账号」「变更审计」「任务」):RBAC 固定角色(admin / kb_editor / viewer);顶栏看执行器在线;`BAILING_ALERTS_*` 配自监控告警出口,可走 webhook 或自家送达插座;`npm run doctor` 做本地配置/文档/开源边界体检,`npm run selftest` 在已运行实例上验证契约闸门。
|
|
99
|
+
|
|
100
|
+
**第 9 步 · 给 AI 接工具**(要"能查、能办"时,「工具源」+「审批意图」):
|
|
101
|
+
|
|
102
|
+
1. 业务系统声明可调接口 + 实现验签中间件。**PHP 业务直接用 SDK**(`sdk/php/`,零依赖):控制器方法标 `#[AiTool(...)]` 注解(完整字段注册表见 CONTRACT §2.4a,构建期自动体检),`SpecServer` 一行挂出 `/.well-known/bailing/tools.json`,`Verify::toolCall` 即验签;其他语言照 CONTRACT 手写 openapi.json + 验签(参考 `docs/examples/bailing-tool-verify.php`);
|
|
103
|
+
2. 控制台「工具源」注册:base_url + 签名密钥 + spec(粘贴或 URL 拉取,推荐业务把 spec 发布到 `/.well-known/bailing/tools.json` 并开自动刷新)。URL 来源只有“签名保护”和“允许公开”两项可选,默认前者;只有你明确接受任何 URL 访问者都能看到接口路径、参数和风险声明时,才选后者。签名保护刷新会在正确签名读取后补做未签名/错误签名负向探测,未实测通过就拒绝覆盖、继续用旧缓存;允许公开以未签名请求读取,不会偷偷改用签名。列表把“期望策略”和“实测结果”分开显示;PHP/PHP7 SDK 在受保护响应上自动加 `Cache-Control: private, no-store`。业务侧新标注的接口会自动成为工具,清单增删/风险变化会审计并告警;「工具清单」预览能看到哪些接口进来了、哪些被跳过及原因;「授权探针」另行显示业务侧是否对合成越权主体 fail-closed;页面右上「开发文档」跳转官网对应文档;
|
|
104
|
+
3. 路由挂 `tools`:`{"sources":[{"provider":"你的工具源","allow":["tenant.staff.*"],"subject_field":"operator_uid"}],"max_calls":5}` ——每个来源的 `allow` 是 scope 白名单(双闸:业务标了 ∩ 路由允许才暴露);`subject_field` 指明 metadata 里哪个字段是操作主体,业务后端触发时写入(全程不经 LLM);跨系统场景可在 `sources` 继续添加来源;
|
|
105
|
+
4. 完成。llm 走 function-calling 循环;执行器大脑(自研智能体 / 脚本 / 第三方运行时)认领件里自带工具清单 + `tool_token`,curl 中枢代理即可调用——两条路走**同一套**白名单/风险闸/限流/审计/签名出口。
|
|
106
|
+
5. 风险操作不放养:`high` / `confirm-required` 的调用先冻结成「审批意图」,批准后任务自动重跑,且只允许执行被批准的那个调用快照。
|
|
107
|
+
|
|
108
|
+
鉴权两段式(谁负责什么):**中枢管 reach**(这路 AI 最多够到哪),**业务管 authority**(这个人此刻能不能做——验签后用你既有的权限表裁决,AI 与人点按钮走同一条路径)。
|
|
109
|
+
|
|
110
|
+
> **诚实一点(别当成粘贴一段中间件)**:你**不需要改架构**,但非平凡集成是个小项目——给每个端点标 x-agent-capability(scope/risk)+ 实现验签**与授权**两道闸 + **把 On-Behalf-Of 主体接进你的权限表**(这是 authority 闸,**服务器到服务器没有 session,平时的登录态鉴权不生效,不接 = 认证了但没授权**)+ 定空主体语义 + 发布 spec + 注册工具源 + 配 allow 白名单。PHP 用官方 SDK 的 `Verify::gate()`(authorize 是**必填回调、fail-closed**),把"授权"这步在代码层钉死,避免最常见的"只验签不授权"陷阱——切勿把 authorize 写成 `return true`。
|
|
111
|
+
|
|
112
|
+
## 可选增强(按需开,都在控制台,业务侧零代码或极小改动)
|
|
113
|
+
|
|
114
|
+
九步跑通后,这些能力按需叠加,互不影响、默认不打扰:
|
|
115
|
+
|
|
116
|
+
- **入站渠道(企微等)**(「渠道」):让外部平台消息**直接进中枢**——注册 `kind=wecom + config + route_key`,企微自建应用「接收消息」填回调 `https://<中枢>/wecom/<渠道名>`。窗口内被动回复、超窗异步推。完整步骤/字段/握手见 **docs/CHANNELS.md**。
|
|
117
|
+
- **聊天附件上传**(「媒体存储」+「聊天入口」):不开任何对象存储也能用,默认写服务器 `data/uploads` 并返回 `/uploads/*` 公开 URL;生产需要 CDN、生命周期管理或多副本共享时,再登记业务对象存储(当前 COS:region/bucket/AK·SK/公开域名/写入前缀)并让聊天入口关联它。图片、语音、文件都会得到**永久 URL**,一份存储喂三件事:完整追溯 / 多模态输入策略 / 业务接口入参。路由决定图片、语音、文件分别走识别、转写、文本抽取、摘要、直送或忽略;指向业务自己的桶则 URL 即业务 CDN、零转存。见 CONTRACT §2.4e。
|
|
118
|
+
- **对话记忆**(「触发路由 → 对话记忆」):长会话开**滚动摘要**(默认关、不改原行为)——超水位线的早期对话异步压缩成结构化摘要,后续连摘要一起注入,上下文不爆。
|
|
119
|
+
- **页面感知**(「聊天入口 → 页面登记」):配 URL 模式 → 页面名+说明的登记表,AI 据此知道访客在哪页提问、精准定位;路由再开「页面感知检索」可偏置召回本页相关文档(全局仍兜底)。见 CONTRACT §1.2。
|
|
120
|
+
- **组件外观与运营启停**(「聊天入口」):窗口尺寸/高度、标题对齐、气泡贴左/右下角与像素偏移、头部头像、自定义气泡图标、底部品牌标识都可配置;入口可在列表一键暂停,已嵌入页面无需删除脚本,恢复后自动重新展示。
|
|
121
|
+
|
|
122
|
+
## 不同形态怎么配(速查)
|
|
123
|
+
|
|
124
|
+
| 你的情况 | 配法 |
|
|
125
|
+
|---|---|
|
|
126
|
+
| 只想要"带知识库的异步 LLM 工人" | 第 1–5 步即止,target=llm |
|
|
127
|
+
| 有本地 agent、脚本或第三方运行时,想让它干重活 | 注册 executor 目标 + 通用执行器 `--cmd './my-agent.sh'`(或用 src/executor.ts 获得能力档/项目目录支持) |
|
|
128
|
+
| 有自研智能体/其他框架 | 同上,`--cmd` 换你的 CLI;或自己实现 claim/result 两个 HTTP 端点(见 CONTRACT.md) |
|
|
129
|
+
| 要把结果推进自有 IM/短信 | 注册 `<渠道>-notify` executor 目标,执行器里调你的发送命令 |
|
|
130
|
+
| 业务要同会话多轮追问 | 路由 session_policy=per_key + metadata 带业务键;总账自动装配上下文 |
|
|
131
|
+
| 要让 Agent 直接查/办业务(客服查订单、运营改配置) | 第 9 步:业务按 ACC 标 `x-agent-capability` + 注册工具源 + 路由挂 tools;写操作走「审批意图」 |
|
|
132
|
+
| 要在官网/H5 放个聊天框 | 「聊天入口」建入口绑路由 → 一行 script 嵌入;Origin 白名单 + IP 限速防滥用;外观/传图/页面登记按需开 |
|
|
133
|
+
| 要让外部平台(企微)消息直接进中枢 | 「渠道」注册 `kind=wecom` + 回调 `/wecom/<名>` 绑路由;见 docs/CHANNELS.md |
|
|
134
|
+
| 聊天里要把图传给 AI 看 / 当商品图 | 「对象存储」登记桶 + 「聊天入口」关联;图落桶取永久 URL;见 CONTRACT §2.4e |
|
|
135
|
+
| 长会话上下文要压缩 | 路由「对话记忆」开滚动摘要(默认关) |
|
|
136
|
+
|
|
137
|
+
## 中枢承诺不变的东西
|
|
138
|
+
|
|
139
|
+
信封契约 v1(`/run`、`/jobs`、executor claim/result、外发签名)是冻结的——见 CONTRACT.md。其余一切(大脑、渠道、场景)都是插座上的插头,随你换。
|
|
140
|
+
|
|
141
|
+
## 接真实业务前的检查
|
|
142
|
+
|
|
143
|
+
在把 demo 配置换成真实系统前,至少确认:
|
|
144
|
+
|
|
145
|
+
- 生产环境设置 `BAILING_ENV=production`,敏感项只从环境变量或密钥管理器注入;
|
|
146
|
+
- 每个业务系统都有独立接入方 token、路由白名单和限速;
|
|
147
|
+
- 工具源只暴露已标注 `x-agent-capability` 的接口,路由 `tools.sources[].allow` 分别只放行必要 scope;
|
|
148
|
+
- 业务侧验签后必须执行自己的授权判断,不能只验签就执行写操作;
|
|
149
|
+
- `high` / `confirm-required` 工具已经接到业务审批流,或明确使用中枢控制台作为兜底审批;
|
|
150
|
+
- 审计保留期已经按组织合规要求配置;如果必须永久留存,保持 `BAILING_AUDIT_RETENTION_DAYS=0`;
|
|
151
|
+
- `/admin/system/status`、任务 trace、变更审计和告警出口都能正常查看;
|
|
152
|
+
- 真实凭证、真实域名、客户数据和本机路径没有进入公开仓、示例配置或日志样例。
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Documentation Map
|
|
2
|
+
|
|
3
|
+
This directory contains public documentation for the open-source BailingHub project. Internal operations notes, official website planning, and temporary research reports do not belong in the open-source package.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
| Document | Purpose |
|
|
8
|
+
|---|---|
|
|
9
|
+
| [QUICKSTART.en.md](QUICKSTART.en.md) | Install BailingHub, run the Docker demo, create the first route, and connect the first business tool. |
|
|
10
|
+
| [DEMO.en.md](DEMO.en.md) | Docker demo walkthrough: hub, MySQL, demo business system, tool provider, audit, and trace. |
|
|
11
|
+
| [INDEPENDENT_VALIDATION.en.md](INDEPENDENT_VALIDATION.en.md) | Independent Docker demo task with objective pass criteria and a standard report path. |
|
|
12
|
+
| [INDEPENDENT_VALIDATION.md](INDEPENDENT_VALIDATION.md) | Chinese independent validation task. |
|
|
13
|
+
| [user-guide/README.en.md](user-guide/README.en.md) | User and product-owner guide: business goals, console concepts, and scenario-based setup. |
|
|
14
|
+
| [CONTRACT.en.md](CONTRACT.en.md) | Stable HTTP and wire contract between business systems and the hub. |
|
|
15
|
+
| [INTEGRATION.en.md](INTEGRATION.en.md) | Third-party integration guide for tools, signatures, authorization, and callback handling. |
|
|
16
|
+
| [WIDGET_RENDERERS.en.md](WIDGET_RENDERERS.en.md) | Trusted rich-content renderer extension for charts and interactive reports in the chat widget. |
|
|
17
|
+
| [WIDGET_RENDERERS.md](WIDGET_RENDERERS.md) | Chinese trusted widget renderer guide. |
|
|
18
|
+
| [integrations/dify/README.en.md](integrations/dify/README.en.md) | Minimal Dify integration through the governed BailingHub `/run` and `/jobs/{job_id}` APIs. |
|
|
19
|
+
| [integrations/dify/README.md](integrations/dify/README.md) | Chinese Dify + BailingHub minimal integration recipe. |
|
|
20
|
+
| [integrations/deepseek/README.en.md](integrations/deepseek/README.en.md) | DeepSeek V4 + BailingHub bilingual E2E recipe with thinking-mode tool-call compatibility. |
|
|
21
|
+
| [integrations/deepseek/README.md](integrations/deepseek/README.md) | Chinese DeepSeek V4 + BailingHub E2E recipe. |
|
|
22
|
+
| [integrations/bailian/README.en.md](integrations/bailian/README.en.md) | Alibaba Cloud Model Studio custom MCP recipe for governed BailingHub jobs. |
|
|
23
|
+
| [integrations/bailian/README.md](integrations/bailian/README.md) | Chinese Alibaba Cloud Model Studio + BailingHub custom MCP recipe. |
|
|
24
|
+
| [integrations/ruoyi-vue-pro/README.en.md](integrations/ruoyi-vue-pro/README.en.md) | Authority-preserving RuoYi-Vue-Pro after-sale and refund integration recipe. |
|
|
25
|
+
| [integrations/ruoyi-vue-pro/README.md](integrations/ruoyi-vue-pro/README.md) | Chinese RuoYi-Vue-Pro / Yudao community integration recipe. |
|
|
26
|
+
| [integrations/jeecgboot/README.en.md](integrations/jeecgboot/README.en.md) | Authority-preserving JeecgBoot user read and freeze/unfreeze integration recipe. |
|
|
27
|
+
| [integrations/jeecgboot/README.md](integrations/jeecgboot/README.md) | Chinese JeecgBoot governed user-action community integration recipe. |
|
|
28
|
+
|
|
29
|
+
## Architecture And Models
|
|
30
|
+
|
|
31
|
+
| Document | Purpose |
|
|
32
|
+
|---|---|
|
|
33
|
+
| [ARCHITECTURE.en.md](ARCHITECTURE.en.md) | Architecture overview: layers, runtime path, boundaries, and extension points. |
|
|
34
|
+
| [KERNEL_HOST_API.en.md](KERNEL_HOST_API.en.md) | Versioned high-level embedding API, managed lifecycle, mount paths, and artifact upgrade boundary. |
|
|
35
|
+
| [KERNEL_HOST_API.md](KERNEL_HOST_API.md) | Chinese Kernel Host API guide. |
|
|
36
|
+
| [PIPELINE.en.md](PIPELINE.en.md) | Runtime pipeline from trigger to dispatch, tools, audit, approval, and delivery. |
|
|
37
|
+
|
|
38
|
+
## Runtime Capabilities
|
|
39
|
+
|
|
40
|
+
| Document | Purpose |
|
|
41
|
+
|---|---|
|
|
42
|
+
| [TOOLS_MODEL.en.md](TOOLS_MODEL.en.md) | Unified tool definition model across OpenAPI, SDK, overlays, and future adapters. |
|
|
43
|
+
| [TOOLS_DESIGN.en.md](TOOLS_DESIGN.en.md) | Tool governance design: allowlists, risk, rate limits, approvals, audit, and signatures. |
|
|
44
|
+
| [AI_FRIENDLY_TOOLS.en.md](AI_FRIENDLY_TOOLS.en.md) | How to design business APIs as AI-friendly tools without exposing raw backend CRUD. |
|
|
45
|
+
| [TOOLS.en.md](TOOLS.en.md) | Practical tool provider and governance guide. |
|
|
46
|
+
| [SDK.en.md](SDK.en.md) | SDK guide for PHP, Node, Python, Java, Go, .NET, and any-language OpenAPI/HMAC integration. |
|
|
47
|
+
| [CHANNELS.en.md](CHANNELS.en.md) | Inbound channel model and adapter expectations. |
|
|
48
|
+
| [OPERATIONS.en.md](OPERATIONS.en.md) | Production topology, readiness, capacity, upgrades, backups, and recovery. |
|
|
49
|
+
| [STREAMING.en.md](STREAMING.en.md) | Chat streaming protocol, reconnect behavior, canonical final result, and multi-replica boundary. |
|
|
50
|
+
| [STREAMING.md](STREAMING.md) | Chinese chat streaming protocol. |
|
|
51
|
+
|
|
52
|
+
## Release And Maintenance
|
|
53
|
+
|
|
54
|
+
| Document | Purpose |
|
|
55
|
+
|---|---|
|
|
56
|
+
| [ECOSYSTEM.en.md](ECOSYSTEM.en.md) | Policy for community distributions, independent implementations, and future ecosystem listings. |
|
|
57
|
+
| [ECOSYSTEM.md](ECOSYSTEM.md) | Chinese ecosystem and derivatives policy. |
|
|
58
|
+
| [RELEASE_NOTES_v0.1.1.en.md](RELEASE_NOTES_v0.1.1.en.md) | `v0.1.1` release notes for widget operations and stricter integration boundaries. |
|
|
59
|
+
| [RELEASE_NOTES_v0.1.1.md](RELEASE_NOTES_v0.1.1.md) | Chinese `v0.1.1` release notes. |
|
|
60
|
+
| [RELEASE_NOTES_v0.1.2.en.md](RELEASE_NOTES_v0.1.2.en.md) | `v0.1.2` server-token and derived-credential security hardening. |
|
|
61
|
+
| [RELEASE_NOTES_v0.1.2.md](RELEASE_NOTES_v0.1.2.md) | Chinese `v0.1.2` release notes. |
|
|
62
|
+
| [RELEASE_NOTES_v0.1.3.en.md](RELEASE_NOTES_v0.1.3.en.md) | `v0.1.3` portable executor onboarding and OpenClaw adapter release notes. |
|
|
63
|
+
| [RELEASE_NOTES_v0.1.3.md](RELEASE_NOTES_v0.1.3.md) | Chinese `v0.1.3` release notes. |
|
|
64
|
+
| [RELEASE_NOTES_v0.1.4.en.md](RELEASE_NOTES_v0.1.4.en.md) | `v0.1.4` real web chat streaming and reconnectable SSE release notes. |
|
|
65
|
+
| [RELEASE_NOTES_v0.1.4.md](RELEASE_NOTES_v0.1.4.md) | Chinese `v0.1.4` release notes. |
|
|
66
|
+
| [RELEASE_NOTES_v0.1.5.en.md](RELEASE_NOTES_v0.1.5.en.md) | `v0.1.5` installer reliability and clean-server compatibility release notes. |
|
|
67
|
+
| [RELEASE_NOTES_v0.1.5.md](RELEASE_NOTES_v0.1.5.md) | Chinese `v0.1.5` release notes. |
|
|
68
|
+
| [RELEASE_NOTES_v0.1.6.en.md](RELEASE_NOTES_v0.1.6.en.md) | `v0.1.6` independent-validation and post-install privilege-hint release notes. |
|
|
69
|
+
| [RELEASE_NOTES_v0.1.6.md](RELEASE_NOTES_v0.1.6.md) | Chinese `v0.1.6` release notes. |
|
|
70
|
+
| [RELEASE_NOTES_v0.1.7.en.md](RELEASE_NOTES_v0.1.7.en.md) | `v0.1.7` versioned Client API and cross-ecosystem compatibility-gate release notes. |
|
|
71
|
+
| [RELEASE_NOTES_v0.1.7.md](RELEASE_NOTES_v0.1.7.md) | Chinese `v0.1.7` release notes. |
|
|
72
|
+
| [RELEASE_NOTES_v0.1.8.en.md](RELEASE_NOTES_v0.1.8.en.md) | `v0.1.8` create-once initial-admin bootstrap release notes. |
|
|
73
|
+
| [RELEASE_NOTES_v0.1.8.md](RELEASE_NOTES_v0.1.8.md) | Chinese `v0.1.8` release notes. |
|
|
74
|
+
| [RELEASE_NOTES_v0.1.9.en.md](RELEASE_NOTES_v0.1.9.en.md) | `v0.1.9` optional OpenMetrics operational metrics release notes. |
|
|
75
|
+
| [RELEASE_NOTES_v0.1.9.md](RELEASE_NOTES_v0.1.9.md) | Chinese `v0.1.9` release notes. |
|
|
76
|
+
| [RELEASE_NOTES_v0.1.10.en.md](RELEASE_NOTES_v0.1.10.en.md) | `v0.1.10` instance branding, model identifier diagnostics, and ecosystem recipe release notes. |
|
|
77
|
+
| [RELEASE_NOTES_v0.1.10.md](RELEASE_NOTES_v0.1.10.md) | Chinese `v0.1.10` release notes. |
|
|
78
|
+
| [RELEASE_NOTES_v0.1.11.en.md](RELEASE_NOTES_v0.1.11.en.md) | `v0.1.11` side-effect execution journal and uncertain-outcome freezing release notes. |
|
|
79
|
+
| [RELEASE_NOTES_v0.1.11.md](RELEASE_NOTES_v0.1.11.md) | Chinese `v0.1.11` release notes. |
|
|
80
|
+
| [RELEASE_NOTES_v0.1.12.en.md](RELEASE_NOTES_v0.1.12.en.md) | `v0.1.12` voice transcription policy and fail-closed audio handling release notes. |
|
|
81
|
+
| [RELEASE_NOTES_v0.1.12.md](RELEASE_NOTES_v0.1.12.md) | Chinese `v0.1.12` release notes. |
|
|
82
|
+
| [RELEASE_NOTES_v0.1.13.en.md](RELEASE_NOTES_v0.1.13.en.md) | `v0.1.13` voice transcription and distribution-version alignment release notes. |
|
|
83
|
+
| [RELEASE_NOTES_v0.1.13.md](RELEASE_NOTES_v0.1.13.md) | Chinese `v0.1.13` release notes. |
|
|
84
|
+
| [RELEASE_NOTES_v0.1.14.en.md](RELEASE_NOTES_v0.1.14.en.md) | `v0.1.14` transient progress feedback for streaming chat release notes. |
|
|
85
|
+
| [RELEASE_NOTES_v0.1.14.md](RELEASE_NOTES_v0.1.14.md) | Chinese `v0.1.14` release notes. |
|
|
86
|
+
| [RELEASE_NOTES_v0.1.15.en.md](RELEASE_NOTES_v0.1.15.en.md) | `v0.1.15` trusted rich rendering and chat reliability release notes. |
|
|
87
|
+
| [RELEASE_NOTES_v0.1.15.md](RELEASE_NOTES_v0.1.15.md) | Chinese `v0.1.15` release notes. |
|
|
88
|
+
| [RELEASE_NOTES_v0.1.16.en.md](RELEASE_NOTES_v0.1.16.en.md) | `v0.1.16` bounded tool runtime and resilient semantic retrieval release notes. |
|
|
89
|
+
| [RELEASE_NOTES_v0.1.16.md](RELEASE_NOTES_v0.1.16.md) | Chinese `v0.1.16` release notes. |
|
|
90
|
+
| [RELEASE_NOTES_v0.2.0.en.md](RELEASE_NOTES_v0.2.0.en.md) | `v0.2.0` tool catalog access protection and active verification release notes. |
|
|
91
|
+
| [RELEASE_NOTES_v0.2.0.md](RELEASE_NOTES_v0.2.0.md) | Chinese `v0.2.0` release notes. |
|
|
92
|
+
| [RELEASE_NOTES_v0.3.0.en.md](RELEASE_NOTES_v0.3.0.en.md) | `v0.3.0` composable Core and Kernel Host API v1 release notes. |
|
|
93
|
+
| [RELEASE_NOTES_v0.3.0.md](RELEASE_NOTES_v0.3.0.md) | Chinese `v0.3.0` release notes. |
|
|
94
|
+
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | First public release notes. |
|
|
95
|
+
| [CHANGELOG.en.md](CHANGELOG.en.md) | Public changelog format and current release summary. |
|
|
96
|
+
| [COMPATIBILITY.en.md](COMPATIBILITY.en.md) | Versioning, compatibility, migration, and schema discipline. |
|
|
97
|
+
|
|
98
|
+
## Maintenance Rules
|
|
99
|
+
|
|
100
|
+
- Every public Chinese document should have an English companion document unless it is explicitly internal and excluded from the open-source package.
|
|
101
|
+
- Public contract changes must update the contract docs, SDK examples, and changelog together.
|
|
102
|
+
- Internal decision logs, release rehearsals, and website/console UX rules belong under `internal/`, not in the public package.
|
|
103
|
+
- Temporary discussion material should not be added here unless it has become maintained public documentation.
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# 文档地图
|
|
2
|
+
|
|
3
|
+
本目录只放开源项目需要公开维护的文档。官网内容、内部运维记录、临时调研报告不放进开源仓。
|
|
4
|
+
|
|
5
|
+
英文文档地图见 [README.en.md](README.en.md)。公开仓库中的中文主文档都应有英文 companion;内部说明和不进入开源包的运营材料不在此约束内。
|
|
6
|
+
|
|
7
|
+
## 开始使用
|
|
8
|
+
|
|
9
|
+
| 文档 | 用途 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| [QUICKSTART.md](QUICKSTART.md) | 从零部署百灵中枢,适合准备接入真实业务系统的开发者。 |
|
|
12
|
+
| [QUICKSTART.en.md](QUICKSTART.en.md) | English quickstart for Docker demo, first route, and first business tool. |
|
|
13
|
+
| [DEMO.md](DEMO.md) | Docker demo 闭环:中枢、MySQL、demo 业务系统、工具源、审计与 trace。 |
|
|
14
|
+
| [DEMO.en.md](DEMO.en.md) | English Docker demo walkthrough. |
|
|
15
|
+
| [INDEPENDENT_VALIDATION.md](INDEPENDENT_VALIDATION.md) | 陌生开发者仅凭公开资料验证 Docker demo 的任务卡、通过标准与反馈方式。 |
|
|
16
|
+
| [INDEPENDENT_VALIDATION.en.md](INDEPENDENT_VALIDATION.en.md) | English independent validation task, pass criteria, and report path. |
|
|
17
|
+
| [user-guide/README.md](user-guide/README.md) | 使用者/产品经理视角:从业务需求出发,理解为什么需要中枢、后台菜单怎么配、配完交给开发者什么。 |
|
|
18
|
+
| [CONTRACT.md](CONTRACT.md) | 业务系统和中枢之间的稳定网络契约,接入前应先读。 |
|
|
19
|
+
| [CONTRACT.en.md](CONTRACT.en.md) | English HTTP and wire contract summary. |
|
|
20
|
+
| [第三方对接指南.md](第三方对接指南.md) | 业务侧如何暴露工具、验签、授权与返回结果。 |
|
|
21
|
+
| [INTEGRATION.en.md](INTEGRATION.en.md) | English third-party integration guide. |
|
|
22
|
+
| [WIDGET_RENDERERS.md](WIDGET_RENDERERS.md) | 聊天组件的可信富内容渲染扩展:图表、交互报告与安全降级。 |
|
|
23
|
+
| [WIDGET_RENDERERS.en.md](WIDGET_RENDERERS.en.md) | English trusted rich-content renderer extension for the chat widget. |
|
|
24
|
+
| [integrations/dify/README.md](integrations/dify/README.md) | Dify 通过 BailingHub `/run` 与 `/jobs/{job_id}` 发起受治理任务的最小接入配方。 |
|
|
25
|
+
| [integrations/dify/README.en.md](integrations/dify/README.en.md) | English Dify + BailingHub minimal integration recipe. |
|
|
26
|
+
| [integrations/deepseek/README.md](integrations/deepseek/README.md) | DeepSeek V4 通过 BailingHub 参与受治理业务动作的双语 E2E 配方。 |
|
|
27
|
+
| [integrations/deepseek/README.en.md](integrations/deepseek/README.en.md) | English DeepSeek V4 + BailingHub bilingual E2E recipe. |
|
|
28
|
+
| [integrations/bailian/README.md](integrations/bailian/README.md) | 阿里云百炼通过自定义 MCP 调用 BailingHub 受治理任务的最小接入配方。 |
|
|
29
|
+
| [integrations/bailian/README.en.md](integrations/bailian/README.en.md) | English Alibaba Cloud Model Studio + BailingHub custom MCP recipe. |
|
|
30
|
+
| [integrations/ruoyi-vue-pro/README.md](integrations/ruoyi-vue-pro/README.md) | RuoYi-Vue-Pro / 芋道源码售后查询与退款的权限保留型社区接入配方。 |
|
|
31
|
+
| [integrations/ruoyi-vue-pro/README.en.md](integrations/ruoyi-vue-pro/README.en.md) | English authority-preserving RuoYi-Vue-Pro after-sale and refund recipe. |
|
|
32
|
+
| [integrations/jeecgboot/README.md](integrations/jeecgboot/README.md) | JeecgBoot 用户查询与冻结/解冻的租户、权限和最终授权保留型社区接入配方。 |
|
|
33
|
+
| [integrations/jeecgboot/README.en.md](integrations/jeecgboot/README.en.md) | English authority-preserving JeecgBoot user read and freeze/unfreeze recipe. |
|
|
34
|
+
|
|
35
|
+
## 架构与模型
|
|
36
|
+
|
|
37
|
+
| 文档 | 职责边界 |
|
|
38
|
+
|---|---|
|
|
39
|
+
| [ARCHITECTURE.md](ARCHITECTURE.md) | 当前架构的主说明:分层、核心运行链路、解耦边界和扩展方向。 |
|
|
40
|
+
| [ARCHITECTURE.en.md](ARCHITECTURE.en.md) | English architecture overview. |
|
|
41
|
+
| [KERNEL_HOST_API.md](KERNEL_HOST_API.md) | 完整 Core 的版本化高层嵌入 API、托管生命周期和升级边界。 |
|
|
42
|
+
| [KERNEL_HOST_API.en.md](KERNEL_HOST_API.en.md) | English versioned Kernel Host API and lifecycle boundary. |
|
|
43
|
+
| [PIPELINE.md](PIPELINE.md) | 一次任务从入口到执行、审计、送达的流水线。 |
|
|
44
|
+
| [PIPELINE.en.md](PIPELINE.en.md) | English runtime pipeline. |
|
|
45
|
+
|
|
46
|
+
## 运行面能力
|
|
47
|
+
|
|
48
|
+
| 文档 | 用途 |
|
|
49
|
+
|---|---|
|
|
50
|
+
| [TOOLS_MODEL.md](TOOLS_MODEL.md) | 工具抽象模型:不同来源如何归一成中枢可治理的 ToolDefinition。 |
|
|
51
|
+
| [TOOLS_MODEL.en.md](TOOLS_MODEL.en.md) | English tool model. |
|
|
52
|
+
| [TOOLS_DESIGN.md](TOOLS_DESIGN.md) | 工具治理实现:白名单、风险、限流、审批、审计、签名。 |
|
|
53
|
+
| [TOOLS_DESIGN.en.md](TOOLS_DESIGN.en.md) | English tool governance design. |
|
|
54
|
+
| [AI友好工具设计指南.md](AI友好工具设计指南.md) | 业务接口如何设计成 AI 容易正确调用的工具。 |
|
|
55
|
+
| [AI_FRIENDLY_TOOLS.en.md](AI_FRIENDLY_TOOLS.en.md) | English AI-friendly tool design guide. |
|
|
56
|
+
| [TOOLS.en.md](TOOLS.en.md) | English business tool and governance guide. |
|
|
57
|
+
| [SDK.en.md](SDK.en.md) | English SDK guide for PHP, Node, Python, Java, Go, .NET, and any-language integration. |
|
|
58
|
+
| [CHANNELS.md](CHANNELS.md) | 入站渠道模型,当前包含企微接入。 |
|
|
59
|
+
| [CHANNELS.en.md](CHANNELS.en.md) | English inbound channel model. |
|
|
60
|
+
| [OPERATIONS.md](OPERATIONS.md) | 生产部署、多副本、健康检查、容量、备份与恢复。 |
|
|
61
|
+
| [OPERATIONS.en.md](OPERATIONS.en.md) | English production operations guide. |
|
|
62
|
+
| [STREAMING.md](STREAMING.md) | 网页聊天的真实增量输出协议:SSE 事件、断线重放、权威结果和多副本边界。 |
|
|
63
|
+
| [STREAMING.en.md](STREAMING.en.md) | English chat streaming protocol and operations boundary. |
|
|
64
|
+
|
|
65
|
+
## 发布与维护
|
|
66
|
+
|
|
67
|
+
| 文档 | 用途 |
|
|
68
|
+
|---|---|
|
|
69
|
+
| [ECOSYSTEM.md](ECOSYSTEM.md) | 社区发行版、独立实现、生态组件和未来官方展示的原则。 |
|
|
70
|
+
| [ECOSYSTEM.en.md](ECOSYSTEM.en.md) | English policy for derivatives, independent implementations, and ecosystem listings. |
|
|
71
|
+
| [RELEASE_NOTES_v0.1.1.md](RELEASE_NOTES_v0.1.1.md) | `v0.1.1` 聊天组件运营控制与接入边界修复说明。 |
|
|
72
|
+
| [RELEASE_NOTES_v0.1.1.en.md](RELEASE_NOTES_v0.1.1.en.md) | English `v0.1.1` release notes. |
|
|
73
|
+
| [RELEASE_NOTES_v0.1.2.md](RELEASE_NOTES_v0.1.2.md) | `v0.1.2` 服务端根 token 与派生凭证安全加固说明。 |
|
|
74
|
+
| [RELEASE_NOTES_v0.1.2.en.md](RELEASE_NOTES_v0.1.2.en.md) | English `v0.1.2` security hardening release notes. |
|
|
75
|
+
| [RELEASE_NOTES_v0.1.3.md](RELEASE_NOTES_v0.1.3.md) | `v0.1.3` 便携式执行器接入与 OpenClaw 适配说明。 |
|
|
76
|
+
| [RELEASE_NOTES_v0.1.3.en.md](RELEASE_NOTES_v0.1.3.en.md) | English `v0.1.3` portable executor onboarding and OpenClaw adapter release notes. |
|
|
77
|
+
| [RELEASE_NOTES_v0.1.4.md](RELEASE_NOTES_v0.1.4.md) | `v0.1.4` 网页聊天真实流式输出与可重连 SSE 说明。 |
|
|
78
|
+
| [RELEASE_NOTES_v0.1.4.en.md](RELEASE_NOTES_v0.1.4.en.md) | English `v0.1.4` real web chat streaming and reconnectable SSE release notes. |
|
|
79
|
+
| [RELEASE_NOTES_v0.1.5.md](RELEASE_NOTES_v0.1.5.md) | `v0.1.5` 一键安装参数可靠性与全新服务器兼容性说明。 |
|
|
80
|
+
| [RELEASE_NOTES_v0.1.5.en.md](RELEASE_NOTES_v0.1.5.en.md) | English `v0.1.5` installer reliability and clean-server compatibility release notes. |
|
|
81
|
+
| [RELEASE_NOTES_v0.1.6.md](RELEASE_NOTES_v0.1.6.md) | `v0.1.6` 独立验证路径与安装后权限提示说明。 |
|
|
82
|
+
| [RELEASE_NOTES_v0.1.6.en.md](RELEASE_NOTES_v0.1.6.en.md) | English `v0.1.6` independent-validation and post-install privilege-hint release notes. |
|
|
83
|
+
| [RELEASE_NOTES_v0.1.7.md](RELEASE_NOTES_v0.1.7.md) | `v0.1.7` 版本化 Client API 与跨生态兼容门禁说明。 |
|
|
84
|
+
| [RELEASE_NOTES_v0.1.7.en.md](RELEASE_NOTES_v0.1.7.en.md) | English `v0.1.7` versioned Client API and cross-ecosystem compatibility-gate release notes. |
|
|
85
|
+
| [RELEASE_NOTES_v0.1.8.md](RELEASE_NOTES_v0.1.8.md) | `v0.1.8` 首次管理员只创建一次与重启安全说明。 |
|
|
86
|
+
| [RELEASE_NOTES_v0.1.8.en.md](RELEASE_NOTES_v0.1.8.en.md) | English `v0.1.8` create-once initial-admin bootstrap release notes. |
|
|
87
|
+
| [RELEASE_NOTES_v0.1.9.md](RELEASE_NOTES_v0.1.9.md) | `v0.1.9` 可选 OpenMetrics 运维指标与安全抓取说明。 |
|
|
88
|
+
| [RELEASE_NOTES_v0.1.9.en.md](RELEASE_NOTES_v0.1.9.en.md) | English `v0.1.9` optional OpenMetrics operational metrics release notes. |
|
|
89
|
+
| [RELEASE_NOTES_v0.1.10.md](RELEASE_NOTES_v0.1.10.md) | `v0.1.10` 实例品牌设置、模型标识诊断与生态接入配方说明。 |
|
|
90
|
+
| [RELEASE_NOTES_v0.1.10.en.md](RELEASE_NOTES_v0.1.10.en.md) | English `v0.1.10` instance branding, model identifier diagnostics, and ecosystem recipe release notes. |
|
|
91
|
+
| [RELEASE_NOTES_v0.1.11.md](RELEASE_NOTES_v0.1.11.md) | `v0.1.11` 副作用执行日志与不确定结果冻结说明。 |
|
|
92
|
+
| [RELEASE_NOTES_v0.1.11.en.md](RELEASE_NOTES_v0.1.11.en.md) | English `v0.1.11` side-effect execution journal and uncertain-outcome freezing release notes. |
|
|
93
|
+
| [RELEASE_NOTES_v0.1.12.md](RELEASE_NOTES_v0.1.12.md) | `v0.1.12` 语音转写策略与失败关闭说明。 |
|
|
94
|
+
| [RELEASE_NOTES_v0.1.12.en.md](RELEASE_NOTES_v0.1.12.en.md) | English `v0.1.12` voice transcription policy and fail-closed audio handling release notes. |
|
|
95
|
+
| [RELEASE_NOTES_v0.1.13.md](RELEASE_NOTES_v0.1.13.md) | `v0.1.13` 语音转写与分发版本一致性说明。 |
|
|
96
|
+
| [RELEASE_NOTES_v0.1.13.en.md](RELEASE_NOTES_v0.1.13.en.md) | English `v0.1.13` voice transcription and distribution-version alignment release notes. |
|
|
97
|
+
| [RELEASE_NOTES_v0.1.14.md](RELEASE_NOTES_v0.1.14.md) | `v0.1.14` 流式对话阶段性进度提示说明。 |
|
|
98
|
+
| [RELEASE_NOTES_v0.1.14.en.md](RELEASE_NOTES_v0.1.14.en.md) | English `v0.1.14` transient progress feedback for streaming chat release notes. |
|
|
99
|
+
| [RELEASE_NOTES_v0.1.15.md](RELEASE_NOTES_v0.1.15.md) | `v0.1.15` 可信富内容渲染与聊天可靠性说明。 |
|
|
100
|
+
| [RELEASE_NOTES_v0.1.15.en.md](RELEASE_NOTES_v0.1.15.en.md) | English `v0.1.15` trusted rich rendering and chat reliability release notes. |
|
|
101
|
+
| [RELEASE_NOTES_v0.1.16.md](RELEASE_NOTES_v0.1.16.md) | `v0.1.16` 工具运行时收敛与语义检索韧性说明。 |
|
|
102
|
+
| [RELEASE_NOTES_v0.1.16.en.md](RELEASE_NOTES_v0.1.16.en.md) | English `v0.1.16` bounded tool runtime and resilient semantic retrieval release notes. |
|
|
103
|
+
| [RELEASE_NOTES_v0.2.0.md](RELEASE_NOTES_v0.2.0.md) | `v0.2.0` 工具清单访问保护与主动核验说明。 |
|
|
104
|
+
| [RELEASE_NOTES_v0.2.0.en.md](RELEASE_NOTES_v0.2.0.en.md) | English `v0.2.0` tool catalog access protection and active verification release notes. |
|
|
105
|
+
| [RELEASE_NOTES_v0.3.0.md](RELEASE_NOTES_v0.3.0.md) | `v0.3.0` 可组合 Core 与 Kernel Host API v1 说明。 |
|
|
106
|
+
| [RELEASE_NOTES_v0.3.0.en.md](RELEASE_NOTES_v0.3.0.en.md) | English `v0.3.0` composable Core and Kernel Host API v1 release notes. |
|
|
107
|
+
| [RELEASE_NOTES_v0.1.0.md](RELEASE_NOTES_v0.1.0.md) | 首个公开版本的 GitHub Release 草稿。 |
|
|
108
|
+
| [RELEASE_NOTES_v0.1.0.en.md](RELEASE_NOTES_v0.1.0.en.md) | English release notes. |
|
|
109
|
+
| [CHANGELOG.md](CHANGELOG.md) | 公开发布后的对外变更记录。 |
|
|
110
|
+
| [CHANGELOG.en.md](CHANGELOG.en.md) | English changelog. |
|
|
111
|
+
| [兼容性与升级.md](兼容性与升级.md) | SemVer、数据库迁移、契约稳定性和升级纪律。 |
|
|
112
|
+
| [COMPATIBILITY.en.md](COMPATIBILITY.en.md) | English compatibility and upgrade policy. |
|
|
113
|
+
|
|
114
|
+
## 维护纪律
|
|
115
|
+
|
|
116
|
+
- 新文档必须能归入上面某一类;如果归不进去,先判断是否只是临时讨论材料。
|
|
117
|
+
- 同一主题只保留一个主文档,其余文档必须说明自己是架构、契约、运行能力还是接入指南。
|
|
118
|
+
- 内部决策记录、发布演练、官网/控制台 UX 规范放 `internal/`,不进入公开分发物。
|
|
119
|
+
- 对外契约变更必须同步 [CONTRACT.md](CONTRACT.md)、SDK 示例和 [CHANGELOG.md](CHANGELOG.md)。
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# v0.1.0 Release Notes
|
|
2
|
+
|
|
3
|
+
BailingHub `v0.1.0` is the first public release.
|
|
4
|
+
|
|
5
|
+
It is a self-hosted Agent control plane for existing business systems and adopts the open contract model of [ACC, the Agent Capability Contract](https://www.agentcapability.org). The independent ACC specification repository is [agent-capability/agent-capability-contract](https://github.com/agent-capability/agent-capability-contract). A business system can trigger jobs, embed a chat entry, or expose selected business tools. The hub handles routing, context assembly, tool governance, approvals, audit trails, traceability, and result delivery.
|
|
6
|
+
|
|
7
|
+
## Who It Is For
|
|
8
|
+
|
|
9
|
+
- Teams with existing business systems that want AI agents to call selected business APIs safely.
|
|
10
|
+
- Developers who need a self-hosted control plane instead of a hosted chatbot-only product.
|
|
11
|
+
- SaaS vendors and integrators that need repeatable AI operation governance.
|
|
12
|
+
- Teams that want business-side authorization to remain the final authority.
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
To explore the product before installing it, open the [online experience](https://trial.bailinghub.com/console/login), create an account, inspect the console, import demo data, and run diagnostics. Do not upload production credentials or sensitive data, and do not connect real workloads to this environment.
|
|
17
|
+
|
|
18
|
+
To run the complete loop in your own environment:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or run from source:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
28
|
+
docker compose up --build
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Open `http://localhost:18900/console/`. The Docker demo account is `admin / bailing-demo-admin`. The one-line installer generates a random password and prints it at the end.
|
|
32
|
+
|
|
33
|
+
## Included Capabilities
|
|
34
|
+
|
|
35
|
+
- Hub runtime: trigger routes, DB-backed scheduling, same-thread serialization, lease recovery, graceful shutdown.
|
|
36
|
+
- Console: routes, targets, tool providers, clients, channels, credentials, knowledge, trace, diagnostics.
|
|
37
|
+
- Tool governance: OpenAPI `x-agent-capability`, allowlists, risk levels, rate limits, approval intent, signatures, audit, trace.
|
|
38
|
+
- Knowledge and context: retrieval injection, page context, message ledger, optional rolling summaries.
|
|
39
|
+
- Open-source experience: Docker demo, demo business system, one-line installer, schemas, PHP/PHP7/Node/Python/Java/Go/.NET SDK examples.
|
|
40
|
+
- Release guardrails: docs link checks, example validation, OSS export guard, release audit, image tag checks.
|
|
41
|
+
|
|
42
|
+
## Boundaries
|
|
43
|
+
|
|
44
|
+
- The first public images focus on `linux/amd64`.
|
|
45
|
+
- MCP integration is not part of this release.
|
|
46
|
+
- Production deployments still need domain, TLS, backups, monitoring, secret management, credential rotation, and business approval workflow integration.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# v0.1.0 Release Notes
|
|
2
|
+
|
|
3
|
+
百灵中枢 `v0.1.0` 是首个公开版本。它定位为可自托管、可验证、可二次开发的 Agent 控制面,采用 [ACC(Agent Capability Contract)](https://www.agentcapability.org) 的开放契约心智:业务系统通过 HTTP 契约触发任务或嵌入聊天入口,中枢负责路由大脑、装配上下文、治理工具调用、记录审计与追溯,并把结果送回业务侧。ACC 独立规范仓库见 [agent-capability/agent-capability-contract](https://github.com/agent-capability/agent-capability-contract)。
|
|
4
|
+
|
|
5
|
+
## 适合谁
|
|
6
|
+
|
|
7
|
+
- 已有传统业务系统,希望让 Agent 安全调用业务接口;
|
|
8
|
+
- 希望把 chatbot、agent、工具调用、审批、审计和送达统一治理的团队;
|
|
9
|
+
- 需要私有部署、保留业务系统边界、逐步接入 AI 能力的开发者和集成商。
|
|
10
|
+
|
|
11
|
+
## 快速体验
|
|
12
|
+
|
|
13
|
+
不想先部署,可以直接进入 [在线体验](https://trial.bailinghub.com/console/login),注册后查看控制台、导入演示数据并运行系统体检。在线环境仅用于了解产品和验证配置心智,请勿上传生产凭据、敏感数据或接入真实业务。
|
|
14
|
+
|
|
15
|
+
需要在自己的环境跑通完整闭环时:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
curl -fsSL https://www.bailinghub.com/install.sh | sh
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
或者在源码目录直接运行:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
export BAILING_TOKEN="${BAILING_TOKEN:-$(openssl rand -hex 32)}"
|
|
25
|
+
docker compose up --build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
打开 `http://localhost:18900/console/`,默认 demo 账号为 `admin / bailing-demo-admin`。一键安装脚本会生成随机密码,并在安装完成时打印。
|
|
29
|
+
|
|
30
|
+
## 这个版本包含什么
|
|
31
|
+
|
|
32
|
+
- 中枢运行时:触发路由、DB 调度队列、同 thread 串行、租约恢复、优雅停机;
|
|
33
|
+
- 控制台:路由、目标、工具源、接入方、渠道、凭证、知识库、任务追溯和系统体检;
|
|
34
|
+
- 工具治理:OpenAPI `x-agent-capability` 扩展、白名单、风险分级、集中限速、审批意图、审计追溯和签名调用;
|
|
35
|
+
- 知识与记忆:知识检索注入、页面上下文、会话总账和可选滚动摘要;
|
|
36
|
+
- 开源体验:Docker demo、示例业务系统、一键安装脚本、公开 schema、PHP/PHP7/Node/Python/Java/Go/.NET SDK 示例;
|
|
37
|
+
- 发布保障:`release:check`、OSS/GitHub 仓模拟、文档链接检查、示例配置校验、安全扫描和镜像 tag 检查。
|
|
38
|
+
|
|
39
|
+
## 和 chatbot / workflow / MCP 的区别
|
|
40
|
+
|
|
41
|
+
- 不是普通 chatbot:它治理的是“AI 如何进入业务系统并调用工具”;
|
|
42
|
+
- 不是传统 workflow:它不要求把所有路径画死,而是在可审计边界内动态选择大脑、知识、工具和送达策略;
|
|
43
|
+
- 不替代 MCP:MCP 是工具生态协议,中枢负责业务侧身份、权限、风险、限流、审批和审计。后续版本会继续评估 MCP 出站/入站设计。
|
|
44
|
+
|
|
45
|
+
## 已知边界
|
|
46
|
+
|
|
47
|
+
- 首版官方镜像优先覆盖 `linux/amd64`;ARM 场景建议使用源码构建,或自行确认镜像兼容;
|
|
48
|
+
- MCP 双向能力尚未发布;
|
|
49
|
+
- 持久化 outbox、全局分布式并发预算、结构化 request trace id 属于后续增强;
|
|
50
|
+
- 生产部署前仍需要自行完成域名、证书、备份、监控、密钥管理、凭证轮换和审批流程接入。
|
|
51
|
+
|
|
52
|
+
## 发布前验证
|
|
53
|
+
|
|
54
|
+
维护者发布前应执行:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm run release:check
|
|
58
|
+
npm run images:check
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
并确认:
|
|
62
|
+
|
|
63
|
+
- `https://www.bailinghub.com/install.sh` 可访问;
|
|
64
|
+
- `https://www.bailinghub.com/connect/bailinghub-source.tgz` 可下载;
|
|
65
|
+
- `https://www.bailinghub.com/version.json` 显示当前版本与构建信息;
|
|
66
|
+
- `github.com/bailinghub/bailinghub` 指向公开仓库。
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# v0.1.1 Release Notes
|
|
2
|
+
|
|
3
|
+
BailingHub `v0.1.1` is a backward-compatible update focused on operational controls for the embedded chat widget and stricter OpenAPI tool compilation boundaries. Existing `/run`, tool signing, approval, SDK, and database contracts do not require migration.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- **Pause or resume chat entries without removing embed code**: disabling an entry hides the launcher and panel. Message, history, upload, and feedback endpoints continue to reject requests on the server side.
|
|
8
|
+
- **Configurable widget attribution**: each chat entry can show, hide, or customize its footer attribution. Existing entries keep the current BailingHub attribution by default.
|
|
9
|
+
- **Explicit public configuration state**: disabled entries return `{ "enabled": false }`. The widget fails closed and remains hidden when configuration cannot be loaded or its state is unknown.
|
|
10
|
+
- **Stricter OpenAPI compilation**: only `query`, `path`, and `header` parameter locations are accepted. `cookie`, unknown, or missing locations produce stable diagnostics and skip the affected operation. Quoted string values for `timeout_ms` now produce an actionable type error.
|
|
11
|
+
- **Improved distribution and community surfaces**: application images are published to both Aliyun ACR and GHCR; GitHub main and release tags mirror to Gitee; README images render on both platforms; community derivative and ecosystem collaboration principles are documented.
|
|
12
|
+
|
|
13
|
+
## Compatibility
|
|
14
|
+
|
|
15
|
+
- Existing chat entries remain enabled, and `powered_by_visible` defaults to `true`.
|
|
16
|
+
- Custom attribution is stored in the existing chat-entry `appearance` JSON; no database migration is added.
|
|
17
|
+
- Tool providers using unsupported OpenAPI parameter locations must move those parameters or translate them in a business-side adapter.
|
|
18
|
+
- Other public HTTP contracts, ACC fields, SDK calls, and signature formats remain unchanged.
|
|
19
|
+
|
|
20
|
+
## Upgrade and Verification
|
|
21
|
+
|
|
22
|
+
For source deployments:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install
|
|
26
|
+
npm run typecheck
|
|
27
|
+
npm test
|
|
28
|
+
npm --prefix web-admin run build
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Published application images:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.1.1
|
|
35
|
+
ghcr.io/bailinghub/bailinghub:0.1.1
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
See [CHANGELOG.en.md](CHANGELOG.en.md) for the complete change history and [COMPATIBILITY.en.md](COMPATIBILITY.en.md) for upgrade discipline.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# v0.1.1 发布说明
|
|
2
|
+
|
|
3
|
+
百灵中枢 `v0.1.1` 是首个公开版本后的兼容性更新,重点补齐聊天组件的运营控制,并收紧 OpenAPI 工具编译边界。现有 `/run`、工具签名、审批、SDK 和数据库结构不需要迁移。
|
|
4
|
+
|
|
5
|
+
## 主要变化
|
|
6
|
+
|
|
7
|
+
- **聊天入口可随时暂停与恢复**:控制台可直接切换入口状态。入口停用后,业务页面无需删除嵌入脚本,悬浮按钮和聊天窗口会静默隐藏;消息、历史、上传和评价端点仍在服务端拒绝访问。
|
|
8
|
+
- **组件品牌标识可配置**:每个聊天入口都可以显示、隐藏或自定义底部品牌文案。旧入口默认继续显示当前中枢品牌,不改变既有页面效果。
|
|
9
|
+
- **公开配置具有明确状态**:聊天配置接口对已停用入口返回 `{ "enabled": false }`,组件在配置不可达或状态未知时按 fail-closed 原则不展示。
|
|
10
|
+
- **OpenAPI 编译边界更严格**:仅接受 `query`、`path`、`header` 参数位置;`cookie`、未知或缺失位置会产生稳定诊断并跳过对应 operation。带引号的字符串 `timeout_ms` 会给出明确类型提示,不再被含糊处理。
|
|
11
|
+
- **分发与社区入口完善**:应用镜像同时发布到阿里云 ACR 和 GHCR;GitHub 主线与发布标签自动镜像到 Gitee;README 图片兼容 GitHub/Gitee;新增社区衍生与生态合作原则。
|
|
12
|
+
|
|
13
|
+
## 对接影响
|
|
14
|
+
|
|
15
|
+
- 现有聊天入口默认保持启用,`powered_by_visible` 默认保持 `true`,无需修改原有配置。
|
|
16
|
+
- 自定义品牌文案存放在聊天入口现有的 `appearance` JSON 中,不新增数据库迁移。
|
|
17
|
+
- 使用不受支持 OpenAPI 参数位置的工具源需要调整为受支持位置,或通过业务侧适配层转换请求。
|
|
18
|
+
- 其余公开 HTTP 契约、ACC 字段、SDK 调用方式和签名格式保持不变。
|
|
19
|
+
|
|
20
|
+
## 升级与验证
|
|
21
|
+
|
|
22
|
+
源码部署更新到 `v0.1.1` 后执行:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install
|
|
26
|
+
npm run typecheck
|
|
27
|
+
npm test
|
|
28
|
+
npm --prefix web-admin run build
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
镜像部署使用:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
crpi-xm97pbcjrmf5in3s.cn-shanghai.personal.cr.aliyuncs.com/bailinghub/bailinghub:0.1.1
|
|
35
|
+
ghcr.io/bailinghub/bailinghub:0.1.1
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
完整变更记录见 [CHANGELOG.md](CHANGELOG.md),部署与回滚纪律见 [兼容性与升级.md](兼容性与升级.md)。
|