@lupinum/better-convex-agents 0.1.0 → 0.2.0

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 (54) hide show
  1. package/dist/agent/AGENTS.md +6 -3
  2. package/dist/agent/pages/docs/build/application-behavior/error-handling.md +40 -1
  3. package/dist/agent/pages/docs/build/authentication/account-deletion.md +73 -0
  4. package/dist/agent/pages/docs/build/authentication/backend-authorization.md +6 -1
  5. package/dist/agent/pages/docs/build/authentication/better-auth-setup.md +3 -1
  6. package/dist/agent/pages/docs/build/authentication/sign-in-and-sign-out.md +3 -0
  7. package/dist/agent/pages/docs/build/authentication/transactional-email.md +45 -10
  8. package/dist/agent/pages/docs/build/files/private-downloads.md +126 -0
  9. package/dist/agent/pages/docs/build/files/storage-urls.md +8 -3
  10. package/dist/agent/pages/docs/build/files/upload-files.md +2 -2
  11. package/dist/agent/pages/docs/build/functions/limits-and-audit.md +142 -4
  12. package/dist/agent/pages/docs/build/functions/testing.md +24 -0
  13. package/dist/agent/pages/docs/build/queries/loading-and-stale-data.md +1 -1
  14. package/dist/agent/pages/docs/build/queries/pagination.md +2 -2
  15. package/dist/agent/pages/docs/build/queries/reactive-arguments.md +46 -0
  16. package/dist/agent/pages/docs/build/server/server-convex.md +16 -1
  17. package/dist/agent/pages/docs/build/write-data/concurrent-operations.md +1 -1
  18. package/dist/agent/pages/docs/build/write-data/forms.md +1 -1
  19. package/dist/agent/pages/docs/build/write-data/multi-step-operations.md +1 -1
  20. package/dist/agent/pages/docs/build/write-data/optimistic-updates.md +1 -1
  21. package/dist/agent/pages/docs/get-started/add-authentication.md +13 -3
  22. package/dist/agent/pages/docs/get-started/complete-and-delete.md +2 -0
  23. package/dist/agent/pages/docs/get-started/first-realtime-page.md +3 -1
  24. package/dist/agent/pages/docs/get-started/installation.md +3 -0
  25. package/dist/agent/pages/docs/get-started/next-steps.md +30 -0
  26. package/dist/agent/pages/docs/get-started/plain-vue.md +143 -41
  27. package/dist/agent/pages/docs/operations/before-launch.md +1 -1
  28. package/dist/agent/pages/docs/operations/log-streams.md +128 -0
  29. package/dist/agent/pages/docs/recipes/dynamic-query-list.md +1 -1
  30. package/dist/agent/pages/docs/recipes/error-messages.md +1 -1
  31. package/dist/agent/pages/docs/recipes/guest-users.md +67 -15
  32. package/dist/agent/pages/docs/recipes/multiple-file-uploads.md +1 -1
  33. package/dist/agent/pages/docs/recipes/optimistic-todo-list.md +1 -1
  34. package/dist/agent/pages/docs/recipes/realtime-feed.md +1 -1
  35. package/dist/agent/pages/docs/recipes/sign-in-link.md +129 -0
  36. package/dist/agent/pages/docs/reference/api-surface.md +11 -0
  37. package/dist/agent/pages/docs/reference/error-types.md +12 -2
  38. package/dist/agent/pages/docs/reference/operation-error-codes.md +15 -1
  39. package/dist/agent/pages/docs/reference/package-exports.md +3 -2
  40. package/dist/agent/pages/docs/reference/server-api.md +5 -1
  41. package/dist/index.d.mts +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.mjs +1 -1
  44. package/dist/internal.d.mts +1 -1
  45. package/dist/internal.d.ts +1 -1
  46. package/dist/internal.mjs +1 -1
  47. package/dist/mcp.mjs +4 -2
  48. package/dist/shared/{better-convex-agents.DWStY2mj.mjs → better-convex-agents.BAvd6ID4.mjs} +475 -393
  49. package/dist/shared/{better-convex-agents.Jrci7p3C.d.mts → better-convex-agents.l5qUkNCR.d.mts} +14 -2
  50. package/dist/shared/{better-convex-agents.Jrci7p3C.d.ts → better-convex-agents.l5qUkNCR.d.ts} +14 -2
  51. package/dist/test.d.mts +1 -1
  52. package/dist/test.d.ts +1 -1
  53. package/dist/test.mjs +1 -1
  54. package/package.json +3 -3
@@ -59,11 +59,15 @@ interface CatalogEntry {
59
59
  /** Grant scopes that unlock this tool; empty for built-in tools every agent has. */
60
60
  scopes: string[];
61
61
  }
62
- /** Turns any failure into what an agent may see: a coded failure, a known platform error, or nothing internal. */
63
- declare function toolFailure(error: unknown): {
62
+ /** What an agent sees of a failure; `why` and `fix` only come from the app's `fail(…, { why, fix })`. */
63
+ type ToolFailure = {
64
64
  code: string;
65
65
  message: string;
66
+ why?: string;
67
+ fix?: string;
66
68
  };
69
+ /** Turns any failure into what an agent may see: a coded failure, a known platform error, or nothing internal. */
70
+ declare function toolFailure(error: unknown): ToolFailure;
67
71
  /** What a tool call returns: the object the MCP door puts in `structuredContent`. */
68
72
  type ToolSuccess = {
69
73
  status: 'done';
@@ -117,6 +121,14 @@ fns: {
117
121
  };
118
122
  renew?: true;
119
123
  }, Promise<{
124
+ fields?: string;
125
+ status: "done";
126
+ result: unknown;
127
+ written: string[];
128
+ approvalId?: undefined;
129
+ summary?: undefined;
130
+ url?: undefined;
131
+ } | {
120
132
  status: "done";
121
133
  result: any;
122
134
  approvalId?: undefined;
@@ -59,11 +59,15 @@ interface CatalogEntry {
59
59
  /** Grant scopes that unlock this tool; empty for built-in tools every agent has. */
60
60
  scopes: string[];
61
61
  }
62
- /** Turns any failure into what an agent may see: a coded failure, a known platform error, or nothing internal. */
63
- declare function toolFailure(error: unknown): {
62
+ /** What an agent sees of a failure; `why` and `fix` only come from the app's `fail(…, { why, fix })`. */
63
+ type ToolFailure = {
64
64
  code: string;
65
65
  message: string;
66
+ why?: string;
67
+ fix?: string;
66
68
  };
69
+ /** Turns any failure into what an agent may see: a coded failure, a known platform error, or nothing internal. */
70
+ declare function toolFailure(error: unknown): ToolFailure;
67
71
  /** What a tool call returns: the object the MCP door puts in `structuredContent`. */
68
72
  type ToolSuccess = {
69
73
  status: 'done';
@@ -117,6 +121,14 @@ fns: {
117
121
  };
118
122
  renew?: true;
119
123
  }, Promise<{
124
+ fields?: string;
125
+ status: "done";
126
+ result: unknown;
127
+ written: string[];
128
+ approvalId?: undefined;
129
+ summary?: undefined;
130
+ url?: undefined;
131
+ } | {
120
132
  status: "done";
121
133
  result: any;
122
134
  approvalId?: undefined;
package/dist/test.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FunctionReference } from 'convex/server';
2
2
  import { McpPrincipal } from './mcp.mjs';
3
- import { T as ToolSuccess } from './shared/better-convex-agents.Jrci7p3C.mjs';
3
+ import { T as ToolSuccess } from './shared/better-convex-agents.l5qUkNCR.mjs';
4
4
  import { CatalogEntry } from './index.mjs';
5
5
  import '@lupinum/better-convex-functions/internal';
6
6
  import '@lupinum/better-convex-functions';
package/dist/test.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FunctionReference } from 'convex/server';
2
2
  import { McpPrincipal } from './mcp.js';
3
- import { T as ToolSuccess } from './shared/better-convex-agents.Jrci7p3C.js';
3
+ import { T as ToolSuccess } from './shared/better-convex-agents.l5qUkNCR.js';
4
4
  import { CatalogEntry } from './index.js';
5
5
  import '@lupinum/better-convex-functions/internal';
6
6
  import '@lupinum/better-convex-functions';
package/dist/test.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { g as grantedTools, e as toolCall } from './shared/better-convex-agents.DWStY2mj.mjs';
1
+ import { g as grantedTools, e as toolCall } from './shared/better-convex-agents.BAvd6ID4.mjs';
2
2
  import '@lupinum/better-convex-functions';
3
3
  import '@lupinum/better-convex-functions/internal';
4
4
  import 'convex/server';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lupinum/better-convex-agents",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Tools, approvals and the MCP door for Convex functions built with @lupinum/better-convex-functions",
5
5
  "homepage": "https://better-convex.lupinum.com",
6
6
  "bugs": {
@@ -41,12 +41,12 @@
41
41
  "convex": "1.48.0",
42
42
  "typescript": "~5.9.3",
43
43
  "unbuild": "3.6.1",
44
- "@lupinum/better-convex-functions": "0.1.0"
44
+ "@lupinum/better-convex-functions": "0.2.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@modelcontextprotocol/server": "2.3.1",
48
48
  "convex": ">=1.42.2 <2",
49
- "@lupinum/better-convex-functions": "0.1.0"
49
+ "@lupinum/better-convex-functions": "0.2.0"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@modelcontextprotocol/server": {