Append Client → Agent → Model tokens to the CLI User-Agent - #3645
Open
sverdlov93 wants to merge 11 commits into
Open
Append Client → Agent → Model tokens to the CLI User-Agent#3645sverdlov93 wants to merge 11 commits into
sverdlov93 wants to merge 11 commits into
Conversation
Build on ExecutionContext.AIClient/AIModel so agent-driven jf invocations advertise client app and model alongside ai-agent on the wire.
Match the tightened detector table (Cursor host role, Kilo/Roo/Windsurf signals) so survey and User-Agent tests stay deterministic.
Pin require to jfrog-cli-core PR #1602 tip so UA enrichment compiles; keep replace commented (No-Replace gate).
Use matching private format consts for ai-agent/ai-client/ai-model, refresh wire-safety comments, and clear client/model env in main_test.
Bump jfrog-cli-core to the tip that drops IDE/config false positives and update clear-lists plus CLAUDE_CODE_CHILD_SESSION fixtures.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Overview
Enriches the outbound HTTP User-Agent with Client → Agent → Model product tokens when an AI agent is detected, so Artifactory/platform request logs can attribute agent-driven
jfinvocations. Human sessions stay byte-identical (no suffix).Depends on jfrog-cli-core#1602 (detection +
ExecutionContext.Client/Model).Details
main.gocallsclientutils.SetUserAgent(cliutils.GetCliUserAgentWithAgent()).agentUserAgentSuffixappendsai-agent/<name>, optionalai-client/<TERM_PROGRAM>, optionalai-model/<JFROG_CLI_AI_MODEL>whenIsAgent.DetectExecutionContext()(session markers + sanitization); CLI does not re-implement detection.go.modpinsjfrog-cli-core/v2to the Update the Go version used to build JFrog CLI to 1.17.12 #1602 tip so this PR compiles for joint review. Activereplaceis not used (fails No-Replace); a commented replace documents the pin. Re-bump to master tip after Update the Go version used to build JFrog CLI to 1.17.12 #1602 merges.Supported identity
ai-agent/<name>AI_AGENT/AGENTai-client/<app>TERM_PROGRAM(not an allowlist)ai-model/<slug>JFROG_CLI_AI_MODELAgent wire names and session signals: see core PR #1602 and the table above
agentEnvDetectorsin core.Flow
Notes
IsAgent; unchanged aside from detector env clear-lists in tests.requireto the merged pseudo-version and remove the temporary comment on the replace line.detect_harness/ Coralogix coalescing (separate PR).