@vertesia/common 1.6.0-dev.20261008.064737Z → 1.6.0-dev.20261009.095813Z

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/common",
3
- "version": "1.6.0-dev.20261008.064737Z",
3
+ "version": "1.6.0-dev.20261009.095813Z",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -38,7 +38,7 @@
38
38
  "vitest": "5.0.2"
39
39
  },
40
40
  "dependencies": {
41
- "@llumiverse/common": "1.6.0-dev.20261008.064411Z",
41
+ "@llumiverse/common": "1.6.0-dev.20261009.095504Z",
42
42
  "ajv": "^8.20.0",
43
43
  "ajv-formats": "^3.0.1",
44
44
  "zod": "4.6.5"
@@ -56,7 +56,7 @@
56
56
  "ai",
57
57
  "typescript"
58
58
  ],
59
- "gitHead": "8ee3a33e9a7c3dbcd13937e971cbdcc5fad56717",
59
+ "gitHead": "e45bc09ecf2de4c8fe8a8d39fb52c1521980e7b9",
60
60
  "scripts": {
61
61
  "lint": "biome lint src",
62
62
  "test": "vitest run",
@@ -888,6 +888,12 @@
888
888
  "type": "string"
889
889
  },
890
890
  "description": "Projects this group is allowed to be used in. When empty or absent the group is org-wide (usable in any project). When set, the group may only be used to grant permissions in the listed projects."
891
+ },
892
+ "member_count": {
893
+ "type": "integer",
894
+ "minimum": -9007199254740991,
895
+ "maximum": 9007199254740991,
896
+ "description": "Number of users in the group. Returned by the group listing only."
891
897
  }
892
898
  },
893
899
  "required": [
@@ -294,6 +294,9 @@ export function createApiContract<T extends object>(ApiSchemaComponents: Readonl
294
294
  // would document a constraint nothing checks — the exact spec/enforcement gap this design is
295
295
  // meant to close.
296
296
  addFormats(ajv);
297
+ // Zod's `.startsWith()` emits `format: "starts_with"` next to a `pattern` that already enforces
298
+ // the prefix. Declared as a no-op so AJV stops logging it as an unknown format on every compile.
299
+ ajv.addFormat('starts_with', true);
297
300
  ajv.addSchema({ $id: AJV_SCHEMA_ID, components: { schemas: toAjvComponents() } });
298
301
  ajvInstance = ajv;
299
302
  return ajv;
@@ -1,8 +1,8 @@
1
1
  /** Public runtime contracts use prebuilt JSON Schema and never load Zod. */
2
2
  import type { JsonObject } from '../api-schemas/adapter.js';
3
- import type { ApiComponentName, ApiComponentType } from '../api-schemas/registry.js';
4
3
  import API_SCHEMA_COMPONENTS from './components.generated.json' with { type: 'json' };
5
4
  import { createApiContract } from './engine.js';
5
+ import type { ApiComponentName, ApiComponentType } from './types.js';
6
6
 
7
7
  export type { JsonObject } from '../api-schemas/adapter.js';
8
8
  export type {
@@ -10,9 +10,9 @@ export type {
10
10
  NormalizedApiParameters,
11
11
  RawApiParameters,
12
12
  } from '../api-schemas/parameters.js';
13
- export type { ApiComponentName, ApiComponentType } from '../api-schemas/registry.js';
14
13
  export type { ApiValidationIssue, PruneAndValidateResult, ValidateApiPayloadResult } from './engine.js';
15
14
  export { createApiContract } from './engine.js';
15
+ export type { ApiComponentName, ApiComponentType } from './types.js';
16
16
 
17
17
  export const ApiSchemaComponents: Readonly<Record<string, JsonObject>> = API_SCHEMA_COMPONENTS;
18
18
 
@@ -0,0 +1,108 @@
1
+ import type {
2
+ CreateEventSubscriptionPayload,
3
+ EventDeliveryTarget,
4
+ EventDeliveryTargetInput,
5
+ EventSubscription,
6
+ EventSubscriptionMutationResponse,
7
+ ProcessEventDeliveryTarget,
8
+ UpdateEventSubscriptionPayload,
9
+ } from '../platform-event.js';
10
+ import type {
11
+ AgentRunInternals,
12
+ AgentRunResponse,
13
+ BindRunWorkflowPayload,
14
+ ListAgentRunsResponse,
15
+ ProgrammaticRunResponse,
16
+ RecordRunPayload,
17
+ SupervisedRunResponse,
18
+ UpdateAgentRunStatusPayload,
19
+ } from '../store/agent-run.js';
20
+ import type * as DSLWorkflowTypes from '../store/dsl-workflow.js';
21
+ import type {
22
+ DSLChildWorkflowStep,
23
+ DSLWorkflowDefinition,
24
+ DSLWorkflowDefinitionResponse,
25
+ DSLWorkflowSpec,
26
+ DSLWorkflowSpecWithSteps,
27
+ DSLWorkflowStep,
28
+ } from '../store/dsl-workflow.js';
29
+ import type {
30
+ BranchNodeBranchDefinition,
31
+ CreateProcessDefinitionPayload,
32
+ NodeDefinition,
33
+ ProcessDefinition,
34
+ ProcessDefinitionBody,
35
+ UpdateProcessDefinitionPayload,
36
+ } from '../store/process.js';
37
+ import type { ViewNavigationNode } from '../views.js';
38
+ import type { ApiComponentTypes } from '../wire-types.generated.js';
39
+
40
+ export type ApiComponentName = keyof ApiComponentTypes;
41
+
42
+ /**
43
+ * Explicit TypeScript recursion boundary for schemas whose runtime graph is lazy.
44
+ *
45
+ * Zod cannot infer a finite named type through a mutually-recursive graph. The schemas remain the
46
+ * runtime and OpenAPI authority; these names preserve the recursive TypeScript declarations until
47
+ * TypeScript can infer recursive aliases without collapsing them to `unknown`.
48
+ */
49
+ interface ZenoRecursiveComponentTypes {
50
+ ViewNavigationNode: ViewNavigationNode;
51
+ AgentRunResponse: AgentRunResponse;
52
+ AgentRunInternals: AgentRunInternals;
53
+ BindRunWorkflowPayload: BindRunWorkflowPayload;
54
+ BranchNodeBranchDefinition: BranchNodeBranchDefinition;
55
+ CreateEventSubscriptionPayload: CreateEventSubscriptionPayload;
56
+ CreateProcessDefinitionPayload: CreateProcessDefinitionPayload;
57
+ DSLChildWorkflowStep: DSLChildWorkflowStep;
58
+ DSLWorkflowDefinition: DSLWorkflowDefinition;
59
+ DSLWorkflowDefinitionResponse: DSLWorkflowDefinitionResponse;
60
+ DSLWorkflowSpec: DSLWorkflowSpec;
61
+ DSLWorkflowSpecWithActivities: DSLWorkflowTypes.DSLWorkflowSpecWithActivities;
62
+ DSLWorkflowSpecWithSteps: DSLWorkflowSpecWithSteps;
63
+ DSLWorkflowStep: DSLWorkflowStep;
64
+ EventDeliveryTarget: EventDeliveryTarget;
65
+ EventDeliveryTargetInput: EventDeliveryTargetInput;
66
+ EventSubscription: EventSubscription;
67
+ EventSubscriptionArray: EventSubscription[];
68
+ EventSubscriptionMutationResponse: EventSubscriptionMutationResponse;
69
+ ListAgentRunsResponse: ListAgentRunsResponse;
70
+ NodeDefinition: NodeDefinition;
71
+ NodeDefinitionMap: Record<string, NodeDefinition>;
72
+ ProcessDefinition: ProcessDefinition;
73
+ ProcessDefinitionArray: ProcessDefinition[];
74
+ ProcessDefinitionBody: ProcessDefinitionBody;
75
+ ProcessEventDeliveryTarget: ProcessEventDeliveryTarget;
76
+ ProgrammaticRunResponse: ProgrammaticRunResponse;
77
+ RecordRunPayload: RecordRunPayload;
78
+ SupervisedRunResponse: SupervisedRunResponse;
79
+ UpdateAgentRunStatusPayload: UpdateAgentRunStatusPayload;
80
+ UpdateEventSubscriptionPayload: UpdateEventSubscriptionPayload;
81
+ UpdateProcessDefinitionPayload: UpdateProcessDefinitionPayload;
82
+ WorkflowDefinitionPayload: DSLWorkflowTypes.WorkflowDefinitionPayload;
83
+ WorkflowDefinitionPayloadWithActivities: DSLWorkflowTypes.WorkflowDefinitionPayloadWithActivities;
84
+ WorkflowDefinitionPayloadWithSteps: DSLWorkflowTypes.WorkflowDefinitionPayloadWithSteps;
85
+ }
86
+
87
+ /**
88
+ * The wire type a component publishes.
89
+ *
90
+ * `ApiComponentType<'Account'>` is the plain type `gen:schemas` writes for `AccountSchema` into
91
+ * `ApiComponentTypes`, which `wire-types.generated.test.ts` proves identical to its `z.infer`. Indexing
92
+ * that map rather than `z.infer<ApiSchemaMap[N]>` keeps Zod's inference out of every program that names
93
+ * a component. A component the generator has not seen yet resolves to `never`, which
94
+ * `registry-groups.test.ts` rejects.
95
+ *
96
+ * It is wrapped in `NoInfer` because `N` always comes from a component-name argument and can never be
97
+ * recovered from the wire type. Without it, a call whose result has a contextual type — a destructuring
98
+ * `const { file } = validatedQuery(ctx, 'FileMetadataQuery')`, an `await`, a typed `return` — makes the
99
+ * checker infer `N` from that context while `N` is still unresolved, which evaluates `z.infer` across
100
+ * every component in the registry: about 500k types, 1 GB and 2 s of `tsc` in each consuming program.
101
+ */
102
+ export type ApiComponentType<N extends ApiComponentName> = NoInfer<
103
+ N extends keyof ZenoRecursiveComponentTypes
104
+ ? ZenoRecursiveComponentTypes[N]
105
+ : N extends keyof ApiComponentTypes
106
+ ? ApiComponentTypes[N]
107
+ : never
108
+ >;
@@ -55,6 +55,11 @@ export const UserGroupSchema = z
55
55
  '(usable in any project). When set, the group may only be used to grant permissions in the ' +
56
56
  'listed projects.',
57
57
  }),
58
+ member_count: z
59
+ .number()
60
+ .int()
61
+ .optional()
62
+ .meta({ description: 'Number of users in the group. Returned by the group listing only.' }),
58
63
  })
59
64
  .meta({ id: 'UserGroup' });
60
65
 
@@ -32,44 +32,10 @@ import {
32
32
  VideoResultSchema,
33
33
  } from '@llumiverse/common/schemas';
34
34
  import type { z } from 'zod';
35
- import type {
36
- CreateEventSubscriptionPayload,
37
- EventDeliveryTarget,
38
- EventDeliveryTargetInput,
39
- EventSubscription,
40
- EventSubscriptionMutationResponse,
41
- ProcessEventDeliveryTarget,
42
- UpdateEventSubscriptionPayload,
43
- } from '../platform-event.js';
44
- import type {
45
- AgentRunInternals,
46
- AgentRunResponse,
47
- BindRunWorkflowPayload,
48
- ListAgentRunsResponse,
49
- ProgrammaticRunResponse,
50
- RecordRunPayload,
51
- SupervisedRunResponse,
52
- UpdateAgentRunStatusPayload,
53
- } from '../store/agent-run.js';
54
- import type * as DSLWorkflowTypes from '../store/dsl-workflow.js';
55
- import type {
56
- DSLChildWorkflowStep,
57
- DSLWorkflowDefinition,
58
- DSLWorkflowDefinitionResponse,
59
- DSLWorkflowSpec,
60
- DSLWorkflowSpecWithSteps,
61
- DSLWorkflowStep,
62
- } from '../store/dsl-workflow.js';
63
- import type {
64
- BranchNodeBranchDefinition,
65
- CreateProcessDefinitionPayload,
66
- NodeDefinition,
67
- ProcessDefinition,
68
- ProcessDefinitionBody,
69
- UpdateProcessDefinitionPayload,
70
- } from '../store/process.js';
71
- import type { ViewNavigationNode } from '../views.js';
72
- import type { ApiComponentTypes } from '../wire-types.generated.js';
35
+ import type { ApiComponentType } from '../api-contract/types.js';
36
+
37
+ export type { ApiComponentType } from '../api-contract/types.js';
38
+
73
39
  import {
74
40
  ACECreatePayloadSchema,
75
41
  ACEUpdatePayloadSchema,
@@ -3651,74 +3617,6 @@ export function buildApiSchemaComponents(): Readonly<Record<string, JsonObject>>
3651
3617
  return toOpenApiComponents(emitRawSchemas(), { strictComponents: STRICT_COMPONENTS });
3652
3618
  }
3653
3619
 
3654
- /**
3655
- * Explicit TypeScript recursion boundary for schemas whose runtime graph is lazy.
3656
- *
3657
- * Zod cannot infer a finite named type through a mutually-recursive graph. The schemas remain the
3658
- * runtime and OpenAPI authority; these names preserve the recursive TypeScript declarations until
3659
- * TypeScript can infer recursive aliases without collapsing them to `unknown`.
3660
- */
3661
- interface ZenoRecursiveComponentTypes {
3662
- ViewNavigationNode: ViewNavigationNode;
3663
- AgentRunResponse: AgentRunResponse;
3664
- AgentRunInternals: AgentRunInternals;
3665
- BindRunWorkflowPayload: BindRunWorkflowPayload;
3666
- BranchNodeBranchDefinition: BranchNodeBranchDefinition;
3667
- CreateEventSubscriptionPayload: CreateEventSubscriptionPayload;
3668
- CreateProcessDefinitionPayload: CreateProcessDefinitionPayload;
3669
- DSLChildWorkflowStep: DSLChildWorkflowStep;
3670
- DSLWorkflowDefinition: DSLWorkflowDefinition;
3671
- DSLWorkflowDefinitionResponse: DSLWorkflowDefinitionResponse;
3672
- DSLWorkflowSpec: DSLWorkflowSpec;
3673
- DSLWorkflowSpecWithActivities: DSLWorkflowTypes.DSLWorkflowSpecWithActivities;
3674
- DSLWorkflowSpecWithSteps: DSLWorkflowSpecWithSteps;
3675
- DSLWorkflowStep: DSLWorkflowStep;
3676
- EventDeliveryTarget: EventDeliveryTarget;
3677
- EventDeliveryTargetInput: EventDeliveryTargetInput;
3678
- EventSubscription: EventSubscription;
3679
- EventSubscriptionArray: EventSubscription[];
3680
- EventSubscriptionMutationResponse: EventSubscriptionMutationResponse;
3681
- ListAgentRunsResponse: ListAgentRunsResponse;
3682
- NodeDefinition: NodeDefinition;
3683
- NodeDefinitionMap: Record<string, NodeDefinition>;
3684
- ProcessDefinition: ProcessDefinition;
3685
- ProcessDefinitionArray: ProcessDefinition[];
3686
- ProcessDefinitionBody: ProcessDefinitionBody;
3687
- ProcessEventDeliveryTarget: ProcessEventDeliveryTarget;
3688
- ProgrammaticRunResponse: ProgrammaticRunResponse;
3689
- RecordRunPayload: RecordRunPayload;
3690
- SupervisedRunResponse: SupervisedRunResponse;
3691
- UpdateAgentRunStatusPayload: UpdateAgentRunStatusPayload;
3692
- UpdateEventSubscriptionPayload: UpdateEventSubscriptionPayload;
3693
- UpdateProcessDefinitionPayload: UpdateProcessDefinitionPayload;
3694
- WorkflowDefinitionPayload: DSLWorkflowTypes.WorkflowDefinitionPayload;
3695
- WorkflowDefinitionPayloadWithActivities: DSLWorkflowTypes.WorkflowDefinitionPayloadWithActivities;
3696
- WorkflowDefinitionPayloadWithSteps: DSLWorkflowTypes.WorkflowDefinitionPayloadWithSteps;
3697
- }
3698
-
3699
- /**
3700
- * The wire type a component publishes.
3701
- *
3702
- * `ApiComponentType<'Account'>` is the plain type `gen:schemas` writes for `AccountSchema` into
3703
- * `ApiComponentTypes`, which `wire-types.generated.test.ts` proves identical to its `z.infer`. Indexing
3704
- * that map rather than `z.infer<ApiSchemaMap[N]>` keeps Zod's inference out of every program that names
3705
- * a component. A component the generator has not seen yet resolves to `never`, which
3706
- * `registry-groups.test.ts` rejects.
3707
- *
3708
- * It is wrapped in `NoInfer` because `N` always comes from a component-name argument and can never be
3709
- * recovered from the wire type. Without it, a call whose result has a contextual type — a destructuring
3710
- * `const { file } = validatedQuery(ctx, 'FileMetadataQuery')`, an `await`, a typed `return` — makes the
3711
- * checker infer `N` from that context while `N` is still unresolved, which evaluates `z.infer` across
3712
- * every component in the registry: about 500k types, 1 GB and 2 s of `tsc` in each consuming program.
3713
- */
3714
- export type ApiComponentType<N extends ApiComponentName> = NoInfer<
3715
- N extends keyof ZenoRecursiveComponentTypes
3716
- ? ZenoRecursiveComponentTypes[N]
3717
- : N extends keyof ApiComponentTypes
3718
- ? ApiComponentTypes[N]
3719
- : never
3720
- >;
3721
-
3722
3620
  /**
3723
3621
  * Names a published component from inside a handler signature:
3724
3622
  * `Promise<ApiSchemaOf<'Account'>>`.
@@ -3514,6 +3514,7 @@ export type UserGroup = {
3514
3514
  clearance?: number | undefined;
3515
3515
  compartments?: string[] | undefined;
3516
3516
  allowed_projects?: string[] | undefined;
3517
+ member_count?: number | undefined;
3517
3518
  };
3518
3519
  export type CreateUserGroupPayload = {
3519
3520
  name: string;