🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@json-render/core

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@json-render/core - npm Package Compare versions

Comparing version
0.12.0
to
0.12.1
+6
-3
dist/index.d.mts

@@ -465,7 +465,10 @@ import { S as StateModel, V as VisibilityCondition, a as StateCondition, A as AndCondition, O as OrCondition, D as DynamicValue, b as Spec } from './store-utils-D98Czbil.mjs';

*
* - `"generate"` (default): The LLM should output only JSONL patches (no prose).
* - `"chat"`: The LLM should respond conversationally first, then output JSONL patches.
* - `"standalone"` (default): The LLM should output only JSONL patches (no prose).
* - `"inline"`: The LLM should respond conversationally first, then output JSONL patches.
* Includes rules about interleaving text with JSONL and not wrapping in code fences.
*
* @deprecated `"generate"` — use `"standalone"` instead.
* @deprecated `"chat"` — use `"inline"` instead.
*/
mode?: "generate" | "chat";
mode?: "standalone" | "inline" | "generate" | "chat";
}

@@ -472,0 +475,0 @@ /**

@@ -465,7 +465,10 @@ import { S as StateModel, V as VisibilityCondition, a as StateCondition, A as AndCondition, O as OrCondition, D as DynamicValue, b as Spec } from './store-utils-D98Czbil.js';

*
* - `"generate"` (default): The LLM should output only JSONL patches (no prose).
* - `"chat"`: The LLM should respond conversationally first, then output JSONL patches.
* - `"standalone"` (default): The LLM should output only JSONL patches (no prose).
* - `"inline"`: The LLM should respond conversationally first, then output JSONL patches.
* Includes rules about interleaving text with JSONL and not wrapping in code fences.
*
* @deprecated `"generate"` — use `"standalone"` instead.
* @deprecated `"chat"` — use `"inline"` instead.
*/
mode?: "generate" | "chat";
mode?: "standalone" | "inline" | "generate" | "chat";
}

@@ -472,0 +475,0 @@ /**

@@ -1065,8 +1065,13 @@ import {

customRules = [],
mode = "generate"
mode: rawMode = "standalone"
} = options;
const mode = rawMode === "chat" ? (console.warn(
'[json-render] mode "chat" is deprecated, use "inline" instead'
), "inline") : rawMode === "generate" ? (console.warn(
'[json-render] mode "generate" is deprecated, use "standalone" instead'
), "standalone") : rawMode;
const lines = [];
lines.push(system);
lines.push("");
if (mode === "chat") {
if (mode === "inline") {
lines.push("OUTPUT FORMAT (text + JSONL, RFC 6902 JSON Patch):");

@@ -1463,3 +1468,3 @@ lines.push(

lines.push("RULES:");
const baseRules = mode === "chat" ? [
const baseRules = mode === "inline" ? [
"When generating UI, wrap all JSONL patches in a ```spec code fence - one JSON object per line inside the fence",

@@ -1466,0 +1471,0 @@ "Write a brief conversational response before any JSONL output",

{
"name": "@json-render/core",
"version": "0.12.0",
"version": "0.12.1",
"license": "Apache-2.0",

@@ -22,3 +22,3 @@ "description": "JSON becomes real things. Define your catalog, register your components, let AI generate.",

},
"homepage": "https://github.com/vercel-labs/json-render#readme",
"homepage": "https://json-render.dev",
"bugs": {

@@ -25,0 +25,0 @@ "url": "https://github.com/vercel-labs/json-render/issues"

@@ -230,3 +230,3 @@ # @json-render/core

### Chat Mode (Mixed Streams)
### Inline Mode (Mixed Streams)

@@ -233,0 +233,0 @@ | Export | Purpose |

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display