@run402/functions 3.5.0 → 3.5.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ https://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control
17
+ with that entity. For the purposes of this definition, "control" means
18
+ (i) the power, direct or indirect, to cause the direction or management
19
+ of such entity, whether by contract or otherwise, or (ii) ownership
20
+ of fifty percent (50%) or more of the outstanding shares, or (iii)
21
+ beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative
95
+ Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work, excluding
103
+ those notices that do not pertain to any part of the Derivative
104
+ Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Do not include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ https://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -245,7 +245,7 @@ const image = await ai.generateImage({
245
245
  // { image: "<base64 PNG>", content_type: "image/png", aspect: "landscape" }
246
246
  ```
247
247
 
248
- `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.
248
+ `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 organization. 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.
249
249
 
250
250
  Translation requires the AI Translation add-on on the project; moderation is free for all projects.
251
251
 
@@ -380,22 +380,22 @@ Node 22 in deployed functions. `>=18` for local use (autocomplete and SSG).
380
380
 
381
381
  ## Other interfaces
382
382
 
383
- `@run402/functions` is one of five surfaces in the [run402](https://github.com/kychee-com/run402) monorepo:
383
+ Run402's public surfaces now span two repositories:
384
384
 
385
- - **`@run402/functions`** (this) — in-function helper, auto-bundled
386
- - [`@run402/sdk`](https://www.npmjs.com/package/@run402/sdk) typed TypeScript client for the platform API
387
- - [`run402`](https://www.npmjs.com/package/run402) — the CLI
388
- - [`run402-mcp`](https://www.npmjs.com/package/run402-mcp) — MCP server for Claude Desktop / Cursor / Cline / Claude Code
389
- - OpenClaw skill script-based skill for OpenClaw agents
390
-
391
- All five release in lockstep at the same version.
385
+ - [`run402-core`](https://github.com/kychee-com/run402-core) - server/runtime core, including **`@run402/functions`** (this package)
386
+ - [`run402`](https://github.com/kychee-com/run402) - agent/client surfaces:
387
+ - [`@run402/sdk`](https://www.npmjs.com/package/@run402/sdk) — typed TypeScript client for the platform API
388
+ - [`run402`](https://www.npmjs.com/package/run402) — the CLI
389
+ - [`run402-mcp`](https://www.npmjs.com/package/run402-mcp)MCP server for Claude Desktop / Cursor / Cline / Claude Code
390
+ - OpenClaw skill — script-based skill for OpenClaw agents
392
391
 
393
392
  ## Links
394
393
 
395
394
  - Run402: <https://run402.com>
395
+ - Source: <https://github.com/kychee-com/run402-core/tree/main/packages/functions>
396
396
  - HTTP API reference: <https://run402.com/llms.txt>
397
397
  - CLI reference: <https://run402.com/llms-cli.txt>
398
398
 
399
399
  ## License
400
400
 
401
- MIT
401
+ Apache-2.0
package/dist/db.d.ts CHANGED
@@ -68,7 +68,7 @@ interface AdminDbClient {
68
68
  * any other caller than service_role. Use for explicit server-side operations
69
69
  * that must ignore RLS.
70
70
  *
71
- * `adminDb().sql()` targets the /projects/v1/admin/:id/sql endpoint, which
71
+ * `adminDb().sql()` targets the /projects/v1/admin/:project_id/sql endpoint, which
72
72
  * runs arbitrary SQL as a superuser-scoped role on the project schema.
73
73
  */
74
74
  export declare function adminDb(): AdminDbClient;
package/dist/db.js CHANGED
@@ -231,7 +231,7 @@ export function db(req) {
231
231
  * any other caller than service_role. Use for explicit server-side operations
232
232
  * that must ignore RLS.
233
233
  *
234
- * `adminDb().sql()` targets the /projects/v1/admin/:id/sql endpoint, which
234
+ * `adminDb().sql()` targets the /projects/v1/admin/:project_id/sql endpoint, which
235
235
  * runs arbitrary SQL as a superuser-scoped role on the project schema.
236
236
  */
237
237
  export function adminDb() {
package/dist/email.d.ts CHANGED
@@ -18,9 +18,18 @@ export interface EmailTemplateOptions {
18
18
  }
19
19
  export type EmailSendOptions = EmailRawOptions | EmailTemplateOptions;
20
20
  export interface EmailSendResult {
21
- id: string;
21
+ message_id?: string;
22
+ id?: string;
23
+ mailbox_id?: string;
24
+ from_address?: string;
22
25
  [key: string]: unknown;
23
26
  }
27
+ export declare class EmailConfigurationError extends Error {
28
+ code: "AMBIGUOUS_MAILBOX" | "DEFAULT_MAILBOX_REQUIRED" | "DEFAULT_MAILBOX_INVALID";
29
+ details: Record<string, unknown>;
30
+ next_actions: unknown[];
31
+ constructor(message: string, code: "AMBIGUOUS_MAILBOX" | "DEFAULT_MAILBOX_REQUIRED" | "DEFAULT_MAILBOX_INVALID", details?: Record<string, unknown>, next_actions?: unknown[]);
32
+ }
24
33
  export declare const email: {
25
34
  send(opts: EmailSendOptions): Promise<EmailSendResult>;
26
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../src/email.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,MAAM,gBAAgB,G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ClF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChC,YAAY,EAAE,OAAO,EAAE;gBAH9B,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,mBAAmB,GAAG,0BAA0B,GAAG,yBAAyB,EAClF,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACrC,YAAY,GAAE,OAAO,EAAO;CAKtC;AAED,eAAO,MAAM,KAAK;eA6DG,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAiC5D,CAAC"}
package/dist/email.js CHANGED
@@ -1,4 +1,16 @@
1
1
  import { config } from "./config.js";
2
+ export class EmailConfigurationError extends Error {
3
+ code;
4
+ details;
5
+ next_actions;
6
+ constructor(message, code, details = {}, next_actions = []) {
7
+ super(message);
8
+ this.code = code;
9
+ this.details = details;
10
+ this.next_actions = next_actions;
11
+ this.name = "EmailConfigurationError";
12
+ }
13
+ }
2
14
  export const email = (() => {
3
15
  let _mailboxId = null;
4
16
  async function _discoverMailbox() {
@@ -10,10 +22,37 @@ export const email = (() => {
10
22
  if (!res.ok)
11
23
  throw new Error("Failed to discover mailbox: " + (await res.text()));
12
24
  const data = (await res.json());
13
- if (!data.mailboxes || data.mailboxes.length === 0) {
14
- throw new Error("No mailbox configured for this project");
25
+ const mailboxes = data.mailboxes || [];
26
+ const defaultOutboundId = data.mailbox_settings?.default_outbound_mailbox_id ?? null;
27
+ if (defaultOutboundId) {
28
+ const selected = mailboxes.find((mailbox) => mailbox.mailbox_id === defaultOutboundId);
29
+ if (!selected || selected.can_send === false || selected.status === "suspended" || selected.status === "tombstoned") {
30
+ throw new EmailConfigurationError("Configured default outbound mailbox is not send-ready", "DEFAULT_MAILBOX_INVALID", {
31
+ resource_kind: "mailbox",
32
+ selection_purpose: "default_outbound",
33
+ default_mailbox_id: defaultOutboundId,
34
+ candidates: mailboxes.map(safeMailboxCandidate),
35
+ }, data.next_actions || defaultMailboxNextActions());
36
+ }
37
+ _mailboxId = defaultOutboundId;
38
+ return _mailboxId;
39
+ }
40
+ const sendReady = mailboxes.filter((mailbox) => mailbox.can_send !== false && mailbox.status !== "suspended" && mailbox.status !== "tombstoned");
41
+ if (sendReady.length === 0) {
42
+ throw new EmailConfigurationError("No active mailbox configured for this project", "DEFAULT_MAILBOX_REQUIRED", {
43
+ resource_kind: "mailbox",
44
+ selection_purpose: "default_outbound",
45
+ candidates: [],
46
+ }, data.next_actions || createMailboxNextActions());
47
+ }
48
+ if (sendReady.length > 1) {
49
+ throw new EmailConfigurationError("Multiple active mailboxes found; configure default_outbound_mailbox_id before calling email.send()", "AMBIGUOUS_MAILBOX", {
50
+ resource_kind: "mailbox",
51
+ selection_purpose: "default_outbound",
52
+ candidates: sendReady.map(safeMailboxCandidate),
53
+ }, data.next_actions || defaultMailboxNextActions());
15
54
  }
16
- _mailboxId = data.mailboxes[0].mailbox_id;
55
+ _mailboxId = sendReady[0].mailbox_id;
17
56
  return _mailboxId;
18
57
  }
19
58
  return {
@@ -55,4 +94,41 @@ export const email = (() => {
55
94
  },
56
95
  };
57
96
  })();
97
+ function safeMailboxCandidate(mailbox) {
98
+ return {
99
+ mailbox_id: mailbox.mailbox_id,
100
+ slug: mailbox.slug,
101
+ address: mailbox.address,
102
+ status: mailbox.status,
103
+ is_default_outbound: mailbox.is_default_outbound === true,
104
+ is_auth_sender: mailbox.is_auth_sender === true,
105
+ can_send: mailbox.can_send !== false,
106
+ send_blocked_reason: mailbox.send_blocked_reason ?? null,
107
+ };
108
+ }
109
+ function defaultMailboxNextActions() {
110
+ return [
111
+ {
112
+ type: "edit_request",
113
+ method: "PATCH",
114
+ path: "/mailboxes/v1/settings",
115
+ auth: "service_key",
116
+ why: "Set default_outbound_mailbox_id to the mailbox email.send() should use.",
117
+ fields: { default_outbound_mailbox_id: "mbx_..." },
118
+ },
119
+ ];
120
+ }
121
+ function createMailboxNextActions() {
122
+ return [
123
+ {
124
+ type: "edit_request",
125
+ method: "POST",
126
+ path: "/mailboxes/v1",
127
+ auth: "service_key",
128
+ why: "Create a mailbox before calling email.send().",
129
+ fields: { slug: "notifications" },
130
+ },
131
+ ...defaultMailboxNextActions(),
132
+ ];
133
+ }
58
134
  //# sourceMappingURL=email.js.map
package/dist/email.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../src/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA6BrC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE;IACzB,IAAI,UAAU,GAAkB,IAAI,CAAC;IAErC,KAAK,UAAU,gBAAgB;QAC7B,IAAI,UAAU;YAAE,OAAO,UAAU,CAAC;QAClC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,EAAE;YACzD,OAAO,EAAE,EAAE,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE;SAC3D,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAClF,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA4C,CAAC;QAC3E,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnD,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;QAC1C,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO;QACL,KAAK,CAAC,IAAI,CAAC,IAAsB;YAC/B,MAAM,KAAK,GAAG,MAAM,gBAAgB,EAAE,CAAC;YACvC,MAAM,IAAI,GAA4B,EAAE,EAAE,EAAE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ACF,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB;IAC/B,OAAO;QACL;YACE,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,+CAA+C;YACpD,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;SAClC;QACD,GAAG,yBAAyB,EAAE;KAC/B,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * SDK runtime verifier for the gateway-signed actor-context envelope.
3
3
  *
4
- * Why this lives in `packages/functions/src/lib/` (vendored shape):
4
+ * Why this lives in `@run402/functions` (vendored shape):
5
5
  * - `@run402/functions` is published independently; it must NOT depend
6
6
  * on `@run402/gateway` types or runtime.
7
7
  * - The verifier is small, deterministic, and security-critical — easier
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * SDK runtime verifier for the gateway-signed actor-context envelope.
3
3
  *
4
- * Why this lives in `packages/functions/src/lib/` (vendored shape):
4
+ * Why this lives in `@run402/functions` (vendored shape):
5
5
  * - `@run402/functions` is published independently; it must NOT depend
6
6
  * on `@run402/gateway` types or runtime.
7
7
  * - The verifier is small, deterministic, and security-critical — easier
package/dist/lib/jwt.d.ts CHANGED
@@ -5,10 +5,9 @@
5
5
  * `getUser`. Replaces a runtime dependency on the `jsonwebtoken` package
6
6
  * (and its transitive tree `jws` / `jwa` / `ecdsa-sig-formatter` /
7
7
  * `lodash.*` / `ms` / `semver` / `safe-buffer`), so this published SDK
8
- * has zero crypto deps beyond `node:crypto`. The companion file in
9
- * the private gateway package (`packages/gateway/src/lib/jwt.ts`) is
10
- * intentionally a verbatim duplicate — the published SDK cannot pull
11
- * from the workspace-private `@run402/shared`.
8
+ * has zero crypto deps beyond `node:crypto`. The Run402 Cloud gateway keeps
9
+ * a companion implementation for its own runtime, but this package cannot
10
+ * depend on gateway-private source.
12
11
  */
13
12
  export interface JwtPayload {
14
13
  [key: string]: unkn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E,MAAM,CAAC;CACzB;AAED,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,iBAAkB,SAAQ,iBAAiB;IACtD,SAAS,EAAE,IAAI,CAAC;gBACJ,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI;CAK7C;AAED,qBAAa,cAAe,SAAQ,iBAAiB;IACnD,IAAI,EAAE,IAAI,CAAC;gBACC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI;CAKxC;AAqCD,wBAAgB,IAAI,CAClB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,WAAW,GACpB,MAAM,CAmCR;AAED,wBAAgB,MAAM,CAAC,CAAC,GAAG,UAAU,EACnC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa,GACtB,CAAC,CA4EH;AAED,wBAAgB,MAAM,CAAC,CAAC,GAAG,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAW9D;AAED,QAAA,MAAM,GAAG;;;;CAA2B,CAAC;AACrC,eAAe,GAAG,CAAC"}
package/dist/lib/jwt.js CHANGED
@@ -5,10 +5,9 @@
5
5
  * `getUser`. Replaces a runtime dependency on the `jsonwebtoken` package
6
6
  * (and its transitive tree `jws` / `jwa` / `ecdsa-sig-formatter` /
7
7
  * `lodash.*` / `ms` / `semver` / `safe-buffer`), so this published SDK
8
- * has zero crypto deps beyond `node:crypto`. The companion file in
9
- * the private gateway package (`packages/gateway/src/lib/jwt.ts`) is
10
- * intentionally a verbatim duplicate — the published SDK cannot pull
11
- * from the workspace-private `@run402/shared`.
8
+ * has zero crypto deps beyond `node:crypto`. The Run402 Cloud gateway keeps
9
+ * a companion implementation for its own runtime, but this package cannot
10
+ * depend on gateway-private source.
12
11
  */
13
12
  import { createHmac, timingSafeEqual } from "node:crypto";
14
13
  export class JsonWebTokenError ext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,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAY,CAAC;QACvF,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3F,OAAO,OAAY,CAAC;IACtB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACrC,eAAe,GAAG,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@run402/functions",
3
- "version": "3.5.0",
4
- "description": "In-function helper library for Run402 serverless functions db, adminDb, getUser, email, ai, assets, verifyWebhook. Auto-bundled into deployed functions; also installable for local TypeScript autocomplete.",
3
+ "version": "3.5.1",
4
+ "description": "In-function helper library for Run402 serverless functions - db, adminDb, getUser, email, ai, assets, verifyWebhook. Auto-bundled into deployed functions; also installable for local TypeScript autocomplete.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -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/auth/index.test.ts src/ai.test.ts src/email.test.ts src/assets.test.ts src/routed-http.test.ts src/request-context.test.ts src/runtime-context.test.ts src/lib/actor-context-verify.test.ts src/verify-webhook.test.ts"
21
+ "test": "node --experimental-test-module-mocks --test --import tsx 'src/**/*.test.ts'"
22
22
  },
23
23
  "engines": {
24
24
  "node": ">=18"
@@ -26,13 +26,13 @@
26
26
  "devDependencies": {},
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "git+https://github.com/kychee-com/run402.git",
30
- "directory": "functions"
29
+ "url": "git+https://github.com/kychee-com/run402-core.git",
30
+ "directory": "packages/functions"
31
31
  },
32
32
  "homepage": "https://run402.com",
33
- "bugs": "https://github.com/kychee-com/run402/issues",
33
+ "bugs": "https://github.com/kychee-com/run402-core/issues",
34
34
  "author": "Kychee Technologies",
35
- "license": "MIT",
35
+ "license": "Apache-2.0",
36
36
  "keywords": [
37
37
  "run402",
38
38
  "serverless",