@vxil/cli 0.4.2 → 0.5.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.
@@ -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,7 +118,14 @@ 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>`. `source` is
124
+ * an event-name PREFIX filter (e.g. 'payments.'), enforced at delivery — a
125
+ * non-matching event is ACK-200 skipped. Declaring the binding is what opts the
126
+ * function into event delivery; a receiver that declares only `cron` keeps the
127
+ * older cron+{} wake. */
128
+ | {
122
129
  kind: 'webhook';
123
130
  source: string;
124
131
  } | {
@@ -142,10 +149,34 @@ export interface FunctionDef {
142
149
  secrets?: string[];
143
150
  /** Outbound host allowlist (deny-by-default egress guard). */
144
151
  egressAllow?: string[];
152
+ /** Per-function resource declarations. Both optional; both clamped server-side.
153
+ * `memoryMb` was REMOVED (2026-09-18): memory is fixed by the managed runtime
154
+ * and is not per-dispatch selectable. A config that still declares it pushes
155
+ * fine — the key is stripped, and `vxil plan --explain` marks it DROPPED. */
145
156
  limits?: {
157
+ /** per-dispatch isolate CPU ceiling, ms (5..300000). Only ever TIGHTENS the
158
+ * platform cap.
159
+ *
160
+ * IT ALSO RAISES YOUR BILL on a metered tenant, and that is worth reading
161
+ * twice: it raises (never lowers) the per-invoke credit reserve, whose floor
162
+ * is the manifest default — and the reserve is the CEILING the pro-rated
163
+ * settle clamps into, because the settle can never commit more than the hold
164
+ * it releases from. So an invoke whose wall time exceeds `defaultLimits.cpuMs`
165
+ * (50) settles at its MEASURED wall-ms instead of being capped at 50:
166
+ * declaring `cpuMs: 1000` makes an 800 ms invoke cost 800 instead of 50.
167
+ * Declaring only `timeoutMs` leaves metering byte-identical.
168
+ *
169
+ * It does NOT affect anyone else's availability: the account-wide daily
170
+ * capacity budget counts the platform's own per-invoke estimate, never this
171
+ * value (workers/functions-v1/src/capacity.ts `capacityReserveCpuMs`). */
146
172
  cpuMs?: number;
173
+ /** wall budget for ONE outbound fetch this function makes, ms (1000..120000,
174
+ * default 30000). Not a whole-invocation budget: three 25 s fetches still
175
+ * take 75 s. The invocation is bounded separately by the platform's own
176
+ * deadline (`FN_MAX_INVOKE_MS`, default ≥ 5 minutes), which raising this
177
+ * value widens with you. The vxil API callback leg keeps the platform's
178
+ * own 30 s bound. */
147
179
  timeoutMs?: number;
148
- memoryMb?: number;
149
180
  };
150
181
  enabled?: boolean;
151
182
  /** optional typed contract surfaced by `vxil gen` (Level 1, §4.5). */