Skip to content

Forward internalCorrelationIds through session create/resume#1820

Draft
belaltaher8 wants to merge 1 commit into
github:mainfrom
belaltaher8:belaltaher8/internal-correlation-ids
Draft

Forward internalCorrelationIds through session create/resume#1820
belaltaher8 wants to merge 1 commit into
github:mainfrom
belaltaher8:belaltaher8/internal-correlation-ids

Conversation

@belaltaher8

@belaltaher8 belaltaher8 commented Jun 28, 2026

Copy link
Copy Markdown

What

Forward an internalCorrelationIds map through the SDK's session.create and session.resume payloads

Why

How

Verification

  • npm run typecheck
  • npm run build ✅ — confirmed the field is absent from every emitted dist/**/*.d.ts (stripped) but present in the compiled dist/**/client.js bag.
  • npm run lint ✅ (only pre-existing warnings in untouched test files)
  • New tests pass: forwards / omits internalCorrelationIds on create + resume.

@belaltaher8 belaltaher8 requested a review from a team as a code owner June 28, 2026 03:46
Copilot AI review requested due to automatic review settings June 28, 2026 03:46
@belaltaher8 belaltaher8 marked this pull request as draft June 28, 2026 03:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 ensures first-party hosts can pass through an internalCorrelationIds string map during session lifecycle calls so the Copilot runtime can stamp those IDs onto its telemetry events for cross-system correlation, without introducing a new public typed API surface in the published Node SDK.

Changes:

  • Added @internal internalCorrelationIds?: Record<string, string> to SessionConfigBase (stripped from published d.ts via stripInternal).
  • Forwarded config.internalCorrelationIds in the session.create and session.resume JSON-RPC parameter bags.
  • Added unit tests that mirror the existing expAssignments forwarding/omission tests for both create and resume.
Show a summary per file
File Description
nodejs/src/types.ts Adds the @internal internalCorrelationIds config field intended for first-party correlation passthrough.
nodejs/src/client.ts Threads internalCorrelationIds through the explicitly enumerated session.create / session.resume request payloads.
nodejs/test/client.test.ts Adds coverage verifying internalCorrelationIds is forwarded (or undefined when unset) for create and resume.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Low

Add an internal `internalCorrelationIds` field to `SessionConfigBase` and
forward it in the `session.create` and `session.resume` payloads,
mirroring the existing `expAssignments` passthrough. The field is tagged
`@internal` so it is stripped from the published type declarations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@belaltaher8 belaltaher8 force-pushed the belaltaher8/internal-correlation-ids branch from 8319c74 to 0acaeae Compare July 1, 2026 01:55
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