@vllnt/convex-helpers 0.2.1-canary.df7d82c → 0.3.0-canary.eaaad44

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +79 -24
  2. package/NOTICE +3 -3
  3. package/README.md +388 -278
  4. package/dist/better-auth.d.ts +10 -0
  5. package/dist/better-auth.d.ts.map +1 -1
  6. package/dist/better-auth.js +9 -0
  7. package/dist/better-auth.js.map +1 -1
  8. package/dist/builders.d.ts +5 -4
  9. package/dist/builders.d.ts.map +1 -1
  10. package/dist/builders.js +5 -4
  11. package/dist/builders.js.map +1 -1
  12. package/dist/identity.d.ts +25 -0
  13. package/dist/identity.d.ts.map +1 -1
  14. package/dist/identity.js +23 -0
  15. package/dist/identity.js.map +1 -1
  16. package/dist/index.d.ts +2 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +2 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/mcp/pagination/types.d.ts +6 -3
  21. package/dist/mcp/pagination/types.d.ts.map +1 -1
  22. package/dist/mcp/resources/helpers.d.ts +8 -0
  23. package/dist/mcp/resources/helpers.d.ts.map +1 -1
  24. package/dist/mcp/resources/helpers.js +8 -0
  25. package/dist/mcp/resources/helpers.js.map +1 -1
  26. package/dist/mcp/resources/types.d.ts +1 -0
  27. package/dist/mcp/resources/types.d.ts.map +1 -1
  28. package/dist/mcp/server.d.ts +10 -0
  29. package/dist/mcp/server.d.ts.map +1 -1
  30. package/dist/mcp/server.js +10 -0
  31. package/dist/mcp/server.js.map +1 -1
  32. package/dist/mcp/tools/helpers.d.ts +21 -0
  33. package/dist/mcp/tools/helpers.d.ts.map +1 -1
  34. package/dist/mcp/tools/helpers.js +21 -0
  35. package/dist/mcp/tools/helpers.js.map +1 -1
  36. package/dist/mcp/tools/register.d.ts +3 -1
  37. package/dist/mcp/tools/register.d.ts.map +1 -1
  38. package/dist/mcp/tools/register.js +3 -1
  39. package/dist/mcp/tools/register.js.map +1 -1
  40. package/dist/mcp/tools/types.d.ts +13 -3
  41. package/dist/mcp/tools/types.d.ts.map +1 -1
  42. package/dist/mcp/types.d.ts +10 -0
  43. package/dist/mcp/types.d.ts.map +1 -1
  44. package/dist/mcp/validators.d.ts +18 -0
  45. package/dist/mcp/validators.d.ts.map +1 -1
  46. package/dist/mcp/validators.js +23 -1
  47. package/dist/mcp/validators.js.map +1 -1
  48. package/dist/validators.d.ts +6 -7
  49. package/dist/validators.d.ts.map +1 -1
  50. package/dist/validators.js +17 -8
  51. package/dist/validators.js.map +1 -1
  52. package/docs/API.md +190 -96
  53. package/llms.txt +65 -42
  54. package/package.json +9 -9
  55. package/src/better-auth.ts +10 -0
  56. package/src/builders.ts +5 -4
  57. package/src/identity.ts +25 -0
  58. package/src/index.ts +2 -0
  59. package/src/mcp/pagination/types.ts +6 -3
  60. package/src/mcp/resources/helpers.ts +8 -0
  61. package/src/mcp/resources/types.ts +1 -0
  62. package/src/mcp/server.ts +10 -0
  63. package/src/mcp/tools/helpers.ts +21 -0
  64. package/src/mcp/tools/register.ts +3 -1
  65. package/src/mcp/tools/types.ts +13 -3
  66. package/src/mcp/types.ts +10 -0
  67. package/src/mcp/validators.ts +23 -1
  68. package/src/validators.ts +16 -8
package/CHANGELOG.md CHANGED
@@ -6,31 +6,84 @@ 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
- ## [Unreleased]
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
- - The tarball no longer ships `docs/READINESS.md` (maintainer publication
25
- notes). `homepage` is now https://oss.vllnt.com/packages/convex-helpers.
26
- - Tooling: every push to `main` touching the package publishes a canary (no
27
- repository-variable gate), and docs-only changes now trigger it.
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
45
  `@vitest/coverage-v8` 5.1.1, `@vllnt/typescript` 3.0.0 (with
30
46
  `exactOptionalPropertyTypes` left off so the published types do not change),
31
- pnpm 10.34.9. The peer ranges are unchanged; the tests and a type-check of a
32
- consumer of the packed package pass at their minimums (`convex` 1.45.0,
33
- `@modelcontextprotocol/sdk` 1.29.0, `zod` 4.3.6).
47
+ pnpm 10.34.9.
48
+ - Tooling: every push to `main` touching the package or its shipped docs
49
+ publishes a canary; the 7-day minimum release 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
+
53
+ ### Added
54
+
55
+ - The npm package states that its bundled docs (`docs/API.md`, `README.md`,
56
+ `CHANGELOG.md`, `llms.txt`) match the installed version, and `llms.txt` links
57
+ to the shipped files.
58
+ - README for coding agents: when to use, install and quick start in the first
59
+ 40 lines, a table of every export, common tasks, every error text with its
60
+ cause and fix, limits, compatibility and links; `llms.txt` carries the same
61
+ summary. `docs/API.md` lists the exported types of each entry. Every export
62
+ has a TSDoc summary.
63
+ - `docs/API.md` and the README now state the `createMCPServer` `name` and
64
+ `version` defaults (`"convex-mcp"`, `"0.1.0"`: the MCP server's own version),
65
+ every `CallContext` field, that `cursor: ""` returns the first page, that
66
+ `pageSize` must be an integer, that resources are listed by
67
+ `resources/templates/list`, which resource URI param validators work, and
68
+ that `parseTrustedOrigin` accepts only canonical origins.
69
+ - Tests and CI: a README layout test, `pnpm check:package` (tarball contents and
70
+ links) and `pnpm test:package` (imports and type-checks the packed tarball)
71
+ run in CI and before publish.
72
+
73
+ ### Fixed
74
+
75
+ - `./mcp`: a `v.int64()` arg sent as a malformed decimal string (`"12abc"`,
76
+ `"1.5"`, `"1e3"`) now returns the documented
77
+ `MCP error -32602: Input validation error: ... Expected a decimal 64-bit integer string`
78
+ instead of a `Cannot convert ... to a BigInt` error, and
79
+ `convertValidator(v.int64()).safeParse(...)` returns that issue instead of
80
+ throwing.
81
+ - Docs: undeclared tool args, `_`-prefixed ones included, are dropped by the MCP
82
+ SDK before hooks run; they are not rejected, as 0.2.0's
83
+ `OnCallResult.extendArgs` doc said.
84
+ - Shipped docs and source comments no longer name repository-only files (proof
85
+ scripts, tests, the vitest config, maintainer publication notes) without a
86
+ GitHub link.
34
87
 
35
88
  ## [0.2.0] - 2026-11-26
36
89
 
@@ -52,7 +105,8 @@ and this project adheres to
52
105
  - Reject MCP query `timeout` values that are negative, `NaN`, infinite or above
53
106
  2147483647 ms; they previously fired immediately and failed the call.
54
107
  - Patch development Handlebars, Vite/esbuild and deepmerge-ts advisory paths;
55
- document the remaining minimatch tooling advisory in `docs/READINESS.md`.
108
+ document the remaining minimatch tooling advisory in
109
+ [`docs/READINESS.md`](https://github.com/vllnt/convex-helpers/blob/main/docs/READINESS.md).
56
110
 
57
111
  - Convert MCP `int64` and `bytes` inputs to native Convex values and serialize
58
112
  native Convex results with lossless tagged JSON.
@@ -81,10 +135,11 @@ and this project adheres to
81
135
 
82
136
  ### Added
83
137
 
84
- - `scripts/better-auth-proof.mjs`: local, cloud-free proof that real Better Auth
85
- sessions (anonymous plugin and email/password) issue JWTs whose issuer,
86
- subject and anonymous claims `./identity` accepts on a real Convex backend,
87
- and that tampered, foreign-issuer and expired tokens are rejected.
138
+ - [`scripts/better-auth-proof.mjs`](https://github.com/vllnt/convex-helpers/blob/main/scripts/better-auth-proof.mjs)
139
+ (repository only): local, cloud-free proof that real Better Auth sessions
140
+ (anonymous plugin and email/password) issue JWTs whose issuer, subject and
141
+ anonymous claims `./identity` accepts on a real Convex backend, and that
142
+ tampered, foreign-issuer and expired tokens are rejected.
88
143
  - `./builders` — `customQuery` / `customMutation` / `customAction` / `customCtx`
89
144
  with the signatures and runtime behaviour of
90
145
  `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.124
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 AddFieldsToValidator types are
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