cli: add install-source and agent-host attribution - #86
Conversation
Carry approved source, content, and campaign labels from MCP install configurations on existing Graph and ARM requests. Add an explicit opt-out, attributed README install buttons, privacy disclosures, and regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Set both Azure CLI User-Agent environment variables, verify the azd child environment, and clarify that attribution labels accompany authenticated service requests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Classify self-reported MCP clientInfo into bounded host values after initialization, propagate the label to Graph, az, and azd requests, honor the existing attribution opt-out, and document the trust and privacy boundaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Confirmed the bounded attribution contract and downstream dependency.
SPO.Core ingestion is now tracked by AB#3198658: consume and validate the tokens on the authenticated create-container-type request, persist attribution once for COGSDB/dashboard reporting, and treat missing/invalid values as unknown. |
Replace long editor-specific README URLs with validated, team-owned aka.ms aliases while retaining surface attribution in their managed destinations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Companion PR: SharePoint/sp-dev-docs#10953. Eight team-owned |
Reconcile the attribution feature with current security hardening, Node support, and package metadata while preserving the bounded install and agent-host attribution behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply the same owned-token replacement policy to Graph headers that Azure CLI propagation uses, preserving unrelated caller metadata both when attribution is enabled and when it is opted out. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge all case-insensitive User-Agent entries, remove stale SPE-owned tokens, deduplicate preserved values, and emit one canonical header. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Refresh the transitive fast-uri lock entry to 3.1.6 so the high-severity audit check passes without changing declared dependencies. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Adds bounded install-source and agent-host attribution to the SPE MCP server so install configurations can identify the publishing surface and initialized MCP clients can identify the host associated with later Graph and Azure activity, without opening a separate telemetry channel.
What changed
--install-source,--install-content, and--install-campaigntospe-mcp start, with environment-variable equivalents.agent-hostafter MCP initialization from the client's self-reportedclientInfo.User-Agent, Azure CLIAZURE_HTTP_USER_AGENT, and Azure Developer CLIAZURE_DEV_USER_AGENT.--no-install-attribution/SPE_INSTALL_ATTRIBUTION=offto disable install and host labels.The client configuration retains the startup arguments, so install source is supplied on each launch without a new state file or telemetry endpoint.
Bounded values
sourcemicrosoft-learn,github-readme,github-release,mcp-registry,npm,othercontentreadme-install,sharepoint-embedded-mcp-server,quickstart-vscode,create-container-type,create-manage-containerscampaigndocs-install-buttonsagent-hostvscode,visual-studio,cursor,claude-code,claude-desktop,codex,github-copilot-cli,azure-ai-foundry,other,unknowncontentandcampaignare optional but requiresource. Agent-host attribution is automatic after initialization.Trust boundary and user controls
clientInfo; it is attribution only and is never used for a security decision.other; missing or generic values becomeunknown.--no-install-attributiondisables install and agent-host labels while retaining the product token.SPE_MCP_COLLECT_TELEMETRY=falseremoves all SPE-owned product, install, campaign, and agent-host tokens while preserving unrelated caller User-Agent content.Validation
npm run lint: 0 errors, 12 existing warnings.npm run ci: typecheck and build passed; 970 tests passed and 7 skipped.npm audit --audit-level=high: passes after updating the transitivefast-urilock entry to 3.1.6; two moderateqsadvisories remain below the configured threshold.Related documentation