Skip to content

feat(context): surface a newer-version notice in get_context - #33

Open
antonisobkowicz-asana wants to merge 2 commits into
mainfrom
get-context-update-check
Open

feat(context): surface a newer-version notice in get_context#33
antonisobkowicz-asana wants to merge 2 commits into
mainfrom
get-context-update-check

Conversation

@antonisobkowicz-asana

@antonisobkowicz-asana antonisobkowicz-asana commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • get_context is 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.
  • Adds a checkForUpdate step that compares the latest published GitHub release tag against the running server version, and surfaces it via a new update_available output field (string | null) — set only when a newer version exists.
  • Also surfaced on the doctor CLI report, for automations that script asana-command-mcp doctor and parse its JSON — they'd otherwise have no way to detect an available update short of polling GitHub Releases themselves.
  • Fails open: any network error, timeout (3s), non-2xx response, or malformed payload is treated the same as "already current" (null), so this can never break the tool call or CLI invocation it's attached to.
  • Caches the result for 24h (in-memory, per process) so repeated get_context calls within one long-lived server session don't hit GitHub every time. doctor is a one-shot CLI invocation, so it always checks fresh (a new checker instance per run).
  • No new dependency — uses Node 22's built-in fetch/AbortSignal.timeout, injected the same way asana_oauth.ts already injects fetch for testability.

Test plan

  • npm run typecheck
  • npm run lint
  • npm test (370 tests passing, including new update_check.test.ts covering: newer/equal/older versions, numeric segment comparison (0.10.0 > 0.9.0), non-2xx responses, network errors, malformed tag_name, and TTL cache hit/expiry — all via injected fake fetch, no real network calls — plus get_context, doctor, and CLI test coverage with an injected stub checker)
  • npm run build

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant