@lynq/hono 0.1.0 → 0.1.1

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 +68 -0
  2. package/package.json +6 -6
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # @lynq/hono
2
+
3
+ [Hono](https://hono.dev) framework adapter for [lynq](https://www.npmjs.com/package/@lynq/lynq) MCP framework.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @lynq/hono @lynq/lynq hono
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { Hono } from "hono";
15
+ import { createMCPServer } from "@lynq/lynq";
16
+ import { mountLynq } from "@lynq/hono";
17
+
18
+ const app = new Hono();
19
+ const server = createMCPServer({ name: "my-server", version: "1.0.0" });
20
+
21
+ // Register tools on server...
22
+
23
+ mountLynq(app, server);
24
+ // MCP endpoint is now available at POST /mcp
25
+
26
+ export default app;
27
+ ```
28
+
29
+ ### With OAuth/payment pages
30
+
31
+ ```ts
32
+ mountLynq(app, server, {
33
+ pages: {
34
+ github: {
35
+ clientId: process.env.GITHUB_CLIENT_ID!,
36
+ clientSecret: process.env.GITHUB_CLIENT_SECRET!,
37
+ },
38
+ stripe: { secretKey: process.env.STRIPE_SECRET_KEY! },
39
+ crypto: true,
40
+ },
41
+ });
42
+ // Auto-registers callback routes under /lynq/
43
+ ```
44
+
45
+ ## Options
46
+
47
+ | Option | Type | Default | Description |
48
+ |---|---|---|---|
49
+ | `path` | `string` | `"/mcp"` | Route path for MCP endpoint |
50
+ | `allowedHosts` | `string[]` | localhost variants | DNS rebinding protection |
51
+ | `pages` | `PagesConfig` | — | Enable auth/payment callback pages |
52
+ | `pagesPrefix` | `string` | `"/lynq"` | URL prefix for pages routes |
53
+
54
+ ### Auto-registered routes (when `pages` is set)
55
+
56
+ - `/lynq/auth/{github,google}/callback` — OAuth callbacks
57
+ - `/lynq/payment/stripe/callback` — Stripe callback
58
+ - `/lynq/payment/crypto` — Crypto payment page (GET + POST)
59
+ - `/lynq/auth/success` — Auth success page
60
+ - `/lynq/payment/success` — Payment success page
61
+
62
+ ## Documentation
63
+
64
+ [https://hogekai.github.io/lynq/](https://hogekai.github.io/lynq/)
65
+
66
+ ## License
67
+
68
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynq/hono",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Hono adapter for lynq MCP framework.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -14,7 +14,7 @@
14
14
  "dist"
15
15
  ],
16
16
  "dependencies": {
17
- "@lynq/lynq": "^0.8.0"
17
+ "@lynq/lynq": "^0.8.4"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "hono": "^4.0.0",
@@ -42,10 +42,10 @@
42
42
  "tsup": "^8.0.0",
43
43
  "typescript": "^5.6.0",
44
44
  "vitest": "^2.0.0",
45
- "@lynq/google": "^0.1.0",
46
- "@lynq/stripe": "^0.1.0",
47
- "@lynq/crypto": "^0.1.0",
48
- "@lynq/github": "^0.1.0"
45
+ "@lynq/github": "^0.1.1",
46
+ "@lynq/google": "^0.1.1",
47
+ "@lynq/stripe": "^0.1.1",
48
+ "@lynq/crypto": "^0.1.1"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"