@run402/functions 3.8.0 → 3.9.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @run402/functions
2
2
 
3
- In-function helper library for [Run402](https://run402.com) serverless functions. Imported _inside_ a deployed function — gives you typed access to the caller's database (RLS-respecting) and the project's admin database, the caller's auth, the project's mailbox, AI helpers, and runtime asset uploads.
3
+ In-function helper library for [Run402](https://run402.com) serverless functions. Imported _inside_ a deployed function — gives you typed access to the caller's database (RLS-respecting) and the project's admin database, the caller's auth, the project's mailbox, AI helpers, runtime asset uploads, and the project's cursored event feed.
4
4
 
5
5
  ```ts
6
6
  import { db, adminDb, getUser, email, ai, assets } from "@run402/functions";
@@ -303,6 +303,44 @@ export default async function handler(req: Request): Promise<Response> {
303
303
  }
304
304
  ```
305
305
 
306
+ ## `events.emit(type, payload?, opts?)` — emit into the project's event feed
307
+
308
+ Write a fact into this project's cursored event feed (the `internal.project_events` outbox) from inside a deployed function. Every existing and future feed consumer — `run402 events`, the MCP `list_project_events` tool, the operator console's Activity view — reads it back for free the moment your code calls `events.emit`.
309
+
310
+ ```ts
311
+ import { events } from "@run402/functions";
312
+
313
+ await events.emit("signature_completed", { request_id, signer }, {
314
+ idempotencyKey: `sig:${requestId}`,
315
+ });
316
+ ```
317
+
318
+ Read it back with `GET /projects/v1/:project_id/events?source=app` (or `run402 events --source app`) — app events share the exact cursor/pagination/retention machinery as platform events (deploys, suspensions, transfers), just filtered to `source=app`.
319
+
320
+ **Vocabulary.** `type` must be flat snake_case matching `/^[a-z][a-z0-9_]{2,63}$/` — no dots, no `app_` prefix. Platform-registered type names (`deploy_activated`, `mailbox_suspended`, ...) are **reserved**: an app cannot impersonate a platform fact. This is enforced **server-side only** — `events.emit` does not pre-validate the grammar or check the reservation list locally; it sends `type` exactly as given. A bad grammar or a reserved name comes back as a thrown `Run402EventsPlatformError` with `code: "INVALID_EVENT_TYPE"` or `code: "RESERVED_EVENT_TYPE"` (both HTTP 400) — never a silently rewritten or dropped call.
321
+
322
+ **Idempotency.** Pass `idempotencyKey` on any code path that might run more than once for the same real-world fact — webhook retries, function-run retries, anything at-least-once. The gateway dedupes on `(project_id, idempotency_key)` **forever**: this is a durable identity for the fact, not a short-lived retry-window token like an HTTP `Idempotency-Key` header. Reusing a key days or years later still replays the *original* stored event (`deduplicated: true` on the response) instead of creating a new one.
323
+
324
+ **Response shape** — both a fresh emit (`201`) and an idempotent replay (`200`) return this:
325
+
326
+ ```ts
327
+ {
328
+ cursor: "evc_...", // opaque feed position — pass to ?cursor= on a feed read
329
+ event_type: "signature_completed",
330
+ class: "app", // always "app" for events emitted through this namespace
331
+ source: "app",
332
+ payload: { request_id: "req_123", signer: "0x..." },
333
+ payload_truncated: true, // present only if payload exceeded the 8 KiB bound
334
+ occurred_at: "2026-07-15T12:00:00.000Z",
335
+ deduplicated: false, // true on an idempotency-key replay
336
+ next_actions: [ /* platform-synthesized drill-downs, incl. a feed poll entry */ ],
337
+ }
338
+ ```
339
+
340
+ `payload` is a compact JSON fact — ids and verdict fields, never bodies or secrets — bounded to 8 KiB server-side (oversize payloads are truncated with `payload_truncated: true` rather than rejected). `next_actions` is always platform-synthesized; there is no way to supply your own drill-downs from the emit call (an app-supplied action would be prompt-injection-by-schema for agents that treat `next_actions` as trusted).
341
+
342
+ **Errors.** Non-2xx responses throw `Run402EventsPlatformError` — see [Errors](#errors) below. In practice the two you're most likely to see are `code: "QUOTA_EXCEEDED"` (403, the organization's pooled daily quota is exhausted; `details: {resource: "events_per_day", scope, used, limit}`) and cross-project denials (`code: "FORBIDDEN"`, 403), alongside the two vocabulary errors above.
343
+
306
344
  ## Static-site generation (build-time use)
307
345
 
308
346
  The same library works at build time for static-site generation if you set `RUN402_SERVICE_KEY` and `RUN402_PROJECT_ID` in your `.env`:
@@ -434,7 +472,29 @@ try {
434
472
 
435
473
  (`PostgREST error (…)` is the prefix for the `QueryBuilder` path; `SQL error (…)` for `adminDb().sql()`.) Don't parse `message` — read `err.code` / `err.status` / `err.trace_id` / `err.remote_code`.
436
474
 
437
- Other helpers still throw `Error` whose message includes the HTTP status and the response body so you can branch on `code` / `category` / `retryable` (the v1.34+ agent-operable error envelope).
475
+ ### `Run402EventsPlatformError` `events.emit()` failures
476
+
477
+ `events.emit()` throws a structured `Run402EventsPlatformError` (also exported from the package) on any non-2xx gateway response. The gateway owns event-type grammar, platform-vocabulary reservation, and the per-organization daily quota — this error is a faithful passthrough of whatever canonical envelope the gateway returned, never a client-fabricated message.
478
+
479
+ ```ts
480
+ import { events, Run402EventsPlatformError } from "@run402/functions";
481
+
482
+ try {
483
+ await events.emit("signature_completed", { request_id });
484
+ } catch (err) {
485
+ if (err instanceof Run402EventsPlatformError) {
486
+ err.code; // "QUOTA_EXCEEDED" | "INVALID_EVENT_TYPE" | "RESERVED_EVENT_TYPE" | "FORBIDDEN" | ...
487
+ err.status; // HTTP status, e.g. 403
488
+ err.details; // e.g. {resource: "events_per_day", scope: "organization", used: 1000, limit: 1000}
489
+ err.next_actions; // platform-synthesized drill-downs (e.g. renew_tier, check_usage)
490
+ err.body; // full response body (parsed object, or raw string when unparseable)
491
+ if (err.code === "QUOTA_EXCEEDED") { /* … */ }
492
+ }
493
+ throw err;
494
+ }
495
+ ```
496
+
497
+ Other helpers still throw plain `Error` whose message includes the HTTP status and the response body so you can branch on `code` / `category` / `retryable` (the v1.34+ agent-operable error envelope).
438
498
 
439
499
  ## Engines
440
500
 
@@ -0,0 +1,132 @@
1
+ /**
2
+ * `events` namespace — emit into the project's cursored event feed
3
+ * (capability `project-events-client-surface`, gateway change
4
+ * `app-events-emit-lane`).
5
+ *
6
+ * A `project_events` row is the platform's tier-1 fact log: deploys,
7
+ * suspensions, transfers — and, through this namespace, an app's OWN
8
+ * business facts too ("signature completed", "booking created"). Every
9
+ * existing and future feed consumer (CLI `run402 events`, MCP, the operator
10
+ * console) reads app events for free the moment code calls `events.emit`.
11
+ *
12
+ * ```ts
13
+ * import { events } from "@run402/functions";
14
+ *
15
+ * await events.emit("signature_completed", { request_id, signer }, {
16
+ * idempotencyKey: `sig:${requestId}`,
17
+ * });
18
+ * ```
19
+ *
20
+ * **Vocabulary.** `type` MUST be flat snake_case matching
21
+ * `/^[a-z][a-z0-9_]{2,63}$/` — no dots, no `app_` prefix. Platform-registered
22
+ * type names (`deploy_activated`, `mailbox_suspended`, ...) are RESERVED: an
23
+ * app cannot impersonate a platform fact. The gateway owns this policy —
24
+ * grammar and the reservation list are validated SERVER-SIDE only. This SDK
25
+ * sends `type` verbatim; a bad grammar or a reserved name comes back as a
26
+ * `Run402EventsPlatformError` (400 `INVALID_EVENT_TYPE` /
27
+ * `RESERVED_EVENT_TYPE`) rather than being caught, rewritten, or dropped
28
+ * locally.
29
+ *
30
+ * **Idempotency.** Pass `idempotencyKey` on any code path that might run
31
+ * more than once for the same real-world fact (webhook retries,
32
+ * function-run retries, anything at-least-once). The gateway dedupes on
33
+ * `(project_id, idempotency_key)` FOREVER — this is a durable identity for
34
+ * the fact, not a short-lived retry-window token like an HTTP
35
+ * `Idempotency-Key` header. Reusing a key days or years later still replays
36
+ * the ORIGINAL stored event (`deduplicated: true`) instead of creating a
37
+ * new one.
38
+ *
39
+ * @see openspec/changes/app-events-emit-lane/design.md (Canonical Agent Contract)
40
+ */
41
+ export interface EventEmitOptions {
42
+ /**
43
+ * Durable identity for this fact. The gateway dedupes on
44
+ * `(project_id, idempotency_key)` forever — reusing a key later still
45
+ * replays the original event rather than creating a new one. Recommended
46
+ * on every at-least-once code path (webhook handlers, function-run
47
+ * retries, anything that might re-execute for the same occurrence).
48
+ */
49
+ idempotencyKey?: string;
50
+ }
51
+ /** A `next_actions[]` entry — platform-synthesized drill-down. Shape is
52
+ * intentionally loose; entries commonly carry `type` plus some subset of
53
+ * `method` / `path` / `command` / `why`. Never app-supplied — see the
54
+ * namespace doc comment. */
55
+ export type EventNextAction = Record<string, unknown>;
56
+ /**
57
+ * The stored event, returned by both a fresh emit (HTTP `201`) and an
58
+ * idempotent replay (HTTP `200`). Matches the shape the feed read routes
59
+ * (`GET /projects/v1/:project_id/events`) render, so `cursor` from this
60
+ * response can be handed straight to a feed consumer's `?cursor=` param.
61
+ */
62
+ export interface EventEmitResult {
63
+ /** Opaque feed position (`evc_...`). Pass to a feed read's `?cursor=` to
64
+ * resume just after this event. Never parse it. */
65
+ cursor: string;
66
+ event_type: string;
67
+ /** Always `"app"` for events emitted through this namespace. */
68
+ class: string;
69
+ /** Always `"app"` for events emitted through this namespace. */
70
+ source: string;
71
+ payload: Record<string, unknown>;
72
+ /** Present (and `true`) only when the payload exceeded the 8 KiB bound
73
+ * and was truncated at write time; omitted otherwise. */
74
+ payload_truncated?: true;
75
+ occurred_at: string;
76
+ /** `true` when this call replayed a previously-stored event (same
77
+ * `idempotency_key`) instead of writing a new row. */
78
+ deduplicated: boolean;
79
+ next_actions: EventNextAction[];
80
+ [key: string]: unknown;
81
+ }
82
+ /**
83
+ * Structured error thrown by `events.emit()` on a non-2xx gateway response.
84
+ * The gateway owns event-type grammar, platform-vocabulary reservation, and
85
+ * the per-organization daily quota — this SDK never re-implements or masks
86
+ * that policy locally; it surfaces exactly what the gateway decided.
87
+ *
88
+ * Common `code` values:
89
+ * - `INVALID_EVENT_TYPE` (400) — `type` fails `/^[a-z][a-z0-9_]{2,63}$/`.
90
+ * - `RESERVED_EVENT_TYPE` (400) — `type` names a platform-registered type.
91
+ * - `QUOTA_EXCEEDED` (403) — the organization's daily app-event quota is
92
+ * exhausted; `details` carries
93
+ * `{ resource: "events_per_day", scope, used, limit }`.
94
+ * - `FORBIDDEN` (403) — the service key does not belong to this project.
95
+ *
96
+ * Branch on `err.code` / `err.status` / `err.details`, not on `message`.
97
+ */
98
+ export declare class Run402EventsPlatformError extends Error {
99
+ readonly code: string;
100
+ readonly status: number;
101
+ /** `details` from the canonical error envelope, when present (e.g. the
102
+ * `{resource, scope, used, limit}` shape on a `QUOTA_EXCEEDED` denial). */
103
+ readonly details: Record<string, unknown> | undefined;
104
+ /** `next_actions` from the canonical error envelope, when present. */
105
+ readonly next_actions: unknown[] | undefined;
106
+ /** Full response body — parsed object, or the raw string when unparseable. */
107
+ readonly body: unknown;
108
+ constructor(status: number, body: unknown, message: string);
109
+ }
110
+ export declare const events: {
111
+ /**
112
+ * Emit a fact into this project's event feed.
113
+ *
114
+ * The gateway owns vocabulary validation (grammar + platform-name
115
+ * reservation), class stamping (`"app"`), namespacing, quota, and
116
+ * `next_actions` synthesis — this call is a dumb pipe. `type` and
117
+ * `payload` are sent exactly as given; a rejection surfaces as a thrown
118
+ * {@link Run402EventsPlatformError}, never a locally-fabricated error or a
119
+ * silently rewritten value.
120
+ *
121
+ * @param type - flat snake_case event type (`/^[a-z][a-z0-9_]{2,63}$/`),
122
+ * validated and reservation-checked server-side only.
123
+ * @param payload - compact JSON fact (ids + verdict fields, never bodies
124
+ * or secrets). Bounded to 8 KiB server-side; oversize payloads are
125
+ * truncated (`payload_truncated: true` on the response) rather than
126
+ * rejected.
127
+ * @param opts.idempotencyKey - durable dedup identity; see the namespace
128
+ * doc comment. Strongly recommended on at-least-once code paths.
129
+ */
130
+ emit(type: string, payload?: Record<string, unknown>, opts?: EventEmitOptions): Promise<EventEmitResult>;
131
+ };
132
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAIH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;6BAG6B;AAC7B,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;wDACoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;8DAC0D;IAC1D,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB;2DACuD;IACvD,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;gFAC4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACtD,sEAAsE;IACtE,QAAQ,CAAC,YAAY,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IAC7C,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;gBAEX,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;CAS3D;AAgDD,eAAO,MAAM,MAAM;IACjB;;;;;;;;;;;;;;;;;;OAkBG;eAEK,MAAM,YACF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,SAC1B,gBAAgB,GACtB,OAAO,CAAC,eAAe,CAAC;CA0B5B,CAAC"}
package/dist/events.js ADDED
@@ -0,0 +1,165 @@
1
+ /**
2
+ * `events` namespace — emit into the project's cursored event feed
3
+ * (capability `project-events-client-surface`, gateway change
4
+ * `app-events-emit-lane`).
5
+ *
6
+ * A `project_events` row is the platform's tier-1 fact log: deploys,
7
+ * suspensions, transfers — and, through this namespace, an app's OWN
8
+ * business facts too ("signature completed", "booking created"). Every
9
+ * existing and future feed consumer (CLI `run402 events`, MCP, the operator
10
+ * console) reads app events for free the moment code calls `events.emit`.
11
+ *
12
+ * ```ts
13
+ * import { events } from "@run402/functions";
14
+ *
15
+ * await events.emit("signature_completed", { request_id, signer }, {
16
+ * idempotencyKey: `sig:${requestId}`,
17
+ * });
18
+ * ```
19
+ *
20
+ * **Vocabulary.** `type` MUST be flat snake_case matching
21
+ * `/^[a-z][a-z0-9_]{2,63}$/` — no dots, no `app_` prefix. Platform-registered
22
+ * type names (`deploy_activated`, `mailbox_suspended`, ...) are RESERVED: an
23
+ * app cannot impersonate a platform fact. The gateway owns this policy —
24
+ * grammar and the reservation list are validated SERVER-SIDE only. This SDK
25
+ * sends `type` verbatim; a bad grammar or a reserved name comes back as a
26
+ * `Run402EventsPlatformError` (400 `INVALID_EVENT_TYPE` /
27
+ * `RESERVED_EVENT_TYPE`) rather than being caught, rewritten, or dropped
28
+ * locally.
29
+ *
30
+ * **Idempotency.** Pass `idempotencyKey` on any code path that might run
31
+ * more than once for the same real-world fact (webhook retries,
32
+ * function-run retries, anything at-least-once). The gateway dedupes on
33
+ * `(project_id, idempotency_key)` FOREVER — this is a durable identity for
34
+ * the fact, not a short-lived retry-window token like an HTTP
35
+ * `Idempotency-Key` header. Reusing a key days or years later still replays
36
+ * the ORIGINAL stored event (`deduplicated: true`) instead of creating a
37
+ * new one.
38
+ *
39
+ * @see openspec/changes/app-events-emit-lane/design.md (Canonical Agent Contract)
40
+ */
41
+ import { config } from "./config.js";
42
+ /**
43
+ * Structured error thrown by `events.emit()` on a non-2xx gateway response.
44
+ * The gateway owns event-type grammar, platform-vocabulary reservation, and
45
+ * the per-organization daily quota — this SDK never re-implements or masks
46
+ * that policy locally; it surfaces exactly what the gateway decided.
47
+ *
48
+ * Common `code` values:
49
+ * - `INVALID_EVENT_TYPE` (400) — `type` fails `/^[a-z][a-z0-9_]{2,63}$/`.
50
+ * - `RESERVED_EVENT_TYPE` (400) — `type` names a platform-registered type.
51
+ * - `QUOTA_EXCEEDED` (403) — the organization's daily app-event quota is
52
+ * exhausted; `details` carries
53
+ * `{ resource: "events_per_day", scope, used, limit }`.
54
+ * - `FORBIDDEN` (403) — the service key does not belong to this project.
55
+ *
56
+ * Branch on `err.code` / `err.status` / `err.details`, not on `message`.
57
+ */
58
+ export class Run402EventsPlatformError extends Error {
59
+ code;
60
+ status;
61
+ /** `details` from the canonical error envelope, when present (e.g. the
62
+ * `{resource, scope, used, limit}` shape on a `QUOTA_EXCEEDED` denial). */
63
+ details;
64
+ /** `next_actions` from the canonical error envelope, when present. */
65
+ next_actions;
66
+ /** Full response body — parsed object, or the raw string when unparseable. */
67
+ body;
68
+ constructor(status, body, message) {
69
+ super(message);
70
+ this.name = "Run402EventsPlatformError";
71
+ this.status = status;
72
+ this.body = body;
73
+ this.code = platformCode(body);
74
+ this.details = platformDetails(body);
75
+ this.next_actions = platformNextActions(body);
76
+ }
77
+ }
78
+ function platformCode(body) {
79
+ if (body && typeof body === "object") {
80
+ const record = body;
81
+ const code = record.code ?? record.error;
82
+ if (typeof code === "string" && code.trim() !== "")
83
+ return code;
84
+ }
85
+ return "events_platform_error";
86
+ }
87
+ function platformMessage(body) {
88
+ if (body && typeof body === "object") {
89
+ const record = body;
90
+ const message = record.message ?? record.error;
91
+ if (typeof message === "string" && message.trim() !== "")
92
+ return message;
93
+ }
94
+ return "Run402 rejected the event.";
95
+ }
96
+ function platformDetails(body) {
97
+ if (body && typeof body === "object") {
98
+ const details = body.details;
99
+ if (details && typeof details === "object" && !Array.isArray(details)) {
100
+ return details;
101
+ }
102
+ }
103
+ return undefined;
104
+ }
105
+ function platformNextActions(body) {
106
+ if (body && typeof body === "object") {
107
+ const actions = body.next_actions;
108
+ if (Array.isArray(actions))
109
+ return actions;
110
+ }
111
+ return undefined;
112
+ }
113
+ async function readErrorBody(res) {
114
+ const text = await res.text();
115
+ if (!text)
116
+ return {};
117
+ try {
118
+ return JSON.parse(text);
119
+ }
120
+ catch {
121
+ return { message: text };
122
+ }
123
+ }
124
+ export const events = {
125
+ /**
126
+ * Emit a fact into this project's event feed.
127
+ *
128
+ * The gateway owns vocabulary validation (grammar + platform-name
129
+ * reservation), class stamping (`"app"`), namespacing, quota, and
130
+ * `next_actions` synthesis — this call is a dumb pipe. `type` and
131
+ * `payload` are sent exactly as given; a rejection surfaces as a thrown
132
+ * {@link Run402EventsPlatformError}, never a locally-fabricated error or a
133
+ * silently rewritten value.
134
+ *
135
+ * @param type - flat snake_case event type (`/^[a-z][a-z0-9_]{2,63}$/`),
136
+ * validated and reservation-checked server-side only.
137
+ * @param payload - compact JSON fact (ids + verdict fields, never bodies
138
+ * or secrets). Bounded to 8 KiB server-side; oversize payloads are
139
+ * truncated (`payload_truncated: true` on the response) rather than
140
+ * rejected.
141
+ * @param opts.idempotencyKey - durable dedup identity; see the namespace
142
+ * doc comment. Strongly recommended on at-least-once code paths.
143
+ */
144
+ async emit(type, payload, opts) {
145
+ const body = { event_type: type };
146
+ if (payload !== undefined)
147
+ body.payload = payload;
148
+ if (opts?.idempotencyKey !== undefined)
149
+ body.idempotency_key = opts.idempotencyKey;
150
+ const res = await fetch(`${config.API_BASE}/projects/v1/${config.PROJECT_ID}/events`, {
151
+ method: "POST",
152
+ headers: {
153
+ Authorization: "Bearer " + config.SERVICE_KEY,
154
+ "Content-Type": "application/json",
155
+ },
156
+ body: JSON.stringify(body),
157
+ });
158
+ if (!res.ok) {
159
+ const errBody = await readErrorBody(res);
160
+ throw new Run402EventsPlatformError(res.status, errBody, `Event emit failed (${res.status}): ${platformMessage(errBody)}`);
161
+ }
162
+ return res.json();
163
+ },
164
+ };
165
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,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AK,SAAS;YAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAClD,IAAI,IAAI,EAAE,cAAc,KAAK,SAAS;YAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC;QAEnF,MAAM,GAAG,GAAG,MAAM,KAAK,CACrB,GAAG,MAAM,CAAC,QAAQ,gBAAgB,MAAM,CAAC,UAAU,SAAS,EAC5D;YACE,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC,WAAW;gBAC7C,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CACF,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC;YACzC,MAAM,IAAI,yBAAyB,CACjC,GAAG,CAAC,MAAM,EACV,OAAO,EACP,sBAAsB,GAAG,CAAC,MAAM,MAAM,eAAe,CAAC,OAAO,CAAC,EAAE,CACjE,CAAC;QACJ,CAAC;QACD,OAAO,GAAG,CAAC,IAAI,EAA8B,CAAC;IAChD,CAAC;CACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -26,4 +26,6 @@ export { CacheInvalidationHostRequiredError, CacheInvalidationHostForbiddenError
26
26
  export { als, getCurrentContext, runWithContext, requireActiveContext, taintCacheBypass, withPaymentTaint, PAYMENT_PRIMITIVES, Run402OutsideRequestContextError, } from "./runtime-context.js";
27
27
  export type { RunRequestContext } from "./runtime-context.js";
28
28
  export { ensureActorContextKeysLoaded } from "./lib/actor-context-verify.js";
29
+ export { events, Run402EventsPlatformError } from "./events.js";
30
+ export type { EventEmitOptions, EventEmitResult, EventNextAction } from "./events.js";
29
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],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BAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EACV,KAAK,EACL,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,YAAY,CAAC;AAKpB,OAAO,EACL,GAAG,EACH,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAK9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAK7E,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -44,4 +44,9 @@ export { als, getCurrentContext, runWithContext, requireActiveContext, taintCach
44
44
  // actor-context verify key once at cold start (the key is never in the
45
45
  // tenant Lambda env). No-op in local dev / in-process gateway (key in env).
46
46
  export { ensureActorContextKeysLoaded } from "./lib/actor-context-verify.js";
47
+ // `events.emit(type, payload?, opts?)` — emit a fact into this project's
48
+ // cursored event feed (gateway change `app-events-emit-lane`). Service-key
49
+ // context inside deployed functions; the gateway owns vocabulary/quota
50
+ // policy, this namespace is a dumb pipe plus idempotency-key ergonomics.
51
+ export { events, Run402EventsPlatformError } from "./events.js";
47
52
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,O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GACjC,MAAM,sBAAsB,CAAC;AAE9B,6EAA6E;AAC7E,uEAAuE;AACvE,uEAAuE;AACvE,4EAA4E;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,yEAAyE;AACzE,2EAA2E;AAC3E,uEAAuE;AACvE,yEAAyE;AACzE,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@run402/functions",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
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",