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,55 @@
|
|
|
1
|
+
# BailingHub v0.1.14:流式对话阶段性进度提示
|
|
2
|
+
|
|
3
|
+
`v0.1.14` 改善了官方网页聊天组件在工具调用链路中的等待体验。模型已经给出简短确认语、但最终业务结果尚未返回时,组件会把这段内容作为临时进度提示保留;正式答案开始输出后,临时提示自动消失,聊天记录仍只保留最终回答。
|
|
4
|
+
|
|
5
|
+
## 用户可见结果
|
|
6
|
+
|
|
7
|
+
- 模型在调用工具前给出的简短确认语不再闪现后立即消失,而会临时显示为进度气泡。
|
|
8
|
+
- 工具调用、模型整理、重试和回退阶段会显示明确的状态文案。
|
|
9
|
+
- 最终回答开始流式输出时,进度气泡立即移除,不会留下两条助手消息。
|
|
10
|
+
- 任务失败或仍在后台处理时,组件显示确定性状态,不伪装成已经完成的业务结果。
|
|
11
|
+
- 进度动画遵循系统的“减少动态效果”设置。
|
|
12
|
+
|
|
13
|
+
## 语义边界
|
|
14
|
+
|
|
15
|
+
该能力不是推理过程展示,也不会尝试保存或呈现模型的隐藏思维链。组件只展示:
|
|
16
|
+
|
|
17
|
+
- 模型已经主动输出的短暂确认语;
|
|
18
|
+
- BailingHub 流式链路已经公开发送的 `reset` 与 `phase` 状态;
|
|
19
|
+
- 正式最终回答。
|
|
20
|
+
|
|
21
|
+
阶段性文本会规范空白并限制长度。只有正式回答进入聊天历史,临时进度提示只属于当前流式会话的界面状态。
|
|
22
|
+
|
|
23
|
+
## 自定义聊天界面
|
|
24
|
+
|
|
25
|
+
官方 `web/widget/widget.js` 会自动应用新行为。没有使用官方组件的业务侧无需修改 BailingHub API,但要获得同样体验,需要按既有流式事件实现:
|
|
26
|
+
|
|
27
|
+
- `delta`:累积当前模型文本;
|
|
28
|
+
- `reset`:把此前短文本转为临时进度提示,并清空正式回答缓冲;
|
|
29
|
+
- `phase`:更新工具调用或模型整理阶段;
|
|
30
|
+
- `done`:移除临时提示,只持久化最终回答。
|
|
31
|
+
|
|
32
|
+
业务侧不应把阶段性提示和正式回答同时作为两条永久助手消息保存。
|
|
33
|
+
|
|
34
|
+
## 兼容性
|
|
35
|
+
|
|
36
|
+
- 无数据库迁移。
|
|
37
|
+
- 不修改 Client API 或流式事件协议。
|
|
38
|
+
- 不修改执行器协议、工具签名、审批语义、审计边界或 ACC。
|
|
39
|
+
- 既有自定义聊天界面保持原行为;官方组件升级后自动获得新体验。
|
|
40
|
+
|
|
41
|
+
## 验证
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
node --check web/widget/widget.js
|
|
45
|
+
node --import tsx --test src/routes/public.test.ts
|
|
46
|
+
npm run typecheck
|
|
47
|
+
npm run release:check
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 相关文档
|
|
51
|
+
|
|
52
|
+
- [公开运行时契约](CONTRACT.md)
|
|
53
|
+
- [独立验证任务卡](INDEPENDENT_VALIDATION.md)
|
|
54
|
+
- [兼容性与升级](兼容性与升级.md)
|
|
55
|
+
- [English release notes](RELEASE_NOTES_v0.1.14.en.md)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# BailingHub v0.1.15: Trusted Rich Rendering and Chat Reliability
|
|
2
|
+
|
|
3
|
+
`v0.1.15` improves perceived latency, structured presentation, and runtime convergence for business-facing chat. The official widget remains dependency-free. Charts and other rich content are registered explicitly by the host as trusted renderers, while model output remains constrained declarative data.
|
|
4
|
+
|
|
5
|
+
## User-visible results
|
|
6
|
+
|
|
7
|
+
- Streaming replies may show a provisional progress bubble. The authoritative final reply replaces it instead of leaving duplicate messages in the conversation.
|
|
8
|
+
- A host can register trusted renderers with the official widget. The chat window can expand for wide tables or charts, and users can maximize and restore it.
|
|
9
|
+
- Safe Markdown tables remain built in. Charts use declarative fenced payloads; unknown types, invalid JSON, excessive data, or renderer errors fall back to a normal code block.
|
|
10
|
+
- BailingHub presents an optional rendering capability to the model only when the client explicitly advertises a renderer it actually supports. The model may still choose text or a table when that better matches the real data.
|
|
11
|
+
|
|
12
|
+
## Custom chat clients
|
|
13
|
+
|
|
14
|
+
A frontend that does not load the official `widget.js` owns four responsibilities:
|
|
15
|
+
|
|
16
|
+
1. advertise only installed and trusted renderer types through `client_capabilities.renderers` when creating the job;
|
|
17
|
+
2. treat `delta` as provisional text and discard it on `reset`;
|
|
18
|
+
3. replace the provisional bubble with `done.reply`, the only authoritative final text;
|
|
19
|
+
4. parse complete fenced blocks with a mature Markdown parser only after `done`, then dispatch allowlisted types to local trusted renderers.
|
|
20
|
+
|
|
21
|
+
`client_capabilities` is presentation-only negotiation. It does not change identity, routing, tool allowlists, approval, or final business authorization. See [`examples/custom-streaming-chat-client.mjs`](examples/custom-streaming-chat-client.mjs) for a minimal transport example.
|
|
22
|
+
|
|
23
|
+
## Runtime reliability
|
|
24
|
+
|
|
25
|
+
- Additional tool discovery has an independent limit and stops early when no new tools are found, preventing unbounded model rounds caused by paraphrased searches.
|
|
26
|
+
- HTTP error pages from tools are reduced to compact model-facing summaries. The full response remains available to the audit path under its independent size limit.
|
|
27
|
+
- LLM traces add low-sensitivity measurements such as request size, tool count, reasoning characters, first-token latency, and total duration without recording secrets or business payloads.
|
|
28
|
+
|
|
29
|
+
## Compatibility and security boundary
|
|
30
|
+
|
|
31
|
+
- No database migration is required.
|
|
32
|
+
- ACC, the Client API version, executor protocol, tool signatures, approval semantics, and business authorization are unchanged.
|
|
33
|
+
- Existing clients that omit `client_capabilities` continue receiving ordinary Markdown. Unknown rich-content types degrade safely.
|
|
34
|
+
- The core widget does not bundle ECharts, GPT-Vis, Mermaid, or another chart library, and it never executes model-generated HTML, JavaScript, event handlers, or remote scripts.
|
|
35
|
+
|
|
36
|
+
## Validation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run release:check
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Focused coverage includes renderer registration, failure fallback, cleanup lifecycle, capability negotiation, provisional-message replacement, and syntax validation for the custom-client example.
|
|
43
|
+
|
|
44
|
+
## Related documentation
|
|
45
|
+
|
|
46
|
+
- [Trusted rich-content renderers](WIDGET_RENDERERS.en.md)
|
|
47
|
+
- [Streaming chat contract](STREAMING.md)
|
|
48
|
+
- [Third-party integration](INTEGRATION.en.md)
|
|
49
|
+
- [Compatibility and upgrades](COMPATIBILITY.en.md)
|
|
50
|
+
- [中文发布说明](RELEASE_NOTES_v0.1.15.md)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# BailingHub v0.1.15:可信富内容渲染与聊天可靠性
|
|
2
|
+
|
|
3
|
+
`v0.1.15` 改善聊天入口在真实业务分析场景中的等待体验、结构化展示能力和运行时收敛性。官方 Widget 仍保持零依赖核心;图表等富内容由宿主页面显式注册可信渲染器,模型只输出受限的声明式数据。
|
|
4
|
+
|
|
5
|
+
## 用户可见结果
|
|
6
|
+
|
|
7
|
+
- 流式回复可先显示临时进度气泡;权威最终回复到达后自动替换临时内容,不在会话中留下重复消息。
|
|
8
|
+
- 官方 Widget 支持宿主页面注册可信渲染器,并可根据表格或图表宽度自适应扩大聊天窗口;用户也可最大化和恢复窗口。
|
|
9
|
+
- 支持安全 Markdown 表格。图表使用声明式 fenced payload,未知类型、无效 JSON、超限数据或渲染异常会回退为普通代码块。
|
|
10
|
+
- 只有客户端明确声明并实际支持某种渲染器时,中枢才会把该展示能力作为可选提示提供给模型;模型仍可根据真实数据决定只输出文字或表格。
|
|
11
|
+
|
|
12
|
+
## 自建聊天客户端
|
|
13
|
+
|
|
14
|
+
没有加载官方 `widget.js` 的业务前端必须自行承担四项职责:
|
|
15
|
+
|
|
16
|
+
1. 创建任务时通过 `client_capabilities.renderers` 声明本地已安装并信任的渲染类型;
|
|
17
|
+
2. 把 `delta` 作为临时文本,收到 `reset` 时清空;
|
|
18
|
+
3. 用 `done.reply` 替换临时气泡,并把它视为唯一权威最终文本;
|
|
19
|
+
4. 只在 `done` 后通过成熟 Markdown 解析器识别完整代码块,再交给本地白名单渲染器。
|
|
20
|
+
|
|
21
|
+
`client_capabilities` 只用于展示协商,不改变身份、路由、工具白名单、审批或业务系统最终授权。最小传输范例见 [`examples/custom-streaming-chat-client.mjs`](examples/custom-streaming-chat-client.mjs)。
|
|
22
|
+
|
|
23
|
+
## 运行时可靠性
|
|
24
|
+
|
|
25
|
+
- 追加工具检索设置独立上限,并在没有新增工具时提前收口,避免同义改写形成无界模型轮次。
|
|
26
|
+
- 工具返回 HTTP 错误页时,只向后续模型轮次提供紧凑错误摘要;完整响应继续按独立上限保留在审计记录中。
|
|
27
|
+
- LLM trace 增加请求规模、工具数量、推理字符数、首 token 和总耗时等低敏指标,便于定位慢链路而不记录密钥或业务正文。
|
|
28
|
+
|
|
29
|
+
## 兼容性与安全边界
|
|
30
|
+
|
|
31
|
+
- 无数据库迁移。
|
|
32
|
+
- 不修改 ACC、Client API 版本、执行器协议、工具签名、审批语义或业务权限。
|
|
33
|
+
- 不声明 `client_capabilities` 的旧客户端继续只接收普通 Markdown;未知富内容类型安全降级。
|
|
34
|
+
- 核心 Widget 不引入 ECharts、GPT-Vis、Mermaid 等第三方依赖,不执行模型生成的 HTML、JavaScript、事件处理器或远程脚本。
|
|
35
|
+
|
|
36
|
+
## 验证
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run release:check
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
重点验证还包括 Widget 渲染器注册、失败回退、清理生命周期、能力协商、流式临时消息替换和自建客户端范例语法。
|
|
43
|
+
|
|
44
|
+
## 相关文档
|
|
45
|
+
|
|
46
|
+
- [可信富内容渲染器](WIDGET_RENDERERS.md)
|
|
47
|
+
- [流式聊天契约](STREAMING.md)
|
|
48
|
+
- [第三方对接指南](第三方对接指南.md)
|
|
49
|
+
- [兼容性与升级](兼容性与升级.md)
|
|
50
|
+
- [English release notes](RELEASE_NOTES_v0.1.15.en.md)
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# BailingHub v0.1.16: Bounded Tool Runtime and Resilient Semantic Retrieval
|
|
2
|
+
|
|
3
|
+
`v0.1.16` makes tool-enabled agents converge more reliably. The runtime follows each route's own business-tool budget, explicitly guides the model toward a final answer near exhaustion, and prevents internal tool-protocol markup from becoming user-visible or executable content. Optional semantic tool retrieval now uses bounded waits and safe fallback instead of allowing index or embedding failures to block the entire conversation.
|
|
4
|
+
|
|
5
|
+
This release also aligns the official widget's minimize control with its actual behavior and includes independent community governance recipes for RuoYi-Vue-Pro and JeecgBoot.
|
|
6
|
+
|
|
7
|
+
## User-visible results
|
|
8
|
+
|
|
9
|
+
- The existing per-route `tools.max_calls` setting remains the business-tool budget for a task. After every business-tool round, the model receives the used and remaining counts and is guided to avoid an unnecessary final call.
|
|
10
|
+
- When the budget is exhausted, BailingHub stops offering tools and requires a natural-language final answer based only on facts already obtained. Missing information must be stated explicitly instead of returning unfinished control text.
|
|
11
|
+
- If a model emits DSML-like internal tool-protocol markup as ordinary content, BailingHub clears provisional streamed text and allows one tool-free safe rewrite. Repeated violations fail closed. Text protocol is neither shown as an answer nor parsed for execution.
|
|
12
|
+
- Semantic retrieval failures fall back to the existing progressive tool-discovery path instead of blocking the conversation on an optional dependency.
|
|
13
|
+
- The official widget replaces the misleading close glyph with a minimize icon, title, and accessible label. The panel-hiding behavior is unchanged.
|
|
14
|
+
|
|
15
|
+
## Tool-runtime convergence
|
|
16
|
+
|
|
17
|
+
The route-specific business-tool budget keeps its existing defaults and allowed range. The runtime now adds the following convergence guarantees:
|
|
18
|
+
|
|
19
|
+
- The model-round bound is derived from the route's business-tool budget and the independently bounded discovery, image, and message tools. A hidden fixed 12-round ceiling no longer truncates a larger valid route budget.
|
|
20
|
+
- Trusted budget state is appended after each business-tool execution round.
|
|
21
|
+
- With one call remaining, the model is told to use it only when required to complete the request.
|
|
22
|
+
- At exhaustion, all tools are removed and the model must enter the final-answer phase.
|
|
23
|
+
- Trace events cover near-limit and exhausted budgets, internal-protocol interception, and successful safe rewrites.
|
|
24
|
+
|
|
25
|
+
`max_calls` still applies only to business tools. `search_tools`, `see_image`, and `send_message` retain their own existing independent limits.
|
|
26
|
+
|
|
27
|
+
## Final-output safety gate
|
|
28
|
+
|
|
29
|
+
Both streaming and non-streaming answers are checked for known internal tool-protocol markers:
|
|
30
|
+
|
|
31
|
+
1. when suspicious control markup appears in a stream, BailingHub stops forwarding it and emits `reset` to discard provisional text from that round;
|
|
32
|
+
2. text protocol is never converted into a tool call and its arguments are never executed;
|
|
33
|
+
3. the model receives one natural-language rewrite opportunity with no tools available;
|
|
34
|
+
4. a repeated violation fails closed instead of presenting a false successful answer.
|
|
35
|
+
|
|
36
|
+
The streaming protocol remains `bailing.chat.stream.v1`. Custom clients should continue treating every `reset` as an instruction to discard provisional text and `done.reply` as the only authoritative final answer. This release adds the `protocol_violation` reset reason.
|
|
37
|
+
|
|
38
|
+
## Semantic tool-retrieval resilience
|
|
39
|
+
|
|
40
|
+
Semantic retrieval remains an optional context enhancement inside the governed allowlist. It does not affect identity, approval, or final business authorization. This release adds:
|
|
41
|
+
|
|
42
|
+
- sequential background prewarming after HTTP readiness, without blocking startup;
|
|
43
|
+
- stale-while-revalidate caching with single-flight refresh;
|
|
44
|
+
- bounded waits only for a true cold cache;
|
|
45
|
+
- database query timeouts for index and embedding-credential reads;
|
|
46
|
+
- abortable HTTP deadlines for query embeddings;
|
|
47
|
+
- progressive tool-discovery fallback when the index, credential store, or embedding service is unavailable;
|
|
48
|
+
- sanitized diagnostics for cache state and index, credential, embedding, and total latency without recording the user query, service URL, or credential;
|
|
49
|
+
- verification of the stored vector model, dimension, and byte length plus the actual length returned by the embedding service; legacy extensions that omit row-level coordinates safely fall back instead of guessing coordinates from a second mutable snapshot;
|
|
50
|
+
- serialized same-provider reindexing with authoritative configuration rereads after lock acquisition;
|
|
51
|
+
- atomic provider replacement when the embedding model or dimension changes, preserving the old index on failure instead of exposing a partial coordinate system.
|
|
52
|
+
|
|
53
|
+
Optional deployment-level settings:
|
|
54
|
+
|
|
55
|
+
| Variable | Default | Allowed range |
|
|
56
|
+
|---|---:|---:|
|
|
57
|
+
| `BAILING_TOOL_INDEX_LOAD_TIMEOUT_MS` | 5000 ms | 100–60000 ms |
|
|
58
|
+
| `BAILING_TOOL_QUERY_EMBEDDING_TIMEOUT_MS` | 15000 ms | 250–120000 ms |
|
|
59
|
+
|
|
60
|
+
Deployments that omit them automatically use the defaults.
|
|
61
|
+
|
|
62
|
+
## Independent community recipes
|
|
63
|
+
|
|
64
|
+
This release includes two auditable governance recipes:
|
|
65
|
+
|
|
66
|
+
- **RuoYi-Vue-Pro**: a thin-adapter pattern for after-sale detail lookup and refund while preserving original permissions, tenant context, approval, idempotency, and final business authority.
|
|
67
|
+
- **JeecgBoot**: a pattern for individual user lookup and freeze/unfreeze actions with operator and target tenant-membership checks, original Shiro permissions, approval, and idempotency.
|
|
68
|
+
|
|
69
|
+
Each recipe includes Agent-facing OpenAPI, a machine-readable adapter contract, and a local verification script. These are independent community recipes, not official upstream integrations, certifications, or endorsements, and they do not provide a direct adapter that bypasses existing business authorization.
|
|
70
|
+
|
|
71
|
+
## Compatibility and upgrade impact
|
|
72
|
+
|
|
73
|
+
- No database migration is required.
|
|
74
|
+
- ACC, the Client API version, executor protocol, tool signatures, approval semantics, and final business authorization are unchanged.
|
|
75
|
+
- Existing routes do not need to change `tools.max_calls`.
|
|
76
|
+
- Both retrieval timeout variables are optional.
|
|
77
|
+
- Custom chat clients already implementing `reset` and `done.reply` correctly require no change.
|
|
78
|
+
- Existing custom `ToolEmbeddingRepository` implementations remain source-compatible. A repository must implement atomic `replaceProvider` when the embedding model or dimension changes; otherwise reindexing now fails explicitly and preserves the old index instead of performing a non-atomic delete-and-rewrite.
|
|
79
|
+
|
|
80
|
+
## Validation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run release:check
|
|
84
|
+
node docs/integrations/ruoyi-vue-pro/verify_recipe.mjs
|
|
85
|
+
node docs/integrations/jeecgboot/verify_recipe.mjs
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Focused coverage includes:
|
|
89
|
+
|
|
90
|
+
- route budgets larger than the former fixed model-round ceiling;
|
|
91
|
+
- near-limit and exhausted-budget convergence;
|
|
92
|
+
- streaming and non-streaming protocol interception, reset, single rewrite, and repeated-violation failure;
|
|
93
|
+
- prewarming, stale cache service, single-flight refresh, database and embedding deadlines, and progressive fallback;
|
|
94
|
+
- serialized provider reindexing and atomic coordinate replacement;
|
|
95
|
+
- widget minimize semantics and existing panel behavior;
|
|
96
|
+
- signature, subject, permission, approval, idempotency, and final-authority boundaries in both community recipes.
|
|
97
|
+
|
|
98
|
+
## Related documentation
|
|
99
|
+
|
|
100
|
+
- [Tool governance design](TOOLS_DESIGN.en.md)
|
|
101
|
+
- [Operations guide](OPERATIONS.en.md)
|
|
102
|
+
- [Streaming chat contract](STREAMING.en.md)
|
|
103
|
+
- [RuoYi-Vue-Pro recipe](integrations/ruoyi-vue-pro/README.en.md)
|
|
104
|
+
- [JeecgBoot recipe](integrations/jeecgboot/README.en.md)
|
|
105
|
+
- [Compatibility and upgrades](COMPATIBILITY.en.md)
|
|
106
|
+
- [中文发布说明](RELEASE_NOTES_v0.1.16.md)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# BailingHub v0.1.16:工具运行时收敛与语义检索韧性
|
|
2
|
+
|
|
3
|
+
`v0.1.16` 让带业务工具的 Agent 更可靠地收敛:运行时遵守每条路由自己的工具调用预算,在接近或达到上限时主动要求模型形成最终回答;模型误把内部工具协议写进正文时,中枢会阻止展示和执行。可选的工具语义检索也改为有界等待和安全降级,不再因索引或向量服务异常长期阻塞整个会话。
|
|
4
|
+
|
|
5
|
+
本版本同时修正官方 Widget 的最小化控件语义,并收录 RuoYi-Vue-Pro 与 JeecgBoot 的独立社区治理接入配方。
|
|
6
|
+
|
|
7
|
+
## 用户可见结果
|
|
8
|
+
|
|
9
|
+
- 每条路由既有的 `tools.max_calls` 继续作为本任务的业务工具调用上限。模型会在每轮业务工具执行后获知已使用和剩余次数,并在只剩一次时优先判断是否已经可以回答。
|
|
10
|
+
- 达到调用上限后,中枢停止提供工具,要求模型只根据已取得的事实形成自然语言最终回答;信息不足时必须明确说明,不能返回半成品控制文本。
|
|
11
|
+
- 模型若把 DSML 等内部工具协议标记写入普通正文,中枢会清除本轮临时流式内容,并在不提供工具的情况下要求模型安全重写一次。连续违规会失败关闭,内部协议不会被当作正文展示,也不会被解析执行。
|
|
12
|
+
- 工具语义检索异常时,会退回既有的渐进式工具发现,不再让可选检索链路长期阻塞会话。
|
|
13
|
+
- 官方 Widget 右上角原本实际执行“隐藏面板”的关闭按钮改为明确的最小化图标、标题和无障碍标签;交互功能不变。
|
|
14
|
+
|
|
15
|
+
## 工具运行时收敛
|
|
16
|
+
|
|
17
|
+
业务工具预算仍由路由独立配置,默认值和允许范围不变。运行时新增以下收敛行为:
|
|
18
|
+
|
|
19
|
+
- 模型轮次上限根据路由的业务工具预算、追加工具检索、图片查看和消息发送等各自的有界预算推导,不再由隐藏的固定 12 轮提前截断较大的路由配置。
|
|
20
|
+
- 每轮业务工具执行后向模型注入可信预算状态。
|
|
21
|
+
- 剩余一次时提示模型只在缺少必要信息时使用最后一次调用。
|
|
22
|
+
- 预算耗尽后移除全部工具并强制进入最终回答阶段。
|
|
23
|
+
- trace 增加工具预算接近上限、预算耗尽、内部协议拦截和安全重写结果,便于定位未收敛会话。
|
|
24
|
+
|
|
25
|
+
`max_calls` 仍只限制业务工具;`search_tools`、`see_image` 和 `send_message` 继续使用各自独立的既有上限。
|
|
26
|
+
|
|
27
|
+
## 最终输出安全闸
|
|
28
|
+
|
|
29
|
+
流式和非流式回答都会检查已知的内部工具协议标记:
|
|
30
|
+
|
|
31
|
+
1. 流式输出遇到可疑控制标记时,先停止继续发送,并通过 `reset` 清除本轮临时文本;
|
|
32
|
+
2. 中枢不会把文本协议转换为工具调用,也不会执行其中的参数;
|
|
33
|
+
3. 模型只获得一次不带工具的自然语言重写机会;
|
|
34
|
+
4. 重写后再次出现内部协议时,任务失败关闭,不向用户伪装成成功回答。
|
|
35
|
+
|
|
36
|
+
流式协议版本仍为 `bailing.chat.stream.v1`。自建聊天客户端应继续遵守既有规则:收到任何 `reset` 都丢弃当前临时文本,并以 `done.reply` 作为唯一权威最终回答。本版本新增的 `reset.reason` 值为 `protocol_violation`。
|
|
37
|
+
|
|
38
|
+
## 工具语义检索韧性
|
|
39
|
+
|
|
40
|
+
工具语义检索仍是白名单内的可选上下文增强,不参与身份、审批或最终业务授权。本版本增加:
|
|
41
|
+
|
|
42
|
+
- 服务 HTTP 就绪后在后台顺序预热已有工具索引,预热失败不阻塞启动;
|
|
43
|
+
- 内存缓存过期时继续服务旧快照,并以单飞方式在后台刷新;
|
|
44
|
+
- 只有真正的冷缓存才在配置的索引时限内等待;
|
|
45
|
+
- 索引和 embedding 凭证读取设置数据库查询时限;
|
|
46
|
+
- 查询向量请求使用可中止的 HTTP 时限;
|
|
47
|
+
- 索引、凭证或向量服务不可用时,安全降级到渐进式工具发现;
|
|
48
|
+
- 新增缓存状态、索引读取、凭证读取、向量请求和总耗时诊断,不记录用户查询、服务地址或凭证;
|
|
49
|
+
- 检索前复核已存向量的模型、维度和字节长度,并校验上游返回向量的实际长度;旧扩展未回传行级坐标时直接安全降级,避免用另一次可变快照猜测坐标;
|
|
50
|
+
- 同一工具源的重建串行执行,取得锁后重新读取权威配置;embedding 模型或维度变化时原子切换整源索引,失败时保留旧数据,不暴露部分新坐标。
|
|
51
|
+
|
|
52
|
+
两个部署级可选环境变量为:
|
|
53
|
+
|
|
54
|
+
| 变量 | 默认值 | 允许范围 |
|
|
55
|
+
|---|---:|---:|
|
|
56
|
+
| `BAILING_TOOL_INDEX_LOAD_TIMEOUT_MS` | 5000 ms | 100–60000 ms |
|
|
57
|
+
| `BAILING_TOOL_QUERY_EMBEDDING_TIMEOUT_MS` | 15000 ms | 250–120000 ms |
|
|
58
|
+
|
|
59
|
+
不配置时自动使用默认值。
|
|
60
|
+
|
|
61
|
+
## 独立社区接入配方
|
|
62
|
+
|
|
63
|
+
本版本收录两项可复核的治理接入配方:
|
|
64
|
+
|
|
65
|
+
- **RuoYi-Vue-Pro**:展示如何通过薄适配层开放售后详情查询和退款动作,同时保留原权限、租户、审批、幂等与业务系统最终授权。
|
|
66
|
+
- **JeecgBoot**:展示如何开放单个用户查询及冻结/解冻,同时复核操作人和目标用户的租户成员关系、原 Shiro 权限、审批与幂等边界。
|
|
67
|
+
|
|
68
|
+
每项配方均提供 Agent-facing OpenAPI、机器可读适配契约和本地验证脚本。它们是独立社区配方,不是上游官方集成、认证或认可,也不包含可绕过原业务权限的直连适配器。
|
|
69
|
+
|
|
70
|
+
## 兼容性与升级
|
|
71
|
+
|
|
72
|
+
- 无数据库迁移。
|
|
73
|
+
- 不修改 ACC、Client API 版本、执行器协议、工具签名、审批语义或业务系统最终授权。
|
|
74
|
+
- 既有路由无需修改 `tools.max_calls`。
|
|
75
|
+
- 两个检索超时环境变量都是可选项。
|
|
76
|
+
- 既有自建聊天客户端如已正确处理 `reset` 和 `done.reply`,无需修改。
|
|
77
|
+
- 自定义 `ToolEmbeddingRepository` 继续保持源码兼容;但当 embedding 模型或维度变化时,仓储必须实现原子的 `replaceProvider`。未实现时重建会明确失败并保留旧索引,不再执行非原子的先删后写。
|
|
78
|
+
|
|
79
|
+
## 验证
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm run release:check
|
|
83
|
+
node docs/integrations/ruoyi-vue-pro/verify_recipe.mjs
|
|
84
|
+
node docs/integrations/jeecgboot/verify_recipe.mjs
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
重点覆盖:
|
|
88
|
+
|
|
89
|
+
- 大于旧固定轮次的路由预算仍能按自身 `max_calls` 运行;
|
|
90
|
+
- 工具预算接近上限和耗尽后的最终回答收敛;
|
|
91
|
+
- 流式与非流式内部协议拦截、重置、单次重写和连续违规失败关闭;
|
|
92
|
+
- 索引预热、旧缓存服务、单飞刷新、数据库与向量请求超时、渐进式降级;
|
|
93
|
+
- 同源重建串行化及坐标系原子切换;
|
|
94
|
+
- Widget 最小化控件语义和原有交互;
|
|
95
|
+
- 两项社区配方的签名、主体、权限、审批、幂等及最终授权边界。
|
|
96
|
+
|
|
97
|
+
## 相关文档
|
|
98
|
+
|
|
99
|
+
- [工具治理设计](TOOLS_DESIGN.md)
|
|
100
|
+
- [运维指南](OPERATIONS.md)
|
|
101
|
+
- [流式聊天契约](STREAMING.md)
|
|
102
|
+
- [RuoYi-Vue-Pro 接入配方](integrations/ruoyi-vue-pro/README.md)
|
|
103
|
+
- [JeecgBoot 接入配方](integrations/jeecgboot/README.md)
|
|
104
|
+
- [兼容性与升级](兼容性与升级.md)
|
|
105
|
+
- [English release notes](RELEASE_NOTES_v0.1.16.en.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# v0.1.2 Release Notes
|
|
2
|
+
|
|
3
|
+
BailingHub `v0.1.2` is a security hardening patch for the server root token and credentials derived from it. It adds no database migration and does not change the public HTTP, SDK, or signature formats.
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
- Task-scoped `tool_token` values no longer use the literal `bailing` as an HMAC fallback. Issuance fails closed without a configured root token.
|
|
8
|
+
- Job callback and alert webhook signatures no longer use a fixed fallback secret.
|
|
9
|
+
- Tokenless development remains available only for `development` mode bound to `127.0.0.1`, `localhost`, or `::1`.
|
|
10
|
+
- Production and non-loopback listeners reject missing tokens, values shorter than 24 characters, and known public placeholders.
|
|
11
|
+
- `docker-compose.yml` and `docker-compose.images.yml` no longer ship a predictable machine-admin token.
|
|
12
|
+
- The tokenless development-admin fallback is restricted to loopback mode, and the security scanner now guards these rules.
|
|
13
|
+
|
|
14
|
+
## Before Upgrading
|
|
15
|
+
|
|
16
|
+
Production, server, or LAN deployments must set a strong random token first:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
export BAILING_TOKEN="$(openssl rand -hex 32)"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Persist that same value in the deployment `.env`, orchestrator secret, or secret manager. Do not generate a new value on every restart. Deployments created by the official one-line installer already have a generated and persisted random token.
|
|
23
|
+
|
|
24
|
+
## Compatibility
|
|
25
|
+
|
|
26
|
+
- Database migration: none.
|
|
27
|
+
- Public HTTP and SDK contracts: unchanged.
|
|
28
|
+
- HMAC wire format: unchanged.
|
|
29
|
+
- Loopback development: remains zero-config.
|
|
30
|
+
- Production or non-loopback deployments: must provide a token that meets the new baseline.
|
|
31
|
+
|
|
32
|
+
## Validation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run typecheck
|
|
36
|
+
npm test
|
|
37
|
+
npm run security:scan
|
|
38
|
+
npm run release:check
|
|
39
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# v0.1.2 发布说明
|
|
2
|
+
|
|
3
|
+
百灵中枢 `v0.1.2` 是一个安全加固补丁,修复服务端根 token 存在公开默认值和派生凭证固定 fallback 的问题。该版本不新增数据库迁移,也不改变公开 HTTP、SDK 或签名格式。
|
|
4
|
+
|
|
5
|
+
## 主要变化
|
|
6
|
+
|
|
7
|
+
- 任务级 `tool_token` 不再使用字面量 `bailing` 作为 HMAC fallback;未配置根 token 时拒绝签发。
|
|
8
|
+
- 任务回调和告警 webhook 签名不再使用固定 fallback;缺少密钥时 fail-closed。
|
|
9
|
+
- `development + 127.0.0.1/localhost/::1` 继续支持无 token 本地开发;生产模式或非回环监听必须配置强随机 `BAILING_TOKEN`。
|
|
10
|
+
- 生产或非回环部署会拒绝短于 24 字符的 token,以及仓库曾出现过的公开示例/占位值。
|
|
11
|
+
- `docker-compose.yml` 与 `docker-compose.images.yml` 不再内置可预测管理 token。
|
|
12
|
+
- 后台无 token 开发管理员回退同步限制为本机回环模式;安全扫描新增对应防回归规则。
|
|
13
|
+
|
|
14
|
+
## 升级前检查
|
|
15
|
+
|
|
16
|
+
生产、服务器或局域网部署必须先设置强随机 token:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
export BAILING_TOKEN="$(openssl rand -hex 32)"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
请把同一值保存到部署环境的 `.env`、容器编排密钥或密钥管理器;不要每次重启生成新值。使用官网一键安装脚本的部署已经由脚本自动生成并保存随机 token,无需手动修改,除非需要轮换。
|
|
23
|
+
|
|
24
|
+
## 兼容性
|
|
25
|
+
|
|
26
|
+
- 数据库迁移:无。
|
|
27
|
+
- 公开 HTTP/SDK 契约:无变化。
|
|
28
|
+
- HMAC 格式:无变化。
|
|
29
|
+
- 本机回环开发:保持零配置兼容。
|
|
30
|
+
- 生产或非回环部署:必须提供符合新安全基线的 `BAILING_TOKEN`。
|
|
31
|
+
|
|
32
|
+
## 验证
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run typecheck
|
|
36
|
+
npm test
|
|
37
|
+
npm run security:scan
|
|
38
|
+
npm run release:check
|
|
39
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# v0.1.3 Release Notes
|
|
2
|
+
|
|
3
|
+
BailingHub `v0.1.3` turns “make another agent an executor” from a long manual instruction block into a reusable Skill, a minimal bootstrap, and a representative OpenClaw adapter. It adds no database migration and does not change public HTTP, SDK, or signature formats.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
### 1. Portable executor onboarding Skill
|
|
8
|
+
|
|
9
|
+
The public `connect-bailinghub-executor` Skill explains:
|
|
10
|
+
|
|
11
|
+
- when to use the generic command wrapper, the OpenClaw adapter, or the direct protocol;
|
|
12
|
+
- how to enter and store the executor token locally;
|
|
13
|
+
- how to confirm `EXECUTOR_ID`, target, and runtime metadata;
|
|
14
|
+
- how to verify presence, claim, execution, result reporting, and audit evidence.
|
|
15
|
+
|
|
16
|
+
The console now copies only the hub URL, target, route context, and Skill URL instead of embedding the complete protocol in chat.
|
|
17
|
+
|
|
18
|
+
### 2. OpenClaw stdio adapter
|
|
19
|
+
|
|
20
|
+
`web/connect/openclaw-stdio.mjs`:
|
|
21
|
+
|
|
22
|
+
- reads a BailingHub task from stdin;
|
|
23
|
+
- invokes a local OpenClaw agent;
|
|
24
|
+
- maps and resumes hub sessions;
|
|
25
|
+
- writes only the final answer to stdout so logs cannot corrupt the result;
|
|
26
|
+
- does not forward business-tool credentials to the OpenClaw child process by default.
|
|
27
|
+
|
|
28
|
+
### 3. Generic executor hardening
|
|
29
|
+
|
|
30
|
+
- `BAILING_EXECUTOR_TOKEN` is preferred so secrets stay out of shell history and process arguments; `--token` remains compatible.
|
|
31
|
+
- Heartbeats are independent of the claim loop, so long-running jobs keep the executor online.
|
|
32
|
+
- Result reports include the dispatch `claim_token`, allowing the hub to reject stale results after reassignment.
|
|
33
|
+
|
|
34
|
+
## Before upgrading
|
|
35
|
+
|
|
36
|
+
1. The hub still requires Node.js `22+`; the portable generic executor itself supports Node.js `18+`.
|
|
37
|
+
2. New integrations should store the executor token in `BAILING_EXECUTOR_TOKEN` or a local secret manager.
|
|
38
|
+
3. Existing `--token` commands continue to work and do not need an immediate change.
|
|
39
|
+
|
|
40
|
+
## Compatibility
|
|
41
|
+
|
|
42
|
+
- No database migration.
|
|
43
|
+
- `/run`, SDKs, business-tool signatures, and existing executor HTTP endpoints are unchanged.
|
|
44
|
+
- The Skill and OpenClaw adapter are optional onboarding capabilities.
|
|
45
|
+
- Final business authorization remains with the business system.
|
|
46
|
+
|
|
47
|
+
## Validation
|
|
48
|
+
|
|
49
|
+
The release is checked with:
|
|
50
|
+
|
|
51
|
+
- `npm run typecheck`
|
|
52
|
+
- `npm test`
|
|
53
|
+
- `npm --prefix web-admin run build`
|
|
54
|
+
- `npm run release:check`
|
|
55
|
+
- a representative OpenClaw end-to-end execution
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# v0.1.3 发布说明
|
|
2
|
+
|
|
3
|
+
百灵中枢 `v0.1.3` 把“让另一个 Agent 成为执行器”从一段较长的人工说明,收敛为可复用的 Skill、短引导和代表性 OpenClaw 适配器。该版本不新增数据库迁移,也不改变公开 HTTP、SDK 或签名格式。
|
|
4
|
+
|
|
5
|
+
## 主要变化
|
|
6
|
+
|
|
7
|
+
### 1. 便携式执行器接入 Skill
|
|
8
|
+
|
|
9
|
+
公开提供 `connect-bailinghub-executor` Skill,内容包括:
|
|
10
|
+
|
|
11
|
+
- 如何判断使用通用命令包装器、OpenClaw 适配器或直连协议;
|
|
12
|
+
- 如何在本机安全输入和保存执行器令牌;
|
|
13
|
+
- 如何确认 `EXECUTOR_ID`、target 与运行时信息;
|
|
14
|
+
- 如何完成在线状态、认领、执行、回报与审计验收。
|
|
15
|
+
|
|
16
|
+
控制台复制给 Agent 的内容只保留中枢地址、target、路由上下文和 Skill 地址,不再内嵌整份协议说明。
|
|
17
|
+
|
|
18
|
+
### 2. OpenClaw stdio 适配器
|
|
19
|
+
|
|
20
|
+
新增 `web/connect/openclaw-stdio.mjs`:
|
|
21
|
+
|
|
22
|
+
- 通过 stdin 接收中枢任务;
|
|
23
|
+
- 将任务交给本地 OpenClaw agent;
|
|
24
|
+
- 映射并续接中枢会话;
|
|
25
|
+
- 只把最终回答写入 stdout,避免日志污染执行结果;
|
|
26
|
+
- 默认不把业务工具凭证转交给 OpenClaw 子进程。
|
|
27
|
+
|
|
28
|
+
### 3. 通用执行器加固
|
|
29
|
+
|
|
30
|
+
- 优先从 `BAILING_EXECUTOR_TOKEN` 环境变量读取令牌,避免令牌进入 shell 历史和进程参数;`--token` 继续兼容。
|
|
31
|
+
- 心跳与认领循环解耦,长任务执行期间仍持续上报存活。
|
|
32
|
+
- 回报结果时携带本次派发的 `claim_token`,中枢可以拒绝任务重排后原执行器迟到的过期结果。
|
|
33
|
+
|
|
34
|
+
## 升级前检查
|
|
35
|
+
|
|
36
|
+
1. Node.js 仍要求 `22+` 运行中枢;便携式通用执行器本身支持 Node.js `18+`。
|
|
37
|
+
2. 新接入建议把执行器令牌放入 `BAILING_EXECUTOR_TOKEN` 或本地密钥管理器。
|
|
38
|
+
3. 已使用 `--token` 的执行器无需立即修改,命令仍保持兼容。
|
|
39
|
+
|
|
40
|
+
## 兼容性
|
|
41
|
+
|
|
42
|
+
- 无数据库迁移;
|
|
43
|
+
- `/run`、SDK、业务工具签名和既有执行器 HTTP 端点不变;
|
|
44
|
+
- 新增的 Skill 与 OpenClaw 适配器均为可选接入能力;
|
|
45
|
+
- 不改变业务系统的最终授权责任边界。
|
|
46
|
+
|
|
47
|
+
## 验证
|
|
48
|
+
|
|
49
|
+
发布前通过:
|
|
50
|
+
|
|
51
|
+
- `npm run typecheck`
|
|
52
|
+
- `npm test`
|
|
53
|
+
- `npm --prefix web-admin run build`
|
|
54
|
+
- `npm run release:check`
|
|
55
|
+
- OpenClaw 代表性端到端执行验证
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# v0.1.4 Release Notes
|
|
2
|
+
|
|
3
|
+
BailingHub `v0.1.4` adds real model-token streaming to embedded web chat and defines a reconnectable SSE event protocol. Model generation is now observable before job completion, while the final job record remains the canonical source for conversation history, callbacks, delivery, and audit.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
### 1. OpenAI-compatible model streaming
|
|
8
|
+
|
|
9
|
+
An `llm` target now attempts `stream:true` by default:
|
|
10
|
+
|
|
11
|
+
- provider text fragments are parsed incrementally;
|
|
12
|
+
- first-fragment latency, chunk count, character count, and finish reason are recorded as trace metadata;
|
|
13
|
+
- fragment text is not copied into trace, audit, or conversation ledgers;
|
|
14
|
+
- a non-streaming retry occurs only when the provider explicitly rejects streaming.
|
|
15
|
+
|
|
16
|
+
Set `streaming:false` in the target configuration when a compatible endpoint should remain non-streaming.
|
|
17
|
+
|
|
18
|
+
### 2. Reconnectable SSE event protocol
|
|
19
|
+
|
|
20
|
+
The new `bailing.chat.stream.v1` protocol adds these events alongside the existing terminal event:
|
|
21
|
+
|
|
22
|
+
- `phase`: the current execution phase;
|
|
23
|
+
- `reset`: discard incomplete provisional text;
|
|
24
|
+
- `delta`: append a provisional text fragment;
|
|
25
|
+
- `done`: the canonical terminal result rebuilt from the final job record.
|
|
26
|
+
|
|
27
|
+
Each job uses monotonically increasing event IDs. A reconnecting client may send `Last-Event-ID` for bounded short-term replay. If a complete replay is unavailable, the server emits `reset` so the client cannot silently concatenate discontinuous text.
|
|
28
|
+
|
|
29
|
+
### 3. Incremental web widget rendering
|
|
30
|
+
|
|
31
|
+
The zero-dependency widget renders model output before job completion and converges correctly after reconnects, resets, and terminal events. Existing clients remain compatible: they may ignore unknown events and continue consuming only `done`.
|
|
32
|
+
|
|
33
|
+
## Security and audit boundary
|
|
34
|
+
|
|
35
|
+
- Incremental text is provisional transport data, not a business outcome or approval evidence.
|
|
36
|
+
- Conversation history, callbacks, delivery, and audit bodies do not persist every fragment.
|
|
37
|
+
- `done` always comes from the canonical final job record.
|
|
38
|
+
- Final business authorization remains with the business system; streaming does not change ACC, tool signatures, or approval boundaries.
|
|
39
|
+
|
|
40
|
+
## Compatibility
|
|
41
|
+
|
|
42
|
+
- No database migration.
|
|
43
|
+
- `/run`, SDKs, tool signatures, and the executor protocol are unchanged.
|
|
44
|
+
- New SSE events are backward compatible; old clients may continue to process only terminal results.
|
|
45
|
+
- Non-streaming model targets and existing chat entries retain their previous behavior.
|
|
46
|
+
|
|
47
|
+
## Validation
|
|
48
|
+
|
|
49
|
+
The release is checked with:
|
|
50
|
+
|
|
51
|
+
- `npm run typecheck`
|
|
52
|
+
- `npm test`
|
|
53
|
+
- `npm --prefix web-admin run build`
|
|
54
|
+
- `npm run docs:check`
|
|
55
|
+
- `npm run release:check`
|