Repository navigation
feat: custom metric definition CRUD + backup support - #249
Merged
Merged
Conversation
…ion-delete commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ost-install Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…c-definitions/ during solutions install
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.
Summary
definition-create,definition-list,definition-get,definition-update,definition-deletecommands tocortex custom-metricsfor full API parity with the custom metric definition endpointscustom-metric-definitionsto backup export/import — definitions are exported as individual JSON files and imported before data points (so import is self-contained)ai-spendsolution to install its metric definition automatically duringcortex solutions installvia a newcustom-metric-definitions/ai-spend.jsonfile; remove the now-unnecessary post-install setup scriptTest plan
cortex custom-metrics definition-create -k my-key -n "My Metric" -V POSITIVEcreates a definitioncortex custom-metrics definition-create -f my-def.jsoncreates from filecortex custom-metrics definition-listreturns paginated listcortex custom-metrics definition-get -k my-keyreturns definitioncortex custom-metrics definition-update -k my-key -n "Updated"updates name onlycortex custom-metrics definition-delete -k my-keydeletes definitioncortex backup exportincludescustom-metric-definitions/directorycortex backup importcreates definitions before data points (409 on re-import = silent success)cortex solutions install -s ai-spendself-contained — no post-install step needed🤖 Generated with Claude Code