You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 22031af
Browse filesBrowse the repository at this point in the historyBrowse files
agent.run_command and the git.* pull-request tools resolved a
model-supplied repositoryId by id and team only, so an agent could
clone, read, merge or comment on any repository of its team at any ref
it named, including repositories its run was never bound to and
unmerged branches, using that repository's connection credential.
Network Off and a read-only write scope did not stop it.
The run's bound repositories (its admitted task's workspace, with each
repository's access and ref) are now stamped server-side onto the
posture every tool call carries. NodeAgentTool holds every node that
declares a repository input (NodeManifest.RepositoryInput) to that set:
any other id gets the same "not found" a missing or foreign one gets.
Read-only context is the run's to read, not to write: an agent opens,
merges, reviews and comments on none of its pull requests, and a
command checks it out only at its bound or default branch. The pin
covers what a command checks out; the repository's pull requests stay
readable through the git read tools. A patch-only repository refuses
agent pull-request writes through the guard chain an agent's pushed
branch meets.
Each of these refusals is answered before a call is parked for
approval (IAgentTool.RefusalAsync), so a Standard or Trusted run never
asks a human to approve a call that could only be refused; the tool
checks again when the call runs, since a repository can change while a
card waits. RunCommandService keeps its own ref pin for a caller that
reaches it directly.
A supervisor-spawned child's related repositories carry the operator's
bound ref, not one the supervisor model authored: that ref is what the
child clones and what its read-only binding pins commands to.
A run whose write scope is read-only (an agent.run with readOnly, or a
Confined tier) is served a NonDestructive catalog: every tool that does
not write, so it can still ask a human through decision.request. The
fabric opt-out's ReadOnly slice is unchanged. Workflow-node calls carry
no calling run and are unchanged.
$"Repository {repositoryId} is bound to this run as read-only context at '{bound.Ref??defaultBranch}', so a command may check out only that branch or the default branch '{defaultBranch}', not '{requestedRef}'.";
35
+
36
+
/// <summary>The run's binding of <paramref name="repositoryId"/>, or null when the run is not bound to it.</summary>
/// <summary>Whether an agent may write to a bound repository through its provider: only a writable one. An access this code does not know is held like read-only context.</summary>
0 commit comments