@vxil/cli 0.5.3 → 0.6.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/dist/_vxil-feature-configs.d.ts +62 -2
- package/dist/vxil.js +8315 -3133
- package/package.json +3 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Static, type TSchema } from '@sinclair/typebox';
|
|
2
2
|
export * from './_vxil-feature-configs-hooks.js';
|
|
3
3
|
export * from './readmodels.js';
|
|
4
|
+
export * from './apiState.js';
|
|
4
5
|
export declare const RESERVED_CREDIT_TYPES: ReadonlySet<string>;
|
|
5
6
|
/** True when a credit_type is a vxil-COGS reserved type (grant/consume/config
|
|
6
7
|
* of which is restricted to internal platform machinery). */
|
|
@@ -265,12 +266,35 @@ export type AuthSecurityConfig = NonNullable<Static<typeof AuthConfigSchema>['se
|
|
|
265
266
|
/** The RB-2 generic OIDC / SSO issuer block (`providers.oidc`). */
|
|
266
267
|
export type AuthOidcConfig = Static<typeof OidcProviderSchema>;
|
|
267
268
|
export type AuthConfig = Static<typeof AuthConfigSchema>;
|
|
269
|
+
export declare const RL_POLICY_NAME_PATTERN = "^[a-zA-Z0-9_.:-]+$";
|
|
270
|
+
/** GET /v1/rate-limits/policies lists at most 100 with no cursor (core.ts
|
|
271
|
+
* listPolicies) — a declared set past that could never be reconciled. */
|
|
272
|
+
export declare const RL_MAX_DECLARED_POLICIES = 100;
|
|
273
|
+
/** rate-limits-v1 core.ts createPolicy: at most 8 distinct `{var}`s. */
|
|
274
|
+
export declare const RL_KEY_TEMPLATE_MAX_VARS = 8;
|
|
275
|
+
export declare const DeclaredRlPolicySchema: import("@sinclair/typebox").TObject<{
|
|
276
|
+
name: import("@sinclair/typebox").TString;
|
|
277
|
+
key_template: import("@sinclair/typebox").TString;
|
|
278
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
279
|
+
window_seconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
280
|
+
behavior: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"block">, import("@sinclair/typebox").TLiteral<"shape">]>>;
|
|
281
|
+
algorithm: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"sliding_window">, import("@sinclair/typebox").TLiteral<"token_bucket">]>>;
|
|
282
|
+
}>;
|
|
283
|
+
export type DeclaredRlPolicy = Static<typeof DeclaredRlPolicySchema>;
|
|
268
284
|
export declare const RateLimitsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
269
285
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
270
286
|
defaults: import("@sinclair/typebox").TObject<{
|
|
271
287
|
perTenantSec: import("@sinclair/typebox").TInteger;
|
|
272
288
|
burstSize: import("@sinclair/typebox").TInteger;
|
|
273
289
|
}>;
|
|
290
|
+
policies: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
291
|
+
name: import("@sinclair/typebox").TString;
|
|
292
|
+
key_template: import("@sinclair/typebox").TString;
|
|
293
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
294
|
+
window_seconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
295
|
+
behavior: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"block">, import("@sinclair/typebox").TLiteral<"shape">]>>;
|
|
296
|
+
algorithm: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"sliding_window">, import("@sinclair/typebox").TLiteral<"token_bucket">]>>;
|
|
297
|
+
}>>>;
|
|
274
298
|
}>;
|
|
275
299
|
export type RateLimitsConfig = Static<typeof RateLimitsConfigSchema>;
|
|
276
300
|
export declare const FilesConfigSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -301,6 +325,11 @@ export declare const FilesConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
301
325
|
}>>;
|
|
302
326
|
}>;
|
|
303
327
|
export type FilesConfig = Static<typeof FilesConfigSchema>;
|
|
328
|
+
export declare const DeclaredWebhookSubscriptionSchema: import("@sinclair/typebox").TObject<{
|
|
329
|
+
target_url: import("@sinclair/typebox").TString;
|
|
330
|
+
event_prefixes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
331
|
+
}>;
|
|
332
|
+
export type DeclaredWebhookSubscription = Static<typeof DeclaredWebhookSubscriptionSchema>;
|
|
304
333
|
export declare const WebhooksConfigSchema: import("@sinclair/typebox").TObject<{
|
|
305
334
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
306
335
|
maxSubscriptions: import("@sinclair/typebox").TInteger;
|
|
@@ -310,6 +339,10 @@ export declare const WebhooksConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
310
339
|
minLevel: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"warn">, import("@sinclair/typebox").TLiteral<"error">]>;
|
|
311
340
|
digestMinutes: import("@sinclair/typebox").TInteger;
|
|
312
341
|
}>>;
|
|
342
|
+
subscriptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
343
|
+
target_url: import("@sinclair/typebox").TString;
|
|
344
|
+
event_prefixes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
345
|
+
}>>>;
|
|
313
346
|
}>;
|
|
314
347
|
export type WebhooksConfig = Static<typeof WebhooksConfigSchema>;
|
|
315
348
|
export declare const CommentsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -476,6 +509,15 @@ export declare const VectorSearchConfigSchema: import("@sinclair/typebox").TObje
|
|
|
476
509
|
}>>>;
|
|
477
510
|
}>;
|
|
478
511
|
export type VectorSearchConfig = Static<typeof VectorSearchConfigSchema>;
|
|
512
|
+
export declare const AI_TEMPLATE_NAME_PATTERN = "^[a-zA-Z0-9_.\\-]+$";
|
|
513
|
+
export declare const AI_MAX_DECLARED_TEMPLATES = 50;
|
|
514
|
+
export declare const DeclaredAiTemplateSchema: import("@sinclair/typebox").TObject<{
|
|
515
|
+
template: import("@sinclair/typebox").TString;
|
|
516
|
+
user: import("@sinclair/typebox").TString;
|
|
517
|
+
system: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
518
|
+
schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
519
|
+
}>;
|
|
520
|
+
export type DeclaredAiTemplate = Static<typeof DeclaredAiTemplateSchema>;
|
|
479
521
|
export declare const AiConfigSchema: import("@sinclair/typebox").TObject<{
|
|
480
522
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
481
523
|
defaultProvider: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"mock">, import("@sinclair/typebox").TLiteral<"openai">, import("@sinclair/typebox").TLiteral<"anthropic">, import("@sinclair/typebox").TLiteral<"gemini">, import("@sinclair/typebox").TLiteral<"azure">, import("@sinclair/typebox").TLiteral<"openrouter">]>;
|
|
@@ -500,11 +542,17 @@ export declare const AiConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
500
542
|
tokensPerUserPerDay: import("@sinclair/typebox").TInteger;
|
|
501
543
|
consumeCredits: import("@sinclair/typebox").TBoolean;
|
|
502
544
|
}>;
|
|
503
|
-
streaming: import("@sinclair/typebox").TObject<{
|
|
545
|
+
streaming: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
504
546
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
505
547
|
replayBufferFrames: import("@sinclair/typebox").TInteger;
|
|
506
548
|
flushMs: import("@sinclair/typebox").TInteger;
|
|
507
|
-
}
|
|
549
|
+
}>>;
|
|
550
|
+
templates: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
551
|
+
template: import("@sinclair/typebox").TString;
|
|
552
|
+
user: import("@sinclair/typebox").TString;
|
|
553
|
+
system: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
554
|
+
schema: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
555
|
+
}>>>;
|
|
508
556
|
}>;
|
|
509
557
|
export type AiConfig = Static<typeof AiConfigSchema>;
|
|
510
558
|
export declare const RagConfigSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -713,6 +761,18 @@ export declare const MCP_MAX_PROMPTS = 32;
|
|
|
713
761
|
* stays ALLOWED (fn→fn composition). Source of truth for both the config-write
|
|
714
762
|
* validation below and the control-plane deploy clamp. */
|
|
715
763
|
export declare const DENY_FUNCTION_SCOPES: Set<string>;
|
|
764
|
+
/** `{var}` names of a rate-limit key template (rate-limits-v1 core.ts
|
|
765
|
+
* templateVars parity). */
|
|
766
|
+
export declare function rlTemplateVars(template: string): string[];
|
|
767
|
+
export declare function validateDeclaredRlPolicies(policies: readonly DeclaredRlPolicy[] | undefined): string[];
|
|
768
|
+
export declare function validateDeclaredWebhookSubscriptions(subscriptions: readonly DeclaredWebhookSubscription[] | undefined, maxSubscriptions: number | undefined): string[];
|
|
769
|
+
/** The stored-template `schema` bounds — MIRRORED from @vxil/runtime
|
|
770
|
+
* (AI_TEMPLATE_SCHEMA_MAX_BYTES / AI_TEMPLATE_SCHEMA_MAX_DEPTH; this package is
|
|
771
|
+
* typebox-only). ai-v1 putTemplate refuses the same numbers at the route, so a
|
|
772
|
+
* declared entry that passes here is never a 422 at converge. */
|
|
773
|
+
export declare const AI_TEMPLATE_SCHEMA_MAX_BYTES = 32000;
|
|
774
|
+
export declare const AI_TEMPLATE_SCHEMA_MAX_DEPTH = 64;
|
|
775
|
+
export declare function validateDeclaredAiTemplates(templates: readonly DeclaredAiTemplate[] | undefined): string[];
|
|
716
776
|
export declare function validateFeatureConfig(feature: string, raw: unknown): ConfigValidation;
|
|
717
777
|
export declare const FEATURE_KEYS: readonly ["notifications", "jobs", "auth", "rate-limits", "files", "webhooks", "comments", "cms", "mcp", "realtime", "presence", "orgs", "activity-feed", "vector-search", "ai", "rag", "payments", "functions", "copilot"];
|
|
718
778
|
export type FeatureKey = (typeof FEATURE_KEYS)[number];
|