Repository navigation
feat(runtime-host): add trusted capability provider service - #2625
Merged
Merged
Conversation
M4n5ter
marked this pull request as ready for review
August 10, 2026 04:09
This was referenced Aug 10, 2026
3 of 4 tasks
Joob1n
added a commit
to Joob1n/maka-agent
that referenced
this pull request
Aug 14, 2026
Addresses the second review on apache#2965. **The retired connection's detail page still invited a sign-in.** `oauthLoginServiceFor` had no case for it, so the page fell through to the generic notice: "若请求提示需要重新登录,请到账号连接重新授权" — an instruction whose only destination is the retirement notice. The credential outlives retirement, so `hasSecret` is true and this rendered for exactly the users this PR is for. `deriveProviderAuthContract` reached the same place by another route, reading the provider as `oauth_preview` — a login that was taken away is not a preview of one that is coming. Both now read a `retired` marker on the registry entry rather than inferring retirement from an unavailable adapter, which an unwired preview provider is indistinguishable from. `ProviderAuthState` gains `retired` and `ProviderAuthSetupMode` gains `oauth_retired`; both are exhaustively switched, so the compiler found every surface that had to answer for the new state. **Tests.** The prior commits deleted 17 cases and added none, leaving every line that enforces the retirement separately revertible with the suite green. Added: a registry contract pinning `runtimeAdapter.kind === 'unavailable'`, `isWiredOAuthProvider === false`, and the auth contract for every retired provider; a storage case asserting a retired connection cannot begin an interactive login; the coordinator's account-usage constant; and the "commit excludes overlapping backend activations" invariant, re-landed on a Codex fixture — what it asserts is provider-agnostic and it left with its Claude fixture. Each was mutation-checked against the revert it is meant to catch. **Epoch.** Narrowing `OAUTH_LOGIN_PROVIDERS` is a decode change in the new-Client-against-old-Host direction, which this repo bumps for (apache#2633, apache#2625). Bumped to 20. Also: dropped the `as OAuthLoginProvider` cast so the compiler keeps storage's union and the protocol's in step; the catalog read now runs alongside the snapshot fetches instead of ahead of them, and a failed read keeps the previous answer rather than retracting the notice; `README.zh-CN.md` matches `README.md`; `SECURITY.md` §4 no longer claims contract tests that do not exist; and the remaining dead symbols and stale comments are gone. Claude-Session: https://claude.ai/code/session_014ajaRxC4jydavY9nYUFj5J
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.
English
Summary
This adds the trusted capability-provider vertical slice for standalone Runtime Host deployments:
maka runtime-host capability-provider serveto publish MCP-backed tools over an authenticated Runtime Host connection, with bounded reconnect and publication recovery;Refs #2522
Verification
npm run format:checknpm run lintnpm run typechecknpm run buildnpm run test:distinpackages/runtime-hostnpm run test:distinpackages/runtimenpm run test:distinpackages/storagenpm run test:distinpackages/clinpm run test:distinpackages/mcpChecklist
Does this PR entail a change in behavior?
简体中文
概要
本 PR 为独立部署的 Runtime Host 增加可信 capability provider 的纵向能力闭环:
maka runtime-host capability-provider serve,通过经过认证的 Runtime Host 连接发布并提供 MCP 工具,同时支持有界重连与 publication 恢复;Refs #2522
验证
npm run format:checknpm run lintnpm run typechecknpm run buildpackages/runtime-host中运行npm run test:distpackages/runtime中运行npm run test:distpackages/storage中运行npm run test:distpackages/cli中运行npm run test:distpackages/mcp中运行npm run test:dist检查清单
本 PR 是否改变行为?