@vllnt/convex-helpers 0.2.1-canary.df7d82c → 0.3.0-canary.74b299a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -25
- package/NOTICE +3 -3
- package/README.md +393 -278
- package/dist/better-auth.d.ts +10 -0
- package/dist/better-auth.d.ts.map +1 -1
- package/dist/better-auth.js +9 -0
- package/dist/better-auth.js.map +1 -1
- package/dist/builders.d.ts +5 -4
- package/dist/builders.d.ts.map +1 -1
- package/dist/builders.js +5 -4
- package/dist/builders.js.map +1 -1
- package/dist/identity.d.ts +25 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +23 -0
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/pagination/types.d.ts +6 -3
- package/dist/mcp/pagination/types.d.ts.map +1 -1
- package/dist/mcp/resources/helpers.d.ts +8 -0
- package/dist/mcp/resources/helpers.d.ts.map +1 -1
- package/dist/mcp/resources/helpers.js +8 -0
- package/dist/mcp/resources/helpers.js.map +1 -1
- package/dist/mcp/resources/params.d.ts +18 -0
- package/dist/mcp/resources/params.d.ts.map +1 -0
- package/dist/mcp/resources/params.js +65 -0
- package/dist/mcp/resources/params.js.map +1 -0
- package/dist/mcp/resources/register.d.ts +2 -2
- package/dist/mcp/resources/register.d.ts.map +1 -1
- package/dist/mcp/resources/register.js +9 -8
- package/dist/mcp/resources/register.js.map +1 -1
- package/dist/mcp/resources/types.d.ts +1 -0
- package/dist/mcp/resources/types.d.ts.map +1 -1
- package/dist/mcp/server.d.ts +10 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +10 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/helpers.d.ts +21 -0
- package/dist/mcp/tools/helpers.d.ts.map +1 -1
- package/dist/mcp/tools/helpers.js +21 -0
- package/dist/mcp/tools/helpers.js.map +1 -1
- package/dist/mcp/tools/register.d.ts +3 -1
- package/dist/mcp/tools/register.d.ts.map +1 -1
- package/dist/mcp/tools/register.js +3 -1
- package/dist/mcp/tools/register.js.map +1 -1
- package/dist/mcp/tools/types.d.ts +13 -3
- package/dist/mcp/tools/types.d.ts.map +1 -1
- package/dist/mcp/types.d.ts +10 -0
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/mcp/validators.d.ts +18 -0
- package/dist/mcp/validators.d.ts.map +1 -1
- package/dist/mcp/validators.js +23 -1
- package/dist/mcp/validators.js.map +1 -1
- package/dist/validators.d.ts +6 -7
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +17 -8
- package/dist/validators.js.map +1 -1
- package/docs/API.md +200 -96
- package/llms.txt +65 -42
- package/package.json +12 -12
- package/src/better-auth.ts +10 -0
- package/src/builders.ts +5 -4
- package/src/identity.ts +25 -0
- package/src/index.ts +5 -3
- package/src/mcp/pagination/types.ts +6 -3
- package/src/mcp/resources/helpers.ts +8 -0
- package/src/mcp/resources/params.ts +86 -0
- package/src/mcp/resources/register.ts +14 -10
- package/src/mcp/resources/types.ts +1 -0
- package/src/mcp/server.ts +10 -0
- package/src/mcp/tools/helpers.ts +21 -0
- package/src/mcp/tools/register.ts +3 -1
- package/src/mcp/tools/types.ts +13 -3
- package/src/mcp/types.ts +10 -0
- package/src/mcp/validators.ts +23 -1
- package/src/validators.ts +16 -8
package/CHANGELOG.md
CHANGED
|
@@ -6,31 +6,97 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
and this project adheres to
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
-
## [
|
|
10
|
-
|
|
11
|
-
### Added
|
|
12
|
-
|
|
13
|
-
- The npm package now states that its bundled docs (`docs/API.md`, `README.md`,
|
|
14
|
-
`CHANGELOG.md`, `llms.txt`) match the installed version: a "For coding agents"
|
|
15
|
-
note in the README and `llms.txt`, relative `llms.txt` links to the shipped
|
|
16
|
-
files, an Ecosystem link and a Related packages section. `docs/API.md` now
|
|
17
|
-
lists the exported types of each entry.
|
|
18
|
-
- `pnpm check:package` (run by `pnpm lint`) fails when the tarball misses a
|
|
19
|
-
required doc file, ships contributor or internal files, or when a relative
|
|
20
|
-
`llms.txt` link does not resolve inside it.
|
|
9
|
+
## [0.3.0] - 2026-11-28
|
|
21
10
|
|
|
22
11
|
### Changed
|
|
23
12
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
13
|
+
- `./validators`: `validate` and `parse` reject arrays and class instances
|
|
14
|
+
(`Date`, `Map`, ...) for `v.record(...)` validators, as Convex and
|
|
15
|
+
`convex-helpers` 0.1.136 do. They were accepted, and `parse` turned an array
|
|
16
|
+
into an object. The error reads
|
|
17
|
+
`` Validator error for <path>: Expected `record`, got `Array` `` (`for <path>`
|
|
18
|
+
is left out at the top level; the class name replaces `Array` for `Date`,
|
|
19
|
+
`Map`, ...). Pass a plain object, such as `Object.fromEntries(map)`.
|
|
20
|
+
- `./validators` reads declared object fields as own properties only, as
|
|
21
|
+
`convex-helpers` 0.1.136 does. An inherited value no longer satisfies a
|
|
22
|
+
declared field, and an absent optional field named like an `Object.prototype`
|
|
23
|
+
member (`constructor`, `toString`) is no longer read from the prototype.
|
|
24
|
+
Declare every field the validator checks as an own property of the value.
|
|
25
|
+
- `engines.node` is now `>=20` (0.2.0 declared `>=18`): Node 20 is the lowest
|
|
26
|
+
Node that the lowest supported `convex` (1.45.0) runs on. Node 18 is no longer
|
|
27
|
+
supported; use Node 20 or newer.
|
|
28
|
+
- `./builders` and `./validators` parity baseline is now `convex-helpers`
|
|
29
|
+
0.1.136 (`customFunctions` is unchanged since 0.1.124). Upstream now also
|
|
30
|
+
treats inherited names such as `constructor` as unknown object fields, so that
|
|
31
|
+
is no longer a difference; the `db` option remains refused. `NOTICE` names
|
|
32
|
+
0.1.136 and now also credits the `CustomCtx` and `Registration` types.
|
|
33
|
+
- `package.json` `description` and `keywords` now name what the package does
|
|
34
|
+
and its stack. `homepage` is now https://oss.vllnt.com/packages/convex-helpers.
|
|
35
|
+
- The tarball no longer ships
|
|
36
|
+
[`docs/READINESS.md`](https://github.com/vllnt/convex-helpers/blob/main/docs/READINESS.md)
|
|
37
|
+
(maintainer publication notes).
|
|
38
|
+
- The peer ranges are unchanged. The test suite was run with the lockfile
|
|
39
|
+
versions; a consumer project installed canary `0.2.1-canary.29170b8` (before
|
|
40
|
+
the `int64` fix below) and ran every entry against a real local Convex backend at both the newest (convex 1.51.0,
|
|
41
|
+
`@modelcontextprotocol/sdk` 1.32.2, `zod` 4.6.7, Node 24) and the lowest
|
|
42
|
+
(convex 1.45.0, `@modelcontextprotocol/sdk` 1.29.0, `zod` 4.3.6, Node 20)
|
|
43
|
+
versions in range.
|
|
28
44
|
- Development dependencies: `convex` 1.51.0, `convex-test` 0.0.73, `vitest` and
|
|
29
|
-
`@vitest/coverage-v8` 5.1.1, `@vllnt/typescript` 3.0.
|
|
45
|
+
`@vitest/coverage-v8` 5.1.1, `@vllnt/typescript` 3.0.1 (with
|
|
30
46
|
`exactOptionalPropertyTypes` left off so the published types do not change),
|
|
31
|
-
pnpm 10.34.9.
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
pnpm 10.34.9.
|
|
48
|
+
- Tooling: every push to `main` publishes a canary; the 7-day minimum release
|
|
49
|
+
age moved to
|
|
50
|
+
[`pnpm-workspace.yaml`](https://github.com/vllnt/convex-helpers/blob/main/pnpm-workspace.yaml),
|
|
51
|
+
where pnpm 10 reads it.
|
|
52
|
+
- Internal: CI and publish set up pnpm through Corepack instead of the pnpm
|
|
53
|
+
action, and the package test pins the same pnpm; CI cancels only superseded
|
|
54
|
+
pull request runs; no update bot: dependency updates are a manual pass under
|
|
55
|
+
the 7-day rule; the policy callback timeout test runs on fake timers only (10 s
|
|
56
|
+
less per test run); a test now checks every cookie attribute that
|
|
57
|
+
`cookieSettingsForSite` returns.
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- The npm package states that its bundled docs (`docs/API.md`, `README.md`,
|
|
62
|
+
`CHANGELOG.md`, `llms.txt`) match the installed version, and `llms.txt` links
|
|
63
|
+
to the shipped files.
|
|
64
|
+
- README for coding agents: when to use, install and quick start in the first
|
|
65
|
+
40 lines, a table of every export, common tasks, every error text with its
|
|
66
|
+
cause and fix, limits, compatibility and links; `llms.txt` carries the same
|
|
67
|
+
summary. `docs/API.md` lists the exported types of each entry. Every export
|
|
68
|
+
has a TSDoc summary.
|
|
69
|
+
- `docs/API.md` and the README now state the `createMCPServer` `name` and
|
|
70
|
+
`version` defaults (`"convex-mcp"`, `"0.1.0"`: the MCP server's own version),
|
|
71
|
+
every `CallContext` field, that `cursor: ""` returns the first page, that
|
|
72
|
+
`pageSize` must be an integer, that resources are listed by
|
|
73
|
+
`resources/templates/list`, which resource URI param validators work, and
|
|
74
|
+
that `parseTrustedOrigin` accepts only canonical origins.
|
|
75
|
+
- Tests and CI: a README layout test, `pnpm check:package` (tarball contents and
|
|
76
|
+
links) and `pnpm test:package` (imports and type-checks the packed tarball)
|
|
77
|
+
run in CI and before publish.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
|
|
81
|
+
- `./mcp`: resource URI params declared `v.float64()` or `v.boolean()` are
|
|
82
|
+
converted from decimal text and `true`/`false`, so those resources can be
|
|
83
|
+
read; every read failed before. A resource param that fails its validator now
|
|
84
|
+
returns `MCP error -32602: Input validation error: ...` instead of
|
|
85
|
+
`Resource read failed`.
|
|
86
|
+
- `./mcp`: a `v.int64()` arg sent as a malformed decimal string (`"12abc"`,
|
|
87
|
+
`"1.5"`, `"1e3"`) now returns the documented
|
|
88
|
+
`MCP error -32602: Input validation error: ... Expected a decimal 64-bit integer string`
|
|
89
|
+
instead of a `Cannot convert ... to a BigInt` error, and
|
|
90
|
+
`convertValidator(v.int64()).safeParse(...)` returns that issue instead of
|
|
91
|
+
throwing.
|
|
92
|
+
- Docs: undeclared tool args, `_`-prefixed ones included, are dropped by the MCP
|
|
93
|
+
SDK before hooks run; they are not rejected, as 0.2.0's
|
|
94
|
+
`OnCallResult.extendArgs` doc said.
|
|
95
|
+
- Shipped docs and source comments no longer name repository-only files (proof
|
|
96
|
+
scripts, tests, the vitest config, maintainer publication notes) without a
|
|
97
|
+
GitHub link.
|
|
98
|
+
- Docs: the `asyncMap`, `pruneNull` and `nullThrows` TSDoc examples use
|
|
99
|
+
`ctx.db.get("projects", id)`, like the README.
|
|
34
100
|
|
|
35
101
|
## [0.2.0] - 2026-11-26
|
|
36
102
|
|
|
@@ -52,7 +118,8 @@ and this project adheres to
|
|
|
52
118
|
- Reject MCP query `timeout` values that are negative, `NaN`, infinite or above
|
|
53
119
|
2147483647 ms; they previously fired immediately and failed the call.
|
|
54
120
|
- Patch development Handlebars, Vite/esbuild and deepmerge-ts advisory paths;
|
|
55
|
-
document the remaining minimatch tooling advisory in
|
|
121
|
+
document the remaining minimatch tooling advisory in
|
|
122
|
+
[`docs/READINESS.md`](https://github.com/vllnt/convex-helpers/blob/main/docs/READINESS.md).
|
|
56
123
|
|
|
57
124
|
- Convert MCP `int64` and `bytes` inputs to native Convex values and serialize
|
|
58
125
|
native Convex results with lossless tagged JSON.
|
|
@@ -81,10 +148,11 @@ and this project adheres to
|
|
|
81
148
|
|
|
82
149
|
### Added
|
|
83
150
|
|
|
84
|
-
- `scripts/better-auth-proof.mjs
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
151
|
+
- [`scripts/better-auth-proof.mjs`](https://github.com/vllnt/convex-helpers/blob/main/scripts/better-auth-proof.mjs)
|
|
152
|
+
(repository only): local, cloud-free proof that real Better Auth sessions
|
|
153
|
+
(anonymous plugin and email/password) issue JWTs whose issuer, subject and
|
|
154
|
+
anonymous claims `./identity` accepts on a real Convex backend, and that
|
|
155
|
+
tampered, foreign-issuer and expired tokens are rejected.
|
|
88
156
|
- `./builders` — `customQuery` / `customMutation` / `customAction` / `customCtx`
|
|
89
157
|
with the signatures and runtime behaviour of
|
|
90
158
|
`convex-helpers/server/customFunctions` 0.1.124, held by a convex-test parity
|
package/NOTICE
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Copyright (c) 2026 bntvllnt. Licensed under the MIT License (see LICENSE).
|
|
3
3
|
|
|
4
4
|
The ./builders and ./validators entry points follow the public API, runtime
|
|
5
|
-
behaviour and type signatures of convex-helpers 0.1.
|
|
5
|
+
behaviour and type signatures of convex-helpers 0.1.136
|
|
6
6
|
(https://github.com/get-convex/convex-helpers), Copyright Convex, Inc.,
|
|
7
7
|
licensed under the Apache License, Version 2.0, reproduced below. The
|
|
8
8
|
implementation in src/builders.ts and src/validators.ts was written for this
|
|
9
|
-
package; the CustomBuilder, Customization and
|
|
10
|
-
adapted from convex-helpers.
|
|
9
|
+
package; the CustomBuilder, CustomCtx, Customization, Registration and
|
|
10
|
+
AddFieldsToValidator types are adapted from convex-helpers.
|
|
11
11
|
|
|
12
12
|
--------------------------------------------------------------------------------
|
|
13
13
|
|