hyperterse 1.4.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 -285
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,191 +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
64
-
65
- Turn queries into production-ready APIs with typed inputs, predictable outputs, and built-in documentation.
25
+ Hyperterse turns tool configs into callable tools, with:
66
26
 
67
- ### Single source of truth
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.
68
31
 
69
- Generate REST endpoints, OpenAPI specs, LLM-readable docs, and MCP tools from one configuration file.
32
+ ## What Hyperterse is
70
33
 
71
- ### Database independence
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.
72
38
 
73
- Work across PostgreSQL, MySQL, MongoDB, and Redis using a consistent, unified interface.
39
+ ## Quick start
74
40
 
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, MCP, and caching
170
- - **[Caching Guide](https://docs.hyperterse.com/guides/caching)** - Executor-level query caching, TTL, and override strategy
171
- - **[Concepts](https://docs.hyperterse.com/concepts)** - Core concepts: adapters, queries, and inputs
172
- - **[Databases](https://docs.hyperterse.com/databases)** - Database-specific documentation
173
- - **[Deployment](https://docs.hyperterse.com/deployment)** - Deployment guides for various platforms
174
-
175
- ### Runtime Endpoints
176
-
177
- When running, Hyperterse exposes several endpoints:
178
-
179
- - **OpenAPI Documentation**: `GET /docs` - Interactive API documentation
180
- - **LLM Documentation**: `GET /llms.txt` - AI-friendly documentation format
181
- - **MCP Protocol**: `POST /mcp` - Model Context Protocol JSON-RPC endpoint
182
-
183
- ## Examples
184
-
185
- ### MCP Protocol
186
-
187
- List available tools:
188
-
189
78
  ```bash
190
79
  curl -X POST http://localhost:8080/mcp \
191
80
  -H "Content-Type: application/json" \
@@ -196,160 +85,102 @@ curl -X POST http://localhost:8080/mcp \
196
85
  }'
197
86
  ```
198
87
 
199
- Invoke a tool:
88
+ ## Project structure
200
89
 
201
- ```bash
202
- curl -X POST http://localhost:8080/mcp \
203
- -H "Content-Type: application/json" \
204
- -d '{
205
- "jsonrpc": "2.0",
206
- "method": "tools/call",
207
- "params": {
208
- "name": "get-user-by-id",
209
- "arguments": {
210
- "userId": "123"
211
- }
212
- },
213
- "id": 1
214
- }'
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
215
104
  ```
216
105
 
217
- ### User Management
106
+ ## Tool examples
218
107
 
219
- ```yaml
220
- queries:
221
- get-user-by-id:
222
- use: user_db
223
- description: "Retrieve user information by ID"
224
- statement: |
225
- SELECT id, name, email, created_at
226
- FROM users
227
- WHERE id = {{ inputs.userId }}
228
- ```
229
-
230
- ### Analytics
108
+ ### DB-backed tool
231
109
 
232
110
  ```yaml
233
- queries:
234
- daily-stats:
235
- description: "Daily statistics over a date range"
236
- statement: |
237
- SELECT
238
- DATE(created_at) AS date,
239
- COUNT(*) AS total_events,
240
- COUNT(DISTINCT user_id) AS unique_users
241
- FROM events
242
- WHERE created_at BETWEEN {{ inputs.startDate }} AND {{ inputs.endDate }}
243
- GROUP BY DATE(created_at)
244
- ORDER BY date DESC
245
- ```
246
-
247
- ## CLI
248
-
249
- Run:
250
-
251
- ```bash
252
- hyperterse run -f config.terse
253
- ```
254
-
255
- Development mode (hot reload):
256
-
257
- ```bash
258
- hyperterse dev -f config.terse
259
- ```
260
-
261
- Validate configuration:
262
-
263
- ```bash
264
- hyperterse validate -f config.terse
265
- ```
266
-
267
- Generate artifacts:
268
-
269
- ```bash
270
- hyperterse generate llms -f config.terse
271
- hyperterse generate skills -f config.terse
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
272
120
  ```
273
121
 
274
- Initialize:
122
+ ### Script-backed tool
275
123
 
276
- ```bash
277
- hyperterse init
124
+ ```yaml
125
+ description: "Get weather"
126
+ handler: "./weather-handler.ts"
278
127
  ```
279
128
 
280
- Upgrade:
129
+ ## CLI commands
281
130
 
282
- ```bash
283
- hyperterse upgrade
284
- ```
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
285
138
 
286
- Export:
139
+ ## Build and deploy
287
140
 
288
141
  ```bash
289
- hyperterse export -f config.terse -o dist
142
+ hyperterse validate
143
+ hyperterse build -o dist
144
+ hyperterse serve dist/
290
145
  ```
291
146
 
292
- ## Configuration
147
+ The `dist/` output includes everything needed to run in production.
293
148
 
294
- Hyperterse uses a simple YAML-like configuration format (`.terse` files) to define your database adapters and queries.
149
+ ## Configuration highlights
295
150
 
296
- **Supported input types:** `string`, `int`, `float`, `boolean`, `uuid`, `datetime`
151
+ - root config: `.hyperterse`
152
+ - adapter files: `app/adapters/*.terse`
153
+ - tool files: `app/tools/*/config.terse`
297
154
 
298
- **Template syntax:**
299
-
300
- ```sql
301
- WHERE price <= {{ inputs.maxPrice }}
302
- ```
303
-
304
- **Optional inputs:**
305
-
306
- ```yaml
307
- optional: true
308
- default: "20"
309
- ```
155
+ Supported primitive types:
310
156
 
311
- **Multiple databases:** Hyperterse supports multiple adapters in a single configuration file.
157
+ - `string`
158
+ - `int`
159
+ - `float`
160
+ - `boolean`
161
+ - `datetime`
312
162
 
313
- For complete configuration reference, see the [configuration guide](https://docs.hyperterse.com/reference/configuration).
163
+ ## Security note
314
164
 
315
- ## Security
316
-
317
- Hyperterse is designed with security as a baseline:
318
-
319
- - 🔒 **Credentials are never exposed** - Connection strings stay server-side
320
- - 🛡️ **SQL is never returned to clients** - Raw queries remain hidden
321
- - ✅ **Inputs are validated and escaped** - Strong typing prevents injection
322
- - 🔇 **Errors are sanitized by default** - Internal details stay internal
323
-
324
- 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.
325
166
 
326
167
  ## Contributing
327
168
 
328
- Contributions are welcome! We appreciate your help in making Hyperterse better.
329
-
330
- 1. Fork the repository
331
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
332
- 3. Add tests for your changes
333
- 4. Ensure code follows standard Go formatting
334
- 5. Open a pull request
335
-
336
- 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.
337
-
338
- **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.
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
 
340
- ## Support
341
-
342
- - 🌐 **Website**: [hyperterse.com](https://hyperterse.com)
343
- - 📖 **Documentation**: [docs.hyperterse.com](https://docs.hyperterse.com)
344
- - 🐛 **Issues**: [GitHub Issues](https://github.com/hyperterse/hyperterse/issues)
345
- - 💬 **Discussions**: [GitHub Discussions](https://github.com/hyperterse/hyperterse/discussions)
175
+ See `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`.
346
176
 
347
177
  ---
348
178
 
349
- <div align="center">
350
-
351
- Made with care by the Hyperterse team.
352
-
353
- [Website](https://hyperterse.com) • [GitHub](https://github.com/hyperterse/hyperterse) • [Documentation](https://docs.hyperterse.com)
354
-
355
- </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.4.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",