Skip to content

feat: managed route mode and session token auth in HTTPTransport#11396

Merged
siddseethepalli merged 1 commit into
mainfrom
feat/managed-signin-pr-11
Mar 2, 2026
Merged

feat: managed route mode and session token auth in HTTPTransport#11396
siddseethepalli merged 1 commit into
mainfrom
feat/managed-signin-pr-11

Conversation

@siddseethepalli
Copy link
Copy Markdown
Contributor

@siddseethepalli siddseethepalli commented Mar 2, 2026

Summary

  • Extends buildURL(for:) to support platformAssistantProxy route mode, mapping all endpoints to assistant-scoped platform proxy paths (e.g. /v1/assistants/{id}/messages/, /v1/assistants/{id}/healthz/)
  • Updates applyAuth to support sessionToken auth mode using X-Session-Token from SessionTokenManager instead of Authorization: Bearer
  • In managed mode, skips X-Actor-Token header since actor identity is derived from the platform session
  • Handles 401 differently in managed mode: emits session-expired error instead of triggering the bearer token refresh flow (which is designed for local daemon auth)
  • Adds isManagedMode convenience property

Behavior Change

When transport is configured with platformAssistantProxy route mode and sessionToken auth mode:

  1. All endpoint URLs use assistant-scoped platform paths with trailing slashes
  2. Auth uses X-Session-Token header instead of Authorization: Bearer
  3. 401 responses emit a session-expired error instead of attempting bearer token refresh

Default behavior (runtimeFlat + bearerToken) is completely unchanged.

Context

PR-11 of the managed sign-in plan (depends on PR-09 and PR-10, both merged).

Dependency

PR-09 (merged) -> PR-10 (merged) -> PR-11 -> PR-12

Test plan

  • swift build succeeds with no errors
  • Default mode paths unchanged (runtimeFlat produces identical URLs)
  • Managed mode produces correct assistant-scoped paths with trailing slashes
  • Session token auth applied correctly in managed mode
  • 401 in managed mode does not trigger bearer refresh flow

🤖 Generated with Claude Code


Open with Devin

…sport

Extends the endpoint builder to support platformAssistantProxy route mode,
which maps all endpoints to assistant-scoped platform proxy paths
(e.g. /v1/assistants/{id}/messages/). Trailing slashes follow the
Django URL convention.

Updates applyAuth to support sessionToken auth mode, which uses
X-Session-Token from SessionTokenManager instead of Bearer token.
In managed mode, X-Actor-Token is skipped since actor identity is
derived from the platform session.

Handles 401 differently in managed mode: instead of triggering the
bearer token refresh flow (which is designed for local daemon auth),
emits a session-expired error so the app can prompt re-authentication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@siddseethepalli siddseethepalli merged commit 785af01 into main Mar 2, 2026
@siddseethepalli siddseethepalli deleted the feat/managed-signin-pr-11 branch March 2, 2026 23:36
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread clients/shared/IPC/HTTPDaemonClient.swift
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: 5b87fa34bc

ℹ️ 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".

Comment thread clients/shared/IPC/HTTPDaemonClient.swift
@siddseethepalli
Copy link
Copy Markdown
Contributor Author

Addressed in #11485

@siddseethepalli
Copy link
Copy Markdown
Contributor Author

Addressed in #11484

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.

1 participant