feat: feishu webhook adaptor (PHASE-08 world intake) - #28
Merged
Merged
Conversation
- WebhookAdaptor::normalize now returns WebhookOutcome{Event,Reply}: some
integrations answer control-plane requests with a JSON body on the spot
(feishu url_verification challenge echo); normalize also receives the
subscription secret, for integrations whose auth field travels inside the
(possibly encrypted) payload
- FeishuAdaptor: X-Lark-Signature verification (sha256(ts+nonce+key+body),
enforced whenever presented; signed-without-key refused), AES-256-CBC payload
decryption (key=sha256(encrypt_key), iv||ct, PKCS7), fail-closed verification
token check, im.message.receive_v1 -> locator-only doorbell (chat_id +
message_id + event_id; message CONTENT deliberately dropped — the soul reads
it through its carrier), one strand per feishu chat, human-sender gate +
SANTI_WEBHOOK_FEISHU_ALLOW allowlist (open_id or user_id)
- env contract: SANTI_WEBHOOK_FEISHU_TOKEN (subscription secret_env),
SANTI_WEBHOOK_FEISHU_ENCRYPT_KEY, SANTI_WEBHOOK_FEISHU_ALLOW — matches the
placeholders already staged in hk-03 /etc/santi/santi.env
- deps: aes/cbc/base64 (workspace-pinned); 8 unit tests (challenge echo, token
fail-closed, encrypt roundtrip + wrong-key refusal, sender gates, signature)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Adds the feishu (Lark) event-subscription adaptor: WebhookOutcome{Event,Reply} trait extension (challenge echo needs a JSON body; secret now reaches normalize for payload-internal auth), X-Lark-Signature verification, AES-256-CBC payload decryption, fail-closed verification-token check, im.message.receive_v1 -> locator-only doorbell (content deliberately dropped; one strand per chat), human-sender gate + allowlist. Env contract matches the placeholders already staged on hk-03. 8 new unit tests; guard green.
🤖 Generated with Claude Code