feat: add telemetry preference controls and preinstall notice#418
Open
jesseturner21 wants to merge 1 commit intoaws:mainfrom
Open
feat: add telemetry preference controls and preinstall notice#418jesseturner21 wants to merge 1 commit intoaws:mainfrom
jesseturner21 wants to merge 1 commit intoaws:mainfrom
Conversation
5184052 to
4c2421f
Compare
Add user-facing telemetry controls (opt-out command, env var support, config file, preinstall notice) without collecting any data. This establishes the user-facing messaging before launch. - Add `agentcore telemetry` command with enable/disable/status subcommands - Add telemetry notice as a warning in preinstall script (shown on install/upgrade) - Support AGENTCORE_TELEMETRY_DISABLED and DO_NOT_TRACK env vars - Add global config module (~/.agentcore/config.json) for persisting preferences - Refactor update-notifier to reuse shared GLOBAL_CONFIG_DIR constant - Add unit tests for global config, preference resolution, and command actions
4c2421f to
402275b
Compare
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.
Description
Add user-facing telemetry preference controls (Phase 1 — controls only, no data collection) to the AgentCore CLI. This establishes the opt-out mechanism and install-time notice so users are informed from day one when telemetry collection is enabled in a future phase.
What's included:
agentcore telemetrycommand withenable,disable, andstatussubcommandsAGENTCORE_TELEMETRY_DISABLEDandDO_NOT_TRACKenvironment variables~/.agentcore/config.json) for persisting user preferencesupdate-notifier.tsto reuse the sharedGLOBAL_CONFIG_DIRconstantRelated Issue
N/A — new feature groundwork for telemetry infrastructure
Documentation PR
N/A — documentation will be added when telemetry collection is enabled in a future phase
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsUnit tests added (25 total):
src/cli/__tests__/global-config.test.ts— config read/write, merge behavior, error handlingsrc/cli/telemetry/__tests__/resolve.test.ts— env var priority, config fallback, defaultssrc/cli/commands/telemetry/__tests__/telemetry.test.ts— enable/disable/status command actionsManual E2E verification:
node scripts/check-old-cli.mjs— telemetry warning appears at install timeagentcore telemetry statusshows correct status and sourceagentcore telemetry disable/enablepersists to~/.agentcore/config.jsonAGENTCORE_TELEMETRY_DISABLED=trueandDO_NOT_TRACK=1correctly override configChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.