Repository navigation
Give the owner's keys to every turn of the owner's own Bots - #656
Merged
Merged
Conversation
Collaborator
Author
Review — self-review (review-pr), owner's reviewer agent as
|
…wLab#601) Owner decision 2026-10-22 08:32 (Asia/Shanghai): the owner's Bots should all see the owner's secrets. resolveEnv no longer reads the turn's origin (withheldReason/ownersTurn are gone): a group round, a relay, a scheduled turn, a shared Bot's turn, a turn with no recorded origin all get the keys the scope allows. A sub-agent's shell follows its parent chain to the Bot through connector-access's whoseAgent. A friend's Bot still gets nothing and a Chosen Bots scope still limits which Bots get a key; those are the only DSH_SECRETS_WITHHELD reasons left, plus unknown-bot for a chain that cannot be followed. canUseSecret (capabilities) follows the same rule. Fixes ThinkFlowLab#601
…Lab#601) Owner decision 2026-10-22 08:42 (Asia/Shanghai) on ThinkFlowLab#601: the connector tools follow the same rule as secrets. connector-access.js no longer reads the turn's origin or who a Bot is shared with: every turn of the owner's own Bots (group rounds of any origin, relays, schedules, shared Bots, turns with no origin, sub-agents via their parent) may use them. A friend's Bot and an unresolvable Agent still get none; the per-Bot off switch stays. The "also when others use it" switch is removed from host, client and i18n; a stored connectorsShared offer is dropped on the next switch or disconnect, and a scope from an older client is ignored. connectorTurnChanged, followSharing and the unused turnOrigin are gone. The Bot rules now say to use the GitHub connector tools first and $DSH_SECRET_GITHUB_TOKEN with gh/git only as the fallback (git push). Fixes ThinkFlowLab#601
Birfy
force-pushed
the
fix-601-secrets-every-turn
branch
from
October 22, 2026 00:51
85f7b07 to
fb70b22
Compare
Collaborator
Author
Self-review (head
|
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.
Fixes #601
Rebased onto
mainafter #654 merged (ee1739e). Two commits:480c22d(secrets) andfb70b22(connectors + GitHub guidance).Owner decisions (recorded on #601):
The boundary that stays: a friend's Bot or a remote home never gets the keys or the connector tools. A per-key Chosen Bots scope and a per-Bot connector switch are still respected.
What changed
Secrets (
core/src/host/secrets.js)withheldReasonandownersTurnare removed, and secrets no longer importturn-origin.js.resolveEnvhands out every key in the Bot's scope on any turn: group rounds of any origin, relays, scheduled turns, shared Bots' turns, and turns with no recorded origin.rt.whoseAgent, the same chain the connector guard uses.DSH_SECRETS_WITHHELDnow names only the real boundaries:remote-bot,not-in-scopeandunknown-bot.list_secretsandrequest_secretno longer say a key is "withheld this turn".canUseSecret(capabilities) follows the same rule.Connectors (
core/src/host/connector-access.js,turns.js, client)mcp__github__*,mcp__composio__*), including sub-agents, which resolve to their parent. A friend's Bot gets none, and a Bot whose connector the owner turned off gets none.connectorsShared, the sharing-follow machinery,connectorTurnChangedand its calls inturns.js. This removes the most dead code.setBotConnectorignores ascopesent by an older client.connectorsSharedflag is dropped.connector-bots.js) shows one switch per Bot, and the related i18n strings are removed or reworded.GitHub guidance (
core/src/host/prompt.js)$DSH_SECRET_GITHUB_TOKENwith gh/git only as the fallback (for examplegit push).Docs
AGENTS.md(hard rules 2 and 4)docs/subsystems/core-host.md,team.md,core-client.mdREADME.mdandREADME.zh.mdchangelog.d/601-secrets-every-turn.changed.mdTests
secrets.test.jsandcapabilities.test.jscover:otherunknown-botwhen the parent chain is lostremote-botconnector-access.test.jscovers:connectorsSharedandscopebeing droppedconnector-bots.test.js: the single-switch UI.Left open
turnOriginis still used by standing approvals and resumed turns. The optional cleanup was skipped.Verification (head
fb70b22e26565be67f2498caeb43b09d3b648767, rebased on mainee1739e)ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify→ pass: core 1201/1201, plugin suites 317/89/104/132/37/16, arch-docs OK on 29 files, patches check ok, and 85 lint warnings (unchanged).dev/bench.sh … reset && node dev/smoke.mjswith deepseek-harness 0.2.0-rc.2 → all 42 steps passed on the rebased head.secrets/capabilitiestests on Declare DSH_SECRETS_WITHHELD so a withheld turn keeps its shell #654's head → 12 fail, including all 7#601cases.connector-access/connector-botstests against480c22d'ssrc→ 8 fail / 13 pass.packagejob, the desktop app, and a real-model or real DSH sub-agent run.