Skip to content

Add create-time visible_to_clients to CreateTool (bc3 #12386)#419

Open
jeremy wants to merge 1 commit into
provenance-sync-d7bc88dafrom
tool-visible-to-clients
Open

Add create-time visible_to_clients to CreateTool (bc3 #12386)#419
jeremy wants to merge 1 commit into
provenance-sync-d7bc88dafrom
tool-visible-to-clients

Conversation

@jeremy

@jeremy jeremy commented Jul 25, 2026

Copy link
Copy Markdown
Member

Closes #418. Part of the post-#401 BC3 follow-up absorption program (PR-1).

Stacked on #416 (PR-0, provenance sync). Base is provenance-sync-d7bc88da; review the PR-1 commit only. Will retarget to main once #416 merges.

Summary

The dock-tool create endpoint gained an optional top-level visible_to_clients boolean in bc3 #12386 (bee714c74, merged 2026-07-23). Only tool types that manage their own client visibility — Chat::Transcript and Kanban::Board, which otherwise start hidden — honor it; every other tool type ignores it and inherits the project default.

Absorbs it as a tri-state optional, mirroring the six content-create inputs from #401.

Changes

  • Smithy: visible_to_clients: Boolean on CreateToolInput (plain Boolean → Go *bool), documenting the two-tool-type honoring rule on the member.
  • Go: CreateToolOptions.VisibleToClients *bool with a pass-through in ToolsService.Createnil omits the field, explicit false reaches the wire.
  • Tests: Go tri-state transport test plus one body-encoding test in each non-Go SDK (TS/Ruby/Python/Kotlin/Swift) asserting explicit false is sent, not dropped.
  • Registry: flip dock-tool-visible-to-clients.mdabsorbed-in-sdk with the smithy_ref; update the api-gaps README row.

Verification

make generate && make check — clean (71 conformance passed, 0 failed; api-gaps + deprecation parity clean). Canary live-my-surface.json validates statically (live canary dormant pending a safe token mechanism).


Summary by cubic

Adds create-time visible_to_clients to CreateTool so callers can set client visibility when creating dock tools; only Chat::Transcript and Kanban::Board honor it. Implements tri‑state encoding (unset omitted; true/false sent) across Go/TS/Ruby/Python/Kotlin/Swift.

  • New Features
    • Smithy/OpenAPI: optional visible_to_clients on CreateToolInput; documents the two-tool honoring rule.
    • Go: CreateToolOptions.VisibleToClients *bool with pass-through in ToolsService.Create.
    • TS/Ruby/Python/Kotlin/Swift: add visible_to_clients to create request bodies; undefined/null omitted.
    • Tests/docs: tri-state tests in all SDKs; api-gaps dock-tool-visible-to-clients flipped to absorbed-in-sdk.

Written for commit d43ed91. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings July 25, 2026 04:30
@github-actions github-actions Bot added typescript Pull requests that update TypeScript code ruby Pull requests that update the Ruby SDK go kotlin swift spec Changes to the Smithy spec or OpenAPI labels Jul 25, 2026
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Spec Change Impact

  • Added: visible_to_clients field to CreateTool operation.
  • Modified: CreateTool operation to include the new field.
  • No operations, types, or resources were removed.

Impact Assessment:

  • This is not a breaking change since no operations or fields were removed.

SDKs Requiring Regeneration:

  • Go
  • TypeScript
  • Ruby
  • Kotlin
  • Swift

All SDKs need regeneration due to the spec update.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR absorbs the BC3 change adding an optional, tri-state visible_to_clients flag to the dock tool create endpoint (CreateTool), ensuring explicit false is sent (not dropped) across all SDKs while documenting that only Chat::Transcript and Kanban::Board honor it.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Smithy/OpenAPI: add optional visible_to_clients: Boolean to CreateToolInput and regenerate downstream artifacts.
  • SDKs: plumb visible_to_clients through request bodies/options with tri-state semantics (omit vs true vs false).
  • Tests/registry: add tri-state request-body assertions in Go/TS/Ruby/Python/Kotlin/Swift; flip the api-gap entry to absorbed-in-sdk.

Reviewed changes

Copilot reviewed 11 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
typescript/tests/services/tools.test.ts Adds tri-state request body coverage for visible_to_clients on tool create.
typescript/src/generated/services/tools.ts Adds visibleToClients to request type and maps it to visible_to_clients in the POST body.
typescript/src/generated/schema.d.ts Updates generated schema for CreateToolRequestContent.visible_to_clients.
typescript/src/generated/openapi-stripped.json Updates stripped OpenAPI with visible_to_clients and Go optional-pointer hint.
typescript/src/generated/metadata.ts Regenerated metadata timestamp.
swift/Tests/BasecampTests/GeneratedServiceTests.swift Adds tri-state request encoding tests for visible_to_clients.
swift/Sources/Basecamp/Generated/Models/CreateToolRequest.swift Adds optional visibleToClients to the generated request model.
spec/basecamp.smithy Adds visible_to_clients: Boolean to CreateToolInput with documentation of honoring behavior.
spec/api-gaps/README.md Marks dock-tool-visible-to-clients as absorbed-in-sdk.
spec/api-gaps/dock-tool-visible-to-clients.md Flips gap entry to absorbed and adds Smithy reference(s).
ruby/test/basecamp/services/tools_service_test.rb Adds tri-state body assertions ensuring explicit false is sent.
ruby/lib/basecamp/generated/types.rb Regenerated timestamp.
ruby/lib/basecamp/generated/services/tools_service.rb Adds visible_to_clients parameter and includes it in compact_params body.
ruby/lib/basecamp/generated/metadata.json Regenerated timestamp.
python/tests/services/test_tools.py Adds tri-state request-body test for visible_to_clients.
python/src/basecamp/generated/types.py Adds visible_to_clients to CreateToolRequestContent TypedDict.
python/src/basecamp/generated/services/tools.py Adds visible_to_clients param and includes it in _compact JSON body (sync + async).
openapi.json Updates OpenAPI schema for visible_to_clients on tool create.
kotlin/sdk/src/commonTest/kotlin/com/basecamp/sdk/ToolsServiceTest.kt Adds tri-state request-body capture/assertions for visible_to_clients.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/Types.kt Adds nullable visibleToClients to CreateToolBody.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/tools.kt Encodes visible_to_clients only when non-null.
go/pkg/generated/client.gen.go Adds VisibleToClients *bool to CreateToolRequestContent with omitempty.
go/pkg/basecamp/tools.go Adds CreateToolOptions.VisibleToClients *bool and passes through to generated request body.
go/pkg/basecamp/tools_test.go Adds Go tri-state transport test asserting omit/true/false wire behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +8
smithy_refs:
- "CreateToolInput.visible_to_clients (spec/basecamp.smithy:7049)"

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 24 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="spec/api-gaps/dock-tool-visible-to-clients.md">

<violation number="1" location="spec/api-gaps/dock-tool-visible-to-clients.md:7">
P3: Smithy ref line number points to `structure CreateToolInput {` (line 7049) instead of the actual `visible_to_clients: Boolean` member definition at line 7066. This breaks the convention demonstrated by the six-content-creates entry where member refs like `CreateTodolistInput.visible_to_clients (spec/basecamp.smithy:1074)` point to the member line itself.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread python/tests/services/test_tools.py
@@ -1,9 +1,11 @@
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Smithy ref line number points to structure CreateToolInput { (line 7049) instead of the actual visible_to_clients: Boolean member definition at line 7066. This breaks the convention demonstrated by the six-content-creates entry where member refs like CreateTodolistInput.visible_to_clients (spec/basecamp.smithy:1074) point to the member line itself.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At spec/api-gaps/dock-tool-visible-to-clients.md, line 7:

<comment>Smithy ref line number points to `structure CreateToolInput {` (line 7049) instead of the actual `visible_to_clients: Boolean` member definition at line 7066. This breaks the convention demonstrated by the six-content-creates entry where member refs like `CreateTodolistInput.visible_to_clients (spec/basecamp.smithy:1074)` point to the member line itself.</comment>

<file context>
@@ -1,9 +1,11 @@
 detected: 2026-07-23
 sdk_demand: low
 bc3_pr: 12386
+smithy_refs:
+  - "CreateToolInput.visible_to_clients (spec/basecamp.smithy:7049)"
 bc3_refs:
</file context>

The dock-tool create endpoint gained an optional top-level
visible_to_clients boolean in bc3 #12386 (bee714c74). Only tool types that
manage their own client visibility — Chat::Transcript and Kanban::Board,
which otherwise start hidden — honor it; every other tool type ignores it
and inherits the project default.

Absorb it as a tri-state optional, mirroring the six content-create inputs
from #401:

- Smithy: add visible_to_clients: Boolean to CreateToolInput (plain Boolean
  → Go *bool), documenting the two-tool-type honoring rule on the member.
- Go: CreateToolOptions.VisibleToClients *bool with a pass-through in
  ToolsService.Create; nil omits the field, explicit false reaches the wire.
- Tests: Go tri-state transport test plus one body-encoding test in each of
  TS/Ruby/Python/Kotlin/Swift asserting explicit false is sent, not dropped.

Flip dock-tool-visible-to-clients.md to absorbed-in-sdk with the smithy_ref
and update the api-gaps README row.
Copilot AI review requested due to automatic review settings July 25, 2026 06:57
@jeremy
jeremy force-pushed the tool-visible-to-clients branch from da1cf30 to d43ed91 Compare July 25, 2026 06:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 24 changed files in this pull request and generated no new comments.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d43ed91f37

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

---
gap: dock-tool-visible-to-clients
status: addressed-in-bc3-pr-12386
status: absorbed-in-sdk

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconcile the gap documentation with the absorbed status

After switching this entry to absorbed-in-sdk, the registry remains contradictory: this file still describes the feature as missing and says “When modeled” in lines 56–67, while visible-to-clients-on-creates.md:62 still states that CreateToolInput does not carry the field. This can mislead future upstream-drift triage about whether the contract was absorbed, so update the remaining forward-looking text and cross-reference as part of the status transition.

AGENTS.md reference: AGENTS.md:L274-L274

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go kotlin ruby Pull requests that update the Ruby SDK spec Changes to the Smithy spec or OpenAPI swift typescript Pull requests that update TypeScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants