ont-run 0.0.13 → 0.0.14
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/README.md +7 -19
- package/bin/ont.ts +1 -1
- package/dist/apps/index.html +2 -30
- package/dist/bin/chunk-V5WCSB5X.js +437 -0
- package/dist/bin/differ-FRGVBDVO.js +8 -0
- package/dist/bin/ont.d.ts +1 -1
- package/dist/bin/ont.js +1720 -6840
- package/dist/chunk-MBDEYKRP.js +457 -0
- package/dist/chunk-MBDEYKRP.js.map +1 -0
- package/dist/chunk-OVWIEFZU.js +119 -0
- package/dist/chunk-OVWIEFZU.js.map +1 -0
- package/dist/differ-UI6NZ3JO.js +9 -0
- package/dist/differ-UI6NZ3JO.js.map +1 -0
- package/dist/index.d.ts +536 -0
- package/dist/index.js +756 -37436
- package/dist/index.js.map +1 -0
- package/dist/server-65SFFKYU.js +5033 -0
- package/dist/server-65SFFKYU.js.map +1 -0
- package/dist/src/cli/commands/init/templates/app.d.ts +2 -2
- package/dist/src/cli/commands/init/templates/components.d.ts +1 -1
- package/dist/src/cli/commands/init/templates/config.d.ts +4 -4
- package/dist/src/cli/commands/init/templates/index.d.ts +1 -1
- package/dist/src/cli/commands/init/templates/routes.d.ts +1 -1
- package/dist/src/cli/commands/init/templates/server.d.ts +1 -1
- package/dist/src/config/types.d.ts +7 -3
- package/dist/src/server/mcp/apps/visualizer.d.ts +2 -2
- package/package.json +23 -26
- package/src/browser/launch.ts +1 -1
- package/src/browser/server.ts +13 -2
- package/src/cli/commands/init/index.ts +43 -96
- package/src/cli/commands/init/templates/app.ts +2 -2
- package/src/cli/commands/init/templates/components.ts +1 -1
- package/src/cli/commands/init/templates/config.ts +35 -34
- package/src/cli/commands/init/templates/index.ts +1 -1
- package/src/cli/commands/init/templates/routes.ts +1 -1
- package/src/cli/commands/init/templates/server.ts +36 -20
- package/src/config/types.ts +7 -3
- package/src/config/validate-ui.ts +37 -15
- package/src/runtime/index.ts +7 -3
- package/src/server/api/index.ts +5 -5
- package/src/server/mcp/apps/visualizer/components/DataChart.tsx +107 -77
- package/src/server/mcp/apps/visualizer/components/SettingsSidebar.tsx +202 -0
- package/src/server/mcp/apps/visualizer/mcp-app.tsx +217 -36
- package/src/server/mcp/apps/visualizer/styles.css +318 -75
- package/src/server/mcp/apps/visualizer/utils/csv.ts +41 -0
- package/src/server/mcp/apps/visualizer.ts +2 -2
- package/src/server/mcp/index.ts +5 -0
- package/src/server/start.ts +4 -4
- package/dist/src/cli/commands/init.d.ts +0 -12
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ WARN Ontology has changed:
|
|
|
70
70
|
~ assignTicket
|
|
71
71
|
Access: [admin] -> [admin, public]
|
|
72
72
|
|
|
73
|
-
WARN Run `
|
|
73
|
+
WARN Run `npx ont-run review` to approve these changes.
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
**Why not just prompts?** The ontology is the source of truth. The framework won't run if it changes without human review.
|
|
@@ -78,10 +78,6 @@ WARN Run `bunx ont-run review` to approve these changes.
|
|
|
78
78
|
## Installation
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
# Using bun (recommended)
|
|
82
|
-
bunx ont-run init my-api
|
|
83
|
-
|
|
84
|
-
# Using npm
|
|
85
81
|
npx ont-run init my-api
|
|
86
82
|
```
|
|
87
83
|
|
|
@@ -92,32 +88,24 @@ This creates a new project with the ont-run framework configured.
|
|
|
92
88
|
### 1. Initialize
|
|
93
89
|
|
|
94
90
|
```bash
|
|
95
|
-
|
|
96
|
-
# or: npx ont-run init my-api
|
|
97
|
-
|
|
91
|
+
npx ont-run init my-api
|
|
98
92
|
cd my-api
|
|
99
93
|
```
|
|
100
94
|
|
|
101
95
|
### 2. Review the initial ontology
|
|
102
96
|
|
|
103
97
|
```bash
|
|
104
|
-
|
|
105
|
-
# or: npx ont-run review
|
|
98
|
+
npm run review
|
|
106
99
|
```
|
|
107
100
|
|
|
108
101
|
Opens a browser showing all functions and access groups. Click **Approve** to generate `ont.lock`.
|
|
109
102
|
|
|
110
103
|
### 3. Start the server
|
|
111
104
|
|
|
112
|
-
|
|
113
|
-
// index.ts
|
|
114
|
-
import { startOnt } from 'ont-run';
|
|
115
|
-
|
|
116
|
-
await startOnt({ port: 3000 });
|
|
117
|
-
```
|
|
105
|
+
The generated project includes a full-stack setup with Vite + React Router for the frontend and Hono for the backend.
|
|
118
106
|
|
|
119
107
|
```bash
|
|
120
|
-
|
|
108
|
+
npm run dev
|
|
121
109
|
```
|
|
122
110
|
|
|
123
111
|
Your API is running at `http://localhost:3000`.
|
|
@@ -279,8 +267,8 @@ export default async function editPost(
|
|
|
279
267
|
## CLI Commands
|
|
280
268
|
|
|
281
269
|
```bash
|
|
282
|
-
|
|
283
|
-
|
|
270
|
+
npx ont-run init [dir] # Initialize a new project
|
|
271
|
+
npx ont-run review # Review and approve ontology changes
|
|
284
272
|
```
|
|
285
273
|
|
|
286
274
|
## API Endpoints
|
package/bin/ont.ts
CHANGED