@vxil/feature-configs 0.7.0 → 0.8.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.
@@ -166,11 +166,11 @@ export interface ApiStateResponseField extends ApiStateSummary {
166
166
  }
167
167
  /** The note every executor reports for a DISABLED feature whose block still
168
168
  * declares rows: the declaration is kept in the manifest and nothing is
169
- * converged (a parked feature is not a propagation window — review finding 2). */
169
+ * converged (a parked feature is not a propagation window). */
170
170
  export declare const API_STATE_DISABLED_NOTE = "feature disabled \u2014 declaration kept, not converged";
171
171
  /** `GET /v1/rate-limits/policies` is a 100-row HARD cap with no cursor. A list
172
172
  * AT the cap is not a complete live set, so planning creates against it would
173
- * re-POST every declared name the cap hid (review finding 5). The server's
173
+ * re-POST every declared name the cap hid. The server's
174
174
  * converge and the CLI's read-only plan refuse with this message instead. */
175
175
  export declare function rlPolicyListCapError(liveCount: number): string | null;
176
176
  export declare const RL_POLICY_LIST_CAP = 100;
package/dist/apiState.js CHANGED
@@ -161,11 +161,11 @@ export function emptyApiStateSummary(datum) {
161
161
  }
162
162
  /** The note every executor reports for a DISABLED feature whose block still
163
163
  * declares rows: the declaration is kept in the manifest and nothing is
164
- * converged (a parked feature is not a propagation window — review finding 2). */
164
+ * converged (a parked feature is not a propagation window). */
165
165
  export const API_STATE_DISABLED_NOTE = 'feature disabled — declaration kept, not converged';
166
166
  /** `GET /v1/rate-limits/policies` is a 100-row HARD cap with no cursor. A list
167
167
  * AT the cap is not a complete live set, so planning creates against it would
168
- * re-POST every declared name the cap hid (review finding 5). The server's
168
+ * re-POST every declared name the cap hid. The server's
169
169
  * converge and the CLI's read-only plan refuse with this message instead. */
170
170
  export function rlPolicyListCapError(liveCount) {
171
171
  if (liveCount < RL_POLICY_LIST_CAP)
package/dist/hooks.d.ts CHANGED
@@ -69,7 +69,7 @@ export declare function parseExpr(src: string): Node;
69
69
  /** Walk the AST and reject anything outside the allow-list, plus depth bounds.
70
70
  * Returns an array of human-readable errors (empty = safe). Pure, no eval. */
71
71
  export declare function validateAst(root: Node): string[];
72
- /** The VERIFIED caller/session context for read hooks (design §5.6). Read-only;
72
+ /** The VERIFIED caller/session context for read hooks (guide ch. 7). Read-only;
73
73
  * present only on the read path in end-user mode. In server mode / write path
74
74
  * the whole object is null. */
75
75
  export interface HookCaller {
@@ -142,7 +142,7 @@ export interface ReadHookResult {
142
142
  * HookEvalError (→ a clean 422, never a pinned isolate). Write events never
143
143
  * fire here, and read events never fire in runWriteHooks. */
144
144
  export declare function runReadHooks(hooks: Record<string, HookDef> | undefined, collection: string, rows: ReadonlyArray<Record<string, unknown>>, now: string,
145
- /** verified caller/session context (design §5.6) — read-only, exposed to
145
+ /** verified caller/session context (guide ch. 7) — read-only, exposed to
146
146
  * expressions as `caller.endUserId` / `caller.principal`. Omitted ⇒ null
147
147
  * (server-caller mode). */
148
148
  caller?: HookCaller | null): ReadHookResult;
package/dist/hooks.js CHANGED
@@ -699,7 +699,7 @@ export function runWriteHooks(hooks, collection, phase, data, before, now) {
699
699
  * HookEvalError (→ a clean 422, never a pinned isolate). Write events never
700
700
  * fire here, and read events never fire in runWriteHooks. */
701
701
  export function runReadHooks(hooks, collection, rows, now,
702
- /** verified caller/session context (design §5.6) — read-only, exposed to
702
+ /** verified caller/session context (guide ch. 7) — read-only, exposed to
703
703
  * expressions as `caller.endUserId` / `caller.principal`. Omitted ⇒ null
704
704
  * (server-caller mode). */
705
705
  caller) {
package/dist/index.d.ts CHANGED
@@ -3,8 +3,9 @@ export * from './hooks.js';
3
3
  export * from './readmodels.js';
4
4
  export * from './apiState.js';
5
5
  export * from './canonicalJson.js';
6
+ export * from './publicAssets.js';
6
7
  export declare const RESERVED_CREDIT_TYPES: ReadonlySet<string>;
7
- /** F33 (2026-09-25): a function binding's `retry.maxAttempts` ceiling, and the
8
+ /** A function binding's `retry.maxAttempts` ceiling, and the
8
9
  * binding kinds that may carry `retry` — the platform-delivered event lanes
9
10
  * (an http invoke returns its own status; a cron tick's retry would overlap
10
11
  * the next tick). Read by the schema, the deploy clamp and the CLI. */
@@ -20,14 +21,14 @@ export declare const NOTIFICATION_TEMPLATE_PLACEHOLDERS: Readonly<Record<string,
20
21
  * exist and renders EMPTY. Rejected in `subject` for exactly the reason the
21
22
  * whole allow-list exists: a silent empty render in a live email. */
22
23
  export declare const NOTIFICATION_TEMPLATE_SLOT_PLACEHOLDERS: Readonly<Record<string, readonly string[]>>;
23
- /** Per-override caps (D4). Bodies are emails, not documents. */
24
+ /** Per-override caps. Bodies are emails, not documents. */
24
25
  export declare const NOTIF_OVERRIDE_SUBJECT_MAX = 500;
25
26
  export declare const NOTIF_OVERRIDE_BODY_MAX = 20000;
26
27
  /** Whole-map caps: keeps one manifest (and the KV row every send reads) small. */
27
28
  export declare const NOTIF_OVERRIDE_MAX_LOCALES_PER_TEMPLATE = 20;
28
29
  export declare const NOTIF_OVERRIDE_MAX_BYTES: number;
29
30
  /**
30
- * D4 — validate `templates.overrides` at CONFIG-WRITE time. Returns [] when the
31
+ * Validate `templates.overrides` at CONFIG-WRITE time. Returns [] when the
31
32
  * bag is absent or clean. Every rule fails LOUD rather than shipping something
32
33
  * that silently renders wrong in a customer's inbox:
33
34
  * • overrides present with `allowOverride:false` → rejected (never inert);
@@ -91,10 +92,10 @@ export declare const NotificationsConfigSchema: import("@sinclair/typebox").TObj
91
92
  }>>;
92
93
  /** in-app inbox channel (send with channel: 'inbox' | 'both') */
93
94
  inboxEnabled: import("@sinclair/typebox").TBoolean;
94
- /** §11b.5 broadcast campaigns channel. Optional bag (= 1 leaf): absent means
95
+ /** Broadcast campaigns channel. Optional bag (= 1 leaf): absent means
95
96
  * disabled; per-campaign quiet_hours / freq_cap overrides live on the
96
97
  * notifications.campaigns ROW (tenant data), not here. Folded into the
97
- * canonical schema 2026-07-18 (M21/#4 — Value.Clean previously STRIPPED the
98
+ * canonical schema 2026-07-18 (Value.Clean previously STRIPPED the
98
99
  * worker-local extension, so campaigns 403'd via the real config path). */
99
100
  broadcast: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
100
101
  enabled: import("@sinclair/typebox").TBoolean;
@@ -114,9 +115,9 @@ export declare const NotificationsConfigSchema: import("@sinclair/typebox").TObj
114
115
  }>>;
115
116
  }>;
116
117
  export type NotificationsConfig = Static<typeof NotificationsConfigSchema>;
117
- /** The §11b.5 broadcast bag as persisted (present ⇒ leaf defaults applied). */
118
+ /** The broadcast bag as persisted (present ⇒ leaf defaults applied). */
118
119
  export type BroadcastConfig = NonNullable<NotificationsConfig['broadcast']>;
119
- /** Generation-lifecycle config defaults (jobs.md §11 / §5 ≤15-flag budget). */
120
+ /** Generation-lifecycle config defaults (guide ch. 6, jobs). */
120
121
  export declare const GENERATION_DEFAULTS: {
121
122
  /** per-tenant in-flight generation cap (separate budget from queue jobs) */
122
123
  readonly maxConcurrent: 20;
@@ -189,14 +190,14 @@ export declare const JobsConfigSchema: import("@sinclair/typebox").TObject<{
189
190
  maxTimeoutMs: import("@sinclair/typebox").TInteger;
190
191
  /** poll-mode: how many poll cycles before giving up (→ terminal-fail) */
191
192
  pollMaxAttempts: import("@sinclair/typebox").TInteger;
192
- /** MANDATORY per-hold cap on a generation `reserve_credits.amount` (jobs.md
193
- * §11.8). Every requested amount is CLAMPED to this (never rejected) — a
193
+ /** MANDATORY per-hold cap on a generation `reserve_credits.amount`
194
+ * (guide ch. 6, jobs). Every requested amount is CLAMPED to this (never rejected) — a
194
195
  * conservative default so an untrusted deployed function that carries a
195
196
  * reserve block can never hold more than a bounded amount per run without
196
197
  * any tenant action. */
197
198
  maxReserveCredits: import("@sinclair/typebox").TInteger;
198
199
  /** MANDATORY per-tenant ceiling on the SUM of un-settled provisional
199
- * reserve holds across all in-flight generation runs (jobs.md §11.8): a
200
+ * reserve holds across all in-flight generation runs (guide ch. 6, jobs): a
200
201
  * reserve whose amount would push the tenant's outstanding-holds total over
201
202
  * this is rejected 429, so a runaway function cannot hold every user at
202
203
  * once. Defaulted so no tenant action is required to be safe. */
@@ -318,7 +319,7 @@ export declare const AuthConfigSchema: import("@sinclair/typebox").TObject<{
318
319
  }>;
319
320
  /** The security bag as persisted (present ⇒ leaf defaults applied). */
320
321
  export type AuthSecurityConfig = NonNullable<Static<typeof AuthConfigSchema>['security']>;
321
- /** The RB-2 generic OIDC / SSO issuer block (`providers.oidc`). */
322
+ /** The generic OIDC / SSO issuer block (`providers.oidc`). */
322
323
  export type AuthOidcConfig = Static<typeof OidcProviderSchema>;
323
324
  export type AuthConfig = Static<typeof AuthConfigSchema>;
324
325
  export declare const RL_POLICY_NAME_PATTERN = "^[a-zA-Z0-9_.:-]+$";
@@ -378,6 +379,17 @@ export declare const FilesConfigSchema: import("@sinclair/typebox").TObject<{
378
379
  asyncOverJobs: import("@sinclair/typebox").TBoolean;
379
380
  boundingBoxes: import("@sinclair/typebox").TBoolean;
380
381
  }>>;
382
+ publicAssets: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
383
+ enabled: import("@sinclair/typebox").TBoolean;
384
+ corsOrigins: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
385
+ variants: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
386
+ w: import("@sinclair/typebox").TInteger;
387
+ h: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
388
+ fit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"scale-down">, import("@sinclair/typebox").TLiteral<"contain">, import("@sinclair/typebox").TLiteral<"cover">, import("@sinclair/typebox").TLiteral<"crop">, import("@sinclair/typebox").TLiteral<"pad">]>>;
389
+ fmt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"webp">, import("@sinclair/typebox").TLiteral<"avif">, import("@sinclair/typebox").TLiteral<"jpeg">, import("@sinclair/typebox").TLiteral<"png">]>;
390
+ q: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
391
+ }>>>;
392
+ }>>;
381
393
  }>;
382
394
  export type FilesConfig = Static<typeof FilesConfigSchema>;
383
395
  export declare const DeclaredWebhookSubscriptionSchema: import("@sinclair/typebox").TObject<{
@@ -789,11 +801,11 @@ export declare const CopilotConfigSchema: import("@sinclair/typebox").TObject<{
789
801
  export type CopilotConfig = Static<typeof CopilotConfigSchema>;
790
802
  export declare const FEATURE_SCHEMAS: Record<string, TSchema>;
791
803
  export declare const CONFIG_FLAG_CAP = 15;
792
- /** Counts leaf flags in a TypeBox object schema (architecture §6).
793
- * Per features/auth.md §4: an OPTIONAL object (e.g. a provider credential
804
+ /** Counts leaf flags in a TypeBox object schema.
805
+ * Per guide ch. 6, auth: an OPTIONAL object (e.g. a provider credential
794
806
  * block) counts as ONE flag — the tenant's decision is "configure it or
795
807
  * not", not each inner ref. */
796
- /** The auth lifecycle events an `authHook` binding may name (F4-30) — the
808
+ /** The auth lifecycle events an `authHook` binding may name — the
797
809
  * closed union `packages/config` types as AuthHookEvent; the control-plane
798
810
  * reconciler maps each to its `auth.<event>` audit-event prefix. */
799
811
  export declare const AUTH_HOOK_EVENTS: readonly ["user.created", "session.created", "session.revoked", "signin.failure"];
@@ -805,13 +817,13 @@ export type AuthHookEvent = (typeof AUTH_HOOK_EVENTS)[number];
805
817
  * else is refused at config write (E-CMSHOOK, 2026-10-01): an unknown name used
806
818
  * to fall back to beforeWrite at delivery, so a typo like 'afterCreate' or
807
819
  * 'beforeDelete' silently subscribed the function to creates AND updates.
808
- * tests/ci/src/fn-binding-contracts.test.ts pins every copy to this list. */
820
+ * A CI gate pins every copy to this list. */
809
821
  export declare const CMS_HOOK_EVENTS: readonly ["beforeCreate", "beforeUpdate", "beforeWrite"];
810
822
  export type CmsHookEvent = (typeof CMS_HOOK_EVENTS)[number];
811
823
  /** The ONE refusal text for an unknown cmsHook binding event (the config
812
824
  * validator and the deploy route's early 422 both use it). */
813
825
  export declare function cmsHookEventError(event: unknown): string | null;
814
- /** F4-29 test-recipient entry grammar (shared by the validator and auth-v1's
826
+ /** The OTP test-recipient entry grammar (shared by the validator and auth-v1's
815
827
  * matcher): an exact email, a `*@domain` glob, or a +E.164 phone number. */
816
828
  export declare const TEST_RECIPIENT_EMAIL_RE: RegExp;
817
829
  export declare const TEST_RECIPIENT_GLOB_RE: RegExp;