Skip to content

feat(macos): targetClientId acceptance guard and x-vellum-client-id headers for host_transfer#29435

Merged
credence-the-bot[bot] merged 3 commits into
Credence/targeted-host-proxy-phase3from
run-plan/host-transfer-xc/pr-3
May 3, 2026
Merged

feat(macos): targetClientId acceptance guard and x-vellum-client-id headers for host_transfer#29435
credence-the-bot[bot] merged 3 commits into
Credence/targeted-host-proxy-phase3from
run-plan/host-transfer-xc/pr-3

Conversation

@credence-the-bot
Copy link
Copy Markdown
Contributor

@credence-the-bot credence-the-bot Bot commented May 3, 2026

Summary

  • Add targetClientId?: String? to HostTransferRequest in MessageTypes.swift
  • Add isTargeted || isUntargetedLocal guard in AppDelegate+ConnectionSetup.swift for .hostTransferRequest
  • Add targeted pass-through guard in EventStreamClient.swift shouldIgnoreHostToolRequest
  • Add X-Vellum-Client-Id header to postTransferResult, pushTransferContent, and pullTransferContent in HostProxyClient.swift (add extraHeaders param to GatewayHTTPClient.get)

Part of plan: targeted-host-proxy-phase3.md (PR 3 of 3)


Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@credence-the-bot
Copy link
Copy Markdown
Contributor Author

@codexbot review

@credence-the-bot
Copy link
Copy Markdown
Contributor Author

@devin-ai-integration[bot] please review

Copy link
Copy Markdown

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

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: b849a135d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +450 to +454
let isLocalConversation = self.mainWindow?.conversationManager
.conversations.contains(where: { $0.conversationId == msg.conversationId }) ?? false
let isTargeted = msg.targetClientId == localClientId
let isUntargetedLocal = msg.targetClientId == nil && isLocalConversation
guard isTargeted || isUntargetedLocal else { break }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not gate untargeted transfers on UI conversation cache

The new hostTransferRequest guard drops untargeted requests unless mainWindow?.conversationManager.conversations already contains the conversation ID, but that UI cache can lag behind transport ownership (or be unavailable when mainWindow is nil). EventStreamClient already admits untargeted host-tool messages only for locallyOwnedConversationIds, so this extra UI-based check can reject legitimate local transfer requests and cause transfers to stall/fail in early/new/background conversation flows.

Useful? React with 👍 / 👎.

@credence-the-bot
Copy link
Copy Markdown
Contributor Author

@codexbot review

@credence-the-bot
Copy link
Copy Markdown
Contributor Author

@devin-ai-integration[bot] please review

…se3' into run-plan/host-transfer-xc/pr-3-merge
@credence-the-bot credence-the-bot Bot merged commit 947a5fe into Credence/targeted-host-proxy-phase3 May 3, 2026
7 checks passed
@credence-the-bot credence-the-bot Bot deleted the run-plan/host-transfer-xc/pr-3 branch May 3, 2026 18:43
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

noanflaherty pushed a commit that referenced this pull request May 3, 2026
…sfer (#29440)

* feat(host-proxy): add targetClientId support to HostTransferProxy and message envelopes (#29431)

* feat(host-proxy): add targetClientId support to HostTransferProxy and message envelopes

* fix(tests): add listClientsByCapability and getClientById to host-transfer-proxy mock

---------

Co-authored-by: credence-the-bot <credence@vellum.ai>

* feat(routes): enforce x-vellum-client-id ownership on host-transfer routes; add target_client_id to tool (#29434)

* feat(routes): enforce x-vellum-client-id ownership on host-transfer routes; add target_client_id to tool

* fix(tests): await .rejects assertions; guard executeLocal fallthrough on targetClientId

---------

Co-authored-by: credence-the-bot <credence@vellum.ai>

* feat(macos): targetClientId acceptance guard and x-vellum-client-id headers for host_transfer (#29435)

* feat(macos): targetClientId acceptance guard and x-vellum-client-id headers for host_transfer

* fix(swift): use setValue (not addValue) for extraHeaders in GatewayHTTPClient.get

---------

Co-authored-by: credence-the-bot <credence@vellum.ai>

---------

Co-authored-by: credence-the-bot[bot] <277301654+credence-the-bot[bot]@users.noreply.github.com>
Co-authored-by: credence-the-bot <credence@vellum.ai>
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.

0 participants