Skip to content

feat(client): default User-Agent header for SDK attribution (DAK-7617) - #214

Merged
ferhimedamine merged 1 commit into
mainfrom
feat/dak-7617-user-agent
Jul 29, 2026
Merged

feat(client): default User-Agent header for SDK attribution (DAK-7617)#214
ferhimedamine merged 1 commit into
mainfrom
feat/dak-7617-user-agent

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Sets User-Agent: dakera-js/0.11.104 on the client's default request headers so the Dakera engine's server-side telemetry (DAK-7617) can attribute JS/TS SDK usage.

Change

  • Added SDK_VERSION constant in src/client.ts (kept in sync with package.json).
  • Added 'User-Agent': \dakera-js/${SDK_VERSION}`to the default headers in the constructor, placed **before**...options.headers` so a caller can still override it.

Caveat

User-Agent is a forbidden fetch header in browsers and will be silently dropped there — it is honored in Node. This is acceptable for telemetry attribution (server-side clients are the primary signal), and is noted with an inline code comment.

🤖 Generated with Claude Code

Set `User-Agent: dakera-js/<version>` on the default request headers so the
Dakera engine's server-side telemetry (DAK-7617) can attribute JS/TS SDK
usage. Placed before `...options.headers` so callers can still override.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ferhimedamine
ferhimedamine merged commit 87e3885 into main Jul 29, 2026
4 checks passed
@ferhimedamine
ferhimedamine deleted the feat/dak-7617-user-agent branch July 29, 2026 09:43
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