hyperterse 1.3.0 → 2.0.0-rc.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.
Files changed (2) hide show
  1. package/README.md +116 -280
  2. package/package.json +9 -2
package/README.md CHANGED
@@ -1,190 +1,80 @@
1
1
  <div align="center">
2
-
3
- [![Hyperterse](docs/public/og.png)](https://docs.hyperterse.com)
4
-
5
- # Hyperterse
6
-
7
- **Connect your data to your agents.**
8
-
9
- A declarative interface between your data and modern software. Turn database queries into stable APIs and AI-ready tools—without exposing SQL, writing boilerplate, or coupling your application to your database.
10
-
11
- [Website](https://hyperterse.com) • [Documentation](https://docs.hyperterse.com) • [Quick Start](#quick-start) • [Features](#features) • [Examples](#examples)
12
-
2
+ <picture>
3
+ <img alt="Hyperterse - connect your data to your agents." src="docs/assets/og.png" />
4
+ </picture>
13
5
  </div>
6
+ <br />
7
+ <div align="center">
8
+ <h1>Hyperterse</h1>
9
+ </div>
10
+ <p align="center">
11
+ <strong>The declarative framework for performant MCP servers.</strong><br />
12
+ <a href="https://hyperterse.com">Website</a>
13
+
14
+ <a href="https://docs.hyperterse.com">Documentation</a>
15
+
16
+ <a href="#quick-start">Quick Start</a>
17
+
18
+ <a href="#tool-examples">Examples</a>
19
+
20
+ <a href="https://github.com/hyperterse/hyperterse">GitHub</a>
21
+ </p>
14
22
 
15
23
  ---
16
24
 
17
- ## What is Hyperterse?
18
-
19
- Hyperterse is a high-performance runtime server that transforms database queries into REST endpoints and MCP (Model Context Protocol) tools.
20
-
21
- You describe your queries once, in a simple configuration file. Hyperterse does the rest:
22
-
23
- * Generates individual, typed endpoints
24
- * Validates inputs automatically
25
- * Produces OpenAPI documentation
26
- * Exposes queries safely to AI systems
27
-
28
- No ORMs. No boilerplate. No exposed SQL.
29
-
30
- ## Designed for Modern Systems
31
-
32
- ### AI & LLM Applications
33
-
34
- Hyperterse is built with AI in mind.
35
-
36
- * **AI agents and assistants** - Safely query databases through MCP without exposing raw SQL.
37
- * **LLM tool calling** - Let models discover and invoke database operations autonomously.
38
- * **Retrieval-augmented generation (RAG)** - Use structured database queries as reliable context.
39
- * **Conversational interfaces** - Power chatbots that access live business data.
40
- * **AI-driven analytics** - Enable models to generate insights through validated queries.
41
- * **Multi-agent systems** - Share consistent database access across agents.
42
- * **Natural language to SQL pipelines** - Bridge human input and databases using tool calls.
43
- * **AI dashboards** - Query and visualize data dynamically.
44
-
45
- ### Traditional Use Cases
46
-
47
- * **Database-backed APIs** without boilerplate
48
- * **Lightweight microservices** without ORM overhead
49
- * **Rapid prototyping** with configuration-first workflows
50
-
51
- ## Features
52
-
53
- Hyperterse comes several features that help you leverage accessing your data in a secure manner for your AI agents and LLMs.
54
-
55
- ### Declarative data interfaces
56
-
57
- Define the shape and intent of data access once, and let Hyperterse handle execution, validation, and exposure.
58
-
59
- ### Agent-ready by design
60
-
61
- Connect your data to AI agents through discoverable, callable tools—without exposing SQL, schemas, or credentials.
62
-
63
- ### Zero-boilerplate API
25
+ Hyperterse turns tool configs into callable tools, with:
64
26
 
65
- Turn queries into production-ready APIs with typed inputs, predictable outputs, and built-in documentation.
27
+ - filesystem-based tool discovery,
28
+ - pluggable adapters (Postgres, MySQL, MongoDB, Redis),
29
+ - optional scripts for transforms and handlers,
30
+ - MCP runtime exposure over Streamable HTTP.
66
31
 
67
- ### Single source of truth
32
+ ## What Hyperterse is
68
33
 
69
- Generate REST endpoints, OpenAPI specs, LLM-readable docs, and MCP tools from one configuration file.
34
+ - **Tool-first MCP framework**: each tool config compiles into a tool.
35
+ - **Declarative runtime**: root config + adapter files + tool files.
36
+ - **Extensible execution pipeline**: auth -> input transform -> execute -> output transform.
37
+ - **Embedded scripting**: script hooks run in a sandboxed runtime; bundled at compile time.
70
38
 
71
- ### Database independence
39
+ ## Quick start
72
40
 
73
- Work across PostgreSQL, MySQL, and Redis using a consistent, unified interface.
74
-
75
- ### Fast and iterative development
76
-
77
- Update queries and schemas with immediate feedback during development.
78
-
79
- ### Portable deployment
80
-
81
- Ship a self-contained runtime that moves cleanly from local development to production.
82
-
83
- ### Built to scale
84
-
85
- Support everything from prototypes to multi-agent systems without changing your architecture.
86
-
87
- ## Quick Start
88
-
89
- ### Installation
90
-
91
- Install Hyperterse with a single command:
41
+ ### Install
92
42
 
93
43
  ```bash
94
44
  curl -fsSL https://hyperterse.com/install | bash
95
45
  ```
96
46
 
97
- **Supported platforms:**
47
+ ### Initialize
98
48
 
99
- * Linux (amd64, arm64, arm)
100
- * macOS (Intel, Apple Silicon)
101
- * Windows (amd64, arm64)
49
+ ```bash
50
+ hyperterse init
51
+ ```
102
52
 
103
- For more installation options, see the [installation guide](https://docs.hyperterse.com/getting-started/installation).
53
+ This scaffolds:
104
54
 
105
- ### Your First Query
55
+ - `.hyperterse`
56
+ - `app/adapters/my-database.terse`
57
+ - `app/tools/hello-world/config.terse`
58
+ - `app/tools/hello-world/user-data-mapper.ts`
106
59
 
107
- Create a configuration file:
60
+ ### Run
108
61
 
109
- ```yaml
110
- name: my-api
111
-
112
- adapters:
113
- my_database:
114
- connector: postgres
115
- connection_string: "postgresql://user:password@localhost:5432/mydb"
116
-
117
- queries:
118
- get-user:
119
- use: my_database
120
- description: "Retrieve a user by email address"
121
- statement: |
122
- SELECT id, name, email, created_at
123
- FROM users
124
- WHERE email = {{ inputs.email }}
125
- inputs:
126
- email:
127
- type: string
128
- description: "User email address"
62
+ ```bash
63
+ hyperterse start
129
64
  ```
130
65
 
131
- Start the server:
66
+ With hot reload:
132
67
 
133
68
  ```bash
134
- hyperterse run -f config.terse
69
+ hyperterse start --watch
135
70
  ```
136
71
 
137
- Call the endpoint:
72
+ ### Test
138
73
 
139
74
  ```bash
140
- curl -X POST http://localhost:8080/query/get-user \
141
- -H "Content-Type: application/json" \
142
- -d '{"email": "user@example.com"}'
143
- ```
144
-
145
- Response:
146
-
147
- ```json
148
- {
149
- "success": true,
150
- "error": "",
151
- "results": [
152
- {
153
- "id": 123,
154
- "name": "John Doe",
155
- "email": "user@example.com",
156
- "created_at": "2024-01-01T00:00:00Z"
157
- }
158
- ]
159
- }
75
+ curl http://localhost:8080/heartbeat
160
76
  ```
161
77
 
162
- ## Documentation
163
-
164
- 📚 **[Read the docs →](https://docs.hyperterse.com)**
165
-
166
- * **[Getting Started](https://docs.hyperterse.com/getting-started/quick-start)** - Quick start guide and installation
167
- * **[CLI Reference](https://docs.hyperterse.com/reference/cli)** - Complete command-line interface reference
168
- * **[Configuration Guide](https://docs.hyperterse.com/reference/configuration)** - Configuration file reference
169
- * **[Guides](https://docs.hyperterse.com/guides)** - Practical guides for AI integration, OpenAPI, and MCP
170
- * **[Concepts](https://docs.hyperterse.com/concepts)** - Core concepts: adapters, queries, and inputs
171
- * **[Databases](https://docs.hyperterse.com/databases)** - Database-specific documentation
172
- * **[Deployment](https://docs.hyperterse.com/deployment)** - Deployment guides for various platforms
173
-
174
- ### Runtime Endpoints
175
-
176
- When running, Hyperterse exposes several endpoints:
177
-
178
- * **OpenAPI Documentation**: `GET /docs` - Interactive API documentation
179
- * **LLM Documentation**: `GET /llms.txt` - AI-friendly documentation format
180
- * **MCP Protocol**: `POST /mcp` - Model Context Protocol JSON-RPC endpoint
181
-
182
- ## Examples
183
-
184
- ### MCP Protocol
185
-
186
- List available tools:
187
-
188
78
  ```bash
189
79
  curl -X POST http://localhost:8080/mcp \
190
80
  -H "Content-Type: application/json" \
@@ -195,156 +85,102 @@ curl -X POST http://localhost:8080/mcp \
195
85
  }'
196
86
  ```
197
87
 
198
- Invoke a tool:
88
+ ## Project structure
199
89
 
200
- ```bash
201
- curl -X POST http://localhost:8080/mcp \
202
- -H "Content-Type: application/json" \
203
- -d '{
204
- "jsonrpc": "2.0",
205
- "method": "tools/call",
206
- "params": {
207
- "name": "get-user-by-id",
208
- "arguments": {
209
- "userId": "123"
210
- }
211
- },
212
- "id": 1
213
- }'
90
+ ```text
91
+ my-project/
92
+ .hyperterse
93
+ app/
94
+ adapters/
95
+ main-db.terse
96
+ tools/
97
+ get-user/
98
+ config.terse
99
+ input.ts
100
+ output.ts
101
+ get-weather/
102
+ config.terse
103
+ handler.ts
214
104
  ```
215
105
 
216
- ### User Management
217
-
218
- ```yaml
219
- queries:
220
- get-user-by-id:
221
- use: user_db
222
- description: "Retrieve user information by ID"
223
- statement: |
224
- SELECT id, name, email, created_at
225
- FROM users
226
- WHERE id = {{ inputs.userId }}
227
- ```
106
+ ## Tool examples
228
107
 
229
- ### Analytics
108
+ ### DB-backed tool
230
109
 
231
110
  ```yaml
232
- queries:
233
- daily-stats:
234
- description: "Daily statistics over a date range"
235
- statement: |
236
- SELECT
237
- DATE(created_at) AS date,
238
- COUNT(*) AS total_events,
239
- COUNT(DISTINCT user_id) AS unique_users
240
- FROM events
241
- WHERE created_at BETWEEN {{ inputs.startDate }} AND {{ inputs.endDate }}
242
- GROUP BY DATE(created_at)
243
- ORDER BY date DESC
111
+ description: "Get user by id"
112
+ use: main-db
113
+ statement: |
114
+ SELECT id, name, email
115
+ FROM users
116
+ WHERE id = {{ inputs.user_id }}
117
+ inputs:
118
+ user_id:
119
+ type: int
244
120
  ```
245
121
 
246
- ## CLI
247
-
248
- Run:
122
+ ### Script-backed tool
249
123
 
250
- ```bash
251
- hyperterse run -f config.terse
252
- ```
253
-
254
- Development mode (hot reload):
255
-
256
- ```bash
257
- hyperterse dev -f config.terse
258
- ```
259
-
260
- Generate artifacts:
261
-
262
- ```bash
263
- hyperterse generate llms -f config.terse
264
- hyperterse generate skills -f config.terse
265
- ```
266
-
267
- Initialize:
268
-
269
- ```bash
270
- hyperterse init
124
+ ```yaml
125
+ description: "Get weather"
126
+ handler: "./weather-handler.ts"
271
127
  ```
272
128
 
273
- Upgrade:
129
+ ## CLI commands
274
130
 
275
- ```bash
276
- hyperterse upgrade
277
- ```
131
+ - `start` - run runtime from config
132
+ - `serve` - run from a compiled artifact
133
+ - `build` - produce a deployable artifact
134
+ - `validate` - validate config and tool scripts
135
+ - `init` - scaffold starter project
136
+ - `upgrade` - upgrade installed binary
137
+ - `completion` - shell completion helper
278
138
 
279
- Export:
139
+ ## Build and deploy
280
140
 
281
141
  ```bash
282
- hyperterse export -f config.terse -o dist
283
- ```
284
-
285
- ## Configuration
286
-
287
- Hyperterse uses a simple YAML-like configuration format (`.terse` files) to define your database adapters and queries.
288
-
289
- **Supported input types:** `string`, `int`, `float`, `boolean`, `uuid`, `datetime`
290
-
291
- **Template syntax:**
292
-
293
- ```sql
294
- WHERE price <= {{ inputs.maxPrice }}
142
+ hyperterse validate
143
+ hyperterse build -o dist
144
+ hyperterse serve dist/
295
145
  ```
296
146
 
297
- **Optional inputs:**
298
-
299
- ```yaml
300
- optional: true
301
- default: "20"
302
- ```
147
+ The `dist/` output includes everything needed to run in production.
303
148
 
304
- **Multiple databases:** Hyperterse supports multiple adapters in a single configuration file.
149
+ ## Configuration highlights
305
150
 
306
- For complete configuration reference, see the [configuration guide](https://docs.hyperterse.com/reference/configuration).
151
+ - root config: `.hyperterse`
152
+ - adapter files: `app/adapters/*.terse`
153
+ - tool files: `app/tools/*/config.terse`
307
154
 
308
- ## Security
155
+ Supported primitive types:
309
156
 
310
- Hyperterse is designed with security as a baseline:
157
+ - `string`
158
+ - `int`
159
+ - `float`
160
+ - `boolean`
161
+ - `datetime`
311
162
 
312
- * 🔒 **Credentials are never exposed** - Connection strings stay server-side
313
- * 🛡️ **SQL is never returned to clients** - Raw queries remain hidden
314
- * ✅ **Inputs are validated and escaped** - Strong typing prevents injection
315
- * 🔇 **Errors are sanitized by default** - Internal details stay internal
163
+ ## Security note
316
164
 
317
- For production deployments, place Hyperterse behind a reverse proxy for authentication, rate limiting, and TLS. See the [production security guide](https://docs.hyperterse.com/security/production) for best practices.
165
+ Hyperterse validates typed inputs, but statement placeholder substitution (`{{ inputs.x }}`) is raw string replacement. Use strict tool input constraints and safe query patterns for production.
318
166
 
319
167
  ## Contributing
320
168
 
321
- Contributions are welcome! We appreciate your help in making Hyperterse better.
322
-
323
- 1. Fork the repository
324
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
325
- 3. Add tests for your changes
326
- 4. Ensure code follows standard Go formatting
327
- 5. Open a pull request
328
-
329
- Please keep changes focused and well-tested. For major changes, open an issue first to discuss your proposal. See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines.
330
-
331
- **Please note**: By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). We are committed to providing a welcoming and inclusive environment for all contributors.
332
-
333
- ## Support
334
-
335
- * 🌐 **Website**: [hyperterse.com](https://hyperterse.com)
336
- * 📖 **Documentation**: [docs.hyperterse.com](https://docs.hyperterse.com)
337
- * 🐛 **Issues**: [GitHub Issues](https://github.com/hyperterse/hyperterse/issues)
338
- * 💬 **Discussions**: [GitHub Discussions](https://github.com/hyperterse/hyperterse/discussions)
169
+ 1. Fork the repo
170
+ 2. Create a feature branch
171
+ 3. Add or update tests
172
+ 4. Run validation/lint/test locally
173
+ 5. Open a PR
339
174
 
175
+ See `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`.
340
176
 
341
177
  ---
342
178
 
343
- <div align="center">
344
-
345
-
346
- Made with care by the Hyperterse team.
347
-
348
- [Website](https://hyperterse.com) [GitHub](https://github.com/hyperterse/hyperterse) • [Documentation](https://docs.hyperterse.com)
349
-
350
- </div>
179
+ <p align="center">
180
+ The declarative framework for performant MCP servers.<br />
181
+ <a href="https://hyperterse.com">Website</a>
182
+
183
+ <a href="https://github.com/hyperterse/hyperterse">GitHub</a>
184
+
185
+ <a href="https://docs.hyperterse.com">Documentation</a>
186
+ </p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperterse",
3
- "version": "1.3.0",
3
+ "version": "2.0.0-rc.0",
4
4
  "description": "A declarative interface to connect your database to your AI agents",
5
5
  "author": "Samrith Shankar <samrith@outlook.com>",
6
6
  "license": "Apache-2.0",
@@ -26,8 +26,15 @@
26
26
  "database",
27
27
  "api",
28
28
  "mcp",
29
+ "model context protocol",
29
30
  "ai",
30
- "agents"
31
+ "agents",
32
+ "postgres",
33
+ "mysql",
34
+ "mongodb",
35
+ "redis",
36
+ "skills",
37
+ "rest"
31
38
  ],
32
39
  "engines": {
33
40
  "node": ">=14.0.0"