@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@donghanh/hono",
3
- "version": "0.4.0",
4
- "description": "Hono routes for GPT Store and LLM chat — renderers for ChatGPT and OpenAI-compatible APIs",
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.4.0",
16
+ "@donghanh/core": "^0.5.0",
17
17
  "hono": "^4.7.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@donghanh/core": "0.4.0"
20
+ "@donghanh/core": "0.5.0"
21
21
  }
22
22
  }
package/src/gpt.ts CHANGED
@@ -42,6 +42,7 @@ function jsonError(message: string, status = 400): Response {
42
42
  });
43
43
  }
44
44
 
45
+ /** @deprecated GPT Store support is deprecated. Use mcpRoutes (Apps SDK) for new projects. */
45
46
  export function gptRoutes(config: GptRoutesConfig): Hono {
46
47
  const {
47
48
  registry,
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: detail?.input ?? {
560
- type: "object",
561
- properties: {},
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 {