feat(context): surface a newer-version notice in get_context - #33
Open
antonisobkowicz-asana wants to merge 2 commits into
Open
feat(context): surface a newer-version notice in get_context#33antonisobkowicz-asana wants to merge 2 commits into
antonisobkowicz-asana wants to merge 2 commits into
Conversation
Users have no way to learn a new release exists short of someone telling them to rerun the installer. get_context is the closest thing to a periodic checkpoint in an Asana Command workflow, so check the latest GitHub release tag there and surface it via a new update_available field when newer than the running version. Fails open on any network error, timeout, or malformed response (indistinguishable from "already current"), and caches the result for 24h so repeated get_context calls in one session don't hit GitHub every time.
Same check as get_context, added here too since automations that script asana-command-mcp doctor and parse its JSON have no other way to detect an available update short of polling GitHub Releases themselves.
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
get_contextis documented as the checkpoint tool an agent calls "at the start of an Asana workflow," which makes it the natural place to nudge the calling agent (and, through it, the user) about a newer release, rather than requiring someone to notice and tell them manually.checkForUpdatestep that compares the latest published GitHub release tag against the running server version, and surfaces it via a newupdate_availableoutput field (string | null) — set only when a newer version exists.doctorCLI report, for automations that scriptasana-command-mcp doctorand parse its JSON — they'd otherwise have no way to detect an available update short of polling GitHub Releases themselves.null), so this can never break the tool call or CLI invocation it's attached to.get_contextcalls within one long-lived server session don't hit GitHub every time.doctoris a one-shot CLI invocation, so it always checks fresh (a new checker instance per run).fetch/AbortSignal.timeout, injected the same wayasana_oauth.tsalready injectsfetchfor testability.Test plan
npm run typechecknpm run lintnpm test(370 tests passing, including newupdate_check.test.tscovering: newer/equal/older versions, numeric segment comparison (0.10.0 > 0.9.0), non-2xx responses, network errors, malformedtag_name, and TTL cache hit/expiry — all via injected fakefetch, no real network calls — plusget_context,doctor, and CLI test coverage with an injected stub checker)npm run build