[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-progression
XP, levels, and streak windows
STABLE 0.1.0 · 0 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.1f83d62).
pnpm add @vllnt/convex-progression
pnpm add @vllnt/convex-progression@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import progression from "@vllnt/convex-progression/convex.config";
const app = defineApp();
app.use(progression);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 847
- Since first publish
- 4,599
Downloads per week since 12 September 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
847 downloads in the last 7 days. 4,599 downloads since 12 September 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 12 September 2026 to 14 September 2026 | 678 |
| 15 September 2026 to 21 September 2026 | 264 |
| 22 September 2026 to 28 September 2026 | 267 |
| 29 September 2026 to 5 October 2026 | 141 |
| 6 October 2026 to 12 October 2026 | 162 |
| 13 October 2026 to 19 October 2026 | 308 |
| 20 October 2026 to 26 October 2026 | 307 |
| 27 October 2026 to 2 November 2026 | 970 |
| 3 November 2026 to 9 November 2026 | 346 |
| 10 November 2026 to 16 November 2026 | 309 |
| 17 November 2026 to 23 November 2026 | 847 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 9 canary builds since 12 September 2026. Latest stable: 0.1.0 on 22 November 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.1f83d62 | canary | 23 November 2026 |
| 0.1.0 | stable | 22 November 2026 |
| 0.1.0-canary.a6dae8c | canary | 22 November 2026 |
| 0.1.0-canary.2f45a59 | canary | 22 November 2026 |
| 0.1.0-canary.5f68ae5 | canary | 31 October 2026 |
| 0.1.0-canary.605370d | canary | 30 October 2026 |
| 0.1.0-canary.1cda2fe | canary | 30 October 2026 |
| 0.1.0-canary.7758b3b | canary | 24 October 2026 |
| 0.1.0-canary.687bbeb | canary | 12 September 2026 |
| 0.1.0-canary.0 | canary | 12 September 2026 |
Changelog
The newest stable releases of @vllnt/convex-progression, with the notes from its changelog.
0.1.0
First stable release. Earlier builds were published only to the
canarydist-tag.Added
- XP, levels and streaks per opaque
(scope, subjectRef, key):accrueadds XP and reportsleveledUp/previousLevel.levelis the number of host-suppliedthresholdsthe XP has reached.recordActivityrecords a hostperiodKey. A matchingexpectedPreviouscontinues the streak, the same period leaves it unchanged, anything else restarts it at 1. It tracksmaxStreak.getreturns the state ornull, and recomputeslevelwhenthresholdsare passed.resetdeletes one row;eraseSubjectdeletes a subject in bounded batches (default 200, clamped to 500) and reschedules until clean.
- Host-wrapper design: the component stores one sandboxed
progresstable and never reads host tables or environment. The host owns auth, refs, thresholds and period keys. - Multiple named mounts with isolated tables and scheduled work.
@vllnt/convex-progression/testexportsregisterforconvex-test.
Guarantees and limits
- Fail closed: invalid input throws a
ConvexErrorwith a code (INVALID_REF,INVALID_THRESHOLDS,INVALID_DELTA,INVALID_BATCH,XP_OVERFLOW,STREAK_OVERFLOW). XP and streaks stay withinMAX_SAFE_INTEGER, and an award that would be silently lost to floating-point precision is rejected. getreturnsnullfor an empty or over-long ref so reactive queries with placeholder values do not error; mutations reject them withINVALID_REF.- Awards are not event-idempotent, periods are opaque and unordered, and erasure has no write fence or completion token: the host deduplicates, orders and fences. See docs/API.md.
- Tests use the
convex-testsimulation, not a real Convex backend.
Release process
- Stable releases are published only from a
vX.Y.Ztag onmainthrough npm trusted publishing with provenance. Test files are not shipped.
- XP, levels and streaks per opaque
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.1f83d62
- GitHub stars
- 0 GitHub stars
- Licence
- MIT
- Issues
- Open an issue