Repository navigation
Add a JSON API integration with a value widget - #55
Merged
Merged
Conversation
Any service that answers JSON can feed a status pill on a link's tile or a status bar. The integration has one connection (base URL, authentication of none, basic, bearer or custom header, and an optional encrypted credential); its Value widget requests a path under the base and shows one value picked by a small path syntax (JsonValuePath), with an optional unit and expected value. JsonApiClient reads at most 256 KB, caches successful answers for 15 seconds, validates certificates and never follows redirects, so credentials only go to the connection's host; widget paths that are absolute or climb out of the base are refused before any request. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A space in a widget's path, as in a query typed by hand, was refused with a message saying the path wasn't relative; it's now encoded as %20, and the containment checks still run on the result. The Value field is labelled Value path, which says what it takes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Phase 5e. Any service that answers JSON can now feed a status pill on a link's tile or a status bar.
json-apiintegration (one connection): base URL (path prefix allowed), authentication (none, basic, bearer, custom header) and an optional encrypted credential.json-api/valuewidget: requests a path under the base URL and shows one value picked by a small path syntax (slideshow.slides[1].title,["odd key"],$), with an optional name, unit and expected value. The pill shows the value with its unit (2 slides,42 ms,93%); arrays show their item count.JsonApiClient: 10 s timeout, 256 KB limit, 15 s cache of successful answers, certificates always validated, redirects not followed so credentials only go to the connection's host. Paths that are absolute or climb out of the base are refused before any request.Tests: 743 passing; Release build with
ContinuousIntegrationBuild=truehas no warnings; one ReSharper cleanup pass applied to the changed files.🤖 Generated with Claude Code