Repository navigation
feat: expose guarded native Working Plan revisions #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,9 @@ def _permitted_tool_names(self, agent_config: dict[str, Any] | None = None) -> s | |
| active = getattr(self, "_execution_capability_token", None) | ||
| capabilities = configured & active.capabilities if active else configured | ||
| capabilities = mode_capabilities(capabilities, self._active_interaction_mode.get()) | ||
| permitted = {name for name in self.AVAILABLE_TOOLS if name != "update_plan" and self.tool_registry.get_spec(name).visibility == 'public' and tool_capability(name,self.AVAILABLE_TOOLS) in capabilities} | ||
| permitted = {name for name in self.AVAILABLE_TOOLS if self.tool_registry.get_spec(name).visibility == 'public' and tool_capability(name,self.AVAILABLE_TOOLS) in capabilities} | ||
| if self._active_interaction_mode.get() != "agent": | ||
| permitted.discard("update_plan") | ||
|
Comment on lines
+57
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For a direct native Agent turn that uses the newly advertised Useful? React with 👍 / 👎. |
||
| delegated = self.execution_context.delegation_tools | ||
| if self.execution_context.child_run_id and delegated is not None: | ||
| permitted &= set(delegated) | ||
|
|
@@ -88,7 +90,7 @@ def _discover_tools(self, args: str) -> str: | |
|
|
||
| def _agent_prompt_tools_list(self, agent_config: dict[str, Any]) -> str: | ||
| """Build the inventory within config, active token and interaction bounds.""" | ||
| permitted = self._permitted_tool_names(agent_config) - {"update_plan"} | ||
| permitted = self._permitted_tool_names(agent_config) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For text-only providers in Agent mode, AGENTS.md reference: AGENTS.md:L35-L35 Useful? React with 👍 / 👎. |
||
| detailed = permitted | ||
| if self._prompt_profile() == "compact": | ||
| detailed = permitted & ({"list_dir", "find_files", "search_files", "read_file", "write_file", "edit_file", "apply_patch", "run_cmd", "discover_tools"} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a native model first calls the newly exposed
update_plantool with the supportedcomplexity/tasksform,_update_plan()returns the plan ID and task IDs but omitsplan.revision. Every subsequent structured edit requiresexpected_revision, so the model cannot reliably issue a revision—especially when this form updated an already-active plan whose revision is not predictably 1. Include the resulting revision in the creation/update response before advertising this tool to native providers.Useful? React with 👍 / 👎.