@softr/sdk 0.0.87-alpha.2 → 0.0.87-alpha.4

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 (44) hide show
  1. package/dist/agent/agent-fns.d.ts +30 -0
  2. package/dist/agent/agent-fns.js +166 -0
  3. package/dist/agent/use-agent-chat.d.ts +94 -0
  4. package/dist/agent/use-agent-chat.js +367 -0
  5. package/dist/auth/isomorphic.d.ts +2 -3
  6. package/dist/auth/isomorphic.js +1 -4
  7. package/dist/auth/methods/authenticator.js +3 -3
  8. package/dist/auth/methods/code.js +1 -1
  9. package/dist/auth/methods/magicLink.js +1 -1
  10. package/dist/auth/methods/password.js +1 -1
  11. package/dist/auth/methods/passwordLink.js +1 -1
  12. package/dist/auth/methods/signup.js +1 -1
  13. package/dist/auth/methods/social.js +1 -1
  14. package/dist/auth/platform.js +1 -1
  15. package/dist/auth/session.js +7 -8
  16. package/dist/cookies.js +3 -29
  17. package/dist/default-error-overlay.d.ts +2 -2
  18. package/dist/formatting.d.ts +3 -3
  19. package/dist/index.d.ts +3 -1
  20. package/dist/index.js +3 -1
  21. package/dist/mcp.d.ts +2 -2
  22. package/dist/mcp.js +5 -3
  23. package/dist/package.js +1 -1
  24. package/dist/pwa.d.ts +2 -2
  25. package/dist/route/route.js +1 -1
  26. package/dist/softr-config.schema.js +1 -3
  27. package/package.json +1 -1
  28. package/schema/softr.schema.json +0 -5
  29. package/skills/softr-sdk/SKILL.md +7 -8
  30. package/skills/softr-sdk/agent-chat/SKILL.md +105 -0
  31. package/skills/softr-sdk/auth/SKILL.md +1 -1
  32. package/skills/softr-sdk/charts-and-metrics/SKILL.md +1 -1
  33. package/skills/softr-sdk/current-user/SKILL.md +1 -1
  34. package/skills/softr-sdk/file-uploads/SKILL.md +1 -1
  35. package/skills/softr-sdk/formatting/SKILL.md +1 -1
  36. package/skills/softr-sdk/integrations/SKILL.md +1 -1
  37. package/skills/softr-sdk/mcp/SKILL.md +1 -1
  38. package/skills/softr-sdk/pwa/SKILL.md +1 -1
  39. package/skills/softr-sdk/record-mutations/SKILL.md +1 -1
  40. package/skills/softr-sdk/record-queries/SKILL.md +1 -1
  41. package/skills/softr-sdk/region-visibility/SKILL.md +1 -1
  42. package/skills/softr-sdk/routes-and-visibility/SKILL.md +1 -1
  43. package/skills/softr-sdk/workflows/SKILL.md +1 -1
  44. package/dist/embedding.js +0 -33
@@ -9,7 +9,7 @@ description: >-
9
9
  metadata:
10
10
  type: sub-skill
11
11
  library: softr-sdk
12
- library_version: 0.0.87-alpha.2
12
+ library_version: 0.0.87-alpha.4
13
13
  ---
14
14
 
15
15
  **Boundary.** `ds` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler or a server-side route hook — importing it into a component fails the build. The same holds for any helper that calls `ds`: declare it inside the handler. A function at module level that calls `ds` keeps the server-only import in the browser bundle, and every page stops loading until it moves. `defineQuery` and every type come from `@softr/sdk` and can be imported anywhere.
@@ -9,7 +9,7 @@ description: >-
9
9
  metadata:
10
10
  type: sub-skill
11
11
  library: softr-sdk
12
- library_version: 0.0.87-alpha.2
12
+ library_version: 0.0.87-alpha.4
13
13
  ---
14
14
 
15
15
  **Boundary.** `Audience` and `defineVisibility` come from `@softr/sdk` and work anywhere.
@@ -8,7 +8,7 @@ description: >-
8
8
  metadata:
9
9
  type: sub-skill
10
10
  library: softr-sdk
11
- library_version: 0.0.87-alpha.2
11
+ library_version: 0.0.87-alpha.4
12
12
  ---
13
13
 
14
14
  **Boundary.** `defineVisibility`, the access functions and the error predicates come from `@softr/sdk` and work anywhere.
@@ -9,7 +9,7 @@ description: >-
9
9
  metadata:
10
10
  type: sub-skill
11
11
  library: softr-sdk
12
- library_version: 0.0.87-alpha.2
12
+ library_version: 0.0.87-alpha.4
13
13
  ---
14
14
 
15
15
  **Boundary.** `workflow` lives on `@softr/sdk/server` and runs only inside a `createServerFn` handler — importing it into a component fails the build. `defineWorkflow` and every type come from `@softr/sdk` and can be imported anywhere.
package/dist/embedding.js DELETED
@@ -1,33 +0,0 @@
1
- import { softrConfig } from "./softr-config.js";
2
- import { createMiddleware } from "@tanstack/react-start";
3
-
4
- //#region src/embedding.ts
5
- /**
6
- * Stops other sites from showing the published app in an iframe. The origins
7
- * softr.json lists in `allowEmbedding` still can.
8
- *
9
- * Production only. The dev server runs in the preview pod, and Studio shows
10
- * that preview in an iframe on another site.
11
- */
12
- function embeddingMiddleware() {
13
- return createMiddleware({ type: "request" }).server(async ({ next }) => {
14
- const result = await next();
15
- if (process.env.NODE_ENV !== "production") return result;
16
- const policy = [
17
- "frame-ancestors",
18
- "'self'",
19
- ...softrConfig().allowEmbedding ?? []
20
- ].join(" ");
21
- try {
22
- result.response.headers.append("content-security-policy", policy);
23
- return result;
24
- } catch {
25
- const response = new Response(result.response.body, result.response);
26
- response.headers.append("content-security-policy", policy);
27
- return response;
28
- }
29
- });
30
- }
31
-
32
- //#endregion
33
- export { embeddingMiddleware };