@run402/functions 1.69.7 → 1.70.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/README.md +43 -1
- package/dist/ai.d.ts +12 -0
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +40 -0
- package/dist/ai.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ await email.send({
|
|
|
121
121
|
|
|
122
122
|
Templates: `project_invite` (`project_name`, `invite_url`), `magic_link` (`project_name`, `link_url`, `expires_in`), `notification` (`project_name`, `message` ≤ 500 chars). Throws on rate limit, suppression, or no-mailbox.
|
|
123
123
|
|
|
124
|
-
## `ai.translate` / `ai.moderate`
|
|
124
|
+
## `ai.translate` / `ai.moderate` / `ai.generateImage`
|
|
125
125
|
|
|
126
126
|
```ts
|
|
127
127
|
const { text, from } = await ai.translate("Hello world", {
|
|
@@ -130,10 +130,52 @@ const { text, from } = await ai.translate("Hello world", {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
const { flagged, categories } = await ai.moderate("Some user-generated text");
|
|
133
|
+
|
|
134
|
+
const image = await ai.generateImage({
|
|
135
|
+
prompt: "a moonlit dream journal illustration",
|
|
136
|
+
aspect: "landscape",
|
|
137
|
+
});
|
|
138
|
+
// { image: "<base64 PNG>", content_type: "image/png", aspect: "landscape" }
|
|
133
139
|
```
|
|
134
140
|
|
|
141
|
+
`ai.generateImage` supports `aspect: "square" | "landscape" | "portrait"` and returns base64 image bytes plus `content_type` and `aspect`. It uses the function's `RUN402_SERVICE_KEY` against the project runtime image endpoint; it does **not** need allowance wallets, x402 wrapping, or local signing inside the function. Runtime image generation is billed and rate-limited against the project's billing account. Quota, rate-limit, and spend-cap failures are ordinary thrown errors such as `Image generation failed (403): QUOTA_EXCEEDED: ...`; handle them in your app response instead of forwarding raw details to the browser.
|
|
142
|
+
|
|
135
143
|
Translation requires the AI Translation add-on on the project; moderation is free for all projects.
|
|
136
144
|
|
|
145
|
+
### Routed image generation example
|
|
146
|
+
|
|
147
|
+
Use a routed function when the browser should request an image at app runtime. Keep app-level auth/rate limits in your handler before calling `ai.generateImage`, especially for public routes.
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
import { ai, getUser } from "@run402/functions";
|
|
151
|
+
|
|
152
|
+
export default async function handler(req: Request): Promise<Response> {
|
|
153
|
+
if (req.method !== "POST") {
|
|
154
|
+
return new Response("method not allowed", { status: 405 });
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const user = await getUser(req);
|
|
158
|
+
if (!user) return new Response("unauthorized", { status: 401 });
|
|
159
|
+
|
|
160
|
+
const { prompt } = await req.json() as { prompt?: string };
|
|
161
|
+
if (!prompt || prompt.length > 500) {
|
|
162
|
+
return Response.json({ error: "prompt_required" }, { status: 400 });
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
try {
|
|
166
|
+
const result = await ai.generateImage({ prompt, aspect: "landscape" });
|
|
167
|
+
return Response.json(result, {
|
|
168
|
+
headers: { "cache-control": "private, no-store" },
|
|
169
|
+
});
|
|
170
|
+
} catch (err) {
|
|
171
|
+
return Response.json(
|
|
172
|
+
{ error: "image_generation_unavailable", detail: (err as Error).message },
|
|
173
|
+
{ status: 503 },
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
137
179
|
## Static-site generation (build-time use)
|
|
138
180
|
|
|
139
181
|
The same library works at build time for static-site generation if you set `RUN402_SERVICE_KEY` and `RUN402_PROJECT_ID` in your `.env`:
|
package/dist/ai.d.ts
CHANGED
|
@@ -13,8 +13,20 @@ export interface ModerateResult {
|
|
|
13
13
|
categories: Record<string, boolean>;
|
|
14
14
|
[key: string]: unknown;
|
|
15
15
|
}
|
|
16
|
+
export type ImageAspect = "square" | "landscape" | "portrait";
|
|
17
|
+
export interface GenerateImageOptions {
|
|
18
|
+
prompt: string;
|
|
19
|
+
aspect?: ImageAspect;
|
|
20
|
+
}
|
|
21
|
+
export interface GenerateImageResult {
|
|
22
|
+
image: string;
|
|
23
|
+
content_type: string;
|
|
24
|
+
aspect: ImageAspect | string;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
16
27
|
export declare const ai: {
|
|
17
28
|
translate(text: string, to: string, opts?: TranslateOptions): Promise<TranslateResult>;
|
|
18
29
|
moderate(text: string): Promise<ModerateResult>;
|
|
30
|
+
generateImage(options: GenerateImageOptions): Promise<GenerateImageResult>;
|
|
19
31
|
};
|
|
20
32
|
//# sourceMappingURL=ai.d.ts.map
|
package/dist/ai.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,EAAE;oBAEL,MAAM,MACR,MAAM,SACH,gBAAgB,GACtB,OAAO,CAAC,eAAe,CAAC;mBAyBN,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAmBD,eAAO,MAAM,EAAE;oBAEL,MAAM,MACR,MAAM,SACH,gBAAgB,GACtB,OAAO,CAAC,eAAe,CAAC;mBAyBN,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;2BAsBxB,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA6BjF,CAAC"}
|
package/dist/ai.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { config } from "./config.js";
|
|
2
|
+
const IMAGE_ASPECTS = new Set(["square", "landscape", "portrait"]);
|
|
3
|
+
async function readRuntimeError(res) {
|
|
4
|
+
const errBody = await res.text();
|
|
5
|
+
try {
|
|
6
|
+
const parsed = JSON.parse(errBody);
|
|
7
|
+
const message = parsed.message || parsed.error || errBody;
|
|
8
|
+
return parsed.code ? `${parsed.code}: ${message}` : message;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return errBody;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
2
14
|
export const ai = {
|
|
3
15
|
async translate(text, to, opts) {
|
|
4
16
|
const body = { text, to };
|
|
@@ -49,5 +61,33 @@ export const ai = {
|
|
|
49
61
|
}
|
|
50
62
|
return res.json();
|
|
51
63
|
},
|
|
64
|
+
async generateImage(options) {
|
|
65
|
+
if (!options || typeof options !== "object") {
|
|
66
|
+
throw new Error("Image generation options are required");
|
|
67
|
+
}
|
|
68
|
+
if (!options.prompt || typeof options.prompt !== "string" || !options.prompt.trim()) {
|
|
69
|
+
throw new Error("Image generation prompt is required");
|
|
70
|
+
}
|
|
71
|
+
const aspect = options.aspect ?? "square";
|
|
72
|
+
if (!IMAGE_ASPECTS.has(aspect)) {
|
|
73
|
+
throw new Error("Invalid image aspect: must be square, landscape, or portrait");
|
|
74
|
+
}
|
|
75
|
+
const res = await fetch(config.API_BASE + "/ai/v1/generate-image", {
|
|
76
|
+
method: "POST",
|
|
77
|
+
headers: {
|
|
78
|
+
Authorization: "Bearer " + config.SERVICE_KEY,
|
|
79
|
+
"Content-Type": "application/json",
|
|
80
|
+
},
|
|
81
|
+
body: JSON.stringify({
|
|
82
|
+
prompt: options.prompt.trim(),
|
|
83
|
+
aspect,
|
|
84
|
+
}),
|
|
85
|
+
});
|
|
86
|
+
if (!res.ok) {
|
|
87
|
+
const msg = await readRuntimeError(res);
|
|
88
|
+
throw new Error("Image generation failed (" + res.status + "): " + msg);
|
|
89
|
+
}
|
|
90
|
+
return res.json();
|
|
91
|
+
},
|
|
52
92
|
};
|
|
53
93
|
//# sourceMappingURL=ai.js.map
|
package/dist/ai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../src/ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,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D,OAAO,GAAG,CAAC,IAAI,EAAkC,CAAC;IACpD,CAAC;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type { User } from "./auth.js";
|
|
|
4
4
|
export { email } from "./email.js";
|
|
5
5
|
export type { EmailSendOptions, EmailRawOptions, EmailTemplateOptions, EmailSendResult } from "./email.js";
|
|
6
6
|
export { ai } from "./ai.js";
|
|
7
|
-
export type { TranslateOptions, TranslateResult, ModerateResult } from "./ai.js";
|
|
7
|
+
export type { GenerateImageOptions, GenerateImageResult, ImageAspect, TranslateOptions, TranslateResult, ModerateResult, } from "./ai.js";
|
|
8
8
|
export { bytes, isRequest, json, routedHttp, text } from "./routed-http.js";
|
|
9
9
|
export type { RoutedHttpHeaderList, RoutedHttpRequestV1, RoutedHttpResponseInit, RoutedHttpResponseV1, } from "./routed-http.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC3G,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC3G,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC5E,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAS7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@run402/functions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.70.0",
|
|
4
4
|
"description": "In-function helper library for Run402 serverless functions — db, adminDb, getUser, email, ai. Auto-bundled into deployed functions; also installable for local TypeScript autocomplete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc",
|
|
21
|
-
"test": "node --experimental-test-module-mocks --test --import tsx src/db.test.ts src/auth.test.ts src/routed-http.test.ts"
|
|
21
|
+
"test": "node --experimental-test-module-mocks --test --import tsx src/db.test.ts src/auth.test.ts src/ai.test.ts src/routed-http.test.ts"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=18"
|