@typia/vercel 13.0.0-dev.20260427-3 → 13.0.0-dev.20260501

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/lib/index.mjs CHANGED
@@ -1,8 +1,3 @@
1
- import { getDefaultExportFromCjs } from './_virtual/_commonjsHelpers.mjs';
2
- import { __require as requireLib } from './index2.mjs';
3
-
4
- var libExports = requireLib();
5
- var index = /*@__PURE__*/getDefaultExportFromCjs(libExports);
6
-
7
- export { index as default };
1
+ export { toVercelSchema, toVercelTools } from './index2.mjs';
2
+ export { __exports as default } from './_virtual/index.mjs';
8
3
  //# sourceMappingURL=index.mjs.map
package/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["index.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireLib } from \"/home/samchon/github/samchon/typia@next/packages/vercel/lib/index.js\";\nvar libExports = requireLib();\nexport { libExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(libExports);"],"names":[],"mappings":";;;AAEA,IAAI,UAAU,GAAG,UAAU,EAAE;AAE7B,YAAe,aAAa,uBAAuB,CAAC,UAAU,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/lib/index2.mjs CHANGED
@@ -1,142 +1,136 @@
1
1
  import { __exports as lib } from './_virtual/index.mjs';
2
- import { __require as requireVercelParameterConverter } from './internal/VercelParameterConverter2.mjs';
3
- import { __require as requireVercelToolsRegistrar } from './internal/VercelToolsRegistrar2.mjs';
2
+ import './internal/VercelParameterConverter2.mjs';
3
+ import './internal/VercelToolsRegistrar2.mjs';
4
+ import { __exports as VercelToolsRegistrar } from './_virtual/VercelToolsRegistrar.mjs';
5
+ import { __exports as VercelParameterConverter } from './_virtual/VercelParameterConverter.mjs';
4
6
 
5
- var hasRequiredLib;
6
-
7
- function requireLib () {
8
- if (hasRequiredLib) return lib;
9
- hasRequiredLib = 1;
10
- Object.defineProperty(lib, "__esModule", { value: true });
11
- lib.toVercelTools = toVercelTools;
12
- lib.toVercelSchema = toVercelSchema;
13
- const VercelParameterConverter_1 = requireVercelParameterConverter();
14
- const VercelToolsRegistrar_1 = requireVercelToolsRegistrar();
15
- /**
16
- * Convert typia controllers to Vercel AI SDK tools.
17
- *
18
- * Transforms TypeScript class methods via `typia.llm.controller<Class>()` or
19
- * OpenAPI operations via `HttpLlm.controller()` into Vercel AI SDK tools that
20
- * can be used with any LLM provider (OpenAI, Anthropic, Google, etc.).
21
- *
22
- * Every tool call is validated by typia. If the LLM provides invalid arguments,
23
- * returns a validation error formatted by {@link LlmJson.stringify} so the LLM
24
- * can auto-correct in the next turn.
25
- *
26
- * ## Example with OpenAI
27
- *
28
- * ```typescript
29
- * import { generateText } from "ai";
30
- * import { openai } from "@ai-sdk/openai";
31
- * import typia from "typia";
32
- * import { toVercelTools } from "@typia/vercel";
33
- *
34
- * class Calculator {
35
- * /&#42;&#42; Add two numbers together. &#42;/
36
- * add(props: { a: number; b: number }): { value: number } {
37
- * return { value: props.a + props.b };
38
- * }
39
- * }
40
- *
41
- * const controller = typia.llm.controller<Calculator>("calc", new Calculator());
42
- * const tools = toVercelTools({ controllers: [controller] });
43
- *
44
- * const result = await generateText({
45
- * model: openai("gpt-4o"),
46
- * tools,
47
- * prompt: "What is 15 + 27?",
48
- * });
49
- * ```
50
- *
51
- * ## Example with Anthropic
52
- *
53
- * ```typescript
54
- * import { anthropic } from "@ai-sdk/anthropic";
55
- * import { toVercelTools } from "@typia/vercel";
56
- * import { generateText } from "ai";
57
- *
58
- * const result = await generateText({
59
- * model: anthropic("claude-sonnet-4-20250514"),
60
- * tools: toVercelTools({ controllers: [controller] }),
61
- * prompt: "Calculate 100 * 50",
62
- * });
63
- * ```
64
- *
65
- * ## Example with HTTP Controller (OpenAPI)
66
- *
67
- * ```typescript
68
- * import { openai } from "@ai-sdk/openai";
69
- * import { HttpLlm } from "@typia/utils";
70
- * import { toVercelTools } from "@typia/vercel";
71
- * import { generateText } from "ai";
72
- *
73
- * const controller = HttpLlm.controller({
74
- * name: "shopping",
75
- * document: await fetch("https://api.example.com/swagger.json").then(
76
- * (r) => r.json(),
77
- * ),
78
- * connection: { host: "https://api.example.com" },
79
- * });
80
- *
81
- * const result = await generateText({
82
- * model: openai("gpt-4o"),
83
- * tools: toVercelTools({ controllers: [controller] }),
84
- * prompt: "Search for laptops under $1000",
85
- * });
86
- * ```
87
- *
88
- * @author Jeongho Nam - https://github.com/samchon
89
- * @param props Conversion properties
90
- * @returns Record of Vercel AI SDK Tools keyed by tool name
91
- */
92
- function toVercelTools(props) {
93
- return VercelToolsRegistrar_1.VercelToolsRegistrar.convert(props);
94
- }
95
- /**
96
- * Convert LLM parameters schema to Vercel AI SDK schema format.
97
- *
98
- * Transforms {@link ILlmSchema.IParameters} into Vercel AI SDK's `Schema` type
99
- * for use with `generateObject()`. Use with `typia.llm.structuredOutput<T>()`
100
- * or `typia.llm.parameters<T>()`.
101
- *
102
- * ## Example
103
- *
104
- * ```typescript
105
- * import { openai } from "@ai-sdk/openai";
106
- * import { toVercelSchema } from "@typia/vercel";
107
- * import { generateObject } from "ai";
108
- * import typia from "typia";
109
- *
110
- * interface IMember {
111
- * name: string;
112
- * age: number;
113
- * }
114
- *
115
- * const output = typia.llm.structuredOutput<IMember>();
116
- * const schema = toVercelSchema(output.parameters);
117
- *
118
- * const { object } = await generateObject({
119
- * model: openai("gpt-4o"),
120
- * schema,
121
- * prompt: "Generate a member named John who is 30 years old",
122
- * });
123
- *
124
- * const coerced = output.coerce(object);
125
- * const result = output.validate(coerced);
126
- * ```
127
- *
128
- * @author Jeongho Nam - https://github.com/samchon
129
- * @param parameters LLM parameters schema from
130
- * `typia.llm.structuredOutput<T>().parameters` or
131
- * `typia.llm.parameters<T>()`
132
- * @returns Vercel AI SDK Schema for `generateObject()`
133
- */
134
- function toVercelSchema(parameters) {
135
- return VercelParameterConverter_1.VercelParameterConverter.convert(parameters);
136
- }
137
-
138
- return lib;
7
+ Object.defineProperty(lib, "__esModule", { value: true });
8
+ var toVercelTools_1 = lib.toVercelTools = toVercelTools;
9
+ var toVercelSchema_1 = lib.toVercelSchema = toVercelSchema;
10
+ const VercelParameterConverter_1 = VercelParameterConverter;
11
+ const VercelToolsRegistrar_1 = VercelToolsRegistrar;
12
+ /**
13
+ * Convert typia controllers to Vercel AI SDK tools.
14
+ *
15
+ * Transforms TypeScript class methods via `typia.llm.controller<Class>()` or
16
+ * OpenAPI operations via `HttpLlm.controller()` into Vercel AI SDK tools that
17
+ * can be used with any LLM provider (OpenAI, Anthropic, Google, etc.).
18
+ *
19
+ * Every tool call is validated by typia. If the LLM provides invalid arguments,
20
+ * returns a validation error formatted by {@link LlmJson.stringify} so the LLM
21
+ * can auto-correct in the next turn.
22
+ *
23
+ * ## Example with OpenAI
24
+ *
25
+ * ```typescript
26
+ * import { generateText } from "ai";
27
+ * import { openai } from "@ai-sdk/openai";
28
+ * import typia from "typia";
29
+ * import { toVercelTools } from "@typia/vercel";
30
+ *
31
+ * class Calculator {
32
+ * /&#42;&#42; Add two numbers together. &#42;/
33
+ * add(props: { a: number; b: number }): { value: number } {
34
+ * return { value: props.a + props.b };
35
+ * }
36
+ * }
37
+ *
38
+ * const controller = typia.llm.controller<Calculator>("calc", new Calculator());
39
+ * const tools = toVercelTools({ controllers: [controller] });
40
+ *
41
+ * const result = await generateText({
42
+ * model: openai("gpt-4o"),
43
+ * tools,
44
+ * prompt: "What is 15 + 27?",
45
+ * });
46
+ * ```
47
+ *
48
+ * ## Example with Anthropic
49
+ *
50
+ * ```typescript
51
+ * import { anthropic } from "@ai-sdk/anthropic";
52
+ * import { toVercelTools } from "@typia/vercel";
53
+ * import { generateText } from "ai";
54
+ *
55
+ * const result = await generateText({
56
+ * model: anthropic("claude-sonnet-4-20250514"),
57
+ * tools: toVercelTools({ controllers: [controller] }),
58
+ * prompt: "Calculate 100 * 50",
59
+ * });
60
+ * ```
61
+ *
62
+ * ## Example with HTTP Controller (OpenAPI)
63
+ *
64
+ * ```typescript
65
+ * import { openai } from "@ai-sdk/openai";
66
+ * import { HttpLlm } from "@typia/utils";
67
+ * import { toVercelTools } from "@typia/vercel";
68
+ * import { generateText } from "ai";
69
+ *
70
+ * const controller = HttpLlm.controller({
71
+ * name: "shopping",
72
+ * document: await fetch("https://api.example.com/swagger.json").then(
73
+ * (r) => r.json(),
74
+ * ),
75
+ * connection: { host: "https://api.example.com" },
76
+ * });
77
+ *
78
+ * const result = await generateText({
79
+ * model: openai("gpt-4o"),
80
+ * tools: toVercelTools({ controllers: [controller] }),
81
+ * prompt: "Search for laptops under $1000",
82
+ * });
83
+ * ```
84
+ *
85
+ * @author Jeongho Nam - https://github.com/samchon
86
+ * @param props Conversion properties
87
+ * @returns Record of Vercel AI SDK Tools keyed by tool name
88
+ */
89
+ function toVercelTools(props) {
90
+ return VercelToolsRegistrar_1.VercelToolsRegistrar.convert(props);
91
+ }
92
+ /**
93
+ * Convert LLM parameters schema to Vercel AI SDK schema format.
94
+ *
95
+ * Transforms {@link ILlmSchema.IParameters} into Vercel AI SDK's `Schema` type
96
+ * for use with `generateObject()`. Use with `typia.llm.structuredOutput<T>()`
97
+ * or `typia.llm.parameters<T>()`.
98
+ *
99
+ * ## Example
100
+ *
101
+ * ```typescript
102
+ * import { openai } from "@ai-sdk/openai";
103
+ * import { toVercelSchema } from "@typia/vercel";
104
+ * import { generateObject } from "ai";
105
+ * import typia from "typia";
106
+ *
107
+ * interface IMember {
108
+ * name: string;
109
+ * age: number;
110
+ * }
111
+ *
112
+ * const output = typia.llm.structuredOutput<IMember>();
113
+ * const schema = toVercelSchema(output.parameters);
114
+ *
115
+ * const { object } = await generateObject({
116
+ * model: openai("gpt-4o"),
117
+ * schema,
118
+ * prompt: "Generate a member named John who is 30 years old",
119
+ * });
120
+ *
121
+ * const coerced = output.coerce(object);
122
+ * const result = output.validate(coerced);
123
+ * ```
124
+ *
125
+ * @author Jeongho Nam - https://github.com/samchon
126
+ * @param parameters LLM parameters schema from
127
+ * `typia.llm.structuredOutput<T>().parameters` or
128
+ * `typia.llm.parameters<T>()`
129
+ * @returns Vercel AI SDK Schema for `generateObject()`
130
+ */
131
+ function toVercelSchema(parameters) {
132
+ return VercelParameterConverter_1.VercelParameterConverter.convert(parameters);
139
133
  }
140
134
 
141
- export { requireLib as __require };
135
+ export { lib as default, toVercelSchema_1 as toVercelSchema, toVercelTools_1 as toVercelTools };
142
136
  //# sourceMappingURL=index2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toVercelTools = toVercelTools;\nexports.toVercelSchema = toVercelSchema;\nconst VercelParameterConverter_1 = require(\"./internal/VercelParameterConverter\");\nconst VercelToolsRegistrar_1 = require(\"./internal/VercelToolsRegistrar\");\n/**\n * Convert typia controllers to Vercel AI SDK tools.\n *\n * Transforms TypeScript class methods via `typia.llm.controller<Class>()` or\n * OpenAPI operations via `HttpLlm.controller()` into Vercel AI SDK tools that\n * can be used with any LLM provider (OpenAI, Anthropic, Google, etc.).\n *\n * Every tool call is validated by typia. If the LLM provides invalid arguments,\n * returns a validation error formatted by {@link LlmJson.stringify} so the LLM\n * can auto-correct in the next turn.\n *\n * ## Example with OpenAI\n *\n * ```typescript\n * import { generateText } from \"ai\";\n * import { openai } from \"@ai-sdk/openai\";\n * import typia from \"typia\";\n * import { toVercelTools } from \"@typia/vercel\";\n *\n * class Calculator {\n * /&#42;&#42; Add two numbers together. &#42;/\n * add(props: { a: number; b: number }): { value: number } {\n * return { value: props.a + props.b };\n * }\n * }\n *\n * const controller = typia.llm.controller<Calculator>(\"calc\", new Calculator());\n * const tools = toVercelTools({ controllers: [controller] });\n *\n * const result = await generateText({\n * model: openai(\"gpt-4o\"),\n * tools,\n * prompt: \"What is 15 + 27?\",\n * });\n * ```\n *\n * ## Example with Anthropic\n *\n * ```typescript\n * import { anthropic } from \"@ai-sdk/anthropic\";\n * import { toVercelTools } from \"@typia/vercel\";\n * import { generateText } from \"ai\";\n *\n * const result = await generateText({\n * model: anthropic(\"claude-sonnet-4-20250514\"),\n * tools: toVercelTools({ controllers: [controller] }),\n * prompt: \"Calculate 100 * 50\",\n * });\n * ```\n *\n * ## Example with HTTP Controller (OpenAPI)\n *\n * ```typescript\n * import { openai } from \"@ai-sdk/openai\";\n * import { HttpLlm } from \"@typia/utils\";\n * import { toVercelTools } from \"@typia/vercel\";\n * import { generateText } from \"ai\";\n *\n * const controller = HttpLlm.controller({\n * name: \"shopping\",\n * document: await fetch(\"https://api.example.com/swagger.json\").then(\n * (r) => r.json(),\n * ),\n * connection: { host: \"https://api.example.com\" },\n * });\n *\n * const result = await generateText({\n * model: openai(\"gpt-4o\"),\n * tools: toVercelTools({ controllers: [controller] }),\n * prompt: \"Search for laptops under $1000\",\n * });\n * ```\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @param props Conversion properties\n * @returns Record of Vercel AI SDK Tools keyed by tool name\n */\nfunction toVercelTools(props) {\n return VercelToolsRegistrar_1.VercelToolsRegistrar.convert(props);\n}\n/**\n * Convert LLM parameters schema to Vercel AI SDK schema format.\n *\n * Transforms {@link ILlmSchema.IParameters} into Vercel AI SDK's `Schema` type\n * for use with `generateObject()`. Use with `typia.llm.structuredOutput<T>()`\n * or `typia.llm.parameters<T>()`.\n *\n * ## Example\n *\n * ```typescript\n * import { openai } from \"@ai-sdk/openai\";\n * import { toVercelSchema } from \"@typia/vercel\";\n * import { generateObject } from \"ai\";\n * import typia from \"typia\";\n *\n * interface IMember {\n * name: string;\n * age: number;\n * }\n *\n * const output = typia.llm.structuredOutput<IMember>();\n * const schema = toVercelSchema(output.parameters);\n *\n * const { object } = await generateObject({\n * model: openai(\"gpt-4o\"),\n * schema,\n * prompt: \"Generate a member named John who is 30 years old\",\n * });\n *\n * const coerced = output.coerce(object);\n * const result = output.validate(coerced);\n * ```\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @param parameters LLM parameters schema from\n * `typia.llm.structuredOutput<T>().parameters` or\n * `typia.llm.parameters<T>()`\n * @returns Vercel AI SDK Schema for `generateObject()`\n */\nfunction toVercelSchema(parameters) {\n return VercelParameterConverter_1.VercelParameterConverter.convert(parameters);\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;AACA,CAAA,MAAM,CAAC,cAAc,CAAC,GAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAA,GAAA,CAAA,aAAqB,GAAG,aAAa;AACrC,CAAA,GAAA,CAAA,cAAsB,GAAG,cAAc;CACvC,MAAM,0BAA0B,GAAGA,+BAAA,EAA8C;CACjF,MAAM,sBAAsB,GAAGC,2BAAA,EAA0C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;CACA,SAAS,aAAa,CAAC,KAAK,EAAE;KAC1B,OAAO,sBAAsB,CAAC,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC;AACrE,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;CACA,SAAS,cAAc,CAAC,UAAU,EAAE;KAChC,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,OAAO,CAAC,UAAU,CAAC;AAClF,CAAA;AACA;;;;;;"}
1
+ {"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toVercelTools = toVercelTools;\nexports.toVercelSchema = toVercelSchema;\nconst VercelParameterConverter_1 = require(\"./internal/VercelParameterConverter\");\nconst VercelToolsRegistrar_1 = require(\"./internal/VercelToolsRegistrar\");\n/**\n * Convert typia controllers to Vercel AI SDK tools.\n *\n * Transforms TypeScript class methods via `typia.llm.controller<Class>()` or\n * OpenAPI operations via `HttpLlm.controller()` into Vercel AI SDK tools that\n * can be used with any LLM provider (OpenAI, Anthropic, Google, etc.).\n *\n * Every tool call is validated by typia. If the LLM provides invalid arguments,\n * returns a validation error formatted by {@link LlmJson.stringify} so the LLM\n * can auto-correct in the next turn.\n *\n * ## Example with OpenAI\n *\n * ```typescript\n * import { generateText } from \"ai\";\n * import { openai } from \"@ai-sdk/openai\";\n * import typia from \"typia\";\n * import { toVercelTools } from \"@typia/vercel\";\n *\n * class Calculator {\n * /&#42;&#42; Add two numbers together. &#42;/\n * add(props: { a: number; b: number }): { value: number } {\n * return { value: props.a + props.b };\n * }\n * }\n *\n * const controller = typia.llm.controller<Calculator>(\"calc\", new Calculator());\n * const tools = toVercelTools({ controllers: [controller] });\n *\n * const result = await generateText({\n * model: openai(\"gpt-4o\"),\n * tools,\n * prompt: \"What is 15 + 27?\",\n * });\n * ```\n *\n * ## Example with Anthropic\n *\n * ```typescript\n * import { anthropic } from \"@ai-sdk/anthropic\";\n * import { toVercelTools } from \"@typia/vercel\";\n * import { generateText } from \"ai\";\n *\n * const result = await generateText({\n * model: anthropic(\"claude-sonnet-4-20250514\"),\n * tools: toVercelTools({ controllers: [controller] }),\n * prompt: \"Calculate 100 * 50\",\n * });\n * ```\n *\n * ## Example with HTTP Controller (OpenAPI)\n *\n * ```typescript\n * import { openai } from \"@ai-sdk/openai\";\n * import { HttpLlm } from \"@typia/utils\";\n * import { toVercelTools } from \"@typia/vercel\";\n * import { generateText } from \"ai\";\n *\n * const controller = HttpLlm.controller({\n * name: \"shopping\",\n * document: await fetch(\"https://api.example.com/swagger.json\").then(\n * (r) => r.json(),\n * ),\n * connection: { host: \"https://api.example.com\" },\n * });\n *\n * const result = await generateText({\n * model: openai(\"gpt-4o\"),\n * tools: toVercelTools({ controllers: [controller] }),\n * prompt: \"Search for laptops under $1000\",\n * });\n * ```\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @param props Conversion properties\n * @returns Record of Vercel AI SDK Tools keyed by tool name\n */\nfunction toVercelTools(props) {\n return VercelToolsRegistrar_1.VercelToolsRegistrar.convert(props);\n}\n/**\n * Convert LLM parameters schema to Vercel AI SDK schema format.\n *\n * Transforms {@link ILlmSchema.IParameters} into Vercel AI SDK's `Schema` type\n * for use with `generateObject()`. Use with `typia.llm.structuredOutput<T>()`\n * or `typia.llm.parameters<T>()`.\n *\n * ## Example\n *\n * ```typescript\n * import { openai } from \"@ai-sdk/openai\";\n * import { toVercelSchema } from \"@typia/vercel\";\n * import { generateObject } from \"ai\";\n * import typia from \"typia\";\n *\n * interface IMember {\n * name: string;\n * age: number;\n * }\n *\n * const output = typia.llm.structuredOutput<IMember>();\n * const schema = toVercelSchema(output.parameters);\n *\n * const { object } = await generateObject({\n * model: openai(\"gpt-4o\"),\n * schema,\n * prompt: \"Generate a member named John who is 30 years old\",\n * });\n *\n * const coerced = output.coerce(object);\n * const result = output.validate(coerced);\n * ```\n *\n * @author Jeongho Nam - https://github.com/samchon\n * @param parameters LLM parameters schema from\n * `typia.llm.structuredOutput<T>().parameters` or\n * `typia.llm.parameters<T>()`\n * @returns Vercel AI SDK Schema for `generateObject()`\n */\nfunction toVercelSchema(parameters) {\n return VercelParameterConverter_1.VercelParameterConverter.convert(parameters);\n}\n//# sourceMappingURL=index.js.map"],"names":["require$$0","require$$1"],"mappings":";;;;;;AACA,MAAM,CAAC,cAAc,CAAC,GAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,eAAA,GAAA,GAAA,CAAA,aAAqB,GAAG;AACxB,IAAA,gBAAA,GAAA,GAAA,CAAA,cAAsB,GAAG;AACzB,MAAM,0BAA0B,GAAGA,wBAA8C;AACjF,MAAM,sBAAsB,GAAGC,oBAA0C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,KAAK,EAAE;AAC9B,IAAI,OAAO,sBAAsB,CAAC,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,UAAU,EAAE;AACpC,IAAI,OAAO,0BAA0B,CAAC,wBAAwB,CAAC,OAAO,CAAC,UAAU,CAAC;AAClF;;;;"}
@@ -1,8 +1,3 @@
1
- import { getDefaultExportFromCjs } from '../_virtual/_commonjsHelpers.mjs';
2
- import { __require as requireVercelParameterConverter } from './VercelParameterConverter2.mjs';
3
-
4
- var VercelParameterConverterExports = requireVercelParameterConverter();
5
- var VercelParameterConverter = /*@__PURE__*/getDefaultExportFromCjs(VercelParameterConverterExports);
6
-
7
- export { VercelParameterConverter as default };
1
+ export { VercelParameterConverter } from './VercelParameterConverter2.mjs';
2
+ export { __exports as default } from '../_virtual/VercelParameterConverter.mjs';
8
3
  //# sourceMappingURL=VercelParameterConverter.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VercelParameterConverter.mjs","sources":["VercelParameterConverter.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireVercelParameterConverter } from \"/home/samchon/github/samchon/typia@next/packages/vercel/lib/internal/VercelParameterConverter.js\";\nvar VercelParameterConverterExports = requireVercelParameterConverter();\nexport { VercelParameterConverterExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(VercelParameterConverterExports);"],"names":[],"mappings":";;;AAEA,IAAI,+BAA+B,GAAG,+BAA+B,EAAE;AAEvE,+BAAe,aAAa,uBAAuB,CAAC,+BAA+B,CAAC;;;;"}
1
+ {"version":3,"file":"VercelParameterConverter.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,21 +1,13 @@
1
- import { __exports as VercelParameterConverter } from '../_virtual/VercelParameterConverter.mjs';
1
+ import { __exports as VercelParameterConverter$1 } from '../_virtual/VercelParameterConverter.mjs';
2
2
  import require$$0 from 'ai';
3
3
 
4
- var hasRequiredVercelParameterConverter;
4
+ Object.defineProperty(VercelParameterConverter$1, "__esModule", { value: true });
5
+ var VercelParameterConverter_2 = VercelParameterConverter$1.VercelParameterConverter = void 0;
6
+ const ai_1 = require$$0;
7
+ var VercelParameterConverter;
8
+ (function (VercelParameterConverter) {
9
+ VercelParameterConverter.convert = (parameters) => (0, ai_1.jsonSchema)(parameters);
10
+ })(VercelParameterConverter || (VercelParameterConverter_2 = VercelParameterConverter$1.VercelParameterConverter = VercelParameterConverter = {}));
5
11
 
6
- function requireVercelParameterConverter () {
7
- if (hasRequiredVercelParameterConverter) return VercelParameterConverter;
8
- hasRequiredVercelParameterConverter = 1;
9
- Object.defineProperty(VercelParameterConverter, "__esModule", { value: true });
10
- VercelParameterConverter.VercelParameterConverter = void 0;
11
- const ai_1 = require$$0;
12
- var VercelParameterConverter$1;
13
- (function (VercelParameterConverter) {
14
- VercelParameterConverter.convert = (parameters) => (0, ai_1.jsonSchema)(parameters);
15
- })(VercelParameterConverter$1 || (VercelParameterConverter.VercelParameterConverter = VercelParameterConverter$1 = {}));
16
-
17
- return VercelParameterConverter;
18
- }
19
-
20
- export { requireVercelParameterConverter as __require };
12
+ export { VercelParameterConverter_2 as VercelParameterConverter, VercelParameterConverter$1 as default };
21
13
  //# sourceMappingURL=VercelParameterConverter2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VercelParameterConverter2.mjs","sources":["VercelParameterConverter.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VercelParameterConverter = void 0;\nconst ai_1 = require(\"ai\");\nvar VercelParameterConverter;\n(function (VercelParameterConverter) {\n VercelParameterConverter.convert = (parameters) => (0, ai_1.jsonSchema)(parameters);\n})(VercelParameterConverter || (exports.VercelParameterConverter = VercelParameterConverter = {}));\n//# sourceMappingURL=VercelParameterConverter.js.map"],"names":["VercelParameterConverter_1","VercelParameterConverter"],"mappings":";;;;;;;;AACA,CAAA,MAAM,CAAC,cAAc,CAACA,wBAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAAA,wBAAA,CAAA,wBAAgC,GAAG,MAAM;CACzC,MAAM,IAAI,GAAG,UAAa;AAC1B,CAAA,IAAIC,0BAAwB;CAC5B,CAAC,UAAU,wBAAwB,EAAE;AACrC,KAAI,wBAAwB,CAAC,OAAO,GAAG,CAAC,UAAU,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;CACvF,CAAC,EAAEA,0BAAwB,KAAKD,wBAAA,CAAA,wBAAgC,GAAGC,0BAAwB,GAAG,EAAE,CAAC,CAAC;AAClG;;;;;;"}
1
+ {"version":3,"file":"VercelParameterConverter2.mjs","sources":["VercelParameterConverter.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VercelParameterConverter = void 0;\nconst ai_1 = require(\"ai\");\nvar VercelParameterConverter;\n(function (VercelParameterConverter) {\n VercelParameterConverter.convert = (parameters) => (0, ai_1.jsonSchema)(parameters);\n})(VercelParameterConverter || (exports.VercelParameterConverter = VercelParameterConverter = {}));\n//# sourceMappingURL=VercelParameterConverter.js.map"],"names":["VercelParameterConverter_1"],"mappings":";;;AACA,MAAM,CAAC,cAAc,CAACA,0BAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,IAAA,0BAAA,GAAAA,0BAAA,CAAA,wBAAgC,GAAG;AACnC,MAAM,IAAI,GAAG,UAAa;AAC1B,IAAI,wBAAwB;AAC5B,CAAC,UAAU,wBAAwB,EAAE;AACrC,IAAI,wBAAwB,CAAC,OAAO,GAAG,CAAC,UAAU,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;AACvF,CAAC,EAAE,wBAAwB,KAAK,0BAAA,GAAAA,0BAAA,CAAA,wBAAgC,GAAG,wBAAwB,GAAG,EAAE,CAAC,CAAC;;;;"}
@@ -1,8 +1,3 @@
1
- import { getDefaultExportFromCjs } from '../_virtual/_commonjsHelpers.mjs';
2
- import { __require as requireVercelToolsRegistrar } from './VercelToolsRegistrar2.mjs';
3
-
4
- var VercelToolsRegistrarExports = requireVercelToolsRegistrar();
5
- var VercelToolsRegistrar = /*@__PURE__*/getDefaultExportFromCjs(VercelToolsRegistrarExports);
6
-
7
- export { VercelToolsRegistrar as default };
1
+ export { VercelToolsRegistrar } from './VercelToolsRegistrar2.mjs';
2
+ export { __exports as default } from '../_virtual/VercelToolsRegistrar.mjs';
8
3
  //# sourceMappingURL=VercelToolsRegistrar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VercelToolsRegistrar.mjs","sources":["VercelToolsRegistrar.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireVercelToolsRegistrar } from \"/home/samchon/github/samchon/typia@next/packages/vercel/lib/internal/VercelToolsRegistrar.js\";\nvar VercelToolsRegistrarExports = requireVercelToolsRegistrar();\nexport { VercelToolsRegistrarExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(VercelToolsRegistrarExports);"],"names":[],"mappings":";;;AAEA,IAAI,2BAA2B,GAAG,2BAA2B,EAAE;AAE/D,2BAAe,aAAa,uBAAuB,CAAC,2BAA2B,CAAC;;;;"}
1
+ {"version":3,"file":"VercelToolsRegistrar.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,151 +1,144 @@
1
- import { __exports as VercelToolsRegistrar } from '../_virtual/VercelToolsRegistrar.mjs';
1
+ import { __exports as VercelToolsRegistrar$1 } from '../_virtual/VercelToolsRegistrar.mjs';
2
2
  import require$$0$1 from '@typia/utils';
3
3
  import require$$0 from 'ai';
4
- import { __require as requireVercelParameterConverter } from './VercelParameterConverter2.mjs';
4
+ import './VercelParameterConverter2.mjs';
5
+ import { __exports as VercelParameterConverter } from '../_virtual/VercelParameterConverter.mjs';
5
6
 
6
- var hasRequiredVercelToolsRegistrar;
7
+ var __awaiter = (VercelToolsRegistrar$1 && VercelToolsRegistrar$1.__awaiter) || function (thisArg, _arguments, P, generator) {
8
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
+ return new (P || (P = Promise))(function (resolve, reject) {
10
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
14
+ });
15
+ };
16
+ Object.defineProperty(VercelToolsRegistrar$1, "__esModule", { value: true });
17
+ var VercelToolsRegistrar_2 = VercelToolsRegistrar$1.VercelToolsRegistrar = void 0;
18
+ const utils_1 = require$$0$1;
19
+ const ai_1 = require$$0;
20
+ const VercelParameterConverter_1 = VercelParameterConverter;
21
+ var VercelToolsRegistrar;
22
+ (function (VercelToolsRegistrar) {
23
+ /**
24
+ * Convert typia controllers to Vercel AI SDK tools.
25
+ *
26
+ * @param props Conversion properties
27
+ * @returns Record of Vercel AI SDK Tools
28
+ */
29
+ VercelToolsRegistrar.convert = (props) => {
30
+ var _a;
31
+ const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;
32
+ const tools = {};
33
+ // check duplicate tool names
34
+ if (prefix === false && props.controllers.length >= 2) {
35
+ const names = new Map();
36
+ const duplicates = [];
37
+ for (const controller of props.controllers) {
38
+ for (const func of controller.application.functions) {
39
+ const existing = names.get(func.name);
40
+ if (existing !== undefined)
41
+ duplicates.push(`"${func.name}" in "${controller.name}" (conflicts with "${existing}")`);
42
+ else
43
+ names.set(func.name, controller.name);
44
+ }
45
+ }
46
+ if (duplicates.length > 0)
47
+ throw new Error(`Duplicate tool names found:\n - ${duplicates.join("\n - ")}`);
48
+ }
49
+ // convert controllers to tools
50
+ for (const controller of props.controllers) {
51
+ if (controller.protocol === "class") {
52
+ registerClassController({ tools, controller, prefix });
53
+ }
54
+ else {
55
+ registerHttpController({ tools, controller, prefix });
56
+ }
57
+ }
58
+ return tools;
59
+ };
60
+ const registerClassController = (props) => {
61
+ const { tools, controller, prefix } = props;
62
+ const execute = controller.execute;
63
+ for (const func of controller.application.functions) {
64
+ const toolName = prefix
65
+ ? `${controller.name}_${func.name}`
66
+ : func.name;
67
+ const method = execute[func.name];
68
+ if (typeof method !== "function") {
69
+ throw new Error(`Method "${func.name}" not found on controller "${controller.name}"`);
70
+ }
71
+ tools[toolName] = createTool({
72
+ name: toolName,
73
+ func,
74
+ execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),
75
+ });
76
+ }
77
+ };
78
+ const registerHttpController = (props) => {
79
+ const { tools, controller, prefix } = props;
80
+ const application = controller.application;
81
+ const connection = controller.connection;
82
+ for (const func of application.functions) {
83
+ const toolName = prefix
84
+ ? `${controller.name}_${func.name}`
85
+ : func.name;
86
+ tools[toolName] = createTool({
87
+ name: toolName,
88
+ func,
89
+ execute: (args) => __awaiter(this, void 0, void 0, function* () {
90
+ if (controller.execute !== undefined) {
91
+ const response = yield controller.execute({
92
+ connection,
93
+ application,
94
+ function: func,
95
+ arguments: args,
96
+ });
97
+ return response.body;
98
+ }
99
+ return utils_1.HttpLlm.execute({
100
+ application,
101
+ function: func,
102
+ connection,
103
+ input: args,
104
+ });
105
+ }),
106
+ });
107
+ }
108
+ };
109
+ const createTool = (props) => {
110
+ var _a;
111
+ const { name, func, execute } = props;
112
+ return (0, ai_1.tool)({
113
+ description: (_a = func.description) !== null && _a !== void 0 ? _a : "",
114
+ inputSchema: VercelParameterConverter_1.VercelParameterConverter.convert(func.parameters),
115
+ execute: (args) => __awaiter(this, void 0, void 0, function* () {
116
+ const coerced = utils_1.LlmJson.coerce(args, func.parameters);
117
+ const validation = func.validate(coerced);
118
+ if (!validation.success)
119
+ return {
120
+ success: false,
121
+ error: `Type errors in "${name}" arguments:\n\n` +
122
+ `\`\`\`json\n${utils_1.LlmJson.stringify(validation)}\n\`\`\``,
123
+ };
124
+ try {
125
+ const result = yield execute(validation.data);
126
+ return result === undefined
127
+ ? { success: true }
128
+ : { success: true, data: result };
129
+ }
130
+ catch (error) {
131
+ return {
132
+ success: false,
133
+ error: error instanceof Error
134
+ ? `${error.name}: ${error.message}`
135
+ : String(error),
136
+ };
137
+ }
138
+ }),
139
+ });
140
+ };
141
+ })(VercelToolsRegistrar || (VercelToolsRegistrar_2 = VercelToolsRegistrar$1.VercelToolsRegistrar = VercelToolsRegistrar = {}));
7
142
 
8
- function requireVercelToolsRegistrar () {
9
- if (hasRequiredVercelToolsRegistrar) return VercelToolsRegistrar;
10
- hasRequiredVercelToolsRegistrar = 1;
11
- var __awaiter = (VercelToolsRegistrar && VercelToolsRegistrar.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
- Object.defineProperty(VercelToolsRegistrar, "__esModule", { value: true });
21
- VercelToolsRegistrar.VercelToolsRegistrar = void 0;
22
- const utils_1 = require$$0$1;
23
- const ai_1 = require$$0;
24
- const VercelParameterConverter_1 = requireVercelParameterConverter();
25
- var VercelToolsRegistrar$1;
26
- (function (VercelToolsRegistrar) {
27
- /**
28
- * Convert typia controllers to Vercel AI SDK tools.
29
- *
30
- * @param props Conversion properties
31
- * @returns Record of Vercel AI SDK Tools
32
- */
33
- VercelToolsRegistrar.convert = (props) => {
34
- var _a;
35
- const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;
36
- const tools = {};
37
- // check duplicate tool names
38
- if (prefix === false && props.controllers.length >= 2) {
39
- const names = new Map();
40
- const duplicates = [];
41
- for (const controller of props.controllers) {
42
- for (const func of controller.application.functions) {
43
- const existing = names.get(func.name);
44
- if (existing !== undefined)
45
- duplicates.push(`"${func.name}" in "${controller.name}" (conflicts with "${existing}")`);
46
- else
47
- names.set(func.name, controller.name);
48
- }
49
- }
50
- if (duplicates.length > 0)
51
- throw new Error(`Duplicate tool names found:\n - ${duplicates.join("\n - ")}`);
52
- }
53
- // convert controllers to tools
54
- for (const controller of props.controllers) {
55
- if (controller.protocol === "class") {
56
- registerClassController({ tools, controller, prefix });
57
- }
58
- else {
59
- registerHttpController({ tools, controller, prefix });
60
- }
61
- }
62
- return tools;
63
- };
64
- const registerClassController = (props) => {
65
- const { tools, controller, prefix } = props;
66
- const execute = controller.execute;
67
- for (const func of controller.application.functions) {
68
- const toolName = prefix
69
- ? `${controller.name}_${func.name}`
70
- : func.name;
71
- const method = execute[func.name];
72
- if (typeof method !== "function") {
73
- throw new Error(`Method "${func.name}" not found on controller "${controller.name}"`);
74
- }
75
- tools[toolName] = createTool({
76
- name: toolName,
77
- func,
78
- execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),
79
- });
80
- }
81
- };
82
- const registerHttpController = (props) => {
83
- const { tools, controller, prefix } = props;
84
- const application = controller.application;
85
- const connection = controller.connection;
86
- for (const func of application.functions) {
87
- const toolName = prefix
88
- ? `${controller.name}_${func.name}`
89
- : func.name;
90
- tools[toolName] = createTool({
91
- name: toolName,
92
- func,
93
- execute: (args) => __awaiter(this, void 0, void 0, function* () {
94
- if (controller.execute !== undefined) {
95
- const response = yield controller.execute({
96
- connection,
97
- application,
98
- function: func,
99
- arguments: args,
100
- });
101
- return response.body;
102
- }
103
- return utils_1.HttpLlm.execute({
104
- application,
105
- function: func,
106
- connection,
107
- input: args,
108
- });
109
- }),
110
- });
111
- }
112
- };
113
- const createTool = (props) => {
114
- var _a;
115
- const { name, func, execute } = props;
116
- return (0, ai_1.tool)({
117
- description: (_a = func.description) !== null && _a !== void 0 ? _a : "",
118
- inputSchema: VercelParameterConverter_1.VercelParameterConverter.convert(func.parameters),
119
- execute: (args) => __awaiter(this, void 0, void 0, function* () {
120
- const coerced = utils_1.LlmJson.coerce(args, func.parameters);
121
- const validation = func.validate(coerced);
122
- if (!validation.success)
123
- return {
124
- success: false,
125
- error: `Type errors in "${name}" arguments:\n\n` +
126
- `\`\`\`json\n${utils_1.LlmJson.stringify(validation)}\n\`\`\``,
127
- };
128
- try {
129
- const result = yield execute(validation.data);
130
- return result === undefined
131
- ? { success: true }
132
- : { success: true, data: result };
133
- }
134
- catch (error) {
135
- return {
136
- success: false,
137
- error: error instanceof Error
138
- ? `${error.name}: ${error.message}`
139
- : String(error),
140
- };
141
- }
142
- }),
143
- });
144
- };
145
- })(VercelToolsRegistrar$1 || (VercelToolsRegistrar.VercelToolsRegistrar = VercelToolsRegistrar$1 = {}));
146
-
147
- return VercelToolsRegistrar;
148
- }
149
-
150
- export { requireVercelToolsRegistrar as __require };
143
+ export { VercelToolsRegistrar_2 as VercelToolsRegistrar, VercelToolsRegistrar$1 as default };
151
144
  //# sourceMappingURL=VercelToolsRegistrar2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VercelToolsRegistrar2.mjs","sources":["VercelToolsRegistrar.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VercelToolsRegistrar = void 0;\nconst utils_1 = require(\"@typia/utils\");\nconst ai_1 = require(\"ai\");\nconst VercelParameterConverter_1 = require(\"./VercelParameterConverter\");\nvar VercelToolsRegistrar;\n(function (VercelToolsRegistrar) {\n /**\n * Convert typia controllers to Vercel AI SDK tools.\n *\n * @param props Conversion properties\n * @returns Record of Vercel AI SDK Tools\n */\n VercelToolsRegistrar.convert = (props) => {\n var _a;\n const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;\n const tools = {};\n // check duplicate tool names\n if (prefix === false && props.controllers.length >= 2) {\n const names = new Map();\n const duplicates = [];\n for (const controller of props.controllers) {\n for (const func of controller.application.functions) {\n const existing = names.get(func.name);\n if (existing !== undefined)\n duplicates.push(`\"${func.name}\" in \"${controller.name}\" (conflicts with \"${existing}\")`);\n else\n names.set(func.name, controller.name);\n }\n }\n if (duplicates.length > 0)\n throw new Error(`Duplicate tool names found:\\n - ${duplicates.join(\"\\n - \")}`);\n }\n // convert controllers to tools\n for (const controller of props.controllers) {\n if (controller.protocol === \"class\") {\n registerClassController({ tools, controller, prefix });\n }\n else {\n registerHttpController({ tools, controller, prefix });\n }\n }\n return tools;\n };\n const registerClassController = (props) => {\n const { tools, controller, prefix } = props;\n const execute = controller.execute;\n for (const func of controller.application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n const method = execute[func.name];\n if (typeof method !== \"function\") {\n throw new Error(`Method \"${func.name}\" not found on controller \"${controller.name}\"`);\n }\n tools[toolName] = createTool({\n name: toolName,\n func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),\n });\n }\n };\n const registerHttpController = (props) => {\n const { tools, controller, prefix } = props;\n const application = controller.application;\n const connection = controller.connection;\n for (const func of application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n tools[toolName] = createTool({\n name: toolName,\n func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n if (controller.execute !== undefined) {\n const response = yield controller.execute({\n connection,\n application,\n function: func,\n arguments: args,\n });\n return response.body;\n }\n return utils_1.HttpLlm.execute({\n application,\n function: func,\n connection,\n input: args,\n });\n }),\n });\n }\n };\n const createTool = (props) => {\n var _a;\n const { name, func, execute } = props;\n return (0, ai_1.tool)({\n description: (_a = func.description) !== null && _a !== void 0 ? _a : \"\",\n inputSchema: VercelParameterConverter_1.VercelParameterConverter.convert(func.parameters),\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n const coerced = utils_1.LlmJson.coerce(args, func.parameters);\n const validation = func.validate(coerced);\n if (!validation.success)\n return {\n success: false,\n error: `Type errors in \"${name}\" arguments:\\n\\n` +\n `\\`\\`\\`json\\n${utils_1.LlmJson.stringify(validation)}\\n\\`\\`\\``,\n };\n try {\n const result = yield execute(validation.data);\n return result === undefined\n ? { success: true }\n : { success: true, data: result };\n }\n catch (error) {\n return {\n success: false,\n error: error instanceof Error\n ? `${error.name}: ${error.message}`\n : String(error),\n };\n }\n }),\n });\n };\n})(VercelToolsRegistrar || (exports.VercelToolsRegistrar = VercelToolsRegistrar = {}));\n//# sourceMappingURL=VercelToolsRegistrar.js.map"],"names":["this","VercelToolsRegistrar_1","require$$0","require$$1","require$$2","VercelToolsRegistrar"],"mappings":";;;;;;;;;;AACA,CAAA,IAAI,SAAS,GAAG,CAACA,oBAAI,IAAIA,oBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;KACrF,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,KAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,SAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACjG,SAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA,CAAE,CAAA;AACpG,SAAQ,SAAS,IAAI,CAAC,MAAM,EAAE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,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC;AACxE,6BAA4B,CAAC,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC;sBACrE;AACrB,iBAAgB,IAAI;qBACA,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;qBAC7C,OAAO,MAAM,KAAK;2BACZ,EAAE,OAAO,EAAE,IAAI;2BACf,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;AACzD,iBAAA;iBACgB,OAAO,KAAK,EAAE;AAC9B,qBAAoB,OAAO;yBACH,OAAO,EAAE,KAAK;yBACd,KAAK,EAAE,KAAK,YAAY;+BAClB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC;+BAChC,MAAM,CAAC,KAAK,CAAC;sBACtB;AACrB,iBAAA;AACA,aAAA,CAAa,CAAC;AACd,UAAS,CAAC;KACV,CAAK;CACL,CAAC,EAAEA,sBAAoB,KAAKJ,oBAAA,CAAA,oBAA4B,GAAGI,sBAAoB,GAAG,EAAE,CAAC,CAAC;AACtF;;;;;;"}
1
+ {"version":3,"file":"VercelToolsRegistrar2.mjs","sources":["VercelToolsRegistrar.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VercelToolsRegistrar = void 0;\nconst utils_1 = require(\"@typia/utils\");\nconst ai_1 = require(\"ai\");\nconst VercelParameterConverter_1 = require(\"./VercelParameterConverter\");\nvar VercelToolsRegistrar;\n(function (VercelToolsRegistrar) {\n /**\n * Convert typia controllers to Vercel AI SDK tools.\n *\n * @param props Conversion properties\n * @returns Record of Vercel AI SDK Tools\n */\n VercelToolsRegistrar.convert = (props) => {\n var _a;\n const prefix = (_a = props.prefix) !== null && _a !== void 0 ? _a : false;\n const tools = {};\n // check duplicate tool names\n if (prefix === false && props.controllers.length >= 2) {\n const names = new Map();\n const duplicates = [];\n for (const controller of props.controllers) {\n for (const func of controller.application.functions) {\n const existing = names.get(func.name);\n if (existing !== undefined)\n duplicates.push(`\"${func.name}\" in \"${controller.name}\" (conflicts with \"${existing}\")`);\n else\n names.set(func.name, controller.name);\n }\n }\n if (duplicates.length > 0)\n throw new Error(`Duplicate tool names found:\\n - ${duplicates.join(\"\\n - \")}`);\n }\n // convert controllers to tools\n for (const controller of props.controllers) {\n if (controller.protocol === \"class\") {\n registerClassController({ tools, controller, prefix });\n }\n else {\n registerHttpController({ tools, controller, prefix });\n }\n }\n return tools;\n };\n const registerClassController = (props) => {\n const { tools, controller, prefix } = props;\n const execute = controller.execute;\n for (const func of controller.application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n const method = execute[func.name];\n if (typeof method !== \"function\") {\n throw new Error(`Method \"${func.name}\" not found on controller \"${controller.name}\"`);\n }\n tools[toolName] = createTool({\n name: toolName,\n func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () { return method.call(execute, args); }),\n });\n }\n };\n const registerHttpController = (props) => {\n const { tools, controller, prefix } = props;\n const application = controller.application;\n const connection = controller.connection;\n for (const func of application.functions) {\n const toolName = prefix\n ? `${controller.name}_${func.name}`\n : func.name;\n tools[toolName] = createTool({\n name: toolName,\n func,\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n if (controller.execute !== undefined) {\n const response = yield controller.execute({\n connection,\n application,\n function: func,\n arguments: args,\n });\n return response.body;\n }\n return utils_1.HttpLlm.execute({\n application,\n function: func,\n connection,\n input: args,\n });\n }),\n });\n }\n };\n const createTool = (props) => {\n var _a;\n const { name, func, execute } = props;\n return (0, ai_1.tool)({\n description: (_a = func.description) !== null && _a !== void 0 ? _a : \"\",\n inputSchema: VercelParameterConverter_1.VercelParameterConverter.convert(func.parameters),\n execute: (args) => __awaiter(this, void 0, void 0, function* () {\n const coerced = utils_1.LlmJson.coerce(args, func.parameters);\n const validation = func.validate(coerced);\n if (!validation.success)\n return {\n success: false,\n error: `Type errors in \"${name}\" arguments:\\n\\n` +\n `\\`\\`\\`json\\n${utils_1.LlmJson.stringify(validation)}\\n\\`\\`\\``,\n };\n try {\n const result = yield execute(validation.data);\n return result === undefined\n ? { success: true }\n : { success: true, data: result };\n }\n catch (error) {\n return {\n success: false,\n error: error instanceof Error\n ? `${error.name}: ${error.message}`\n : String(error),\n };\n }\n }),\n });\n };\n})(VercelToolsRegistrar || (exports.VercelToolsRegistrar = VercelToolsRegistrar = {}));\n//# sourceMappingURL=VercelToolsRegistrar.js.map"],"names":["this","VercelToolsRegistrar_1","require$$0","require$$1","require$$2"],"mappings":";;;;;;AACA,IAAI,SAAS,GAAG,CAACA,sBAAI,IAAIA,sBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;AAC9G,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;AAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,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AAK,CAAC,OAAO,CAAC;AAC9D,8BAA8B,MAAM,CAAC,KAAK,CAAC;AAC3C,qBAAqB;AACrB,gBAAA;AACA,YAAA,CAAa,CAAC;AACd,SAAS,CAAC;AACV,IAAA,CAAK;AACL,CAAC,EAAE,oBAAoB,KAAK,sBAAA,GAAAH,sBAAA,CAAA,oBAA4B,GAAG,oBAAoB,GAAG,EAAE,CAAC,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typia/vercel",
3
- "version": "13.0.0-dev.20260427-3",
3
+ "version": "13.0.0-dev.20260501",
4
4
  "description": "Vercel AI SDK integration for typia",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "homepage": "https://typia.io",
24
24
  "dependencies": {
25
- "@typia/interface": "^13.0.0-dev.20260427-3",
26
- "@typia/utils": "^13.0.0-dev.20260427-3"
25
+ "@typia/interface": "^13.0.0-dev.20260501",
26
+ "@typia/utils": "^13.0.0-dev.20260501"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "ai": ">=6.0.0"
@@ -32,14 +32,14 @@
32
32
  "@rollup/plugin-commonjs": "^29.0.0",
33
33
  "@rollup/plugin-node-resolve": "^16.0.3",
34
34
  "@types/json-schema": "^7.0.15",
35
- "@typescript/native-preview": "7.0.0-dev.20260425.1",
35
+ "@typescript/native-preview": "7.0.0-dev.20260429.1",
36
36
  "ai": "^6.0.116",
37
37
  "rimraf": "^6.1.2",
38
38
  "rollup": "^4.56.0",
39
39
  "rollup-plugin-auto-external": "^2.0.0",
40
40
  "rollup-plugin-node-externals": "^8.1.2",
41
41
  "tinyglobby": "^0.2.12",
42
- "ttsc": "^0.4.4"
42
+ "ttsc": "^0.7.2"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "files": [
@@ -1,6 +0,0 @@
1
- function getDefaultExportFromCjs (x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
- }
4
-
5
- export { getDefaultExportFromCjs };
6
- //# sourceMappingURL=_commonjsHelpers.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_commonjsHelpers.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}