@vxil/cli 0.4.3 → 0.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.
@@ -6,6 +6,12 @@ export declare const RESERVED_CREDIT_TYPES: ReadonlySet<string>;
6
6
  * of which is restricted to internal platform machinery). */
7
7
  export declare function isReservedCreditType(creditType: string): boolean;
8
8
  export declare const NOTIFICATION_TEMPLATE_PLACEHOLDERS: Readonly<Record<string, readonly string[]>>;
9
+ /** Placeholders that are SLOTS in the BODY parts only — the renderer splits
10
+ * `html`/`text` on them (templates.ts `CTA_SLOT`) but the subject goes through
11
+ * the plain interpolator, where the same token is just a data key that does not
12
+ * exist and renders EMPTY. Rejected in `subject` for exactly the reason the
13
+ * whole allow-list exists: a silent empty render in a live email. */
14
+ export declare const NOTIFICATION_TEMPLATE_SLOT_PLACEHOLDERS: Readonly<Record<string, readonly string[]>>;
9
15
  /** Per-override caps (D4). Bodies are emails, not documents. */
10
16
  export declare const NOTIF_OVERRIDE_SUBJECT_MAX = 500;
11
17
  export declare const NOTIF_OVERRIDE_BODY_MAX = 20000;
@@ -54,7 +60,7 @@ export declare const NotificationsConfigSchema: import("@sinclair/typebox").TObj
54
60
  templates: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
55
61
  allowOverride: import("@sinclair/typebox").TBoolean;
56
62
  overrides: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
57
- subject: import("@sinclair/typebox").TString;
63
+ subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
58
64
  html: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
59
65
  text: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
60
66
  }>>>>;
@@ -203,9 +209,11 @@ export declare const AuthConfigSchema: import("@sinclair/typebox").TObject<{
203
209
  emailVerification: import("@sinclair/typebox").TObject<{
204
210
  required: import("@sinclair/typebox").TBoolean;
205
211
  }>;
206
- magicLink: import("@sinclair/typebox").TObject<{
212
+ magicLink: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
207
213
  tokenTtlMinutes: import("@sinclair/typebox").TInteger;
208
- }>;
214
+ resendCooldownSec: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
215
+ }>>;
216
+ registryAdopt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
209
217
  otp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
210
218
  enabled: import("@sinclair/typebox").TBoolean;
211
219
  codeTtlMinutes: import("@sinclair/typebox").TInteger;
@@ -275,6 +283,11 @@ export declare const WebhooksConfigSchema: import("@sinclair/typebox").TObject<{
275
283
  enabled: import("@sinclair/typebox").TBoolean;
276
284
  maxSubscriptions: import("@sinclair/typebox").TInteger;
277
285
  maxSources: import("@sinclair/typebox").TInteger;
286
+ alerts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
287
+ enabled: import("@sinclair/typebox").TBoolean;
288
+ minLevel: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"warn">, import("@sinclair/typebox").TLiteral<"error">]>;
289
+ digestMinutes: import("@sinclair/typebox").TInteger;
290
+ }>>;
278
291
  }>;
279
292
  export type WebhooksConfig = Static<typeof WebhooksConfigSchema>;
280
293
  export declare const CommentsConfigSchema: import("@sinclair/typebox").TObject<{
@@ -554,6 +567,7 @@ export declare const PaymentsConfigSchema: import("@sinclair/typebox").TObject<{
554
567
  enforcePeriodEnd: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
555
568
  slackHours: import("@sinclair/typebox").TInteger;
556
569
  }>>;
570
+ unmappedProduct: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"error">, import("@sinclair/typebox").TLiteral<"ignore">]>>;
557
571
  }>>;
558
572
  }>;
559
573
  export type PaymentsConfig = Static<typeof PaymentsConfigSchema>;
@@ -579,9 +593,8 @@ export declare const FunctionsConfigSchema: import("@sinclair/typebox").TObject<
579
593
  secrets: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
580
594
  egressAllow: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
581
595
  limits: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
582
- cpuMs: import("@sinclair/typebox").TInteger;
583
- timeoutMs: import("@sinclair/typebox").TInteger;
584
- memoryMb: import("@sinclair/typebox").TInteger;
596
+ cpuMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
597
+ timeoutMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
585
598
  }>>;
586
599
  enabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
587
600
  signature: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
package/dist/config.d.ts CHANGED
@@ -118,10 +118,27 @@ export type FunctionTrigger = {
118
118
  } | {
119
119
  kind: 'queue';
120
120
  source: string;
121
- } | {
121
+ }
122
+ /** `webhook`: the function is woken by a webhook_subscription fan-out whose
123
+ * target_url is `<edge>/v1/internal/fn/trigger/<name>?tenant=<id>`. That
124
+ * subscription is AUTO-WIRED on deploy (2026-09-19): the platform reconciles
125
+ * one per function declaring this binding, with `event_prefixes` = the
126
+ * function's `source` values — a hand-made one equal in target + prefixes is
127
+ * adopted. `source` is an event-name PREFIX (e.g. 'payments.') or a full event
128
+ * name — lowercase dotted segments, ≤64 chars, validated at deploy — and is
129
+ * also enforced at delivery: a non-matching event is ACK-200 skipped.
130
+ * Declaring the binding is what opts the function into event delivery; a
131
+ * receiver that declares only `cron` keeps the older cron+{} wake. */
132
+ | {
122
133
  kind: 'webhook';
123
134
  source: string;
124
- } | {
135
+ }
136
+ /** `cmsHook`: fires after a CMS write in `collection`. The platform filters
137
+ * deliveries on the binding (2026-09-19): `beforeCreate` → created only,
138
+ * `beforeUpdate` → updated only, `beforeWrite` → created|updated; a write to
139
+ * another collection never wakes the function. Deleted/bulk events are not
140
+ * delivered to a cmsHook binding. */
141
+ | {
125
142
  kind: 'cmsHook';
126
143
  collection: string;
127
144
  event: 'beforeCreate' | 'beforeUpdate' | 'beforeWrite';
@@ -142,10 +159,34 @@ export interface FunctionDef {
142
159
  secrets?: string[];
143
160
  /** Outbound host allowlist (deny-by-default egress guard). */
144
161
  egressAllow?: string[];
162
+ /** Per-function resource declarations. Both optional; both clamped server-side.
163
+ * `memoryMb` was REMOVED (2026-09-18): memory is fixed by the managed runtime
164
+ * and is not per-dispatch selectable. A config that still declares it pushes
165
+ * fine — the key is stripped, and `vxil plan --explain` marks it DROPPED. */
145
166
  limits?: {
167
+ /** per-dispatch isolate CPU ceiling, ms (5..300000). Only ever TIGHTENS the
168
+ * platform cap.
169
+ *
170
+ * IT ALSO RAISES YOUR BILL on a metered tenant, and that is worth reading
171
+ * twice: it raises (never lowers) the per-invoke credit reserve, whose floor
172
+ * is the manifest default — and the reserve is the CEILING the pro-rated
173
+ * settle clamps into, because the settle can never commit more than the hold
174
+ * it releases from. So an invoke whose wall time exceeds `defaultLimits.cpuMs`
175
+ * (50) settles at its MEASURED wall-ms instead of being capped at 50:
176
+ * declaring `cpuMs: 1000` makes an 800 ms invoke cost 800 instead of 50.
177
+ * Declaring only `timeoutMs` leaves metering byte-identical.
178
+ *
179
+ * It does NOT affect anyone else's availability: the account-wide daily
180
+ * capacity budget counts the platform's own per-invoke estimate, never this
181
+ * value (workers/functions-v1/src/capacity.ts `capacityReserveCpuMs`). */
146
182
  cpuMs?: number;
183
+ /** wall budget for ONE outbound fetch this function makes, ms (1000..120000,
184
+ * default 30000). Not a whole-invocation budget: three 25 s fetches still
185
+ * take 75 s. The invocation is bounded separately by the platform's own
186
+ * deadline (`FN_MAX_INVOKE_MS`, default ≥ 5 minutes), which raising this
187
+ * value widens with you. The vxil API callback leg keeps the platform's
188
+ * own 30 s bound. */
147
189
  timeoutMs?: number;
148
- memoryMb?: number;
149
190
  };
150
191
  enabled?: boolean;
151
192
  /** optional typed contract surfaced by `vxil gen` (Level 1, §4.5). */