@vxil/cli 0.31.0 → 0.33.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.
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type Static } from '@sinclair/typebox';
|
|
2
|
+
/** = control-plane appgenTypes RULE_KINDS (a CI test pins the two equal). */
|
|
3
|
+
export declare const CMS_RULE_KINDS: readonly ["stamp_actor", "create_by_role", "owner_only_edit", "role_gate", "archive_by_role", "state_flow", "no_self_decision", "capacity", "no_overlap"];
|
|
4
|
+
export type CmsRuleKind = typeof CMS_RULE_KINDS[number];
|
|
5
|
+
/** Entries in one manifest (an app compiles ≤ a few dozen; the bag stays small). */
|
|
6
|
+
export declare const CMS_RULES_MAX = 64;
|
|
7
|
+
/** = control-plane appgenRules MAX_LIMIT (a capacity limit is 1..this). */
|
|
8
|
+
export declare const CMS_RULE_MAX_LIMIT = 100000;
|
|
9
|
+
/** An App builder app id (`app_` + a 26-char Crockford ULID, any case). */
|
|
10
|
+
export declare const CMS_RULE_APP_PATTERN = "^app_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$";
|
|
11
|
+
/** One rule's compiled parameters (= control-plane appgenTypes RuleParams). */
|
|
12
|
+
export declare const CmsRuleParamsSchema: import("@sinclair/typebox").TObject<{
|
|
13
|
+
field: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14
|
+
actor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15
|
+
roles: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"owner">, import("@sinclair/typebox").TLiteral<"admin">, import("@sinclair/typebox").TLiteral<"member">]>>>;
|
|
16
|
+
transitions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
17
|
+
from: import("@sinclair/typebox").TString;
|
|
18
|
+
to: import("@sinclair/typebox").TString;
|
|
19
|
+
role: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"owner">, import("@sinclair/typebox").TLiteral<"admin">, import("@sinclair/typebox").TLiteral<"member">]>, import("@sinclair/typebox").TLiteral<"actor">]>>;
|
|
20
|
+
}>>>;
|
|
21
|
+
initial: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
22
|
+
key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
23
|
+
parent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
25
|
+
parent_field: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
27
|
+
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
|
+
live: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const CmsRuleEntrySchema: import("@sinclair/typebox").TObject<{
|
|
32
|
+
app: import("@sinclair/typebox").TString;
|
|
33
|
+
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"stamp_actor" | "create_by_role" | "owner_only_edit" | "role_gate" | "archive_by_role" | "state_flow" | "no_self_decision" | "capacity" | "no_overlap">[]>;
|
|
34
|
+
collection: import("@sinclair/typebox").TString;
|
|
35
|
+
params: import("@sinclair/typebox").TObject<{
|
|
36
|
+
field: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
37
|
+
actor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
|
+
roles: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"owner">, import("@sinclair/typebox").TLiteral<"admin">, import("@sinclair/typebox").TLiteral<"member">]>>>;
|
|
39
|
+
transitions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
40
|
+
from: import("@sinclair/typebox").TString;
|
|
41
|
+
to: import("@sinclair/typebox").TString;
|
|
42
|
+
role: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"owner">, import("@sinclair/typebox").TLiteral<"admin">, import("@sinclair/typebox").TLiteral<"member">]>, import("@sinclair/typebox").TLiteral<"actor">]>>;
|
|
43
|
+
}>>>;
|
|
44
|
+
initial: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
|
+
key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
46
|
+
parent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
47
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
48
|
+
parent_field: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
49
|
+
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
50
|
+
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
51
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
|
+
live: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
53
|
+
}>;
|
|
54
|
+
}>;
|
|
55
|
+
export type CmsRuleEntry = Static<typeof CmsRuleEntrySchema>;
|
|
56
|
+
export type CmsRuleParams = Static<typeof CmsRuleParamsSchema>;
|
|
57
|
+
/** THE canonical rule key: shared by the server diff, the CLI render and
|
|
58
|
+
* the backfill. A param change is a different key
|
|
59
|
+
* (a removal plus an addition). The app id is compared lowercased. */
|
|
60
|
+
export declare function cmsRuleKey(e: Pick<CmsRuleEntry, 'app' | 'kind' | 'collection' | 'params'>): string;
|
|
61
|
+
/** The lists and fields one entry reads (its own list, and a capacity
|
|
62
|
+
* limit's parent list + field). */
|
|
63
|
+
export declare function cmsRuleReads(e: Pick<CmsRuleEntry, 'collection' | 'params'>): Array<{
|
|
64
|
+
collection: string;
|
|
65
|
+
fields: string[];
|
|
66
|
+
}>;
|
|
67
|
+
/** The stored entries a schema change on `collection` reads: `field` null =
|
|
68
|
+
* a list-level change (policy, owner, access, roles, drop) — every entry on
|
|
69
|
+
* the list or naming it as a parent; else only the entries reading that field. */
|
|
70
|
+
export declare function cmsRulesReading(rules: unknown, collection: string, field: string | null): CmsRuleEntry[];
|
|
71
|
+
/** One owner-facing English sentence for an entry (the CLI pull comment, the
|
|
72
|
+
* rules_widening / destructive-ack messages). Built from the closed kind and
|
|
73
|
+
* its validated identifiers only. */
|
|
74
|
+
export declare function cmsRuleSentence(e: Pick<CmsRuleEntry, 'kind' | 'collection' | 'params'>): string;
|
|
75
|
+
/** The fields-route meta-ops that change who may read or write a list (its
|
|
76
|
+
* sharing policy): on a list a rule reads they need the destructive ack. */
|
|
77
|
+
export declare const CMS_RULE_LIST_META_KEYS: readonly ["owner_field", "end_user_access", "write_roles", "org_field", "org_read_roles"];
|
|
78
|
+
/** The stored entries a cms fields-route body touches on
|
|
79
|
+
* `collection` — a policy meta-op (any entry on the list or naming it as a
|
|
80
|
+
* parent), a field definition or a `drop_field` naming a field a rule reads.
|
|
81
|
+
* Other bodies (a new unrelated field, retention, actions, public) touch none.
|
|
82
|
+
* Shared by cms-v1 (the 422 ack) and /v1/apply (the plan holds the step). */
|
|
83
|
+
export declare function cmsRulesTouchedByFieldBody(rules: unknown, collection: string, body: unknown): CmsRuleEntry[];
|
|
@@ -81,7 +81,7 @@ export declare function validateCdcConfig(cdc: Record<string, CdcRuleLike> | und
|
|
|
81
81
|
* `orgField`: the workspace-scope field (null/absent = none). */
|
|
82
82
|
export interface CdcCollectionGates {
|
|
83
83
|
readRoleFields?: readonly string[];
|
|
84
|
-
endUserAccess?: 'readwrite' | 'read' | 'none';
|
|
84
|
+
endUserAccess?: 'readwrite' | 'read' | 'none' | 'read_all';
|
|
85
85
|
ownerField?: string | null;
|
|
86
86
|
orgField?: string | null;
|
|
87
87
|
}
|
|
@@ -6,6 +6,7 @@ export * from './_vxil-feature-configs-readmodels.js';
|
|
|
6
6
|
export * from './_vxil-feature-configs-apiState.js';
|
|
7
7
|
export * from './_vxil-feature-configs-canonicalJson.js';
|
|
8
8
|
export * from './_vxil-feature-configs-publicAssets.js';
|
|
9
|
+
export * from './_vxil-feature-configs-cmsRules.js';
|
|
9
10
|
export declare const RESERVED_CREDIT_TYPES: ReadonlySet<string>;
|
|
10
11
|
/** A function binding's `retry.maxAttempts` ceiling, and the
|
|
11
12
|
* binding kinds that may carry `retry` — every lane the platform delivers
|
|
@@ -225,7 +226,7 @@ export type JobsConfig = Static<typeof JobsConfigSchema>;
|
|
|
225
226
|
declare const OidcProviderSchema: import("@sinclair/typebox").TObject<{
|
|
226
227
|
issuer: import("@sinclair/typebox").TString;
|
|
227
228
|
clientId: import("@sinclair/typebox").TString;
|
|
228
|
-
clientSecretRef: import("@sinclair/typebox").TString
|
|
229
|
+
clientSecretRef: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
229
230
|
scopes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
230
231
|
claims: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
231
232
|
email: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -284,7 +285,7 @@ export declare const AuthConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
284
285
|
oidc: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
285
286
|
issuer: import("@sinclair/typebox").TString;
|
|
286
287
|
clientId: import("@sinclair/typebox").TString;
|
|
287
|
-
clientSecretRef: import("@sinclair/typebox").TString
|
|
288
|
+
clientSecretRef: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
288
289
|
scopes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
289
290
|
claims: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
290
291
|
email: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -454,6 +455,15 @@ export declare const CommentsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
454
455
|
editWindowMinutes: import("@sinclair/typebox").TInteger;
|
|
455
456
|
}>;
|
|
456
457
|
export type CommentsConfig = Static<typeof CommentsConfigSchema>;
|
|
458
|
+
/** The most collections a project's cms may be configured for (the schema
|
|
459
|
+
* maximum of `limits.maxCollections`); at it, "raise Max collections" is no
|
|
460
|
+
* longer an answer. */
|
|
461
|
+
export declare const CMS_MAX_COLLECTIONS_CEILING = 200;
|
|
462
|
+
/** The cms query page-size defaults (the schema defaults; cmsQueryConfig's fallback). */
|
|
463
|
+
export declare const CMS_QUERY_DEFAULTS: {
|
|
464
|
+
readonly maxPageSize: 100;
|
|
465
|
+
readonly defaultPageSize: 25;
|
|
466
|
+
};
|
|
457
467
|
export declare const CmsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
458
468
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
459
469
|
draftPublish: import("@sinclair/typebox").TBoolean;
|
|
@@ -464,10 +474,10 @@ export declare const CmsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
464
474
|
maxItemBytes: import("@sinclair/typebox").TInteger;
|
|
465
475
|
maxItemsPerCollection: import("@sinclair/typebox").TInteger;
|
|
466
476
|
}>;
|
|
467
|
-
query: import("@sinclair/typebox").TObject<{
|
|
477
|
+
query: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
468
478
|
maxPageSize: import("@sinclair/typebox").TInteger;
|
|
469
479
|
defaultPageSize: import("@sinclair/typebox").TInteger;
|
|
470
|
-
}
|
|
480
|
+
}>>;
|
|
471
481
|
relations: import("@sinclair/typebox").TObject<{
|
|
472
482
|
maxExpandDepth: import("@sinclair/typebox").TInteger;
|
|
473
483
|
maxExpandFields: import("@sinclair/typebox").TInteger;
|
|
@@ -499,8 +509,43 @@ export declare const CmsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
499
509
|
payload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ids">, import("@sinclair/typebox").TLiteral<"full">]>>;
|
|
500
510
|
enabled: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
501
511
|
}>>>;
|
|
512
|
+
rules: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
513
|
+
app: import("@sinclair/typebox").TString;
|
|
514
|
+
kind: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"stamp_actor" | "create_by_role" | "owner_only_edit" | "role_gate" | "archive_by_role" | "state_flow" | "no_self_decision" | "capacity" | "no_overlap">[]>;
|
|
515
|
+
collection: import("@sinclair/typebox").TString;
|
|
516
|
+
params: import("@sinclair/typebox").TObject<{
|
|
517
|
+
field: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
518
|
+
actor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
519
|
+
roles: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"owner">, import("@sinclair/typebox").TLiteral<"admin">, import("@sinclair/typebox").TLiteral<"member">]>>>;
|
|
520
|
+
transitions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
521
|
+
from: import("@sinclair/typebox").TString;
|
|
522
|
+
to: import("@sinclair/typebox").TString;
|
|
523
|
+
role: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"owner">, import("@sinclair/typebox").TLiteral<"admin">, import("@sinclair/typebox").TLiteral<"member">]>, import("@sinclair/typebox").TLiteral<"actor">]>>;
|
|
524
|
+
}>>>;
|
|
525
|
+
initial: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
526
|
+
key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
527
|
+
parent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
528
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
529
|
+
parent_field: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
530
|
+
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
531
|
+
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
532
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
533
|
+
live: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
534
|
+
}>;
|
|
535
|
+
}>>>;
|
|
502
536
|
}>;
|
|
503
537
|
export type CmsConfig = Static<typeof CmsConfigSchema>;
|
|
538
|
+
/** The resolved cms query page sizes (the bag is Optional in the type;
|
|
539
|
+
* every persisted manifest still carries it). */
|
|
540
|
+
export declare function cmsQueryConfig(config: {
|
|
541
|
+
query?: {
|
|
542
|
+
maxPageSize?: number;
|
|
543
|
+
defaultPageSize?: number;
|
|
544
|
+
} | undefined;
|
|
545
|
+
} | null | undefined): {
|
|
546
|
+
maxPageSize: number;
|
|
547
|
+
defaultPageSize: number;
|
|
548
|
+
};
|
|
504
549
|
export declare const McpConfigSchema: import("@sinclair/typebox").TObject<{
|
|
505
550
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
506
551
|
exposureLevel: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"all">, import("@sinclair/typebox").TLiteral<"read-only">, import("@sinclair/typebox").TLiteral<"custom">]>;
|
package/dist/config.d.ts
CHANGED
|
@@ -114,13 +114,17 @@ export interface CollectionDef {
|
|
|
114
114
|
* filtered delete, batch write — and a delete elsewhere
|
|
115
115
|
* whose on_delete cascade / set_null would change a row
|
|
116
116
|
* here) is `403 server_only`;
|
|
117
|
-
* 'none' — no end-user reads or writes at all, even with ownerField
|
|
117
|
+
* 'none' — no end-user reads or writes at all, even with ownerField;
|
|
118
|
+
* 'read_all' — every verified end user reads every row (past the
|
|
119
|
+
* ownerField predicate); writes stay owner-scoped as
|
|
120
|
+
* 'readwrite' (a members board: everyone reads, each edits
|
|
121
|
+
* only their own).
|
|
118
122
|
* Server keys (and platform writes such as a jobs status mirror) are never
|
|
119
123
|
* affected. Stored on the collection (model data, not a config leaf) and
|
|
120
|
-
* carried by BOTH push paths; widening ('
|
|
124
|
+
* carried by BOTH push paths; widening (towards 'readwrite', then 'read_all') needs
|
|
121
125
|
* `vxil push --allow-destructive`. Any other value fails `vxil plan` /
|
|
122
126
|
* `vxil push` (it never falls back to 'readwrite'). */
|
|
123
|
-
endUserAccess?: 'readwrite' | 'read' | 'none';
|
|
127
|
+
endUserAccess?: 'readwrite' | 'read' | 'none' | 'read_all';
|
|
124
128
|
/** Role slugs one of which a VERIFIED end user must hold to WRITE this
|
|
125
129
|
* collection (create, update, $inc, delete, publish, transaction step,
|
|
126
130
|
* filtered delete, batch write, and an end-user delete's cascade into it) —
|