Add Instatus status-page provider support#16
Merged
Conversation
Add Instatus (e.g. status.perplexity.com) as a third status-page provider alongside Statuspage.io and incident.io, with full parity: live status, threaded incident updates with the operator's real prose, full history, and scheduled maintenance windows. - New src/providers/instatus.ts adapter implementing the Provider interface. Reads the documented keyless /v3/summary.json API for live state and impact, and the /history.atom feed for full update history and prose, joined on the incident id. Maintenances are modeled as incidents with impact "maintenance". - Register in the provider registry and PROBE_ORDER (probed last, with a strict shape check so it can't false-positive on the other providers) and add "instatus" to the monitorSchema provider enum. - impactColor() now maps "maintenance" to grey. - Replace the stale "Instatus (skipped)" note and update all docs (wiki, README, AGENTS, .env.example). - Add a `test` npm script and the first Bun tests in the repo (no new deps). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zod v4's .default() expects the schema's output type, so passing the strings "true"/"false" to booleanFromEnv.default() failed typechecking (7 TS2769 errors) and would have defaulted unset flags to a truthy string instead of a real boolean. Use boolean defaults (true/false) and add a `typecheck` npm script. `tsc --noEmit` now reports zero errors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6c82ff1 to
2c87eef
Compare
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.
Adds Instatus as a third status-page provider alongside Statuspage.io and incident.io, with full parity: live status, threaded incident updates with the operator’s real prose, full history, and scheduled maintenance windows.
Summary
src/providers/instatus.tsadapter implementing the existingProviderinterface, built from pure, unit-tested helpers./v3/summary.json(live state + impact enum) and the standard/history.atomfeed (full update history + prose), joining them on the incidentid.impact: "maintenance"(rendered grey).PROBE_ORDER([incidentio, statuspage, instatus], probed last with a strict shape check so it can’t false-positive on the other two), and added to themonitorSchema.providerenum.impactColor()now mapsmaintenance→ grey (it previously fell through to blurple).API-Integration.md,Configuration.md,Architecture.md,Commands.md,Home.md,README.md,AGENTS.md,.env.example).test+typechecknpm scripts; first tests in the repo (Bun’s built-in runner, no new deps).booleanFromEnv.default("true")), which failedtsc(7 errors) and would have defaulted unset flags to a truthy string rather than a real boolean. Now use boolean defaults.tsc --noEmitreports zero errors.Test plan
bun test— 24 pass (canonical mappers, yearless-timestamp + year-rollover, Atom parsing for incidents & maintenances, summary mapping, probe disambiguation, live-impact join,detectProviderauto-detection).bun run typecheck— zero errors.https://status.kagi.com: probe +fetchSummary+fetchIncidentsreturned 41 real incidents with prose bodies and a detected maintenance entry.Notes
/monitor add https://status.perplexity.com(auto-detectsinstatus).🤖 Generated with Claude Code