Skip to content

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.

new StarPromptService(deps): StarPromptService

Defined in: src/star-prompt.ts:79

StarPromptDeps

StarPromptService

dismiss(): StarPromptStatus

Defined in: src/star-prompt.ts:127

“No thanks” — never ask again.

StarPromptStatus


snooze(): StarPromptStatus

Defined in: src/star-prompt.ts:132

“Remind me in 3 days” — suppress the nudge for STAR_SNOOZE_MS.

StarPromptStatus


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.

Promise<StarPromptStatus>


status(): StarPromptStatus

Defined in: src/star-prompt.ts:122

Current nudge status for GET / client bootstrap.

StarPromptStatus