Repository navigation
Conversation
Feishu was only a custom group webhook. Owners who want a Bot to answer in Feishu chats, use cards and work with calendars or documents had no supported path. Extend the existing Feishu channel with application connections: - A six-step long-connection guide (seven for an HTTP event address) behind one Connect entry, with permission import JSON, live connection state and polled event status. - Credentials kept in an encrypted per-instance vault, never in state projections or Bot environments. The long connection uses the official SDK; HTTP mode uses a separate event-only listener. - Inbound messages persisted before acknowledgement, deduplicated across restarts, routed per chat to a local Bot and answered in their thread through a durable outbox with Get reactions. - Cards bound to the original message and the actual linked clicker. - Per-Bot, per-product calendar, document, table, sheet, meeting and task tools. Ask-mode writes go through the native approval seam. - The gateway admits the authenticated `feishu` endpoint, documented in the OpenAPI contract. Docker: install ds-bot's runtime dependencies in the image, because `link:` installs none of them and the Feishu SDK import is lazy, and fail the build when a declared dependency is missing. The local override publishes the console on all interfaces and requires an explicit trusted host so browser API requests are admitted. A dial that cannot import the SDK is reported as a missing install, not as a network or credential failure. No console links are sent into Feishu: an attachment over the Feishu limits fails as a tool error.
zy95-12
merged commit Nov 5, 2026
056cb55
into
ThinkFlowLab:delivery/ai-centric-development-service
5 of 6 checks passed
zy95-12
added a commit
that referenced
this pull request
Nov 5, 2026
Written-by: Codex Fixes #2526 (follow-up to #2537). Target: `delivery/ai-centric-development-service`. After Chief revised a Task to rev3/rev4, its already merged rev2 Attempt could never be accepted: both the advisory precheck and execution applied whole-Task requirement equality. Scoped acceptance now judges the pinned Attempt definition and its exact code/test/Review/provider-merge evidence while leaving the Task open. Settlement records both original and current revisions; an explicitly chosen next Attempt uses the current requirements. Historical parent settlement also looks up the original durable child admission using the pinned parent revision; child evidence and the committed admission remain mandatory. Whole-Task closure retains its independent current-goal checks. Chief/TaskView receive the same bounded comparison: revisions, changed fields, prior values, and the existing paged requirement source. Changes after a Chief snapshot use existing stale-snapshot correction. Prior refusal messages describe past outcomes, not current action legality. Candidate evidence, identity, permissions, execution generations, exits, pending writes and replay/rollback guards remain strict. No new workflow, timer, store, migration or automatic human escalation. Validation: - Fresh base `056cb557`: the corrected persisted-Task fixture fails the real Git/Runtime rev2→rev4 settlement/next-delivery path, actual Chief loop and advisory projection on the old requirement-equality guard; all three pass after the fix. - Final-head related suites: **281 passed / 0 failed**; the final actual Chief loop also passes with four historical same-fact refusal records. It sees legal scoped acceptance, accepts rev2, keeps Task open and explicitly starts rev4. New stale-judgement regression returns correction without blocking the Task or consulting a human. - Preserved negative coverage for mutated candidate/evidence, provider/rights/exit failures, changed requirements during I/O and incomplete whole-Task acceptance. Role budget **6/0**, API/OpenAPI **10/0**. Self-review also reproduced and repaired the child-admission revision barrier; targeted parent/evolution/Chief/negative admission regressions: **5/0**. **Final-head full root verification: 5167 passed / 0 failed**, including **8 actual DSH runtime checks**. [GitHub Test 42053449199](https://github.com/ThinkFlowLab/FlyBot/actions/runs/42053449199), attempt1: final-head Node24 / tests-ok both success. - Measured broad coverage (whole modules): shared helper **100% lines / 99.25% branches / 100% functions**; Chief 96.96/85.56/80.18; Delivery 96.91/79.74/86.67. This is not a 100% added-branch claim; unexecuted helper ranges include queue.reason null fallback, direct missing-candidate shortcircuit, and the new advisory prior-value empty-string fallback. The latter cannot authorize an action and the original full requirement remains queryable. No added source line appears in the Node uncovered-line list; that is not proof of every added branch combination. No exclusions or weakened evidence assertions. - Updated compact long-term memory, delivery/Chief/backend architecture, API/OpenAPI, decision, changelog and canonical mirrors. Original context cap/source list unchanged. Broader mandatory-context slimming stays separately deferred. - Pairing self-review covered correctness, security and conventions; no independent Verifier PASS claimed. Final source: `1f8cff3abcaad9ccf91ebb0a7b0980c4307deae0`. Not run: live OpenToday deployment/restart/state or binding edits, external provider writes, paid model inference, or a real vendor SDK/model on this new evolution path. Runtime/SDK-protocol subprocess fixtures do not establish onsite acceptance. Source preserves #2527 Feishu integration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No tracking issue. Builds on the Feishu connector work of #1266 (webhook sender and inbound long connection).
What changed
Before: Feishu was a custom group webhook plus an inbound long-connection row. After: an owner can connect a Feishu application and have a local Bot answer in Feishu chats.
feishu-credentials.json, mode-0600 host key). They never enter state projections, Bot schemas or Bot environments. The long connection uses the official SDK. HTTP mode uses a separate event-only listener with no console routes.Getreactions mark accepted requests.feishu_cardcards bind the original message and the actual linked clicker.feishu_filesends Session attachments within the Feishu limits (images 10 MB, files 30 MB) and fails as a tool error beyond them. No console links are sent into Feishu.feishu_toolgives per-Bot, per-product access to calendar, documents, tables, sheets, meetings and tasks. Ask-mode writes go through the native approval seam.feishuendpoint is added toscripts/api-contracts.mjsand the OpenAPI artifact.link:profile installs none of them, and the Feishu SDK import is lazy, so the container started healthy and only the dial failed. The build now fails when a declared dependency is missing. The image grows from about 1.6 GB to 2.7 GB, mostly the Claude and Codex executor binaries; the Feishu SDK is about 29 MB.docker/compose.local.yamlpublishes the console on all interfaces and requiresFLYBOT_TRUSTED_HOST, so browser API requests are admitted.docs/feishu.md, the core-host, core-client, project-workbench and backend-service subsystem docs, the Docker guide (en/zh) and the third-party integration counts. Changelog fragments are inchangelog.d/.Verification at the tip
Tip SHA: 8a8d8d0 (base e11ba3b)
Ran:
npm run verify: exit 0, 5120 tests, 0 failures. It covers core lint with arch-docs, plugin lint, the client and workbench bundle checks, the ds-bot patch check and canonical form, the core and plugin suites, the.github/scriptstests, and the interop, live-e2e and demo checks.docker compose -f compose.yaml -f docker/compose.local.yaml buildandup --waitat this tip: both containers healthy. Against a real Feishu application, the long connection reportsready. Unauthenticated API requests from the published address still return 401.feishu_filelimits with no console address.Not run (and why):
dev/smoke.mjs) and real-model runs.Checkpoint
{ "pr": 2527, "claim": "zhaozhaozz", "issue": 0, "summary": "Connect a Feishu application to the existing Feishu channel: guided long-connection or HTTP setup, an encrypted credential vault, persisted and deduplicated inbound messages answered in thread through a durable outbox, cards bound to the linked clicker, and per-Bot product tools behind native approvals. The Docker image now carries ds-bot's runtime dependencies so the long connection can load its SDK.", "files": ["core/src/host/feishu-service.js", "core/src/host/feishu-sdk.js", "core/src/host/feishu-tools.js", "core/src/host/feishu-vault.js", "core/src/client/feishu-setup.js", "Dockerfile", "docker/profile.mjs", "docs/feishu.md"], "checks": { "ran": "npm run verify", "result": "green", "at": "8a8d8d09abd67f98a01c9c59a8da10c74e769d4b" }, "next": "none — ready for review" }