Skip to content

added skip permission from main sdk to port#11

Closed
tilakpatell wants to merge 1 commit into
0xeb:mainfrom
tilakpatell:feat/skip-permissions
Closed

added skip permission from main sdk to port#11
tilakpatell wants to merge 1 commit into
0xeb:mainfrom
tilakpatell:feat/skip-permissions

Conversation

@tilakpatell

Copy link
Copy Markdown
Contributor

The official Python and TypeScript SDKs support skip_permission and overrides_built_in_tool on tool definitions (Python docs), but the C++ port doesn't include them yet. This PR adds parity for both.

Changes

  • include/copilot/types.hpp — Added skip_permission and overrides_built_in_tool bool fields to struct Tool (default false), plus ref-qualified fluent setters for chaining
  • src/client.cppbuild_session_create_request and build_session_resume_request now include skipPermission and overridesBuiltInTool in the JSON-RPC tool payload when true

Usage

auto lookup = copilot::make_tool("safe_lookup", "Read-only lookup",
    [](std::string query) { return do_lookup(query); },
    {"query"}
).with_skip_permission();

auto editor = copilot::ToolBuilder("edit_file", "Custom editor")
    .param<std::string>("path", "File path")
    .handler([](std::string path) { /* ... */ })
    .with_overrides_built_in_tool();

Fully backward compatible — both fields default to false, no existing code affected.

@0xeb

0xeb commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution @tilakpatell! Great catch on the missing parity for skip_permission and overrides_built_in_tool.

The core functionality (fields + wire serialization) was independently added as part of a broader v0.1.49 parity sync, but your PR identified the missing fluent setters (with_skip_permission() / with_overrides_built_in_tool()), which are a nice ergonomic improvement.

I've incorporated the fluent setter pattern from your PR in commit 7dc023d with a Co-authored-by credit. Thanks for contributing!

@0xeb

0xeb commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Closing as the changes have been incorporated (see comment above). Thanks again!

@0xeb 0xeb closed this Jun 9, 2026
0xeb added a commit that referenced this pull request Jun 9, 2026
…_in_tool


Add ref-qualified with_skip_permission() and with_overrides_built_in_tool()
fluent setters enabling chaining on make_tool() and ToolBuilder results.

Closes #11

Co-authored-by: Tilak Patel <tilakny@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.

2 participants