Skip to content

Support CodeMode ToolDisclosure Variants#7926

Merged
jh-block merged 11 commits into
aaif-goose:mainfrom
eliasposen:main
Mar 19, 2026
Merged

Support CodeMode ToolDisclosure Variants#7926
jh-block merged 11 commits into
aaif-goose:mainfrom
eliasposen:main

Conversation

@eliasposen
Copy link
Copy Markdown
Contributor

Summary

pctx@0.3.0 introduced ToolDisclosure variants that allow for different sets of tools to be exposed when the code execution extension is active. You can read a summary of the variants here.

ToolDisclosure can be configured via the CODE_MODE_TOOL_DISCLOSURE env var, defaulting to ToolDisclosure::Catalog (same as before this PR).

Other updates:

  • Use of tool/workflow descriptions provided by pctx_code_mode crate
  • Update docs with correct link to pctx repo

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Related Issues

Relates to #ISSUE_ID
Discussion: LINK (if any)

Screenshots/Demos (for UX changes)

Before:

After:

Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
let full_name = tool.name.to_string();
let (namespace, name) = if let Some((server, tool_name)) = full_name.split_once("__") {
(server.to_string(), tool_name.to_string())
let (name, namespace) = if let Some((prefix, tool_name)) = tool.name.split_once("__") {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interested if someone can confirm this is the correct prioritization to discern the extension name/tool name?

Signed-off-by: Elias Posen <elias@posen.ch>
}
}

pub fn get_tool_disclosure() -> ToolDisclosure {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the config system, e.g.:

let config = crate::config::Config::global();
let style_env: String = config
    .get_param("CODE_MODE_TOOL_DISCLOSURE")
    .unwrap_or_else(|_| "catalog".to_string());

Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
@eliasposen
Copy link
Copy Markdown
Contributor Author

@angiejones I believe this PR needs sign-off from one of your team as there is a small .md change (just fixing the link to pctx). Let me know if your happy with this change as part of this PR or if there is another process I should follow

@jh-block jh-block added this pull request to the merge queue Mar 19, 2026
Merged via the queue into aaif-goose:main with commit 28a52e3 Mar 19, 2026
28 of 29 checks passed
cloorc pushed a commit to LeafAI/Leaf-ARC that referenced this pull request Mar 20, 2026
Signed-off-by: Elias Posen <elias@posen.ch>
cloorc pushed a commit to LeafAI/Leaf-ARC that referenced this pull request Mar 20, 2026
Signed-off-by: Elias Posen <elias@posen.ch>
elijahsgh pushed a commit to elijahsgh/goose that referenced this pull request Mar 21, 2026
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: esnyder <elijah.snyder1@gmail.com>
elijahsgh pushed a commit to elijahsgh/goose that referenced this pull request Mar 21, 2026
Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: esnyder <elijah.snyder1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants