StarPromptService
Defined in: src/star-prompt.ts:73
Tracks a once-per-install “star us on GitHub?” nudge. After the operator has
used Shepherd for STAR_ELIGIBLE_AFTER_MS it asks — gently, non-blocking
— whether to star STAR_REPO_SLUG with their gh account. The operator
can star (one-click via their existing gh auth), snooze 3 days, or dismiss for
good. State is durable in the settings KV so the choice survives restarts and
is shared across browsers/devices (it’s about the install, not the tab).
Constructing the service seeds firstSeenAt on the very first boot, so the
grace window is anchored to first use.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new StarPromptService(
deps):StarPromptService
Defined in: src/star-prompt.ts:79
Parameters
Section titled “Parameters”Returns
Section titled “Returns”StarPromptService
Methods
Section titled “Methods”dismiss()
Section titled “dismiss()”dismiss():
StarPromptStatus
Defined in: src/star-prompt.ts:127
“No thanks” — never ask again.
Returns
Section titled “Returns”snooze()
Section titled “snooze()”snooze():
StarPromptStatus
Defined in: src/star-prompt.ts:132
“Remind me in 3 days” — suppress the nudge for STAR_SNOOZE_MS.
Returns
Section titled “Returns”star()
Section titled “star()”star():
Promise<StarPromptStatus>
Defined in: src/star-prompt.ts:139
Star the repo with the operator’s gh account, then mark it starred so the nudge never returns. Throws if the gh call fails (caller maps to an error response); state is only flipped after a successful star.
Returns
Section titled “Returns”Promise<StarPromptStatus>
status()
Section titled “status()”status():
StarPromptStatus
Defined in: src/star-prompt.ts:122
Current nudge status for GET / client bootstrap.