@donghanh/hono 0.4.0 → 0.5.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/package.json +4 -4
- package/src/gpt.ts +1 -0
- package/src/mcp.test.ts +7 -0
- package/src/mcp.ts +4 -4
- package/src/openapi.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donghanh/hono",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Hono routes for
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Hono routes for Apps SDK, LLM chat and GPT Store (deprecated) — renderers for ChatGPT and OpenAI-compatible APIs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"directory": "packages/hono"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@donghanh/core": "^0.
|
|
16
|
+
"@donghanh/core": "^0.5.0",
|
|
17
17
|
"hono": "^4.7.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@donghanh/core": "0.
|
|
20
|
+
"@donghanh/core": "0.5.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/src/gpt.ts
CHANGED
package/src/mcp.test.ts
CHANGED
|
@@ -547,6 +547,13 @@ describe("mcpRoutes", () => {
|
|
|
547
547
|
(await rpc(mcpRoutes({ ...baseConfig, ...config } as any), "tools/list"))
|
|
548
548
|
.result.tools[0];
|
|
549
549
|
|
|
550
|
+
test("an operation with empty input still lists an object schema", async () => {
|
|
551
|
+
const tool = await list({
|
|
552
|
+
registry: makeApp({ op: makeOp("op", { input: {} }) }),
|
|
553
|
+
});
|
|
554
|
+
expect(tool.inputSchema.type).toBe("object");
|
|
555
|
+
});
|
|
556
|
+
|
|
550
557
|
test("tools carry title, idempotentHint and operation meta", async () => {
|
|
551
558
|
const op = makeOp("keep", {
|
|
552
559
|
type: "mutation",
|
package/src/mcp.ts
CHANGED
|
@@ -556,10 +556,10 @@ export function mcpRoutes(config: McpRoutesConfig): Hono {
|
|
|
556
556
|
description: detail?.instruction
|
|
557
557
|
? `${op.description}\n\n${detail.instruction}`
|
|
558
558
|
: op.description,
|
|
559
|
-
inputSchema:
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
559
|
+
inputSchema:
|
|
560
|
+
detail?.input && "type" in detail.input
|
|
561
|
+
? detail.input
|
|
562
|
+
: { type: "object", properties: {}, ...detail?.input },
|
|
563
563
|
annotations: annotationsFor(detail),
|
|
564
564
|
securitySchemes: securitySchemesFor(detail, scopes),
|
|
565
565
|
};
|
package/src/openapi.ts
CHANGED
|
@@ -102,6 +102,8 @@ type PathItem = Partial<Record<"get" | "post", Operation>>;
|
|
|
102
102
|
* - `auth: "required"` (default) → path under `${basePath}/query/...` with bearerAuth
|
|
103
103
|
* - `auth: "optional"` → two entries: the default path with bearerAuth AND `/public/...` with no security
|
|
104
104
|
* - `auth: "none"` → single entry under `${basePath}/public/...` with no security
|
|
105
|
+
*
|
|
106
|
+
* @deprecated GPT Store support is deprecated. Use mcpRoutes (Apps SDK) for new projects.
|
|
105
107
|
*/
|
|
106
108
|
export function generateOpenApi(config: GenerateOpenApiConfig): object {
|
|
107
109
|
const {
|