Commit Graph

1019 Commits

Author SHA1 Message Date
Peter Steinberger
6c49cae2bc test(feishu): consolidate bot fixtures (#112884) 2026-07-23 01:49:49 -04:00
Peter Steinberger
7497147519 refactor: hoist channel doctor migration helpers (#112782) 2026-07-22 22:53:39 -04:00
joshavant
8b4df42894 fix(feishu): bind probe cache to app credentials 2026-07-22 20:13:12 -05:00
joshavant
3a7f1ab0f4 fix(feishu): keep internal identity types private 2026-07-22 20:13:12 -05:00
joshavant
3b5fb27b8d fix(feishu): preserve bot identity through probe outages 2026-07-22 20:13:12 -05:00
joshavant
8b1d0278f4 fix(feishu): decouple bot identity from AI registration 2026-07-22 20:13:12 -05:00
Jesse Merhi
4a2a600809 feat(channels): add channel-owned setup contracts (#112176)
* feat(channels): add channel-owned setup contracts

* test(channels): align legacy setup fixtures

* chore(channels): regenerate config and SDK baselines after rebase

* fix(update): run fresh doctor after current-process core changes

* fix(channels): align add pre-scan with execution precedence

* style(cli): format channels-cli test additions

* fix(channels): restore option-before-positional channel resolution via metadata arity scan

* fix(channels): keep help flags out of metadata arity escalation

* test(update): mock fresh post-update doctor in current-process suites

* style: format review fixes and correct entrypoint mock type

* fix(channels): register only modern contract options for dual-publishing plugins

* test(update): align downgrade suites with fresh-doctor child invocation

* docs(channels): record empty-contract and input-forwarding invariants

* fix(line): keep the shipped --token switch as a channel access token alias

* fix(signal): stop treating exact cross-family loopback endpoints as bind-aligned

* chore(config): regenerate docs config baselines after second rebase

* style: format rebased channels add tests

* fix(channels): enforce field-key and flag-name agreement in setup contracts

* fix(signal): detect container endpoints for bare --http-url setup

* fix(signal): ignore unconfigured accounts in transport collision checks

* fix(channels): validate negated setup flags in contract and normalizer

* fix(signal): preserve existing transport kind when setup detection is unreachable

* style(signal): use direct boolean check in collision guard

* style(signal): type test config literals

* docs(update): record two-read design of fresh-doctor validation gate

* fix(channels): satisfy post-rebase architecture gates

* docs: refresh channel setup map

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-22 19:57:42 -04:00
Peter Steinberger
5e651d5ac7 fix(channels): restore assistant context after restart (#112548)
* fix(channels): restore transcript context after restart

Merge bounded active-branch session transcript turns at the shared prepared-turn seam so message channels retain assistant replies after restart or history eviction. Migrate Telegram's one-off merge while preserving exact projection and legacy dedupe behavior.\n\nCloses #112520. Slack case reported by Joe Tam (@joetam) in #102594.

* style(channels): avoid spread in transcript mapping

* refactor(telegram): drop obsolete transcript exports
2026-07-21 23:45:01 -07:00
Peter Steinberger
edecdbd05e refactor(config): config-surface reduction tranche 3 — product consolidations (review request) (#111527)
* refactor(config): consolidate media model lists

* refactor(config): unify memory configuration

* refactor(config): consolidate TTS ownership

* refactor(config): move typing policy to agents

* refactor(config): retire product-level config surfaces

* refactor(config): share scoped tool policy type

* chore(config): refresh generated baselines

* fix(config): honor agent typing overrides

* fix(config): migrate sibling config consumers

* refactor(infra): keep base64url decoder private

* fix(config): strip invalid legacy TTS values

* chore(config): refresh rebased baseline hash

* fix(doctor): route legacy messages.tts.realtime voice to talk during tts move

* refactor(config): polish final layout names

* refactor(config): freeze retired tuning defaults

* feat(config): add fast mode default symmetry

* refactor(config): key agent entries by id

* docs(config): update final layout reference

* test(config): cover final layout migrations

* chore(config): refresh final layout baselines

* fix(config): align final layout runtime readers

* fix(config): align remaining readers

* fix(config): stabilize final layout migrations

* fix(config): finalize config projection proof

* fix(config): address final layout review

* docs(release): preserve historical config names

* fix(config): complete keyed agent migration

* fix(config): close final migration gaps

* fix(config): finish full-branch review

* fix(config): complete runtime secret detection

* fix(config): close final review findings

* fix(config): finish canonical docs and heartbeat migration

* fix(config): integrate latest main after rebase

* refactor(env): isolate test-only controls

* refactor(env): isolate build and development controls

* refactor(env): collapse process identity indirection

* refactor(env): remove duplicate config and temp aliases

* docs(env): define the operator-facing allowlist

* ci(env): ratchet production variable count

* fix(env): remove stale provider helper import

* fix(env): make ratchet sorting explicit

* test(env): keep test seam in dead-code audit

* test(env): cover ratchet growth and boundary; document surface budgets

* docs(config): document tier-eval consolidations

* docs(config): clarify speech preference ownership

* test(memory): align retired tuning fixtures

* refactor(memory): freeze engine heuristics

* refactor(config): apply tier-eval tranche

* refactor(tts): move persona shaping to providers

* refactor(compaction): move prompt policy to providers

* test(config): align hookified prompt fixtures

* chore(deadcode): classify test-only exports

* chore(github): remove unused spawn helper

* chore(deadcode): classify queue diagnostics

* chore(deadcode): remove unused lane snapshot export

* chore(plugin-sdk): ratchet consolidated surface

* fix(config): integrate latest main after rebase
2026-07-21 20:28:43 -07:00
Peter Steinberger
94557e1c57 refactor(media): ingress and preflight consumers ride ordered media facts (#112276)
* refactor(media): ingress and preflight consumers ride ordered media facts

Media-facts program PR 2: channel context retains ordered MediaFact[]
through finalization; inbound gates, hook mapping, current-turn
normalization, and all five channel families' audio preflights consume
facts. Four review cycles hardened the canonical/legacy merge: canonical
facts are authoritative (legacy fills gaps only), one shared staging
predicate covers MediaStaged and MediaWorkspaceDir, kind inference runs
after fallback MIME fills, legacy counts use max array cardinality, and
alignment-only empty slots no longer count as media presence — all
pinned by a 54-cell canonical×legacy×type merge-matrix test.

* fix(media): hide internal fact helper
2026-07-21 05:32:49 -07:00
mikasa
644645f4f9 fix #95291: message tool fails to deliver files/images on Feishu (400 volc-dcdn / write ECONNRESET) while same Lark SDK upload succeeds standalone (#95514)
* fix(feishu): normalize media upload multipart data

Convert Feishu SDK multipart Buffer upload parts into explicit FormData
before they reach the wrapped HTTP transport. The SDK upload helpers
pass multipart data as a plain object with Buffer media parts; relying on
implicit serialization in the timeout/proxy-aware HTTP wrapper was fragile
and caused file/image delivery failures (400 volc-dcdn / write ECONNRESET)
even though the same credentials succeeded via a standalone SDK upload.

Adds normalizeMultipartUploadData, applied on the request path of the
shared Feishu HTTP instance, plus a regression test covering the
multipart-to-FormData normalization.

Rebased onto current origin/main, which replaced the old synchronous
injectTimeout path with the async proxy-aware injectRequestOptions flow;
the multipart normalization is now applied before that flow.

* fix(feishu): scope multipart media normalization

* test(feishu): mark multipart auth fixture synthetic

* test(feishu): use field-shaped secret fixtures

* fix(feishu): validate multipart upload endpoints

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-20 23:31:03 -07:00
TUARAN
37ac5d671f fix(feishu): fall back media replies (#98320)
* fix(feishu): fall back media replies

* test(feishu): polish media fallback coverage

* test(feishu): cover media fallback policy wiring

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-20 22:52:08 -07:00
Peter Steinberger
0adc2cf606 refactor(media): consolidate parallel media-kind unions onto canonical MediaKind (#112063)
* refactor(media): consolidate parallel media-kind unions onto canonical MediaKind

One canonical MediaKind union (media-core constants) replaces ~40
duplicate/parallel kind declarations across core and channel plugins;
channel-specific narrower contracts derive via Extract/Exclude. Also
fixes a review-caught fallback bug where a stored "unknown" reply-chain
kind preempted MIME inference and relabeled images as documents.

* refactor(ui): derive attachment kinds from MediaKind

* fix(telegram): drop type-dead unknown guard in reply-context kind fallback

* style(telegram): format media kind fallback
2026-07-20 22:27:22 -07:00
chengzhichao-xydt
828845a08a fix(feishu): honor abortSignal during app registration poll interval (#109909)
* fix(feishu): honor abortSignal during app registration poll interval

* test(feishu): prove poll abort through a real loopback server
2026-07-20 21:53:45 -07:00
Peter Steinberger
6e19c36d41 feat(channels): batch 2 producers drop media placeholder bodies (#111665)
* feat(channels): batch 2 producers drop media placeholder bodies

Media-placeholder program batch 2: Discord, Feishu, and MSTeams stop
minting <media:kind> placeholder bodies. Primary bodies carry captions
only; native resources produce ordered structured facts with type-only
facts for failures/rejections (batch-1 alignment contract). Discord
stickers travel as native kind "sticker" (not MIME-derivable); text
carriers (forwarded snapshots, room history, thread starters, pending
text) render via formatMediaPlaceholderText. Feishu audio preflight and
MSTeams unavailable selection move from body-string equality to
structured facts; dead placeholder payload builders deleted.

* test(discord): make allowlist policy explicit
2026-07-19 22:48:32 -07:00
Peter Steinberger
ee0e3a4d47 refactor(channels): share durable ingress monitor (#111214)
* refactor(telegram): share durable ingress monitor

* refactor(whatsapp): share durable ingress monitor

* refactor(feishu): share durable ingress monitor

* refactor(qqbot): share durable ingress monitor

* refactor(zalouser): share durable ingress monitor

* refactor(nostr): share durable ingress monitor
2026-07-18 23:33:24 -07:00
Peter Steinberger
736dddb96a fix(feishu): preserve inbound messages across restarts (#110864)
* fix(feishu): adopt durable inbound ingress

* fix(feishu): preserve failed broadcast ingress

* fix(feishu): commit broadcast lanes at adoption

* test(feishu): fix lifecycle fixture typing
2026-07-18 18:49:38 +01:00
Peter Steinberger
50fdbc5c3f test(feishu): fix delivery trace dispatcher fixture (#110838) 2026-07-18 18:07:41 +01:00
Peter Steinberger
1aa0d73823 refactor(feishu): use shared cache pruning helper (#110326) 2026-07-18 04:26:26 +01:00
Peter Steinberger
258d83b989 fix(feishu): update lifecycle test runtime (#110361) 2026-07-18 04:19:36 +01:00
Peter Steinberger
31ed59bdf6 feat: keep main agents aware of group activity (#110332)
* feat(sessions): auto-watch group activity from main

* feat(sessions): allow watchers to read watched sessions

* fix(sessions): skip group watches for system turns

* fix(sessions): preserve watched session semantics

* fix(channels): propagate effective dm scope

* fix(sessions): canonicalize main watch identity

* fix(sessions): distinguish ambient group watches

* fix(sessions): revoke ineligible ambient watches

* chore: drop CHANGELOG edit (release generation owns it)
2026-07-18 04:06:58 +01:00
Peter Steinberger
601ffa2530 refactor(channels): move inbound turn execution into core (#110095)
* refactor(channels): centralize turn execution lifecycle

* refactor(extensions): adopt core channel turn plans

* test(channels): ratchet modern dispatch ownership

* chore(channels): drop stale max-lines exemption

* fix(channels): allow async delivery error cleanup

* test(channels): await async delivery cleanup

* test(channels): await delivery error callbacks

* fix(channels): preserve delivery error contract

* fix(plugin-sdk): preserve channel inbound declarations

* test(channels): exercise core delivery plans

* fix(channels): await delivery error cleanup

* fix(channels): preserve async cleanup contract

* refactor(channels): trim dispatch boilerplate

* fix(channels): mask observe-only dispatch results

* refactor(channels): delete unused dispatch exports

* fix(msteams): preserve resolver config overrides

* refactor(channels): keep Teams turn config internal

* test(plugins): drop retired Teams runtime export guard
2026-07-18 00:55:46 +01:00
mikasa
d03b015ff4 fix(feishu): bound sender name cache (#103513) 2026-07-18 00:11:51 +01:00
Peter Steinberger
b48c801623 test(release): repair extension runtime fixtures 2026-07-17 14:24:13 +01:00
max
907f5552f5 feat(feishu): handle opt-in VC meeting invites (#92340)
* feat(feishu): handle VC meeting invites

* fix(feishu): route VC invites through DM ingress

* fix(feishu): keep VC invite chat id canonical

* fix(feishu): handle VC invite pairing

* fix(feishu): simplify VC invite dispatch

* fix(feishu): guard VC invite pairing

* refactor(feishu): canonicalize VC invite ingress

Co-authored-by: renaocheng <renaocheng@bytedance.com>

* refactor(feishu): keep synthetic routing internal

Co-authored-by: renaocheng <renaocheng@bytedance.com>

* refactor(feishu): hide VC invite internals

Co-authored-by: renaocheng <renaocheng@bytedance.com>

* fix(feishu): gate VC invitation auto-join

* chore(config): refresh Feishu config baseline

* test(feishu): use synthetic VC fixture credential

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-17 12:36:42 +01:00
Max Huang
3e838782b1 feat(feishu): bot-to-bot conversation support with @mention handling (#89783)
* feat(feishu): support bot-authored mentions

Co-authored-by: heyumeng154-alt <260365965+heyumeng154-alt@users.noreply.github.com>

* test(feishu): isolate bot name resolver state

* fix(feishu): verify bot mention identity

* docs: refresh Feishu channel map

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: heyumeng154-alt <260365965+heyumeng154-alt@users.noreply.github.com>
2026-07-17 11:44:00 +01:00
Peter Steinberger
4ecd85e0b7 fix: keep healthy channel accounts running when one credential fails (#109766)
* fix(secrets): isolate channel account credentials

* fix(secrets): normalize Feishu default ownership

* fix(feishu): preserve accountless secret ownership

* fix(matrix): keep accountless top-level refs active
2026-07-17 01:12:18 -07:00
Peter Steinberger
0e792b6de3 refactor(channels): centralize inbound orchestration and remove internal compat (#109716)
* refactor(channels): centralize inbound turn orchestration

* refactor(runtime): remove stale compatibility paths

* chore(guards): reject internal deprecated API use

* refactor(channels): simplify core turn planning

* chore(guards): keep deprecated checks boundary-focused

* refactor(memory): keep modern config off compat barrel

* fix(msteams): preserve feedback learning

* test(channels): align modern inbound fixtures

* refactor(channels): finish modern inbound migration

* refactor(channels): tighten core inbound kernel

* fix(channels): preserve turn assembly narrowing

* test(sdk): keep runtime mock binding immutable

* test(matrix): isolate read policy runtime

* test(msteams): mock canonical reply factory

* test(slack): mock core inbound turn dispatch

* test(telegram): inject core session recorder

* test(signal): inject core session recorder

* test(googlechat): assert canonical inbound routing

* test(synology-chat): align core turn fixture

* fix(sdk): preserve direct DM runtime compat

* refactor(channels): own inbound envelope compat in core

* refactor(channels): trim inbound dispatch seams

* refactor(channels): remove redundant async wrappers

* test(synology-chat): type canonical dispatcher mock

* refactor(channels): remove remaining dead compat seams

* chore(sdk): refresh API baseline after rebase

* fix(channels): preserve direct DM identity metadata
2026-07-17 00:56:46 -07:00
Peter Steinberger
96815a437b fix(channels): centralize access gates and media fallback (#109548)
* refactor(channels): shared supplemental sender gating, allowlist-match adoption, outbound mop-ups

* fix(plugin-sdk): skip-aware media sequence with text fallback for empty URLs

* chore(plugin-sdk): align surface budgets after rebase

* test(qqbot): type media sender mock calls

* fix(plugin-sdk): distinguish empty media sequences

* fix(plugin-sdk): track void media sends
2026-07-16 20:55:08 -07:00
ooiuuii
b1eaf53672 fix(feishu): avoid local media fallback leaks (#98251)
* Fix Feishu local media fallback leaks

* refactor(feishu): clarify media fallback link style

* fix(feishu): reject credentialed media fallbacks

* fix(feishu): reject ambiguous media fallback URLs

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 16:48:31 -07:00
Peter Steinberger
a168ffcd5e improve: reduce extension monitor test import overhead (#109345)
* test(feishu): consolidate monitor helper coverage

* test(imessage): consolidate monitor helper coverage

* test(mattermost): consolidate monitor helper coverage

* test(zalo): consolidate monitor lifecycle coverage

* test(imessage): classify merged monitor support correctly
2026-07-16 15:20:08 -07:00
thomas.szbay
1bff4eecb2 [AI] fix(feishu): send text and voice separately for Auto-TTS replies (#103781)
* fix(feishu): use TTS supplement metadata for precise text suppression

* refactor(feishu): centralize TTS supplement delivery

* style(feishu): format TTS delivery callback

* fix(feishu): preserve streamed TTS text

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 13:18:28 -07:00
Peter Steinberger
d4d7b80431 refactor(feishu): remove comment retry test seam (#109192) 2026-07-16 09:46:29 -07:00
wangmiao0668000666
813021fa79 fix(feishu): honor abortSignal in drive comment reply retry loop (#108408)
* fix(feishu): honor abortSignal in drive comment reply retry loop

The inter-attempt delay in monitor.comment.ts used a bare setTimeout and
never received the owning monitor account's AbortSignal, so an account
teardown (ws disconnect, webhook stop, config reload) left the in-flight
comment reply retry running for up to ~6s after the rest of the lifecycle
settled. delayMs now wraps waitForAbortableDelay from async.ts and the
abortSignal is threaded through fetchDriveCommentContext →
resolveDriveCommentEventTurn → handleFeishuCommentEvent →
createFeishuDriveCommentNoticeHandler, sourced from
monitorSingleAccount.

The retry loop checks the waitMs return value and the abortSignal flag,
breaking out of the next 1s tick instead of running the full 6×1s poll
budget. Sibling surface monitor.bot-identity.ts already uses the same
pattern; #104431 explicitly skipped the comment-monitor retry because
it is a result-predicate poll, not an error retry, and this fix is
orthogonal to that decision.

Not tested: live Feishu tenant, real bot identity, real drive comment,
and account restart. requestFeishuOpenApi itself does not accept
AbortSignal — that is a separate, larger refactor and is out of scope.

* test(feishu): prove comment retry abort

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 09:05:23 -07:00
Peter Steinberger
c46cc1e2d4 refactor(channels): unify inbound replay protection (#109117)
* refactor(channels): unify inbound replay-guard orchestration on shared factory

* fix(plugin-sdk): bind replay-guard settlement to claim handles

* fix(plugin-sdk): claim-handle settlement (rest)

* fix(discord): align skipped queue cleanup

* style(feishu): simplify bot menu claim settlement

* refactor(plugin-sdk): extract replay dedupe contracts
2026-07-16 08:46:34 -07:00
Peter Steinberger
44314c9451 refactor(channels): table-drive setup and control-plane helpers (#109028)
* refactor(channels): table-drive setup credentials, config schemas, doctor detectors, status issues

* refactor(channels): control-plane tables (rest)

* fix(plugin-sdk): refresh surface budgets after rebase

* style(plugin-sdk): format credential helpers

* fix(channels): preserve generic schema refinement types

* fix(channels): preserve schema input and output inference

* fix(clickclack): forward credential patch fields

* test(plugin-sdk): use redacted credential fixtures

* fix(plugin-sdk): refresh API baseline after inference fix

* fix(channels): keep multi-account envelope optional

* fix(channels): preserve policy validation invariants

* fix(extensions): remove stale awaits from file checks

* style(qqbot): format synchronous file check

* fix(config): refresh bundled channel metadata

* fix(qqbot): reject unsupported pairing policy
2026-07-16 07:17:01 -07:00
Peter Steinberger
990e8d24b0 feat(presentation): hosted-widget launch via typed web-app actions (#108927)
* feat(presentation): support hosted widget actions

* refactor(discord): route widget launches through presentation

* chore: keep changelog release-owned

* test(interactive): type the invalid web-app boundary case explicitly

* test: type web-app action fixtures against the split union

The two-member web-app union no longer accepts a distributed
type: "url" | "web-app" literal or an empty receipt in typed
callbacks; use explicit action casts and the Discord receipt factory.
2026-07-16 04:35:31 -07:00
pick-cat
6c11d261e2 fix(feishu): add chunk-idle timeout to inbound media download (#106541)
* fix(feishu): add chunk-idle timeout to inbound media download

* fix(feishu): extract media chunk-idle helper under LOC ratchet

* fix(feishu): keep only used media idle export for knip/lint

* test(feishu): add executable negative control for stalled media hang

* test(feishu): avoid dangling underscore in negative control

* test(feishu): add production-path idle proof with real saveMediaStream

* fix(feishu): drop await in media idle finally so timeout escapes stalled Readable

The finally block's `await iterator.return()` blocked the timeout error
from propagating when the source is a real Node.js Readable.
Readable async-iterator `return()` does not settle on stalled streams,
so awaiting it made the whole idle timeout a no-op for that boundary.

Add Lark SDK boundary tests with real Readable streams (stalled,
progressing, multi-chunk) and production-path proof.

* fix(feishu): thread canonical Feishu timeout through media download

Derive the per-chunk idle timeout from resolveConfiguredHttpTimeoutMs()
so the established Feishu HTTP-timeout policy (env var, account config,
default) is preserved instead of a hardcoded 30s fallback.

Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn>

* fix(feishu): restore sanitizeFileNameForUpload export lost in cherry-pick

The extraction commit (extract media chunk-idle helper) removed the
export from media.ts and the let declaration from media.test.ts during
the cherry-pick because origin/main does not export this function.

Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn>

* fix(feishu): destroy stalled source on chunk-idle timeout

Destroy the underlying Readable source when the idle timer fires so the
Lark SDK stream and its HTTP resource close instead of leaking. Previously
only iterator.return() was called without awaiting it, which dropped the
cleanup promise on stalled Node Readables without releasing resources.

Add assertions in tests and proof that the source Readable is destroyed
after timeout.

Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn>

* fix(feishu): drop unused export and compact timeout calls to stay under LOC ratchet

Removes the `export` from sanitizeFileNameForUpload (never imported outside
media.ts and its test) and uses a local `save` wrapper in
saveFeishuResponseMedia to keep the chunk-idle timeout calls single-line so
media.ts stays under its baseline. The test no longer imports the
now-private helper.

Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn>

* chore: trigger CI after rebase onto main

* chore: trigger CI after rebase onto main

* test(feishu): add HTTP loopback proof for media chunk-idle destroy

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(feishu): clear media idle proof oxlint

* fix(feishu): bound stalled inbound media streams

Co-authored-by: Pick-cat <huang.ting3@xydigit.com>

* test(feishu): avoid promise executor return

Co-authored-by: Pick-cat <huang.ting3@xydigit.com>

* fix(feishu): keep media timeout authoritative

Co-authored-by: Pick-cat <huang.ting3@xydigit.com>

---------

Co-authored-by: nebulacoder-v8.0 <noreply@zte.com.cn>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 01:48:44 -07:00
Peter Steinberger
dde90a345a refactor(plugin-sdk): narrow wildcard barrels to explicit used exports (#108440)
* refactor(plugin-sdk): narrow wildcard barrels to explicit used exports

* refactor(tools): delete dead tool-planning module exposed by barrel narrowing

* fix(plugin-sdk): restore deprecation tag on OpenClawSchemaType alias

* test(agents): drop test for deleted runtime proxy module

* refactor(tools): trim descriptor types to cache consumers

* refactor(deadcode): harvest exports orphaned by barrel narrowing

* refactor(deadcode): harvest exports orphaned by barrel narrowing (rest)

* fix(agents): restore sdk imports and test markers via public predicate

* fix(plugin-sdk): named type re-exports in plugin-entry; trim types barrel precisely

* chore(plugin-sdk): account unmasked deprecated provider types in budgets

* fix(plugins): name star-only type rows for dts bundling

* fix(plugins): restore host-hook surface; unexport internal api compositions

* fix(plugins): named type imports for api composition; restore needed source exports

* fix(plugins): knip-visible type imports for registry surfaces

* test: adapt tests to privatized media and command internals

* fix(qa-lab): re-export snapshot conversation type

* style: format sessions sdk imports

* fix(plugins): restore smoke entry export; pin budgets to exact actuals

* fix(plugins): canonical smoke-entry import; drop orphaned root shims

* fix(plugins): allowlist manifest probe, repoint qa web import, drop dead browser barrels

* fix(plugin-sdk): pin codex auth marker and scaffold provider type

* fix(qa-lab): keep web-facing model-selection shim within boundary rules

* fix(plugin-sdk): preserve merged contracts through narrowed barrels

* chore(plugin-sdk): pin post-rebase surface budgets
2026-07-16 00:45:23 -07:00
NIO
ed16970fc6 fix(feishu): pass timeoutMs through app-registration guarded fetch (#105549)
* fix(feishu): pass timeoutMs through app-registration guarded fetch

* refactor(feishu): keep registration timeout internal

* docs(changelog): credit Feishu timeout fix

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-15 17:18:54 -07:00
Alix-007
dbbe012256 fix(feishu): bound stalled docx image URL reads (#104663)
* fix(feishu): bound stalled docx image URL reads

* fix(feishu): honor configured docx image timeout

* fix(feishu): avoid total deadline for docx images

* refactor(feishu): extract docx upload input handling

* fix(feishu): harden document image uploads

Co-authored-by: Alix-007 <li.long15@xydigit.com>

* refactor(feishu): keep docx helper types internal

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-15 12:39:17 -07:00
Peter Steinberger
0393189243 chore(plugins): gate deprecation hygiene in CI and purge internal deprecated usage (#108261)
* chore(plugins): gate deprecation hygiene in CI and purge internal deprecated usage

* fix(agents): migrate auth-profiles oauth import to OAuthProviderId

* fix(whatsapp): use durability param in delivery-recovery test

* chore(scripts): declare shouldRunDeprecationHygieneChecks in check-changed types

* test(plugins): update runtime-api guard for ssrf policy rename
2026-07-15 04:15:23 -07:00
yujian
d43c8ec7a2 fix(feishu): route SDK traffic through ambient proxy (#86386)
* fix(feishu): route sdk http through ambient proxy

* fix(feishu): preserve request agents under proxy

* fix(feishu): honor managed proxy agent override

* fix(feishu): share ambient proxy transport

* chore(feishu): move release note to pr

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-15 03:47:19 -07:00
Peter Steinberger
7748574c4b fix: stabilize flaky test shards blocking merges (#107938)
* test: stabilize flaky test shards

* style: format Feishu delivery trace types
2026-07-14 20:41:54 -07:00
Peter Steinberger
ed12937cbd refactor(plugin-sdk)!: delete the zero-consumer channel-ingress facade, AccessFacts projections, and dead dispatch aliases (#107906)
* refactor(plugin-sdk)!: delete the zero-consumer channel-ingress facade, AccessFacts projections, and dead dispatch aliases

* chore(plugin-sdk): refresh API baseline hash for the facade deletions

* fix(channels): drop dead AccessFacts field writes stranded by the facade deletion

* chore(plugin-sdk): refresh API baseline hash after rebase
2026-07-14 19:43:18 -07:00
Peter Steinberger
75354578cf test(feishu): refresh overflow delivery trace (#107764) 2026-07-14 15:10:23 -07:00
Peter Lee
98e88ab1a6 fix(feishu): preserve line breaks in post markdown (#99394)
* fix(feishu): upgrade single newlines to paragraph breaks in post md messages

* fix(feishu): move post-md normalization out of adapter chunker, add card-mode regression test

* fix(feishu): normalize post-md newlines before chunk/limit decisions

* fix(feishu): remove post-md normalization from outbound chunker

Move newline normalization out of feishuOutbound.chunker so card and
document-comment text paths are not affected. Post-md normalization
remains scoped to sendOutboundText, buildFeishuPostMessagePayload, and
editMessageFeishu where the render mode is known.

Add regression test verifying the chunker preserves single newlines
unchanged.

Ref: https://github.com/openclaw/openclaw/pull/99394#issuecomment-4873230477

* fix(feishu): route card on raw text, add post-md expansion length guards

* fix(feishu): scope reply target to first subchunk in expanded post fanout

* fix(feishu): skip redundant post-md normalization for pre-chunked outbound and reply text

ClawSweeper review identified that subchunks from already-normalized
post-md text re-enter sendMessageFeishu which normalizes again. If a
chunk boundary falls inside a fenced code block the second chunk lacks
the opening fence, so findCodeRegions treats code newlines as prose and
expands them to paragraph breaks.

Add alreadyNormalized flag to buildFeishuPostMessagePayload and
sendMessageFeishu so pre-normalized callers (sendOutboundText overflow
path and reply-dispatcher sendChunkedTextReply) can skip the redundant
normalization pass.

* fix(feishu): convert markdown tables before post-md newline normalization in outbound path

ClawSweeper identified that sendOutboundText normalizes newlines before
sendMessageFeishu runs convertMarkdownTables. The blank lines inserted by
normalization break markdown table row contiguity, so raw-mode Feishu
accounts can lose table rendering while fixing paragraph spacing.

Convert tables before the newline upgrader so the converter sees the
original table structure. sendMessageFeishu runs convertMarkdownTables
again internally, but that is a no-op on already-converted text.
This matches the reply-dispatcher path which already converts tables
before normalization.

* chore(feishu): avoid exporting internal card builders, test through public send API

The card-mode newline preservation tests now exercise sendMarkdownCardFeishu
and sendStructuredCardFeishu instead of calling buildMarkdownCard and
buildStructuredCard directly. This keeps the SDK surface unchanged from
upstream/main.

The schema-2.0 width config and buildStructuredCard header-fallback tests
are removed because upstream/main already covers them under the sends
cards with schema-2.0 width config describe.

* fix(feishu): preserve markdown newlines in posts

* fix(feishu): preserve multiline markdown structure

* fix(feishu): preserve markdown structure while chunking

* fix(feishu): satisfy package and type gates

* fix(feishu): chunk posts within byte envelope

* fix(feishu): restore channel chunker contract

* chore(feishu): leave release notes release-owned

* chore(feishu): shrink max-lines baseline

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 12:46:03 -07:00
Peter Steinberger
f81f9d8570 chore: enforce max-lines suppression ratchet (#107315)
* ci: enforce max-lines suppression ratchet

* chore: prune stale max-lines suppression

* fix: close max-lines ratchet enforcement gaps

* fix: harden max-lines ratchet checks

* fix(ci): satisfy max-lines ratchet checks

* style: format max-lines declarations

* fix(ci): match oxlint suppression grammar

* test: isolate max-lines git fixtures

* chore: prune resolved max-lines debt

* test: skip newline path fixture on Windows

* fix: harden max-lines suppression ratchet

* chore: refresh max-lines baseline

* fix: close max-lines ratchet bypasses

* fix: derive ratchet base from PR merge tree

* fix: support older Git in staged ratchet

* fix: align max-lines declarations and baseline

* chore: refresh max-lines baseline for current main

* fix: exclude generated wizard locales from max-lines

* chore: prune resolved max-lines debt
2026-07-14 09:27:02 -07:00
Peter Steinberger
e798a76662 refactor(schemas): use TypeBox native enums 2026-07-14 04:25:58 -07:00
Peter Steinberger
610c25881b fix(feishu): remove unused schema builder export (#107395) 2026-07-14 03:56:36 -07:00