Repository navigation
Conversation
6556114 to
394df53
Compare
|
Hi maintainers, I pushed a small follow-up docs commit (9b8867a) that adds a direct README link to the bot platform guide and corrects the verification metadata date. The new CI run is currently marked action_required with no jobs, so it appears to be waiting for workflow approval for this fork PR. Could a maintainer approve the workflow and take a look when convenient? The PR remains documentation-only and contains no credentials or raw provider payloads. |
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 9b8867a10eee1e40534b2b3c17d72dc2b3ff8130. This docs-only change adds the bilingual bot-platform capability guide and its index links. The guide currently overstates the runtime's allowlist and per-channel proxy contracts, and one capability row omits important conversation-scope limits. Technical NO-GO until the P1/P2 claims are corrected.
Validation completed: build:test, full typecheck, lint, format check, ASF header check, diff check, and 102 focused Core/Runtime bot tests. I also ran compiled production-mapper and credential-probe checks, verified all local documentation targets, and confirmed a clean merge with current main ea990cab7ffa768dc1a574b539f73a83f8faabb8. GitHub exposes no hosted checks for this head. I did not independently repeat the author-reported live provider smokes. Seven external setup links returned HTTP 200; the DingTalk documentation hostname did not resolve from this runner.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
|
|
||
| ### Restrict who can contact a bot when the deployment needs it | ||
|
|
||
| `allowedUserIds` is an optional per-channel allowlist. When it is absent or |
There was a problem hiding this comment.
[P1] Do not promise an allowlist on bridges that never enforce it
This is a security-boundary claim that is false for five of the eight bridges. BotRegistry.wire() forwards every bridge message event without a central filter, and only Telegram, Feishu, and WeCom consult allowedUserIds. On this exact build, a compiled production-mapper probe with allowedUserIds: ['trusted-user'] still produced inbound events for attacker-not-in-allowlist on Discord, DingTalk, QQ, Slack, and WeChat; Feishu and WeCom control probes returned null. The settings UI also exposes this field only for Telegram. A user following this section can therefore believe untrusted senders are blocked while those messages still enter a Session. Either enforce and expose the allowlist for every channel claimed here, or explicitly limit this contract to the providers that implement it. Please update the Chinese guide in the same change.
|
|
||
| 1. Use [BotFather](https://core.telegram.org/bots#how-do-i-create-a-bot) to | ||
| create a bot with `/newbot` and copy its token. | ||
| 2. Put the token in Maka's `token` field. Set `proxyUrl` only when the Telegram |
There was a problem hiding this comment.
[P2] The channel proxy field is not used by either credential path
Neither Telegram nor Discord consumes BotChannelSettings.proxyUrl. All bot HTTP calls go through proxiedFetch(), which resolves only the active global network proxy, and the runtime bot directory has zero reads of the channel field. In an exact-head probe with the global proxy disabled and each channel's proxyUrl pointed at a local listener, both credential tests contacted the real provider endpoints while the listener observed zero connections. Thus this instruction, and the Discord claim that the channel setting covers authentication, send users toward a setting that currently covers nothing. Wire the field into the relevant transports, or document the actual global/system proxy requirement instead; mirror the correction in the Chinese guide.
|
|
||
| | Channel | Normal conversation reply | Scheduled bot delivery | Progressive reply stream | Typing indicator | Ephemeral reply cleanup | Non-text message classification | | ||
| | --- | --- | --- | --- | --- | --- | --- | | ||
| | Telegram | Yes | Yes | Yes | Yes | Yes | Yes | |
There was a problem hiding this comment.
[P3] Qualify the conversation scope of these “Yes” capabilities
The current table reads as channel-wide support, but TelegramBotBridge.startReplyStream() returns null for every group conversation, and QQ's typing endpoint is implemented only for channel: (guild-channel) targets, not QQ groups or C2C chats. Normal replies still work, so this is non-blocking, but a capability guide should label Telegram progressive streaming as private-chat only and QQ typing as guild-channel only in both language versions.
|
Thanks for the review. Addressed in commit 334b215:
The new CI run is currently |
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 334b215e9952daef9a3def4f970d72fd9cdf101b. This follow-up correctly narrows the allowedUserIds security contract, removes the unsupported channel-level proxyUrl claim, and adds the missing Telegram/QQ conversation scopes. The replacement global-proxy guidance still does not match the production Bot path, so the technical conclusion remains NO-GO due to the P2 inline finding.
Validation completed: build:test, full typecheck, lint, format check, ASF header check, diff check, 102 focused Core/Runtime bot tests, and 93 relative documentation links. A compiled exact-head Desktop settings probe also confirmed that applying an enabled global proxy leaves the Bot transport proxy state unset. The head cleanly merges with current main c22768c3b0dc47518f6f8584e864f86f0b1e5379. GitHub exposes no hosted checks for this head. I did not repeat live-provider smoke tests or native Windows/macOS networking.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
| Runtime consumes; it is not a claim that the credentials have been validated | ||
| against a live provider. | ||
|
|
||
| Bot HTTP requests currently use the active global network proxy resolved by |
There was a problem hiding this comment.
[P2] Do not direct Bot users to the global proxy until the BotRegistry is actually wired to it. proxiedFetch() only reads the module-local activeProxy, but no production path calls setActiveProxy(): Desktop constructs BotRegistry and its settings effect forwards only botChat. A compiled exact-head probe applied an enabled settings.network.proxy and still observed resolveActiveProxy() === null. SDK-backed paths are also outside this claim: Slack uses WebClient directly, and a credential/bridge probe made zero connections to the configured local proxy. As written, users behind a proxy will follow this guide and still send Bot HTTP traffic directly or fail to connect. Either plumb the Host-owned proxy snapshot into every Bot transport, including SDK-backed bridges, or document that Bot proxy routing is not currently supported.
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
8dc844f to
57caebc
Compare
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 57caebc06d986f3b3960d6f37332669a2491af16.
This follow-up connects Desktop-owned bot HTTP traffic to the Host-resolved network proxy, adds proxy-resolution IPC and retry handling, and updates the platform guide. I found two high-impact proxy-boundary regressions and one remaining transport/documentation mismatch, so this is not ready to merge.
Validation: build:test; full typecheck, lint, format, ASF-header and diff checks; Desktop 2503/2503; Runtime 3465 pass / 13 skip; focused proxy tests 23/23. Runtime Host completed with 1937 pass / 19 skip / 2 fail: the existing managed-Bash sandbox integration is blocked by this environment, and an unchanged endpoint-probe timing test passed on immediate focused rerun. The branch cleanly merges with current main (c22768c3b0dc47518f6f8584e864f86f0b1e5379). GitHub currently reports no hosted checks. I did not test real external bot providers or native Windows/macOS networking.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
| } | ||
| lastReportedError = undefined; | ||
| attempt = 0; | ||
| apply(resolved.kind === "ready" ? (resolved.proxy ?? null) : null); |
There was a problem hiding this comment.
[P1] Keep an authenticated-proxy failure fail-closed. The protocol deliberately distinguishes credential_not_configured from a ready result with no proxy, but this line maps both to setActiveProxy(null). In an exact-head production-path probe, resolving credential_not_configured and then calling proxiedFetch produced active=null, one direct origin connection, and zero proxy connections. Thus a missing or unreadable proxy secret silently sends bot HTTP outside the configured network boundary; Host WebFetch, WebSearch, and external-agent installation reject the same state instead. Preserve a blocked proxy state (or otherwise make client-owned requests fail) until credentials are restored, and add a regression that proves no direct dial occurs.
| // A non-local Host describes a different machine's network. The bot | ||
| // bridges dial out from this one, so its proxy policy does not apply and | ||
| // guessing would be worse than staying direct. | ||
| if (deps.profileKind !== "local") { |
There was a problem hiding this comment.
[P1] Do not let every connected Host profile mutate one process-global proxy. Client IPC is registered for every owner target, while every remote/environment applier clears the global state here; scheduled retries also have no dispose or generation fence when a candidate retires. With two production appliers, a remote refresh cleared the local proxy and a delayed local resolution later reapplied it (remote:null then local:127.0.0.1). Because Desktop keeps multiple profiles connected and uses one process-wide BotRegistry, enabling, reconnecting, or retiring another profile can silently bypass the selected local proxy or restore a stale one. Coordinate the state against the authoritative active/default target and cancel or fence retired appliers.
| Runtime consumes; it is not a claim that the credentials have been validated | ||
| against a live provider. | ||
|
|
||
| Bot HTTP requests currently use the active global network proxy resolved by |
There was a problem hiding this comment.
[P2] This statement is still false for Slack HTTP traffic. SlackBotBridge and testSlack construct @slack/web-api WebClient instances without its supported custom fetch option, so the SDK uses globalThis.fetch, not Maka proxiedFetch. With an active proxy and a local Slack API fixture, auth.test() hit the origin directly once and the proxy zero times. Slack authentication, Socket Mode URL acquisition, and message sends therefore still bypass the configured proxy. Inject the proxied fetch into the Slack clients (including the Socket Mode client options) or narrow this documentation.
hqhq1025
left a comment
There was a problem hiding this comment.
The prior credential, cross-profile race, and Slack HTTP findings are addressed, but two process-wide proxy lifecycle paths remain unsafe. The selected/default Host can leave Bot traffic fail-open while its policy is unresolved, and an unrelated non-default Host cleanup can globally block the healthy default route. These need production-path lifecycle coverage before the documented global proxy behavior is reliable.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
| } | ||
| }, | ||
| onDefaultProfileChanged: (profileId) => { | ||
| void clientNetworkProxyAppliers |
There was a problem hiding this comment.
[P1] Block client traffic until the authoritative proxy policy is known
This optional refresh leaves the process-global proxy unchanged when the newly selected default has no ready applier. The same window exists during initial registration because the refresh is fire-and-forget while active-proxy-state starts as unblocked/direct. Using the compiled production components, I held an authoritative local resolution pending and proxiedFetch reached a loopback origin directly; selecting an unavailable default with no map entry also left blocked=false and reached the origin. If that Host requires an authenticated proxy, bot auth/send traffic can bypass the policy before resolution or during retries. Set the process state to blocked synchronously when authority changes or is first attached, and only unblock it after an explicit ready direct/proxy result.
| clientNetworkProxyAppliers.delete(profileId); | ||
| // No replacement target owns the process-wide transport anymore. Keep | ||
| // client-owned requests fail-closed until the default target returns. | ||
| setActiveProxyBlocked(); |
There was a problem hiding this comment.
[P2] Do not block the active route when a non-default Host closes
Every owner target gets its own map entry, so this condition is also true for a non-default candidate. In a compiled lifecycle probe, the local default applier remained registered, but cleaning up an unrelated remote target executed this branch, set the global state to blocked, and made proxiedFetch reject before the origin saw a request. That takes all Bot HTTP offline until some unrelated default refresh occurs. Only clear/block when the closing applier is the authoritative default, or immediately reapply the current default owner.
# Conflicts: # packages/runtime-host/src/protocol/index.ts
me2seeks
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent operated by me2seeks make. It is not an independent human review and does not replace one.
Summary
Adds a bot platform capability guide (docs/bot-platforms.md + zh-CN counterpart, indexed in docs/README.md) — but the PR ALSO carries a network-proxy change in client-network-proxy.ts and runtime-host-settings-ipc-main.ts plus their tests, which is outside the stated docs scope.
Findings
- [P2] The proxy change duplicates #5159 (
fix(bots): apply the configured network proxy to Client-owned bot traffic, also open, different author): the diffs touch the identical four files (client-network-proxy.ts,client-network-proxy.test.ts,runtime-host-settings-ipc-main.ts,runtime-host-settings-ipc-main.test.ts) with the same change. Either this PR rebased onto #5159 and should be docs-only (drop the proxy files), or it's a competing implementation of the same fix — the two cannot both merge with divergent versions of the proxy seam. Split: keep the docs here and leave the proxy fix to #5159 (already reviewed separately). - [P3] No CI has run on this branch ("no checks reported").
Verdict
needs-discussion — the docs are welcome, but the bundled proxy change must be split from #5159's duplicate work before merging.
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head e525063aa18eeeb698664f1140691bd9877c5154. The latest commit successfully removes the unrelated Bot proxy implementation, leaving a four-file documentation change (+701/-0). The earlier allowlist and platform-scope corrections remain accurate, but the guide still presents the separate, unmerged proxy feature as current behavior, so the technical conclusion remains NO-GO with one P2 finding.
Validation completed against current main 2f32205528a4436783c800715261d4b6e286023d: I inspected the complete documentation diff, the Bot provider/delivery contracts, all eight bridge implementations, the active-proxy state and Slack transport paths, and the state of PR #5159. All 95 relative documentation links resolve, ASF headers and git diff --check pass, and the merge tree 787e63ccaabc36610264a270514e08f5cf23ff33 is conflict-free. GitHub reports no hosted checks for this head. I did not repeat the author-reported live provider tests or native Windows/macOS network validation.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
| Runtime consumes; it is not a claim that the credentials have been validated | ||
| against a live provider. | ||
|
|
||
| Bot HTTP requests currently use the active global network proxy resolved by |
There was a problem hiding this comment.
[P2] This describes a proxy path that does not exist on the current PR or current main. proxiedFetch() reads the module-local resolveActiveProxy(), but setActiveProxy() has no production caller, so the active value stays null; Slack also constructs WebClient and SocketModeClient without the custom fetch. The separate implementation in #5159 is still a draft, conflicting, and unmerged. As written, the English and Chinese guides tell users to configure Maka's global proxy although Bot HTTP remains direct. Please describe this support as pending/unsupported in both locales, or land the implementation first and revalidate the proxy claims.
|
Thanks for the follow-up review. Addressed in 91d4070:\n\n- the English and Chinese guides now state that Bot HTTP is not currently wired to Maka's global proxy, and that neither the global setting nor channel-level \proxyUrl\ guarantees Bot routing;\n- Telegram, Discord, and Slack setup guidance now directs users to independently verify a system-level route such as TUN when routing is required;\n- the guide no longer presents the separate, unmerged proxy implementation as current behavior.\n\nThe PR remains documentation-only; dedicated Bot proxy support is intentionally left to #5159. |
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 91d4070b47410d31ccf414233343f53b33ee09cc.
The follow-up resolves the prior proxy-documentation finding. Both English and Chinese guides now state that Bot HTTP traffic is not wired to Maka's global proxy, that neither the global setting nor channel-level proxyUrl guarantees routing, and that Slack uses its SDK transport directly. That matches the current production paths in this head and current main.
I found no P0-P3 issue in the current four-file documentation diff (+707/-0). I rechecked the source-derived provider/configuration matrix, allowlist scope, Telegram and QQ delivery limits, the WeChat context_token caveat, the active-proxy call sites, and Slack client construction. All 95 relative documentation links resolve; ASF headers and git diff --check pass. The head is 221 commits behind current main (2f32205528a4436783c800715261d4b6e286023d), but git merge-tree produced a conflict-free tree (d12e0e1979f814c18d703816952cc5431e8252e5). GitHub exposes no hosted checks for this head.
Residual scope: I did not rerun the claimed live-provider smoke tests or native Windows/macOS networking paths. The documented system-level routing guidance still requires environment-specific verification, as the text now says.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
The guide said the channel's proxyUrl reaches every bot API call through proxiedFetch. It does not. No bridge reads proxyUrl, and proxiedFetch asks resolveActiveProxy() for the app's network proxy, which nothing in the product ever sets — so on main every bot request goes direct. The earlier claim came from reading proxiedFetch without tracing who populates the value it reads. The live verifications that looked like proxy coverage all ran with a TUN-mode proxy active, which intercepts below the application. They do not demonstrate Maka-level proxy support, and the guide now says so. Replaces the five affected passages with one Network routing section: what does not route (proxyUrl, the unwired app proxy), what would stay outside proxiedFetch even once wired (the gateway sockets, and the Slack, Feishu/Lark and WeCom SDKs), and what works today (a system-level route). Adds it to the known limitations and points at apache#5159, which wires the app proxy into the REST paths only. Also records that iLink replies are sent with an empty context_token and inbound context is never kept, credited to apache#5115, where it was first identified. Left marked untested, since the iLink route could not be exercised. Refs apache#3894 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
This pull request has had no new commits for 30 days and has been marked stale. It will be closed in 7 days unless a new commit is pushed. Comments do not reset this timer: only a new commit does. If the pull request is intentionally long-lived, a maintainer can apply the |
The guide said the channel's proxyUrl reaches every bot API call through proxiedFetch. It does not. No bridge reads proxyUrl, and proxiedFetch asks resolveActiveProxy() for the app's network proxy, which nothing in the product ever sets — so on main every bot request goes direct. The earlier claim came from reading proxiedFetch without tracing who populates the value it reads. The live verifications that looked like proxy coverage all ran with a TUN-mode proxy active, which intercepts below the application. They do not demonstrate Maka-level proxy support, and the guide now says so. Replaces the five affected passages with one Network routing section: what does not route (proxyUrl, the unwired app proxy), what would stay outside proxiedFetch even once wired (the gateway sockets, and the Slack, Feishu/Lark and WeCom SDKs), and what works today (a system-level route). Adds it to the known limitations and points at apache#5159, which wires the app proxy into the REST paths only. Also records that iLink replies are sent with an empty context_token and inbound context is never kept, credited to apache#5115, where it was first identified. Left marked untested, since the iLink route could not be exercised. Refs apache#3894 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Re-checked against main at 85a1031 after apache#6074 and apache#6156 (code reading, not a live re-run): - User allowlist: enforced for all eight bridges in BaseBotAdapter.emitIncomingMessage; the remaining gap is that the settings UI only exposes the field for Telegram and Feishu (QR onboarding fills it for WeChat, and for Feishu when the scan returns a user ID). Matrix, known limitation 2, security and Feishu setup updated. - Typing: Feishu (Typing reaction) and WeChat iLink now send and cancel typing; new cancelTypingIndicator row. - Inbound attachment kind: Feishu now classifies attachments. - Message limits: Feishu personal-assistant sends split at 12,000 bytes of JSON-encoded text. - New section on task / workhub / assistant message handling, linking the desktop README transport sections. - WeChat iLink: DM-only; context_token now stored, persisted and sent with replies (fixed by apache#6156, first found in apache#5115). Dropped the unsourced 8.0.70 and wxp_act_ claims. - Added a last-checked note at the top. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
This pull request has been closed because it received no new commits during the 7-day grace period. This is not a judgement on the merit of the change; it only keeps the review queue aligned with work that is actively in flight. The branch and review history are preserved. Push a new commit and reopen the pull request whenever the work is ready to continue. |
Summary
Refs #3894.
Adds synchronized English and Chinese documentation for the eight current bot platforms, including a source-derived capability matrix, provider setup guidance, security boundaries, limitations, and a repeatable live-validation checklist. This is a documentation-only change; it does not change runtime behavior.
Verification
git diff --check: passed@Makareply, content preservation, and post-restart group reply passed@Makaround trip and exact reply content passed; a system-level TUN route was required for the Gateway WebSocketcontext_tokenand sends an empty token for outbound replies, so the documentation records this implementation risk instead of claiming live support.No credentials, user IDs, or raw provider payloads are included. Restart recovery, duplicate suppression, group behavior where not tested, and scheduled delivery remain untested in the live smoke entries.
AI use
Tool(s) and scope:
Codex was used for source review, documentation drafting, platform smoke-test recording, and verification.
Checklist
Does this PR entail a change in behavior?