Dst cli clig improvements - #5690
Draft
jim761 wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🦋 Changeset detectedLatest commit: 2c99640 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Accessibility tests executed. Download the report here. |
Contributor
Coverage Report for Marigold Code Coverage
File CoverageNo changed files found. |
Contributor
|
Accessibility tests executed. Download the report here. |
Add a first-run telemetry disclosure and "did you mean?" command suggestions, closing two gaps against the Command Line Interface Guidelines (clig.dev). - First-run notice: since telemetry is opt-out, print a one-time disclosure to stderr (keeps stdout/JSON clean for agents) explaining anonymous collection and how to opt out. Mirrors the .NET SDK model. The flag is persisted only after an actual print on a TTY, so non-interactive agent/pipe runs never consume the notice before a human sees it. The invocation that shows the notice is itself not tracked — no data leaves the machine before the user has had a chance to opt out; tracking begins on the next run. - "Did you mean?": unknown commands now suggest the nearest valid command via edit distance (e.g. `serach` -> search), matching the error-recovery pattern used by git/cargo/npm. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Telemetry stays on by default, but no longer carries anything that can single out a machine, user, or session. This is what makes the opt-out default defensible: with no identifier there is no personal data to have a lawful basis for under GDPR, and the CLI no longer stores an identifier on the user's device, which would require consent under ePrivacy Art. 5(3) / TDDDG section 25. - Remove `anonymousId`. Gone from the event payload, `UserConfig`, and the server schema. A value written by an older CLI is stripped on the next config read and erased from disk. The trade is deliberate: we can count invocations, not people, and unique-user numbers come from public npm download counts instead. - Correct the first-run notice. It previously claimed no arguments and no personal data were collected, while the event carried both `args` and a persistent UUID. It now states what is actually sent and links the disclosure. - Clamp `args` via new `slugArg`/`enumArg` helpers. Enum flags are recorded as their validated value or as `invalid`, so a mistyped `--format=jsonn` is no longer echoed back; positionals are forwarded only when identifier-shaped. Free-text search terms stay as `used`. - Truncate `receivedAt` to the hour. Exact timestamps would let events be stitched back into per-session sequences by timing alone, undoing the point of removing the identifier. - Add 90-day retention. The daily event list previously had no TTL and was kept indefinitely. - Reject unknown keys on the endpoint (`z.strictObject`), so an identifying field can never be accepted quietly. - Replace the per-anonymousId quota with a global daily cap, since there is no client identifier to key on. It is a cost backstop, not a security control; abuse belongs behind WAF rate limiting. - Document every field in the `marigold telemetry` section of the CLI docs page, including what is never sent and why the default is opt-out. It lives there rather than on a standalone privacy page, which nobody would navigate to. `marigold --help` links the anchor so non-interactive users have a discoverable disclosure too. Still needs a human: DPO sign-off on the residual Art. 5(3) question (reading platform/nodeVersion off the device), and confirming the Upstash region is in the EU. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jim761
force-pushed
the
dst-cli-clig-improvements
branch
from
August 25, 2026 13:41
f97fa0e to
2c99640
Compare
Contributor
|
Accessibility tests executed. Download the report here. |
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
Closes DST-XXXX
Screenshots / Preview
Test Instructions
Breaking Changes
No
Checklist
component-testtag where applicable)pnpm changeset)