@vertesia/common 1.5.0-dev.20260910.052912Z → 1.5.1

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.
Files changed (139) hide show
  1. package/lib/api-contract/components.generated.json +929 -378
  2. package/lib/api-schemas/account.d.ts +5 -0
  3. package/lib/api-schemas/account.d.ts.map +1 -1
  4. package/lib/api-schemas/account.js +7 -0
  5. package/lib/api-schemas/account.js.map +1 -1
  6. package/lib/api-schemas/agent-runs.d.ts +410 -145
  7. package/lib/api-schemas/agent-runs.d.ts.map +1 -1
  8. package/lib/api-schemas/apikey.d.ts +7 -1
  9. package/lib/api-schemas/apikey.d.ts.map +1 -1
  10. package/lib/api-schemas/apikey.js +10 -1
  11. package/lib/api-schemas/apikey.js.map +1 -1
  12. package/lib/api-schemas/app-runtime.d.ts +1169 -406
  13. package/lib/api-schemas/app-runtime.d.ts.map +1 -1
  14. package/lib/api-schemas/app-runtime.js +6 -0
  15. package/lib/api-schemas/app-runtime.js.map +1 -1
  16. package/lib/api-schemas/apps.d.ts +5 -0
  17. package/lib/api-schemas/apps.d.ts.map +1 -1
  18. package/lib/api-schemas/apps.js +6 -3
  19. package/lib/api-schemas/apps.js.map +1 -1
  20. package/lib/api-schemas/content.d.ts +418 -145
  21. package/lib/api-schemas/content.d.ts.map +1 -1
  22. package/lib/api-schemas/content.js +3 -0
  23. package/lib/api-schemas/content.js.map +1 -1
  24. package/lib/api-schemas/data-store.d.ts +1 -0
  25. package/lib/api-schemas/data-store.d.ts.map +1 -1
  26. package/lib/api-schemas/data-store.js +7 -0
  27. package/lib/api-schemas/data-store.js.map +1 -1
  28. package/lib/api-schemas/document-processing.d.ts +246 -87
  29. package/lib/api-schemas/document-processing.d.ts.map +1 -1
  30. package/lib/api-schemas/embeddings.d.ts +250 -0
  31. package/lib/api-schemas/embeddings.d.ts.map +1 -1
  32. package/lib/api-schemas/embeddings.js +163 -0
  33. package/lib/api-schemas/embeddings.js.map +1 -1
  34. package/lib/api-schemas/environment.d.ts +2 -2
  35. package/lib/api-schemas/events.d.ts +738 -261
  36. package/lib/api-schemas/events.d.ts.map +1 -1
  37. package/lib/api-schemas/files.d.ts +1 -0
  38. package/lib/api-schemas/files.d.ts.map +1 -1
  39. package/lib/api-schemas/files.js +1 -0
  40. package/lib/api-schemas/files.js.map +1 -1
  41. package/lib/api-schemas/interaction.d.ts +3518 -1260
  42. package/lib/api-schemas/interaction.d.ts.map +1 -1
  43. package/lib/api-schemas/interaction.js +2 -0
  44. package/lib/api-schemas/interaction.js.map +1 -1
  45. package/lib/api-schemas/project-configuration.d.ts +825 -290
  46. package/lib/api-schemas/project-configuration.d.ts.map +1 -1
  47. package/lib/api-schemas/project-configuration.js +5 -3
  48. package/lib/api-schemas/project-configuration.js.map +1 -1
  49. package/lib/api-schemas/project.d.ts +1233 -435
  50. package/lib/api-schemas/project.d.ts.map +1 -1
  51. package/lib/api-schemas/prompt.d.ts +1 -0
  52. package/lib/api-schemas/prompt.d.ts.map +1 -1
  53. package/lib/api-schemas/prompt.js +1 -0
  54. package/lib/api-schemas/prompt.js.map +1 -1
  55. package/lib/api-schemas/registry.d.ts +12758 -4412
  56. package/lib/api-schemas/registry.d.ts.map +1 -1
  57. package/lib/api-schemas/registry.js +52 -34
  58. package/lib/api-schemas/registry.js.map +1 -1
  59. package/lib/api-schemas/store.d.ts +4130 -1480
  60. package/lib/api-schemas/store.d.ts.map +1 -1
  61. package/lib/api-schemas/store.js +3 -0
  62. package/lib/api-schemas/store.js.map +1 -1
  63. package/lib/api-schemas/user.d.ts +28 -12
  64. package/lib/api-schemas/user.d.ts.map +1 -1
  65. package/lib/api-schemas/user.js +23 -17
  66. package/lib/api-schemas/user.js.map +1 -1
  67. package/lib/api-schemas/view-execution.d.ts +2 -0
  68. package/lib/api-schemas/view-execution.d.ts.map +1 -1
  69. package/lib/api-schemas/views.d.ts +7 -0
  70. package/lib/api-schemas/views.d.ts.map +1 -1
  71. package/lib/api-schemas/workflow-runs.d.ts +164 -58
  72. package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
  73. package/lib/apps.d.ts +6 -0
  74. package/lib/apps.d.ts.map +1 -1
  75. package/lib/embeddings.d.ts +18 -1
  76. package/lib/embeddings.d.ts.map +1 -1
  77. package/lib/index.d.ts +2 -1
  78. package/lib/index.d.ts.map +1 -1
  79. package/lib/index.js +1 -0
  80. package/lib/index.js.map +1 -1
  81. package/lib/interaction.d.ts +2 -7
  82. package/lib/interaction.d.ts.map +1 -1
  83. package/lib/interaction.js.map +1 -1
  84. package/lib/principal-context.d.ts +21 -12
  85. package/lib/principal-context.d.ts.map +1 -1
  86. package/lib/project-values.d.ts +1 -0
  87. package/lib/project-values.d.ts.map +1 -1
  88. package/lib/project-values.js +1 -0
  89. package/lib/project-values.js.map +1 -1
  90. package/lib/project.d.ts.map +1 -1
  91. package/lib/project.js +10 -0
  92. package/lib/project.js.map +1 -1
  93. package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
  94. package/lib/store/intake-policy-schema.generated.js +104 -31
  95. package/lib/store/intake-policy-schema.generated.js.map +1 -1
  96. package/lib/store/rendering.d.ts +1 -0
  97. package/lib/store/rendering.d.ts.map +1 -1
  98. package/lib/store/rendering.js +4 -0
  99. package/lib/store/rendering.js.map +1 -1
  100. package/lib/user.d.ts +2 -1
  101. package/lib/user.d.ts.map +1 -1
  102. package/lib/user.js.map +1 -1
  103. package/lib/vertesia-common.js +2 -2
  104. package/lib/vertesia-common.js.map +1 -1
  105. package/package.json +4 -4
  106. package/src/api-contract/components.generated.json +929 -378
  107. package/src/api-schemas/account.ts +8 -0
  108. package/src/api-schemas/apikey.ts +11 -1
  109. package/src/api-schemas/app-runtime.ts +7 -0
  110. package/src/api-schemas/apps.ts +6 -3
  111. package/src/api-schemas/content.ts +4 -0
  112. package/src/api-schemas/data-store.contract.test.ts +6 -0
  113. package/src/api-schemas/data-store.ts +8 -0
  114. package/src/api-schemas/embeddings.ts +184 -0
  115. package/src/api-schemas/files.ts +1 -0
  116. package/src/api-schemas/indexing.contract.test.ts +40 -1
  117. package/src/api-schemas/interaction.ts +2 -0
  118. package/src/api-schemas/llumiverse.contract.test.ts +70 -39
  119. package/src/api-schemas/mcp-api-key.contract.test.ts +39 -0
  120. package/src/api-schemas/project-configuration.ts +5 -3
  121. package/src/api-schemas/project.contract.test.ts +30 -0
  122. package/src/api-schemas/prompt.ts +1 -0
  123. package/src/api-schemas/registry.ts +76 -35
  124. package/src/api-schemas/store.contract.test.ts +25 -25
  125. package/src/api-schemas/store.ts +4 -0
  126. package/src/api-schemas/user.contract.test.ts +24 -18
  127. package/src/api-schemas/user.ts +24 -18
  128. package/src/api-schemas/views.contract.test.ts +3 -10
  129. package/src/apps.ts +6 -0
  130. package/src/embeddings.ts +34 -0
  131. package/src/index.ts +2 -1
  132. package/src/interaction.ts +2 -6
  133. package/src/principal-context.ts +22 -12
  134. package/src/project-values.ts +1 -0
  135. package/src/project.ts +10 -0
  136. package/src/roles.test.ts +1 -0
  137. package/src/store/intake-policy-schema.generated.ts +109 -31
  138. package/src/store/rendering.ts +9 -0
  139. package/src/user.ts +8 -1
@@ -1,23 +1,33 @@
1
1
  import type { z } from 'zod';
2
- import type { PrincipalContextFromSchema, PrincipalIdentitySchema } from './api-schemas/user.js';
2
+ import type { AbacPrincipalContextFromSchema, PrincipalIdentitySchema } from './api-schemas/user.js';
3
3
 
4
4
  /**
5
- * Resolved per-user context consumed by PrincipalSet condition evaluation
6
- * (`matchConditions` / `resolveConditions`) and by ABAC client-side tooling.
5
+ * The resolved principal context matched by ResourceSet/PrincipalSet condition evaluation
6
+ * (`resolveConditions` / `matchConditions`) and offered by the UI condition editor. Every field is
7
+ * referenceable in a rule as `$principal.<field>`: the principal `kind`, its `id`, and the merged
8
+ * BLP attributes (clearance, compartments, email, tags, properties).
7
9
  *
8
- * Mirrors what the token server builds for `$principal.*` resolution at JWT
9
- * issue time, with the same defaults (clearance = 0, compartments = [],
10
- * tags = [], properties = {}). Lives in @vertesia/common so both server-side
11
- * builders and client-side consumers share the exact same shape.
10
+ * This is the single shape the token server writes into the JWT for `$principal.*` resolution at
11
+ * issue time, and the shared `buildPrincipalContext` in @vertesia/studio-utils produces — with the
12
+ * defaults that keep condition operators well-defined for absent values (clearance = 0,
13
+ * compartments = [], tags = [], properties = {}, id = '', email = '').
12
14
  *
13
- * Derived from `PrincipalContextSchema`, which is composed into `PrincipalIdentitySchema` rather
14
- * than published as a component of its own — the document has never carried a `PrincipalContext`
15
+ * Derived from `AbacPrincipalContextSchema`, which is composed into `PrincipalIdentitySchema` rather
16
+ * than published as a component of its own — the document has never carried an `AbacPrincipalContext`
15
17
  * schema, and inventing one would add a `$ref` to every generated client.
16
18
  */
17
- export type PrincipalContext = PrincipalContextFromSchema;
19
+ export type AbacPrincipalContext = AbacPrincipalContextFromSchema;
18
20
 
19
21
  /**
20
- * Response shape of the `/iam/users/identity` endpoint. Derived from `PrincipalIdentitySchema`,
21
- * where its published description lives — Zod reads `.meta()`, not TSDoc.
22
+ * The principal subject kind. A resolvable field of {@link AbacPrincipalContext}, so rules may match
23
+ * on `$principal.kind`.
24
+ */
25
+ export type PrincipalKind = AbacPrincipalContext['kind'];
26
+
27
+ /**
28
+ * Response shape of the `/iam/users/identity` endpoint. Extends {@link AbacPrincipalContext} with
29
+ * identity-only fields (none today) — the invariant is that the ABAC context is always a subset of
30
+ * the identity, so a field added here never widens the `$principal.*` surface. Derived from
31
+ * `PrincipalIdentitySchema`, where its published description lives — Zod reads `.meta()`, not TSDoc.
22
32
  */
23
33
  export type PrincipalIdentity = z.infer<typeof PrincipalIdentitySchema>;
@@ -24,6 +24,7 @@ export enum ResourceVisibility {
24
24
  export enum SystemRoles {
25
25
  owner = 'owner', // all permissions
26
26
  admin = 'admin', // all permissions
27
+ app_admin = 'app_admin', // all permissions but studio:access — admin driving a custom admin UI
27
28
  manager = 'manager', // all permissions but manage_account, manage_billing
28
29
  developer = 'developer', // all permissions but manage_account, manage_billing, manage_roles, delete
29
30
  application = 'application', // executor + request_pk
package/src/project.ts CHANGED
@@ -118,6 +118,16 @@ export const SYSTEM_INTERACTION_CATEGORIES: Record<string, SystemInteractionCate
118
118
  ContentSearchAgent: SystemInteractionCategory.analysis,
119
119
  ContentSearchReranker: SystemInteractionCategory.analysis,
120
120
  StudioAssistant: SystemInteractionCategory.agent,
121
+ // App development runs as an orchestrator plus five specialist sub-agents. Categorising them
122
+ // lets `defaults.system.agent` apply: an in-code sub-agent is launched without an environment
123
+ // or model of its own, so without a category it resolves to the project BASE default rather
124
+ // than the agent default, and a task started on a chosen model ran its sub-agents on another.
125
+ AppDevelopmentOrchestrator: SystemInteractionCategory.agent,
126
+ AppSolutionArchitect: SystemInteractionCategory.agent,
127
+ AppDesigner: SystemInteractionCategory.agent,
128
+ AppDeveloper: SystemInteractionCategory.agent,
129
+ AppReviewer: SystemInteractionCategory.agent,
130
+ AppTester: SystemInteractionCategory.agent,
121
131
  };
122
132
 
123
133
  /**
package/src/roles.test.ts CHANGED
@@ -7,6 +7,7 @@ describe('shared role vocabulary', () => {
7
7
  expect(Object.values(SystemRoles).sort()).toEqual(
8
8
  [
9
9
  'admin',
10
+ 'app_admin',
10
11
  'app_member',
11
12
  'application',
12
13
  'auditor',
@@ -251,6 +251,57 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
251
251
  additionalProperties: false,
252
252
  description: 'Per-content-type policy for the standard intake workflows.',
253
253
  $defs: {
254
+ AnthropicClaudeOptions: {
255
+ type: 'object',
256
+ properties: {
257
+ _option_id: {
258
+ type: 'string',
259
+ const: 'anthropic-claude',
260
+ },
261
+ max_tokens: {
262
+ type: 'number',
263
+ },
264
+ temperature: {
265
+ type: 'number',
266
+ },
267
+ top_p: {
268
+ type: 'number',
269
+ },
270
+ top_k: {
271
+ type: 'number',
272
+ },
273
+ stop_sequence: {
274
+ type: 'array',
275
+ items: {
276
+ type: 'string',
277
+ },
278
+ },
279
+ effort: {
280
+ type: 'string',
281
+ enum: ['low', 'medium', 'high', 'xhigh', 'max'],
282
+ },
283
+ thinking_mode: {
284
+ type: 'string',
285
+ enum: ['adaptive', 'between_tools'],
286
+ description:
287
+ 'Thinking mode override. Sonnet 5.5 supports between_tools at low, medium, or high effort. It omits display and budget fields; keep effort fixed during the conversation. When unset, existing model-specific thinking behavior is preserved.',
288
+ },
289
+ thinking_budget_tokens: {
290
+ type: 'number',
291
+ },
292
+ include_thoughts: {
293
+ type: 'boolean',
294
+ },
295
+ cache_enabled: {
296
+ type: 'boolean',
297
+ },
298
+ cache_ttl: {
299
+ type: 'string',
300
+ enum: ['5m', '1h'],
301
+ },
302
+ },
303
+ additionalProperties: false,
304
+ },
254
305
  AzureFoundryChatOptions: {
255
306
  type: 'object',
256
307
  properties: {
@@ -290,7 +341,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
290
341
  type: 'boolean',
291
342
  },
292
343
  },
293
- required: ['_option_id'],
294
344
  additionalProperties: false,
295
345
  },
296
346
  BedrockAI21Options: {
@@ -309,6 +359,12 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
309
359
  top_p: {
310
360
  type: 'number',
311
361
  },
362
+ presence_penalty: {
363
+ type: 'number',
364
+ },
365
+ frequency_penalty: {
366
+ type: 'number',
367
+ },
312
368
  stop_sequence: {
313
369
  type: 'array',
314
370
  items: {
@@ -325,7 +381,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
325
381
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
326
382
  },
327
383
  },
328
- required: ['_option_id'],
329
384
  additionalProperties: false,
330
385
  },
331
386
  BedrockClaudeOptions: {
@@ -353,6 +408,12 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
353
408
  top_k: {
354
409
  type: 'number',
355
410
  },
411
+ thinking_mode: {
412
+ type: 'string',
413
+ enum: ['adaptive', 'between_tools'],
414
+ description:
415
+ 'Thinking mode override. Sonnet 5.5 supports between_tools at low, medium, or high effort. It omits display and budget fields; keep effort fixed during the conversation. When unset, existing model-specific thinking behavior is preserved.',
416
+ },
356
417
  thinking_budget_tokens: {
357
418
  type: 'number',
358
419
  },
@@ -377,7 +438,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
377
438
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
378
439
  },
379
440
  },
380
- required: ['_option_id'],
381
441
  additionalProperties: false,
382
442
  },
383
443
  BedrockCohereCommandOptions: {
@@ -396,6 +456,15 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
396
456
  top_p: {
397
457
  type: 'number',
398
458
  },
459
+ top_k: {
460
+ type: 'number',
461
+ },
462
+ presence_penalty: {
463
+ type: 'number',
464
+ },
465
+ frequency_penalty: {
466
+ type: 'number',
467
+ },
399
468
  stop_sequence: {
400
469
  type: 'array',
401
470
  items: {
@@ -412,7 +481,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
412
481
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
413
482
  },
414
483
  },
415
- required: ['_option_id'],
416
484
  additionalProperties: false,
417
485
  },
418
486
  BedrockConverseOptions: {
@@ -447,7 +515,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
447
515
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
448
516
  },
449
517
  },
450
- required: ['_option_id'],
451
518
  additionalProperties: false,
452
519
  },
453
520
  BedrockGptOssOptions: {
@@ -489,7 +556,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
489
556
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
490
557
  },
491
558
  },
492
- required: ['_option_id'],
493
559
  additionalProperties: false,
494
560
  },
495
561
  BedrockMantleChatCompletionsOptions: {
@@ -526,7 +592,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
526
592
  type: 'boolean',
527
593
  },
528
594
  },
529
- required: ['_option_id'],
530
595
  additionalProperties: false,
531
596
  },
532
597
  BedrockMantleClaudeOptions: {
@@ -558,6 +623,12 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
558
623
  type: 'string',
559
624
  enum: ['low', 'medium', 'high', 'xhigh', 'max'],
560
625
  },
626
+ thinking_mode: {
627
+ type: 'string',
628
+ enum: ['adaptive', 'between_tools'],
629
+ description:
630
+ 'Thinking mode override. Sonnet 5.5 supports between_tools at low, medium, or high effort. It omits display and budget fields; keep effort fixed during the conversation. When unset, existing model-specific thinking behavior is preserved.',
631
+ },
561
632
  thinking_budget_tokens: {
562
633
  type: 'number',
563
634
  },
@@ -572,7 +643,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
572
643
  enum: ['5m', '1h'],
573
644
  },
574
645
  },
575
- required: ['_option_id'],
576
646
  additionalProperties: false,
577
647
  },
578
648
  BedrockMantleResponsesOptions: {
@@ -593,11 +663,11 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
593
663
  },
594
664
  effort: {
595
665
  type: 'string',
596
- enum: ['none', 'low', 'medium', 'high', 'xhigh'],
666
+ enum: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
597
667
  },
598
668
  reasoning_effort: {
599
669
  type: 'string',
600
- enum: ['none', 'low', 'medium', 'high', 'xhigh'],
670
+ enum: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
601
671
  },
602
672
  verbosity: {
603
673
  type: 'string',
@@ -611,7 +681,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
611
681
  type: 'boolean',
612
682
  },
613
683
  },
614
- required: ['_option_id'],
615
684
  additionalProperties: false,
616
685
  },
617
686
  BedrockMistralOptions: {
@@ -630,6 +699,9 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
630
699
  top_p: {
631
700
  type: 'number',
632
701
  },
702
+ top_k: {
703
+ type: 'number',
704
+ },
633
705
  stop_sequence: {
634
706
  type: 'array',
635
707
  items: {
@@ -646,7 +718,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
646
718
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
647
719
  },
648
720
  },
649
- required: ['_option_id'],
650
721
  additionalProperties: false,
651
722
  },
652
723
  BedrockNovaOptions: {
@@ -665,6 +736,9 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
665
736
  top_p: {
666
737
  type: 'number',
667
738
  },
739
+ top_k: {
740
+ type: 'number',
741
+ },
668
742
  stop_sequence: {
669
743
  type: 'array',
670
744
  items: {
@@ -681,7 +755,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
681
755
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
682
756
  },
683
757
  },
684
- required: ['_option_id'],
685
758
  additionalProperties: false,
686
759
  },
687
760
  BedrockPalmyraOptions: {
@@ -725,7 +798,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
725
798
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
726
799
  },
727
800
  },
728
- required: ['_option_id'],
729
801
  additionalProperties: false,
730
802
  },
731
803
  ConfigModes: {
@@ -895,7 +967,7 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
895
967
  enum: ['parsed', 'raw', 'hidden'],
896
968
  },
897
969
  },
898
- required: ['_option_id', 'reasoning_format'],
970
+ required: ['reasoning_format'],
899
971
  additionalProperties: false,
900
972
  },
901
973
  HttpTimeoutOptions: {
@@ -941,7 +1013,7 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
941
1013
  },
942
1014
  person_generation: {
943
1015
  type: 'string',
944
- enum: ['dont_allow', 'allow_adults', 'allow_all'],
1016
+ enum: ['dont_allow', 'allow_adults', 'allow_all', 'allow_adult'],
945
1017
  },
946
1018
  safety_setting: {
947
1019
  type: 'string',
@@ -1002,7 +1074,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1002
1074
  ],
1003
1075
  },
1004
1076
  },
1005
- required: ['_option_id'],
1006
1077
  additionalProperties: false,
1007
1078
  },
1008
1079
  ImagenTaskType: {
@@ -1058,6 +1129,11 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1058
1129
  model: {
1059
1130
  type: 'string',
1060
1131
  },
1132
+ inherit_model_config: {
1133
+ type: 'boolean',
1134
+ description:
1135
+ 'Treat environment and model as inherited fallbacks after interaction settings, before project defaults.',
1136
+ },
1061
1137
  do_validate: {
1062
1138
  type: 'boolean',
1063
1139
  },
@@ -1153,11 +1229,10 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1153
1229
  type: 'boolean',
1154
1230
  },
1155
1231
  },
1156
- required: ['_option_id'],
1157
1232
  additionalProperties: false,
1158
1233
  },
1159
1234
  ModelOptions: {
1160
- oneOf: [
1235
+ anyOf: [
1161
1236
  {
1162
1237
  $ref: '#/$defs/TextFallbackOptions',
1163
1238
  },
@@ -1239,7 +1314,11 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1239
1314
  {
1240
1315
  $ref: '#/$defs/MistralTextOptions',
1241
1316
  },
1317
+ {
1318
+ $ref: '#/$defs/AnthropicClaudeOptions',
1319
+ },
1242
1320
  ],
1321
+ type: 'object',
1243
1322
  },
1244
1323
  NovaCanvasOptions: {
1245
1324
  type: 'object',
@@ -1300,7 +1379,7 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1300
1379
  enum: ['DEFAULT', 'PRECISE'],
1301
1380
  },
1302
1381
  },
1303
- required: ['_option_id', 'taskType'],
1382
+ required: ['taskType'],
1304
1383
  additionalProperties: false,
1305
1384
  },
1306
1385
  OpenAiDalleOptions: {
@@ -1330,7 +1409,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1330
1409
  type: 'number',
1331
1410
  },
1332
1411
  },
1333
- required: ['_option_id'],
1334
1412
  additionalProperties: false,
1335
1413
  },
1336
1414
  OpenAiGptImageOptions: {
@@ -1357,7 +1435,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1357
1435
  enum: ['png', 'webp', 'jpeg'],
1358
1436
  },
1359
1437
  },
1360
- required: ['_option_id'],
1361
1438
  additionalProperties: false,
1362
1439
  },
1363
1440
  OpenAiTextOptions: {
@@ -1413,7 +1490,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1413
1490
  description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',
1414
1491
  },
1415
1492
  },
1416
- required: ['_option_id'],
1417
1493
  additionalProperties: false,
1418
1494
  },
1419
1495
  OpenAiThinkingOptions: {
@@ -1438,6 +1514,10 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1438
1514
  reasoning_effort: {
1439
1515
  $ref: '#/$defs/ReasoningEffort',
1440
1516
  },
1517
+ reasoning_context: {
1518
+ type: 'string',
1519
+ enum: ['auto', 'current_turn', 'all_turns'],
1520
+ },
1441
1521
  image_detail: {
1442
1522
  type: 'string',
1443
1523
  enum: ['low', 'high', 'auto'],
@@ -1457,7 +1537,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1457
1537
  description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',
1458
1538
  },
1459
1539
  },
1460
- required: ['_option_id'],
1461
1540
  additionalProperties: false,
1462
1541
  },
1463
1542
  PromptCacheMode: {
@@ -1507,7 +1586,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1507
1586
  type: 'boolean',
1508
1587
  },
1509
1588
  },
1510
- required: ['_option_id'],
1511
1589
  additionalProperties: false,
1512
1590
  },
1513
1591
  ThinkingLevel: {
@@ -1534,7 +1612,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1534
1612
  'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',
1535
1613
  },
1536
1614
  },
1537
- required: ['_option_id'],
1538
1615
  additionalProperties: false,
1539
1616
  },
1540
1617
  VertexAIClaudeOptions: {
@@ -1566,6 +1643,12 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1566
1643
  type: 'string',
1567
1644
  enum: ['low', 'medium', 'high', 'xhigh', 'max'],
1568
1645
  },
1646
+ thinking_mode: {
1647
+ type: 'string',
1648
+ enum: ['adaptive', 'between_tools'],
1649
+ description:
1650
+ 'Thinking mode override. Sonnet 5.5 supports between_tools at low, medium, or high effort. It omits display and budget fields; keep effort fixed during the conversation. When unset, existing model-specific thinking behavior is preserved.',
1651
+ },
1569
1652
  thinking_budget_tokens: {
1570
1653
  type: 'number',
1571
1654
  },
@@ -1580,7 +1663,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1580
1663
  enum: ['5m', '1h'],
1581
1664
  },
1582
1665
  },
1583
- required: ['_option_id'],
1584
1666
  additionalProperties: false,
1585
1667
  },
1586
1668
  VertexAIGeminiOmniVideoOptions: {
@@ -1608,7 +1690,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1608
1690
  enum: ['360p', '720p', '1080p', '4k'],
1609
1691
  },
1610
1692
  },
1611
- required: ['_option_id'],
1612
1693
  additionalProperties: false,
1613
1694
  },
1614
1695
  VertexAIGeminiOptions: {
@@ -1694,7 +1775,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1694
1775
  type: 'number',
1695
1776
  },
1696
1777
  },
1697
- required: ['_option_id'],
1698
1778
  additionalProperties: false,
1699
1779
  },
1700
1780
  VertexAIGrokOptions: {
@@ -1720,7 +1800,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1720
1800
  },
1721
1801
  },
1722
1802
  },
1723
- required: ['_option_id'],
1724
1803
  additionalProperties: false,
1725
1804
  },
1726
1805
  XAIGrokImageOptions: {
@@ -1767,7 +1846,6 @@ export const ContentTypeIntakePolicySchema: JSONObject = {
1767
1846
  maximum: 10,
1768
1847
  },
1769
1848
  },
1770
- required: ['_option_id'],
1771
1849
  additionalProperties: false,
1772
1850
  },
1773
1851
  },
@@ -43,6 +43,15 @@ export function getRenditionsPath(contentEtag: string, params: ImageRenditionPar
43
43
  return `renditions/${contentEtag}/${params.max_hw}`;
44
44
  }
45
45
 
46
+ export function getRenditionPagePath(
47
+ contentEtag: string,
48
+ params: ImageRenditionParams,
49
+ pageNumber: number | string = 0,
50
+ ) {
51
+ const page = typeof pageNumber === 'number' ? String(pageNumber).padStart(4, '0') : pageNumber;
52
+ return `${getRenditionsPath(contentEtag, params)}/${page}.${params.format}`;
53
+ }
54
+
46
55
  /** Metadata for PDF rendering, inferred from the published API schema. */
47
56
  export type PdfRenderingMetadata = z.infer<typeof PdfRenderingMetadataSchema>;
48
57
 
package/src/user.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import type { z } from 'zod';
2
- import type { AccountBillingSchema, AccountSchema, UpdateAccountPayloadSchema } from './api-schemas/account.js';
2
+ import type {
3
+ AccountApiVersionPolicySchema,
4
+ AccountBillingSchema,
5
+ AccountSchema,
6
+ UpdateAccountPayloadSchema,
7
+ } from './api-schemas/account.js';
3
8
  import type {
4
9
  AccountProjectsResponseSchema,
5
10
  AccountRefSchema,
@@ -104,3 +109,5 @@ export type SignupData = z.infer<typeof SignupDataSchema>;
104
109
  * The `POST /auth/signup` request body.
105
110
  */
106
111
  export type SignupPayload = z.infer<typeof SignupPayloadSchema>;
112
+
113
+ export type AccountApiVersionPolicy = z.infer<typeof AccountApiVersionPolicySchema>;