@mastra/connect 1.4.0 → 1.4.1-alpha.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.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +9 -9
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/user-connect-routes.d.ts +9 -5
- package/dist/user-connect-routes.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { SpanType, resolveCurrentSpan } from "@mastra/core/observability";
|
|
|
4
4
|
import { createCodeMode, createCodeModeTool, createTool, generateStubs } from "@mastra/core/tools";
|
|
5
5
|
import { hkdfSync } from "crypto";
|
|
6
6
|
import { MASTRA_RESOURCE_ID_KEY } from "@mastra/core/request-context";
|
|
7
|
+
import { getRequestUser } from "@mastra/core/utils";
|
|
7
8
|
// src/errors.ts
|
|
8
9
|
const MAX_DETAIL_LENGTH = 2e3;
|
|
9
10
|
var MastraConnectError = class extends Error {
|
|
@@ -53740,7 +53741,7 @@ function toImageGenerationModelOutput(output) {
|
|
|
53740
53741
|
// src/providers/openai/tools/create-image.ts
|
|
53741
53742
|
const createImageInputSchema = z.object({
|
|
53742
53743
|
prompt: z.string().min(1).max(32e3).describe("A text description of the desired image(s). Maximum 32,000 characters for GPT image models."),
|
|
53743
|
-
model: z.string().regex(/^(gpt-image-.+|chatgpt-image-latest)$/).optional().describe("A supported GPT Image model ID. Defaults to \"gpt-image-
|
|
53744
|
+
model: z.string().regex(/^(gpt-image-.+|chatgpt-image-latest)$/).optional().describe("A supported GPT Image model ID. Defaults to \"gpt-image-2.5-sunburst\"."),
|
|
53744
53745
|
n: z.number().int().min(1).max(10).optional().describe("The number of images to generate. Must be between 1 and 10."),
|
|
53745
53746
|
size: z.union([z.literal("auto"), z.string().regex(/^[1-9]\d*x[1-9]\d*$/)]).optional().describe("Image dimensions such as \"1024x1024\", \"1536x1024\", or \"auto\". Newer GPT image models support arbitrary WIDTHxHEIGHT values."),
|
|
53746
53747
|
quality: z.enum([
|
|
@@ -53794,7 +53795,7 @@ function createImageTool(proxy) {
|
|
|
53794
53795
|
endpoint: "/v1/images/generations",
|
|
53795
53796
|
data: {
|
|
53796
53797
|
prompt: input.prompt,
|
|
53797
|
-
model: input.model ?? "gpt-image-
|
|
53798
|
+
model: input.model ?? "gpt-image-2.5-sunburst",
|
|
53798
53799
|
...input.n !== void 0 && { n: input.n },
|
|
53799
53800
|
...input.size !== void 0 && { size: input.size },
|
|
53800
53801
|
...input.quality !== void 0 && { quality: input.quality },
|
|
@@ -87170,7 +87171,7 @@ function userConnectRoutes(options) {
|
|
|
87170
87171
|
if (options.resourceId) try {
|
|
87171
87172
|
raw = await options.resourceId({
|
|
87172
87173
|
requestContext,
|
|
87173
|
-
user: requestContext
|
|
87174
|
+
user: getRequestUser(requestContext)
|
|
87174
87175
|
});
|
|
87175
87176
|
} catch (error) {
|
|
87176
87177
|
logRouteError(c, error);
|