@renderify/core 0.1.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.
- package/LICENSE +21 -0
- package/README.md +72 -0
- package/dist/core.cjs.js +1583 -0
- package/dist/core.cjs.js.map +1 -0
- package/dist/core.d.mts +335 -0
- package/dist/core.d.ts +335 -0
- package/dist/core.esm.js +1609 -0
- package/dist/core.esm.js.map +1 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Web LLM
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# @renderify/core
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
Core orchestration layer for Renderify.
|
|
8
|
+
|
|
9
|
+
`@renderify/core` wires together config, context, LLM, code generation, runtime execution, security checks, and UI rendering via `RenderifyApp`.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @renderify/core @renderify/runtime @renderify/security @renderify/llm
|
|
15
|
+
# or
|
|
16
|
+
npm i @renderify/core @renderify/runtime @renderify/security @renderify/llm
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Main API
|
|
20
|
+
|
|
21
|
+
- `createRenderifyApp(deps)`
|
|
22
|
+
- `RenderifyApp`
|
|
23
|
+
- `PolicyRejectionError`
|
|
24
|
+
- `renderPrompt()` / `renderPromptStream()` / `renderPlan()`
|
|
25
|
+
|
|
26
|
+
The package also re-exports core interfaces from `api-integration`, `codegen`, `config`, `context`, `customization`, `llm-interpreter`, `performance`, `security`, and `ui`.
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import {
|
|
32
|
+
createRenderifyApp,
|
|
33
|
+
DefaultApiIntegration,
|
|
34
|
+
DefaultCodeGenerator,
|
|
35
|
+
DefaultContextManager,
|
|
36
|
+
DefaultCustomizationEngine,
|
|
37
|
+
DefaultPerformanceOptimizer,
|
|
38
|
+
DefaultRenderifyConfig,
|
|
39
|
+
DefaultUIRenderer,
|
|
40
|
+
} from "@renderify/core";
|
|
41
|
+
import { createLLMInterpreter } from "@renderify/llm";
|
|
42
|
+
import { DefaultRuntimeManager, JspmModuleLoader } from "@renderify/runtime";
|
|
43
|
+
import { DefaultSecurityChecker } from "@renderify/security";
|
|
44
|
+
|
|
45
|
+
const app = createRenderifyApp({
|
|
46
|
+
config: new DefaultRenderifyConfig(),
|
|
47
|
+
context: new DefaultContextManager(),
|
|
48
|
+
llm: createLLMInterpreter({ provider: "openai" }),
|
|
49
|
+
codegen: new DefaultCodeGenerator(),
|
|
50
|
+
runtime: new DefaultRuntimeManager({ moduleLoader: new JspmModuleLoader() }),
|
|
51
|
+
security: new DefaultSecurityChecker(),
|
|
52
|
+
performance: new DefaultPerformanceOptimizer(),
|
|
53
|
+
ui: new DefaultUIRenderer(),
|
|
54
|
+
apiIntegration: new DefaultApiIntegration(),
|
|
55
|
+
customization: new DefaultCustomizationEngine(),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
await app.start();
|
|
59
|
+
const result = await app.renderPrompt("build a small dashboard");
|
|
60
|
+
console.log(result.html);
|
|
61
|
+
await app.stop();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Streaming
|
|
65
|
+
|
|
66
|
+
Use `renderPromptStream()` for progressive updates from LLM output to UI preview chunks.
|
|
67
|
+
|
|
68
|
+
## Docs
|
|
69
|
+
|
|
70
|
+
- `../../docs/architecture.md`
|
|
71
|
+
- `../../docs/runtime-execution.md`
|
|
72
|
+
- `../../docs/browser-integration.md`
|