veryfront 0.1.656 → 0.1.657

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 (48) hide show
  1. package/esm/cli/sync/ignore.d.ts.map +1 -1
  2. package/esm/cli/sync/ignore.js +66 -18
  3. package/esm/cli/templates/manifest.js +2 -2
  4. package/esm/deno.js +3 -3
  5. package/esm/src/agent/ag-ui/request-shared.d.ts.map +1 -1
  6. package/esm/src/agent/ag-ui/request-shared.js +1 -2
  7. package/esm/src/agent/index.d.ts +6 -4
  8. package/esm/src/agent/index.d.ts.map +1 -1
  9. package/esm/src/agent/index.js +6 -4
  10. package/esm/src/agent/runtime/message-adapter.d.ts +1 -1
  11. package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
  12. package/esm/src/chat/message-prep.js +2 -2
  13. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  14. package/esm/src/internal-agents/run-stream.js +7 -1
  15. package/esm/src/mcp/http-transport.d.ts +1 -1
  16. package/esm/src/mcp/http-transport.d.ts.map +1 -1
  17. package/esm/src/mcp/http-transport.js +4 -3
  18. package/esm/src/mcp/index.d.ts +2 -2
  19. package/esm/src/mcp/index.js +2 -2
  20. package/esm/src/mcp/server.d.ts +4 -6
  21. package/esm/src/mcp/server.d.ts.map +1 -1
  22. package/esm/src/mcp/server.js +42 -14
  23. package/esm/src/resource/index.d.ts +2 -2
  24. package/esm/src/resource/index.js +2 -2
  25. package/esm/src/resource/registry.d.ts.map +1 -1
  26. package/esm/src/resource/registry.js +5 -1
  27. package/esm/src/routing/api/module-loader/external-import-rewriter.d.ts.map +1 -1
  28. package/esm/src/routing/api/module-loader/external-import-rewriter.js +59 -59
  29. package/esm/src/security/client/html-sanitizer.d.ts +1 -0
  30. package/esm/src/security/client/html-sanitizer.d.ts.map +1 -1
  31. package/esm/src/security/client/html-sanitizer.js +44 -6
  32. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
  33. package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +2 -2
  34. package/esm/src/server/services/rsc/orchestrators/page-handler.d.ts.map +1 -1
  35. package/esm/src/server/services/rsc/orchestrators/page-handler.js +3 -21
  36. package/esm/src/tool/factory.d.ts.map +1 -1
  37. package/esm/src/tool/factory.js +3 -35
  38. package/esm/src/tool/host-tools.d.ts.map +1 -1
  39. package/esm/src/tool/host-tools.js +2 -11
  40. package/esm/src/tool/index.d.ts +12 -8
  41. package/esm/src/tool/index.d.ts.map +1 -1
  42. package/esm/src/tool/index.js +12 -8
  43. package/esm/src/tool/schema/zod-json-schema.d.ts +6 -11
  44. package/esm/src/tool/schema/zod-json-schema.d.ts.map +1 -1
  45. package/esm/src/tool/schema/zod-json-schema.js +7 -37
  46. package/esm/src/utils/version-constant.d.ts +1 -1
  47. package/esm/src/utils/version-constant.js +1 -1
  48. package/package.json +1 -1
@@ -9,10 +9,9 @@
9
9
  * `tool/factory.ts`, `workflow/registry.ts`, `routing/api/openapi/...`,
10
10
  * `mcp/server.ts`, `cli/mcp/server.ts`) continue to compile.
11
11
  *
12
- * Inputs may be either an opaque `Schema<T>` produced by `defineSchema`
13
- * (the modern path) or a raw zod schema (legacy path during the migration
14
- * window). Both shapes are routed through the `SchemaValidator` contract
15
- * so no zod-specific logic remains in this file.
12
+ * Inputs must be opaque `Schema<T>` values produced by `defineSchema`.
13
+ * Conversion is routed through the `SchemaValidator` contract so no
14
+ * zod-specific logic remains in this file.
16
15
  *
17
16
  * @module tool/schema/zod-json-schema
18
17
  */
@@ -29,52 +28,23 @@ function isContractSchema(value) {
29
28
  typeof value.parse === "function" &&
30
29
  typeof value.safeParse === "function");
31
30
  }
32
- /** Detect a raw zod schema: object with `_def` carrying `typeName` (v3) or `type` (v4). */
33
- function isRawZodSchema(value) {
34
- if (value === null || typeof value !== "object")
35
- return false;
36
- if (!("_def" in value))
37
- return false;
38
- const def = value._def;
39
- if (!def || typeof def !== "object")
40
- return false;
41
- return typeof def.typeName === "string" || typeof def.type === "string";
42
- }
43
31
  /**
44
- * Adapter that wraps a raw zod schema in the contract's `Schema<unknown>`
45
- * shape so the contract's `toJsonSchema` / `isOptional` can unwrap it via
46
- * the `__zod` brand.
47
- */
48
- function wrapRawZod(value) {
49
- return { __zod: value };
50
- }
51
- /**
52
- * Convert a `Schema<T>` (or, transitionally, a raw zod schema) into a
53
- * JSON Schema document.
32
+ * Convert a `Schema<T>` into a JSON Schema document.
54
33
  *
55
- * Throws if the input is neither a contract schema nor a raw zod schema —
56
- * matches the pre-B2 behavior of the original `zodToJsonSchema` guard.
34
+ * Throws if the input is not a contract schema.
57
35
  */
58
36
  export function zodToJsonSchema(schema) {
59
37
  if (isContractSchema(schema)) {
60
38
  return schemaToJsonSchema(schema);
61
39
  }
62
- if (isRawZodSchema(schema)) {
63
- return schemaToJsonSchema(wrapRawZod(schema));
64
- }
65
- throw new Error("Invalid Zod schema: missing _def property");
40
+ throw new Error("Invalid Veryfront schema: use defineSchema()");
66
41
  }
67
42
  /**
68
- * Returns `true` when the schema permits `undefined`. Accepts both
69
- * contract `Schema<T>` and raw zod schemas for the same compatibility
70
- * reasons as `zodToJsonSchema` above.
43
+ * Returns `true` when the schema permits `undefined`.
71
44
  */
72
45
  export function isOptionalSchema(schema) {
73
46
  if (isContractSchema(schema)) {
74
47
  return schemaIsOptional(schema);
75
48
  }
76
- if (isRawZodSchema(schema)) {
77
- return schemaIsOptional(wrapRawZod(schema));
78
- }
79
49
  return false;
80
50
  }
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.656";
2
+ export declare const VERSION = "0.1.657";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.656";
4
+ export const VERSION = "0.1.657";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.656",
3
+ "version": "0.1.657",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",