@constal/sdk 5.3.0 → 6.1.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.
@@ -1,3 +1,243 @@
1
+ /** Stable capability shared by configured Models and directly bound Gateways. */
2
+ declare const MODEL_COMPLETION_CAPABILITY: CapabilityContractRef;
3
+ /** Capability of Gateways that evaluate state against typed questions (`evaluate`), alongside or instead of completion. */
4
+ declare const MODEL_EVALUATION_CAPABILITY: CapabilityContractRef;
5
+ type ModelGatewayProtocol = "anthropic" | "openai";
6
+ type RawModelProtocol = ModelGatewayProtocol | "bedrock";
7
+ /** Optional generation choices. Supported effort values are defined by the selected model. */
8
+ interface ModelGenerationOptions {
9
+ maxOutputTokens?: number;
10
+ temperature?: number;
11
+ effort?: string;
12
+ }
13
+ /** Preserve absence: defaults belong to the configured Model or upstream provider. */
14
+ declare function modelGenerationOptions(source: ModelGenerationOptions): ModelGenerationOptions;
15
+ interface ModelTool {
16
+ name: string;
17
+ version?: string;
18
+ description: string;
19
+ schema: object;
20
+ }
21
+ interface ModelInvocationArgs extends ModelGenerationOptions {
22
+ /** Logical Model identity or a model selected through a bound Gateway, evaluated under Policy. */
23
+ model?: string;
24
+ system?: string;
25
+ objective?: unknown;
26
+ context?: unknown;
27
+ /** Earlier exchanges, oldest first. Each is one message of its own so the prompt prefix grows by appending. */
28
+ history?: ModelHistoryMessage[];
29
+ tools?: ModelTool[];
30
+ /** Constrain whether an offered Tool must be selected for this generation. */
31
+ toolChoice?: "auto" | "required";
32
+ feedback?: string[];
33
+ stream?: boolean;
34
+ /** Opt in to provider prompt caching for this request. */
35
+ cache?: ModelCacheHint;
36
+ /** Host-adapter escape hatch for a qualified upstream SDK wire request. Credentials and the selected model remain platform-owned. */
37
+ rawProtocol?: {
38
+ protocol: RawModelProtocol;
39
+ request: Record<string, unknown>;
40
+ };
41
+ }
42
+ interface ModelCredentialHeader {
43
+ slot: string;
44
+ header: string;
45
+ scheme: "bearer" | "raw";
46
+ }
47
+ interface ModelGatewayConfig {
48
+ baseUrl: string;
49
+ protocol: ModelGatewayProtocol;
50
+ model: string;
51
+ maxOutputTokens?: number;
52
+ temperature?: number;
53
+ gatewayAuth?: ModelCredentialHeader | null;
54
+ providerAuth?: ModelCredentialHeader | null;
55
+ }
56
+ type NormalizedModelGatewayConfig = Omit<ModelGatewayConfig, "maxOutputTokens" | "temperature" | "gatewayAuth" | "providerAuth"> & {
57
+ maxOutputTokens: number | null;
58
+ temperature: number | null;
59
+ gatewayAuth: ModelCredentialHeader | null;
60
+ providerAuth: ModelCredentialHeader | null;
61
+ };
62
+ /** Provider response completeness, independent of whether an Agent task is finished. */
63
+ interface ModelCompletion {
64
+ status: "complete" | "incomplete" | "unknown";
65
+ reason: string | null;
66
+ }
67
+ interface ModelInvocationResult {
68
+ content: string;
69
+ completion?: ModelCompletion;
70
+ toolCalls?: {
71
+ id: string;
72
+ name: string;
73
+ args: unknown;
74
+ }[];
75
+ /** Provider-reported refusal text, when present separately from visible content. */
76
+ refusal?: string;
77
+ /** Provider-exposed reasoning text or summary, when present. Output tokens alone do not imply either. */
78
+ reasoningContent?: string;
79
+ /** Integration-observed timing for the complete upstream model request. */
80
+ timing?: {
81
+ upstreamMs: number;
82
+ };
83
+ usage: {
84
+ input: number;
85
+ output: number;
86
+ /** Input tokens read from the provider's prompt cache; 0 when the provider reports none. */
87
+ cached: number;
88
+ /** Input tokens written to the provider's prompt cache, present only when the provider reports it. */
89
+ cacheWrite?: number;
90
+ /** Exact upstream inference cost when the Gateway can establish it; null means unavailable. */
91
+ costUsd?: number | null;
92
+ costSource?: string;
93
+ costEstimated?: boolean;
94
+ };
95
+ provider: string;
96
+ model: string;
97
+ /**
98
+ * Present when the turn was sampled from tokens the platform rendered with a pinned chat format, as a trained Model is
99
+ * served: the format, the sampled tokens and their log probabilities (null when the provider returned none). Training
100
+ * reuses these tokens under the same format instead of rendering the reply again.
101
+ */
102
+ sampled?: {
103
+ format: ChatFormatPin;
104
+ tokens: number[];
105
+ logprobs: number[] | null;
106
+ };
107
+ }
108
+ declare function normalizeModelGatewayConfig(value: unknown): NormalizedModelGatewayConfig;
109
+ declare function modelGatewayEndpoint(config: Pick<ModelGatewayConfig, "baseUrl" | "protocol">): URL;
110
+ /** One Tool call an earlier assistant message made. `id` is the call's id in its turn's record (`ToolCallRecord.id`), which
111
+ * the tool message answering it names; `args` is the JSON value the model gave (`ToolCallRecord.args`). An OpenAI-protocol
112
+ * request sends it as the arguments text; an Anthropic `tool_use` input must be an object, so a value that is not one is
113
+ * sent as `{ value }`, as the Constal Gateway does for such a call. */
114
+ interface ModelHistoryToolCall {
115
+ id: string;
116
+ name: string;
117
+ args: unknown;
118
+ }
119
+ /** One earlier message, oldest first. User and assistant text is as it always was; an assistant message may also carry the
120
+ * Tool calls it made, and a tool message returns one call's result to the model. The tool messages right after an
121
+ * assistant message answer each of its calls once, before any other message. */
122
+ type ModelHistoryMessage = {
123
+ role: "user";
124
+ content: string;
125
+ } | {
126
+ role: "assistant";
127
+ content: string;
128
+ toolCalls?: ModelHistoryToolCall[];
129
+ } | {
130
+ role: "tool";
131
+ toolCallId: string;
132
+ content: string;
133
+ isError?: boolean;
134
+ };
135
+ /** Opt-in prompt caching. With a hint, an Anthropic-protocol request marks cache breakpoints on its stable prefix (Tools and
136
+ * system prompt) and on the last history message; an OpenAI-protocol request sent with `contentCacheControl` marks the same
137
+ * breakpoints on the system prompt's and the last history message's text. Each value reaches the provider only when given;
138
+ * without one the provider's default applies. */
139
+ interface ModelCacheHint {
140
+ /** OpenAI-protocol `prompt_cache_key`, such as the caller's Session id: requests that share it share cached prefixes. */
141
+ key?: string;
142
+ /** OpenAI-protocol `prompt_cache_retention`. */
143
+ retention?: string;
144
+ /** Anthropic `cache_control.ttl` of every breakpoint. */
145
+ ttl?: string;
146
+ }
147
+ /** Canonical (sorted-key) JSON: the same objective and context render to the same text whether their objects were built live
148
+ * or loaded back from storage, so a provider's prompt cache keeps matching from one turn to the next. */
149
+ declare function modelPrompt(args: ModelInvocationArgs): string;
150
+ /** The messages of one turn: the static objective and context first (when the turn has either, or its history opens with an
151
+ * assistant message), then each earlier exchange as its own message, then feedback about the previous attempt. Without
152
+ * history this is the single prompt message it always was. */
153
+ declare function modelMessages(args: ModelInvocationArgs): ModelHistoryMessage[];
154
+ /** Choices an OpenAI-protocol request makes for the endpoint it is sent to. Without them the request is plain Chat
155
+ * Completions, as every OpenAI-compatible endpoint takes it. */
156
+ interface ModelProtocolRequestOptions {
157
+ /** Send a cache hint's breakpoints as Anthropic `cache_control` on the text of the system prompt and of the last history
158
+ * message, for an endpoint that reads them there, such as the Constal Gateway or OpenRouter. */
159
+ contentCacheControl?: boolean;
160
+ /** Name an error Tool result `tool_error`, which the Constal Gateway sends to Anthropic as `is_error`. */
161
+ toolErrorName?: boolean;
162
+ }
163
+ declare function modelProtocolRequest(protocol: ModelGatewayProtocol, model: string, maxOutputTokens: number | null, temperature: number | null, args: ModelInvocationArgs, options?: ModelProtocolRequestOptions): Record<string, unknown>;
164
+ declare function modelProtocolResult(protocol: ModelGatewayProtocol, raw: unknown, provider: string, model: string): ModelInvocationResult;
165
+
166
+ /**
167
+ * Stable capability implemented by every chat format: `render` and `parse`, both synchronous, read-only and repeatable.
168
+ * Its hash covers that operation contract.
169
+ */
170
+ declare const CHAT_FORMAT_CAPABILITY: CapabilityContractRef;
171
+ /** Immutable, format-authored metadata: the exact provider model ids whose chat template the format renders. */
172
+ interface ChatFormatMetadata {
173
+ lifecycleVersion: 1;
174
+ models: string[];
175
+ }
176
+ /** The exact chat format Resource a model is trained and served with. Its hash covers the format's code and config. */
177
+ interface ChatFormatPin {
178
+ crn: CRN;
179
+ hash: Hash;
180
+ }
181
+ /** A Tool offered to the model, as a chat template shows it. */
182
+ type ChatTool = Pick<ModelTool, "name" | "description" | "schema">;
183
+ /** One message of a conversation. An assistant message may carry the reasoning its turn produced. */
184
+ type ChatMessage = ModelHistoryMessage | {
185
+ role: "assistant";
186
+ content: string;
187
+ toolCalls?: ModelHistoryToolCall[];
188
+ reasoning?: string;
189
+ };
190
+ /** What a chat format renders: the same input for training and for serving. */
191
+ interface ChatRenderRequest {
192
+ system: string | null;
193
+ messages: ChatMessage[];
194
+ tools: ChatTool[];
195
+ toolChoice: "auto" | "required" | null;
196
+ effort: string | null;
197
+ /** Indexes of the assistant messages whose turns are trained, ascending; empty renders the generation prompt. */
198
+ train: number[];
199
+ }
200
+ /** The tokens of one trained assistant message: `start` inclusive, `end` exclusive, its end of turn included. */
201
+ interface ChatSpan {
202
+ message: number;
203
+ start: number;
204
+ end: number;
205
+ }
206
+ interface ChatRendering {
207
+ tokens: number[];
208
+ spans: ChatSpan[];
209
+ /** Tokens that end an assistant turn when sampling. */
210
+ stop: number[];
211
+ }
212
+ interface ChatParseRequest {
213
+ tokens: number[];
214
+ }
215
+ /** One sampled assistant turn. `stopped` is false when sampling ended before a stop token. */
216
+ interface ChatParsed {
217
+ content: string;
218
+ toolCalls: ModelHistoryToolCall[];
219
+ reasoningContent: string | null;
220
+ stopped: boolean;
221
+ }
222
+ /** A conversation whose rendering of a trained turn changes once later messages follow it. */
223
+ declare class NotAppendOnly extends Error {
224
+ constructor(message?: string);
225
+ }
226
+ declare function chatFormatMetadata(value: unknown): ChatFormatMetadata;
227
+ declare function chatFormatPin(value: unknown): ChatFormatPin;
228
+ /** Validates a render request as a chat format receives it. */
229
+ declare function chatRenderInput(value: unknown): ChatRenderRequest;
230
+ /**
231
+ * The one render request a model invocation becomes, for training and for serving alike: its system prompt, its turn's
232
+ * messages (modelMessages), its Tools, Tool choice and effort, in canonical key order. `train` names the assistant
233
+ * messages whose turns are trained; empty renders the generation prompt.
234
+ */
235
+ declare function chatRenderRequest(args: ModelInvocationArgs, train?: number[]): ChatRenderRequest;
236
+ /** Validates a chat format's rendering of `request`: one span per trained message, in order, within its tokens. */
237
+ declare function chatRendering(value: unknown, request: Pick<ChatRenderRequest, "train">): ChatRendering;
238
+ declare function chatParseInput(value: unknown): ChatParseRequest;
239
+ declare function chatParsed(value: unknown): ChatParsed;
240
+
1
241
  /** A secret exposed only to integration code through a declared Credential slot. */
2
242
  interface IntegrationSecret {
3
243
  value: string;
@@ -265,6 +505,9 @@ interface CaseRow {
265
505
  customer?: CustomerTenantCRN | null;
266
506
  /** Exact immutable execution identity captured with a production Run. */
267
507
  subject?: EvalSubject;
508
+ /** The Run's trace, stored in the Dataset's namespace when the case was captured: every turn, and every model call's exact
509
+ * request and result, which training learns the agent's own turns from. Absent when the Run has no trace. */
510
+ trace?: Ref;
268
511
  } | null;
269
512
  tags: Record<string, string>;
270
513
  }
@@ -417,6 +660,7 @@ interface JudgeCalibration {
417
660
  correlation: number | null;
418
661
  kappa: number | null;
419
662
  }
663
+ type EvalSuiteJobState = "queued" | "running" | "succeeded" | "failed" | "cancelled";
420
664
  interface EvalComparison {
421
665
  suite: FactRef;
422
666
  baseline: FactRef;
@@ -448,9 +692,19 @@ interface AgentDeployPolicy {
448
692
  }
449
693
  type TrainingMethod = "sft" | "rl";
450
694
  type TrainingJobState = "queued" | "running" | "evaluating" | "succeeded" | "failed" | "cancelled";
695
+ /** A step of an Agent, as performance and failure groups name it: a turn by the Tool names it called, or `turn` for one that
696
+ * called none. */
697
+ interface TrainingStep {
698
+ kind: "tool" | "turn";
699
+ name: string;
700
+ }
451
701
  interface TrainingRecipe {
452
702
  method: TrainingMethod;
453
703
  baseModel: string;
704
+ /** The exact chat format the model is trained with, and later served with. It must render `baseModel`. */
705
+ chatFormat: ChatFormatPin;
706
+ /** Only the turns of these steps are trained, each with its full context; omitted trains every turn. */
707
+ steps?: TrainingStep[];
454
708
  dataset: DatasetRef;
455
709
  validationDataset: DatasetRef | null;
456
710
  scorers: ScorerRef[];
@@ -542,6 +796,46 @@ interface TrainingResumePoint {
542
796
  step: number;
543
797
  ref: Ref;
544
798
  }
799
+ /**
800
+ * The recipe settings a new job starts from. SFT trains one sequence per example, so it always uses a group size of 1; the
801
+ * group size here is RL's rollouts per prompt.
802
+ */
803
+ declare const TRAINING_RECIPE_DEFAULTS: {
804
+ readonly epochs: 1;
805
+ readonly batchSize: 4;
806
+ readonly loraRank: 32;
807
+ readonly learningRate: 0.0001;
808
+ readonly groupSize: 4;
809
+ readonly checkpointEvery: 25;
810
+ readonly evalEvery: 25;
811
+ readonly maxTrainTokens: 1000000;
812
+ readonly maxSampleTokens: 500000;
813
+ };
814
+ /**
815
+ * A person's correction of one turn of a captured Run: what the agent should have answered there. A Dataset case carries it as
816
+ * `expected: { correction }`; training then learns this message in place of the turn's own, in the turn's full context, and
817
+ * nothing the Run did after it.
818
+ */
819
+ interface TrainingCorrection {
820
+ /** The corrected turn's hash (its TurnRecord's `hash`, as a verdict's subject names it). */
821
+ turn: Hash;
822
+ message: {
823
+ content: string;
824
+ toolCalls?: ModelHistoryToolCall[];
825
+ reasoning?: string;
826
+ };
827
+ }
828
+ /** What a job's preparation found before any provider work: its examples, the cases it skipped, and its exact training cost. */
829
+ interface TrainingPreparation {
830
+ examples: number;
831
+ validationExamples: number;
832
+ /** Cases or turns left out, such as ones longer than the model's context. */
833
+ skipped: number;
834
+ /** Every training and validation-loss token the whole job processes, counted before it starts. */
835
+ trainTokens: number;
836
+ /** The exact charge for those tokens. Sampling (RL rollouts and scored validation) is metered as it runs. */
837
+ costMicroUsd: number;
838
+ }
545
839
  interface TrainingUsageUnits {
546
840
  trainTokens: number;
547
841
  prefillTokens: number;
@@ -576,6 +870,8 @@ interface TrainingJobStatus {
576
870
  completed: number;
577
871
  usage: TrainingUsageUnits;
578
872
  costMicroUsd: number;
873
+ /** Null until the job's examples are prepared. */
874
+ prepared: TrainingPreparation | null;
579
875
  checkpoints: TrainingJobFact["checkpoints"];
580
876
  evaluation: TrainingJobFact["evaluation"];
581
877
  outputModel: TrainingJobFact["outputModel"];
@@ -595,168 +891,10 @@ interface TrainingJobStatus {
595
891
  updatedAt: number;
596
892
  }
597
893
  declare function trainingProviderMetadata(value: unknown): TrainingProviderMetadata;
894
+ /** Validates a turn correction as a Dataset case's `expected: { correction }` carries it. */
895
+ declare function trainingCorrection(value: unknown): TrainingCorrection;
598
896
  declare function trainingRecipe(value: unknown): TrainingRecipe;
599
897
  declare function startTrainingRequest(value: unknown): StartTrainingRequest;
600
- /** Stable, model-agnostic completion rendering used by the v1 training loop. */
601
- declare function renderTrainingCompletion(input: unknown, expected?: unknown): {
602
- prompt: string;
603
- completion: string | null;
604
- };
605
-
606
- /** Stable capability shared by configured Models and directly bound Gateways. */
607
- declare const MODEL_COMPLETION_CAPABILITY: CapabilityContractRef;
608
- /** Capability of Gateways that evaluate state against typed questions (`evaluate`), alongside or instead of completion. */
609
- declare const MODEL_EVALUATION_CAPABILITY: CapabilityContractRef;
610
- type ModelGatewayProtocol = "anthropic" | "openai";
611
- type RawModelProtocol = ModelGatewayProtocol | "bedrock";
612
- /** Optional generation choices. Supported effort values are defined by the selected model. */
613
- interface ModelGenerationOptions {
614
- maxOutputTokens?: number;
615
- temperature?: number;
616
- effort?: string;
617
- }
618
- /** Preserve absence: defaults belong to the configured Model or upstream provider. */
619
- declare function modelGenerationOptions(source: ModelGenerationOptions): ModelGenerationOptions;
620
- interface ModelTool {
621
- name: string;
622
- version?: string;
623
- description: string;
624
- schema: object;
625
- }
626
- interface ModelInvocationArgs extends ModelGenerationOptions {
627
- /** Logical Model identity or a model selected through a bound Gateway, evaluated under Policy. */
628
- model?: string;
629
- system?: string;
630
- objective?: unknown;
631
- context?: unknown;
632
- /** Earlier exchanges, oldest first. Each is one message of its own so the prompt prefix grows by appending. */
633
- history?: ModelHistoryMessage[];
634
- tools?: ModelTool[];
635
- /** Constrain whether an offered Tool must be selected for this generation. */
636
- toolChoice?: "auto" | "required";
637
- feedback?: string[];
638
- stream?: boolean;
639
- /** Opt in to provider prompt caching for this request. */
640
- cache?: ModelCacheHint;
641
- /** Host-adapter escape hatch for a qualified upstream SDK wire request. Credentials and the selected model remain platform-owned. */
642
- rawProtocol?: {
643
- protocol: RawModelProtocol;
644
- request: Record<string, unknown>;
645
- };
646
- }
647
- interface ModelCredentialHeader {
648
- slot: string;
649
- header: string;
650
- scheme: "bearer" | "raw";
651
- }
652
- interface ModelGatewayConfig {
653
- baseUrl: string;
654
- protocol: ModelGatewayProtocol;
655
- model: string;
656
- maxOutputTokens?: number;
657
- temperature?: number;
658
- gatewayAuth?: ModelCredentialHeader | null;
659
- providerAuth?: ModelCredentialHeader | null;
660
- }
661
- type NormalizedModelGatewayConfig = Omit<ModelGatewayConfig, "maxOutputTokens" | "temperature" | "gatewayAuth" | "providerAuth"> & {
662
- maxOutputTokens: number | null;
663
- temperature: number | null;
664
- gatewayAuth: ModelCredentialHeader | null;
665
- providerAuth: ModelCredentialHeader | null;
666
- };
667
- /** Provider response completeness, independent of whether an Agent task is finished. */
668
- interface ModelCompletion {
669
- status: "complete" | "incomplete" | "unknown";
670
- reason: string | null;
671
- }
672
- interface ModelInvocationResult {
673
- content: string;
674
- completion?: ModelCompletion;
675
- toolCalls?: {
676
- id: string;
677
- name: string;
678
- args: unknown;
679
- }[];
680
- /** Provider-reported refusal text, when present separately from visible content. */
681
- refusal?: string;
682
- /** Provider-exposed reasoning text or summary, when present. Output tokens alone do not imply either. */
683
- reasoningContent?: string;
684
- /** Integration-observed timing for the complete upstream model request. */
685
- timing?: {
686
- upstreamMs: number;
687
- };
688
- usage: {
689
- input: number;
690
- output: number;
691
- /** Input tokens read from the provider's prompt cache; 0 when the provider reports none. */
692
- cached: number;
693
- /** Input tokens written to the provider's prompt cache, present only when the provider reports it. */
694
- cacheWrite?: number;
695
- /** Exact upstream inference cost when the Gateway can establish it; null means unavailable. */
696
- costUsd?: number | null;
697
- costSource?: string;
698
- costEstimated?: boolean;
699
- };
700
- provider: string;
701
- model: string;
702
- }
703
- declare function normalizeModelGatewayConfig(value: unknown): NormalizedModelGatewayConfig;
704
- declare function modelGatewayEndpoint(config: Pick<ModelGatewayConfig, "baseUrl" | "protocol">): URL;
705
- /** One Tool call an earlier assistant message made. `id` is the call's id in its turn's record (`ToolCallRecord.id`), which
706
- * the tool message answering it names; `args` is the JSON value the model gave (`ToolCallRecord.args`). An OpenAI-protocol
707
- * request sends it as the arguments text; an Anthropic `tool_use` input must be an object, so a value that is not one is
708
- * sent as `{ value }`, as the Constal Gateway does for such a call. */
709
- interface ModelHistoryToolCall {
710
- id: string;
711
- name: string;
712
- args: unknown;
713
- }
714
- /** One earlier message, oldest first. User and assistant text is as it always was; an assistant message may also carry the
715
- * Tool calls it made, and a tool message returns one call's result to the model. The tool messages right after an
716
- * assistant message answer each of its calls once, before any other message. */
717
- type ModelHistoryMessage = {
718
- role: "user";
719
- content: string;
720
- } | {
721
- role: "assistant";
722
- content: string;
723
- toolCalls?: ModelHistoryToolCall[];
724
- } | {
725
- role: "tool";
726
- toolCallId: string;
727
- content: string;
728
- isError?: boolean;
729
- };
730
- /** Opt-in prompt caching. With a hint, an Anthropic-protocol request marks cache breakpoints on its stable prefix (Tools and
731
- * system prompt) and on the last history message; an OpenAI-protocol request sent with `contentCacheControl` marks the same
732
- * breakpoints on the system prompt's and the last history message's text. Each value reaches the provider only when given;
733
- * without one the provider's default applies. */
734
- interface ModelCacheHint {
735
- /** OpenAI-protocol `prompt_cache_key`, such as the caller's Session id: requests that share it share cached prefixes. */
736
- key?: string;
737
- /** OpenAI-protocol `prompt_cache_retention`. */
738
- retention?: string;
739
- /** Anthropic `cache_control.ttl` of every breakpoint. */
740
- ttl?: string;
741
- }
742
- /** Canonical (sorted-key) JSON: the same objective and context render to the same text whether their objects were built live
743
- * or loaded back from storage, so a provider's prompt cache keeps matching from one turn to the next. */
744
- declare function modelPrompt(args: ModelInvocationArgs): string;
745
- /** The messages of one turn: the static objective and context first (when the turn has either, or its history opens with an
746
- * assistant message), then each earlier exchange as its own message, then feedback about the previous attempt. Without
747
- * history this is the single prompt message it always was. */
748
- declare function modelMessages(args: ModelInvocationArgs): ModelHistoryMessage[];
749
- /** Choices an OpenAI-protocol request makes for the endpoint it is sent to. Without them the request is plain Chat
750
- * Completions, as every OpenAI-compatible endpoint takes it. */
751
- interface ModelProtocolRequestOptions {
752
- /** Send a cache hint's breakpoints as Anthropic `cache_control` on the text of the system prompt and of the last history
753
- * message, for an endpoint that reads them there, such as the Constal Gateway or OpenRouter. */
754
- contentCacheControl?: boolean;
755
- /** Name an error Tool result `tool_error`, which the Constal Gateway sends to Anthropic as `is_error`. */
756
- toolErrorName?: boolean;
757
- }
758
- declare function modelProtocolRequest(protocol: ModelGatewayProtocol, model: string, maxOutputTokens: number | null, temperature: number | null, args: ModelInvocationArgs, options?: ModelProtocolRequestOptions): Record<string, unknown>;
759
- declare function modelProtocolResult(protocol: ModelGatewayProtocol, raw: unknown, provider: string, model: string): ModelInvocationResult;
760
898
 
761
899
  interface GatewayCredentialSlotSetup {
762
900
  title: string;
@@ -842,6 +980,8 @@ interface GatewayPackageMetadata {
842
980
  training?: TrainingProviderMetadata;
843
981
  /** Present when this Connection can import a trained checkpoint into an inference Model. */
844
982
  checkpointImport?: CheckpointImportMetadata;
983
+ /** Present when this Connection renders and parses the chat format of the models it names. */
984
+ chatFormat?: ChatFormatMetadata;
845
985
  }
846
986
  interface GatewayDefinition<C = unknown> extends Omit<GatewayPackageMetadata, "lifecycleVersion" | "modelOffers"> {
847
987
  id: string;
@@ -860,6 +1000,15 @@ interface GatewayDefinition<C = unknown> extends Omit<GatewayPackageMetadata, "l
860
1000
  interface TrainingProviderDefinition<C = unknown> extends GatewayDefinition<C> {
861
1001
  training: TrainingProviderMetadata;
862
1002
  }
1003
+ /**
1004
+ * A chat format authored on the ordinary Connection package substrate: it renders conversations to tokens and parses
1005
+ * sampled tokens back into a turn, for the exact models its metadata names.
1006
+ */
1007
+ interface ChatFormatDefinition<C = unknown> extends Omit<GatewayDefinition<C>, "kind" | "capabilities" | "modelOffers" | "discovery" | "training" | "checkpointImport" | "chatFormat" | "catalog" | "invoke" | "reconcile" | "cancel" | "release"> {
1008
+ chatFormat: ChatFormatMetadata;
1009
+ render(request: ChatRenderRequest, context: IntegrationContext): Promise<ChatRendering>;
1010
+ parse(request: ChatParseRequest, context: IntegrationContext): Promise<ChatParsed>;
1011
+ }
863
1012
  interface GatewayModelOffer extends ModelTechnicalCapabilities {
864
1013
  id: string;
865
1014
  displayName: string;
@@ -890,6 +1039,11 @@ declare function gateway<C>(definition: GatewayDefinition<C>): GatewayPackage<C>
890
1039
  * other Resource.
891
1040
  */
892
1041
  declare function trainingProvider<C>(definition: TrainingProviderDefinition<C>): GatewayPackage<C>;
1042
+ /**
1043
+ * Defines an installable chat format without creating a parallel package system: a Connection package with the exact
1044
+ * chat format capability and its two operations, `render` and `parse`.
1045
+ */
1046
+ declare function chatFormat<C>(definition: ChatFormatDefinition<C>): GatewayPackage<C>;
893
1047
  /** Stable capability implemented by Gateways that import immutable training checkpoints. */
894
1048
  declare const MODEL_CHECKPOINT_IMPORT_CAPABILITY: CapabilityContractRef;
895
1049
  /** Stable capability implemented by remote MCP client Gateways. */
@@ -925,6 +1079,24 @@ declare function selectableResourceLabels(input: {
925
1079
  version?: string;
926
1080
  labels?: Record<string, string>;
927
1081
  }): Record<string, string>;
1082
+ /**
1083
+ * A Run's selectable labels: its Agent's, and whose Run it is. The customer label is always present, `none` for the tenant's
1084
+ * own Runs, since `NotIn` matches only present keys. A tag adds a label only when its key and value are valid unreserved
1085
+ * labels that no identity or Agent label already sets.
1086
+ */
1087
+ declare function runLabels(input: {
1088
+ agent: {
1089
+ crn: string;
1090
+ name: string;
1091
+ namespace: string;
1092
+ version?: string;
1093
+ labels?: Record<string, string>;
1094
+ };
1095
+ tenant: string;
1096
+ principal: string;
1097
+ customer: string | null;
1098
+ tags?: Record<string, string>;
1099
+ }): Record<string, string>;
928
1100
 
929
1101
  declare const RESOURCE_KINDS: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault"];
930
1102
  declare const PLATFORM_ADDRESS_KINDS: readonly ["analytics", "role", "principal", "customer", "binding", "session", "run", "ledger", "table", "artifact", "deployment"];
@@ -1061,8 +1233,9 @@ type AgentResourceBinding = CRN | ScopedResourceRef;
1061
1233
  type ResourceCredentialBinding = CredentialCRN | ScopedCredentialRef;
1062
1234
  interface InvocationCredentialUse {
1063
1235
  binding: ResourceCredentialBinding;
1064
- /** Who receives the value: a sandbox process (an env variable or a memory-backed file), or a sandbox's egress gate,
1065
- * which adds it to requests as the named header and never shows it to the sandbox. */
1236
+ /** Who receives the value: a sandbox process (an env variable or a memory-backed file), a sandbox's egress gate,
1237
+ * which adds it to requests as the named header and never shows it to the sandbox, or the invoked Resource itself: for
1238
+ * this call only, its scoped slot of this name holds the Credential the Run's own owner holds under this key. */
1066
1239
  consumer: {
1067
1240
  kind: "process";
1068
1241
  delivery: "env" | "file";
@@ -1071,6 +1244,8 @@ interface InvocationCredentialUse {
1071
1244
  kind: "egress";
1072
1245
  delivery: "header";
1073
1246
  name: string;
1247
+ } | {
1248
+ kind: "resource";
1074
1249
  };
1075
1250
  }
1076
1251
  interface BindingAssignmentRevision {
@@ -1833,7 +2008,14 @@ interface SandboxCommandResult {
1833
2008
  execution?: SandboxCommandExecution | null;
1834
2009
  /** Failures retaining streams or declared outputs, separate from process execution. Absent on older results. */
1835
2010
  collectionErrors?: SandboxCommandCollectionError[];
2011
+ /**
2012
+ * The stream's output, or its start: up to 100 KiB per stream. On pool versions with the sandbox fast path, an exec it
2013
+ * answers holds complete output up to 512 KiB for stdout and stderr together (`stdoutTruncated` false); a stream beyond
2014
+ * that budget keeps a 100 KiB preview with `…Truncated` true, its size in `…Bytes` and its content in `…Ref`. Read
2015
+ * `…Truncated` rather than assuming a preview size.
2016
+ */
1836
2017
  stdoutPreview: string;
2018
+ /** As `stdoutPreview`, for stderr; it shares the same 512 KiB inline budget, after stdout. */
1837
2019
  stderrPreview: string;
1838
2020
  stdoutRef: Ref | null;
1839
2021
  stderrRef: Ref | null;
@@ -1895,6 +2077,12 @@ interface SandboxWorkspace {
1895
2077
  readonly pool: SandboxPool;
1896
2078
  readonly agent: CRN;
1897
2079
  readonly session: string;
2080
+ /**
2081
+ * Run one command. `await workspace.exec(...)` (or `Promise.all` of execs) waits for the command inline and continues
2082
+ * in the same pass; `start()` first, or racing it with a durable wait, spawn or approval, answers once it is admitted and
2083
+ * delivers the result through the Handle. `opts.wait` (`"inline"` | `"async"`) overrides that choice and passes through
2084
+ * unchanged; it never changes the Handle id or the operation's identity.
2085
+ */
1898
2086
  exec(input: SandboxExecInput, opts?: InvokeOpts): InvocationHandle<SandboxCommandResult>;
1899
2087
  /** Admit ordinary exec without waiting for exit. Readiness is observable via I/O. */
1900
2088
  openProcess(input: SandboxExecInput, opts?: InvokeOpts): Promise<SandboxProcess>;
@@ -1902,7 +2090,9 @@ interface SandboxWorkspace {
1902
2090
  resolveProcess(selector: string | {
1903
2091
  id: string;
1904
2092
  }, opts?: InvokeOpts): Promise<SandboxProcess | null>;
2093
+ /** Synchronous: waits inline unless `options.invoke.wait` is `"async"`. `options.invoke` passes through to the invocation unchanged. */
1905
2094
  readFile(path: string, options?: SandboxReadFileOptions): Promise<SandboxReadFileResult>;
2095
+ /** Synchronous: waits inline unless `options.invoke.wait` is `"async"`. `options.invoke` passes through to the invocation unchanged. */
1906
2096
  writeFile(path: string, content: string, options?: {
1907
2097
  mode?: number;
1908
2098
  invoke?: InvokeOpts;
@@ -2267,12 +2457,16 @@ type SteerEvent = EventBase & {
2267
2457
  };
2268
2458
  ref: Ref | null;
2269
2459
  };
2460
+ /**
2461
+ * A control applied to a Run. `upgrade` moved the Run to another deployment revision of its Agent, onto its caller's
2462
+ * authority (its payload's `authority: { from, to }`), or both, at a step boundary.
2463
+ */
2270
2464
  type ControlEvent = EventBase & {
2271
2465
  kind: "control";
2272
2466
  eventId: string;
2273
2467
  actor: Actor;
2274
2468
  run: string;
2275
- op: "pause" | "resume" | "cancel" | "interrupt" | "policy" | "rebind" | "truncate";
2469
+ op: "pause" | "resume" | "cancel" | "interrupt" | "policy" | "rebind" | "truncate" | "upgrade";
2276
2470
  mode: "safe-point" | "abort";
2277
2471
  payload: unknown;
2278
2472
  };
@@ -2430,8 +2624,23 @@ interface HistoryView {
2430
2624
  message: unknown;
2431
2625
  checkpoint: Fact | null;
2432
2626
  facts: Fact[];
2627
+ /** The steers this page holds, oldest first: on the Run's own ledger, those after its checkpoint up to the event head
2628
+ * the view is pinned at. */
2433
2629
  steers: SteerEvent[];
2630
+ /** The cursor to the Facts before `facts`, which `page()` reads; null when there are none. */
2434
2631
  more: string | null;
2632
+ /** The cursor to the steers after `steers`, which `page()` reads; null when there are none. Absent from platforms before
2633
+ * SDK 6.1.0, whose page held at most its oldest 200 steers. */
2634
+ steersMore?: string | null;
2635
+ }
2636
+ /** A page `ctx.ledger.page()` reads: from a `more` cursor the Facts before the last ones read, newest last; from a `steersMore`
2637
+ * cursor the steers after the last ones read, oldest first, with no Facts. */
2638
+ interface HistoryPage {
2639
+ facts: Fact[];
2640
+ more: string | null;
2641
+ /** Present on a steer page. */
2642
+ steers?: SteerEvent[];
2643
+ steersMore?: string | null;
2435
2644
  }
2436
2645
  interface RollbackReport {
2437
2646
  rollbackId: string;
@@ -2883,7 +3092,8 @@ interface ReduceFact {
2883
3092
  stage: StageInfo;
2884
3093
  }
2885
3094
  type ScopeJournalKind = "turn" | "tool" | "step";
2886
- type LocalJournalKind = "clock" | "random" | "score" | "commit" | "await" | "spawn" | "map" | "reduce" | "view" | "page" | "truncate" | "cancel" | "capability" | "schedule";
3095
+ /** `journal`: what the Agent read of `ctx.journal.paged` at that point, recorded as its `value` so a replay reads the same. */
3096
+ type LocalJournalKind = "clock" | "random" | "score" | "commit" | "await" | "spawn" | "map" | "reduce" | "view" | "page" | "truncate" | "cancel" | "capability" | "schedule" | "journal";
2887
3097
  type JournalKind = ScopeJournalKind | LocalJournalKind | "invoke" | "send";
2888
3098
  /** Stable identity available to Agent code. Platform execution and deployment
2889
3099
  * metadata intentionally remain outside the public Agent context. */
@@ -2915,6 +3125,21 @@ interface InvokeOpts {
2915
3125
  dedupeKey?: string;
2916
3126
  /** Invocation-local Credential selections. Material never enters Agent code. */
2917
3127
  credentials?: Record<string, InvocationCredentialUse>;
3128
+ /**
3129
+ * How the platform answers the call. `"inline"`: wait for the outcome, up to the operation's own timeout, and answer it
3130
+ * in the same pass, so awaiting the result does not suspend the step. `"async"`: answer once the operation is admitted;
3131
+ * the outcome arrives through the Handle, as for a started or raced Handle.
3132
+ *
3133
+ * Omitted, the runtime decides. A synchronous operation (`invoke`, e.g. `readFile`/`writeFile`) waits inline; with
3134
+ * `"async"` it is answered once admitted, and when it has not finished by then the step suspends and resumes with its
3135
+ * result. An asynchronous one (`invokeAsync`, e.g. `exec`) waits inline when it is awaited
3136
+ * directly or only together with other invocations (`await h`, `Promise.all([h1, h2])`), and async when `start()` is
3137
+ * called before it is awaited or it is raced with a durable wait, spawn, approval or any other Handle.
3138
+ *
3139
+ * A transport hint, not part of the operation: it never changes the operation hash, the Handle id, the journal or the
3140
+ * result, and a platform without the sandbox fast path ignores it. Any other value is a TypeError.
3141
+ */
3142
+ wait?: "inline" | "async";
2918
3143
  }
2919
3144
  interface CapabilityGrant {
2920
3145
  actions: string[];
@@ -2960,6 +3185,22 @@ interface EvaluationRecord<Q extends EvaluationQuestions = EvaluationQuestions>
2960
3185
  provider: string;
2961
3186
  model: string;
2962
3187
  }
3188
+ /**
3189
+ * This step's journal at the Agent's current position. Every dispatch of a step carries its journal, and the step replays
3190
+ * it: a durable Agent's journal starts afresh each time `step()` returns, a script Agent's lasts the Run. Once a dispatch
3191
+ * no longer fits one message the rest is stored and read back at every dispatch, so a durable Agent that loops within one
3192
+ * `step()` can return from it once `paged` is true.
3193
+ *
3194
+ * `entries` follows from the Agent's position and reading it records nothing. Reading `paged` journals what it read, so a
3195
+ * replay reads at each point what the live step read there. Read them where everything the step started has been awaited.
3196
+ */
3197
+ interface StepJournal {
3198
+ /** The entries the step's journal holds at this point. */
3199
+ readonly entries: number;
3200
+ /** True once the step's next dispatch, with its journal and the values its replay reads, would no longer fit one message:
3201
+ * end the step now. */
3202
+ readonly paged: boolean;
3203
+ }
2963
3204
  interface Ctx {
2964
3205
  turn(spec: TurnSpec): Promise<TurnRecord>;
2965
3206
  /** Judge one state with constrained, probabilistic answers instead of a generated turn. Journaled and priced like a model call. */
@@ -2967,14 +3208,13 @@ interface Ctx {
2967
3208
  ledger: {
2968
3209
  /** `of` names another ledger: `agent:<agent>/session:<session>` (that Session's main ledger, read at its head),
2969
3210
  * `agent:<agent>/session:<session>/spawn:<handle>` (a spawned loop's), `memory` or `table:<table>@<branch>`.
2970
- * Omit it for this Run's own ledger, pinned at dispatch; `session:<id>` is refused. */
3211
+ * Omit it for this Run's own ledger, pinned at dispatch; `session:<id>` is refused. Every `history` view is read from
3212
+ * its Session, so it can fail as other ctx requests do. */
2971
3213
  view<S = HistoryView>(name?: string, opts?: {
2972
3214
  of?: LedgerAddress;
2973
3215
  }): Promise<S>;
2974
- page(cursor: string): Promise<{
2975
- facts: Fact[];
2976
- more: string | null;
2977
- }>;
3216
+ /** The page a view's or page's `more` or `steersMore` cursor names. */
3217
+ page(cursor: string): Promise<HistoryPage>;
2978
3218
  branch(at: FactRef): BranchRef;
2979
3219
  truncate(to: FactRef): Handle<RollbackReport>;
2980
3220
  };
@@ -2999,6 +3239,8 @@ interface Ctx {
2999
3239
  invokeAsync<T>(resource: CRN, op: string, args: unknown, opts?: InvokeOpts): InvocationHandle<T>;
3000
3240
  request(policy: PolicyCRN, grant: CapabilityGrant): Handle<CapabilityRef>;
3001
3241
  analytics: AnalyticsClient;
3242
+ /** This step's journal at the Agent's current position. Undefined where the platform's runtime predates it. */
3243
+ readonly journal?: StepJournal;
3002
3244
  run: RunInfo;
3003
3245
  }
3004
3246
  interface AgentDef<S = unknown> {
@@ -4204,6 +4446,218 @@ declare function policy(definition: PolicyDefinition): PolicyDefinition;
4204
4446
  /** Runs and validates one Policy definition without creating a transport envelope. */
4205
4447
  declare function evaluatePolicyDefinition(definition: PolicyDefinition, input: Readonly<PolicyInput>): Promise<PolicyOutcome>;
4206
4448
 
4449
+ /** Data sharing: which of a tenant's Runs may be shared, and the Shares that deliver them to partner organizations. */
4450
+
4451
+ /** A tenant's sharing scope over its Runs' labels: off shares nothing; on with no selector, every Run. */
4452
+ interface DataSharingScope {
4453
+ enabled: boolean;
4454
+ selector: LabelSelector | null;
4455
+ }
4456
+ type ShareAction = "read" | "evaluate" | "contribute";
4457
+ /** A price rule of a Share. Rules are ordered: a trace costs the first one its labels match, and nothing when none does. */
4458
+ interface SharePrice {
4459
+ selector: LabelSelector | null;
4460
+ microUsd: number;
4461
+ }
4462
+ /** A Resource version a Share's evaluation pins, by its id in the evaluation's namespace. */
4463
+ interface ShareEvaluationPin {
4464
+ id: string;
4465
+ version: string;
4466
+ hash: string;
4467
+ }
4468
+ /**
4469
+ * What the recipient's candidates are evaluated with on a Share that evaluates: the grantor's namespace, the Agent that takes
4470
+ * its `model` from a principal-scoped binding, the Dataset version and Scorers, and each evaluation's ceilings.
4471
+ */
4472
+ interface ShareEvaluation {
4473
+ /** Fixed once set. */
4474
+ namespace: string;
4475
+ agent: string;
4476
+ dataset: ShareEvaluationPin;
4477
+ scorers: ShareEvaluationPin[];
4478
+ concurrency: number;
4479
+ budgetMicroUsd: number;
4480
+ }
4481
+ /**
4482
+ * What a recipient asks to evaluate under a Share: its model endpoint's base URL (the protocol's path is appended) and a key
4483
+ * it issued for it, which is sealed into a Credential on arrival. Budget and concurrency default to the Share's ceilings and
4484
+ * may not exceed them.
4485
+ */
4486
+ interface ShareEvaluationRequest {
4487
+ id: string;
4488
+ candidate: {
4489
+ baseUrl: string;
4490
+ protocol: "openai" | "anthropic";
4491
+ model: string;
4492
+ key: string;
4493
+ };
4494
+ budgetMicroUsd?: number;
4495
+ concurrency?: number;
4496
+ }
4497
+ /** One case's verdict by one Scorer, as the recipient sees it: never the output, expected value or evidence. */
4498
+ interface ShareEvaluationVerdict {
4499
+ caseId: string;
4500
+ scorer: string;
4501
+ score: number | null;
4502
+ pass: boolean | null;
4503
+ }
4504
+ /**
4505
+ * An evaluation under a Share as either party reads it: its Suite's progress, and once it finished, each Scorer's aggregates
4506
+ * (keyed by Scorer id) and the cost the recipient paid. Budget and concurrency are null before the Suite starts.
4507
+ */
4508
+ interface ShareEvaluationView {
4509
+ id: string;
4510
+ state: EvalSuiteJobState;
4511
+ total: number;
4512
+ completed: number;
4513
+ errored: number;
4514
+ budgetMicroUsd: number | null;
4515
+ concurrency: number | null;
4516
+ error: {
4517
+ code: string;
4518
+ message: string;
4519
+ } | null;
4520
+ result: {
4521
+ scores: Record<string, {
4522
+ mean: number;
4523
+ p50: number;
4524
+ p10: number;
4525
+ passRate: number | null;
4526
+ n: number;
4527
+ }>;
4528
+ cases: number;
4529
+ completed: number;
4530
+ errored: number;
4531
+ costMicroUsd: number;
4532
+ } | null;
4533
+ createdAt: number;
4534
+ updatedAt: number;
4535
+ /** One evaluation's read adds each case's verdicts once it finished. */
4536
+ verdicts?: ShareEvaluationVerdict[];
4537
+ }
4538
+ /** A grantor's grant of its matching Runs, delivered as cleaned traces into the recipient organization's namespace. */
4539
+ interface Share {
4540
+ id: string;
4541
+ /** The granting tenant, or null for Constal, which grants across every tenant that shares. */
4542
+ grantor: string | null;
4543
+ /** The recipient tenant and its namespace that receives the traces, both set when the invite is accepted. */
4544
+ recipient: string | null;
4545
+ namespace: string | null;
4546
+ displayName: string;
4547
+ /** Narrows each source's sharing scope; null delivers all of it. */
4548
+ selector: LabelSelector | null;
4549
+ actions: ShareAction[];
4550
+ prices: SharePrice[];
4551
+ /** Required when actions include evaluate; null otherwise. */
4552
+ evaluation: ShareEvaluation | null;
4553
+ /**
4554
+ * The past Runs the Share also delivers, which the grantor sets: those that ended from `since` until the Share was accepted.
4555
+ * Needs read; null delivers none, and a Share Constal grants has none.
4556
+ */
4557
+ history: {
4558
+ since: number;
4559
+ } | null;
4560
+ expiresAt: number | null;
4561
+ status: "invited" | "active" | "revoked" | "expired";
4562
+ authorizationSeq: number;
4563
+ createdBy: string;
4564
+ createdAt: number;
4565
+ acceptedBy: string | null;
4566
+ acceptedAt: number | null;
4567
+ revokedAt: number | null;
4568
+ }
4569
+ /** The terms a grantor sets: all it chooses when creating a Share, those that change when updating one. */
4570
+ type ShareRequest = Partial<Pick<Share, "displayName" | "selector" | "actions" | "prices" | "evaluation" | "history" | "expiresAt">>;
4571
+ /**
4572
+ * The delivery of a Share's past Runs under one authorizationSeq, which starts once the Share is accepted, or saved, with
4573
+ * `history` set, charged at the Share's prices as live traces are: the Runs it checked, the traces it delivered, and what they
4574
+ * were charged. A change to the Share's terms cancels it (`error.code` `ShareChanged`) and starts one under the new terms; so
4575
+ * do revoking or expiring the Share or removing read (`ShareRevoked`), and turning the grantor's sharing off (`SharingOff`).
4576
+ * The recipient cancelling it leaves `error` null; a running delivery that billing holds back carries `AccountBalanceExceeded`.
4577
+ * Warnings name traces by their pseudonyms.
4578
+ */
4579
+ interface ShareHistory {
4580
+ id: string;
4581
+ share: string;
4582
+ authorizationSeq: number;
4583
+ state: "queued" | "running" | "succeeded" | "failed" | "cancelled";
4584
+ window: {
4585
+ start: number;
4586
+ end: number;
4587
+ };
4588
+ runs: number;
4589
+ delivered: number;
4590
+ chargeMicroUsd: number;
4591
+ warnings: string[];
4592
+ error: {
4593
+ code: string;
4594
+ message: string;
4595
+ } | null;
4596
+ createdAt: number;
4597
+ updatedAt: number;
4598
+ }
4599
+ /** A Share's evaluation spec, checked: Resources named in its namespace, at most 32 Scorers, concurrency 1 to 32, a budget. */
4600
+ declare function shareEvaluation(value: unknown): ShareEvaluation;
4601
+ /** A Share's ordered price rules, at most 32, each a selector (null matches every trace) and a whole microUsd price. */
4602
+ declare function sharePrices(value: unknown): SharePrice[];
4603
+ /** Constal's fee on each priced trace a tenant's Share delivers, in basis points; the grantor earns the rest of the price. */
4604
+ declare const DATA_SHARE_FEE_BPS = 3000;
4605
+ /**
4606
+ * What a tenant grantor earns of a delivered trace's price: the price less Constal's fee, rounded down to the micro-USD, so
4607
+ * Constal keeps the remainder. A Share Constal grants earns no one anything.
4608
+ */
4609
+ declare function dataShareEarningMicroUsd(priceMicroUsd: number): number;
4610
+ /** The Share terms a request sets, checked and canonical; any other field is refused. */
4611
+ declare function shareRequest(value: unknown): ShareRequest;
4612
+ type ShareContributionStatus = "submitted" | "changes-requested" | "accepted" | "rejected";
4613
+ type ShareReviewDecision = "accept" | "request-changes" | "reject";
4614
+ /** A contributed Dataset version and the version accepting it registered in the grantor's tenant. */
4615
+ interface ShareContributionImport {
4616
+ source: DatasetRef;
4617
+ target: DatasetRef;
4618
+ }
4619
+ /** The grantor's review of a contribution; an acceptance records what it imported, one for each contributed Dataset in order. */
4620
+ interface ShareContributionReview {
4621
+ decision: ShareReviewDecision;
4622
+ note: string;
4623
+ imported?: ShareContributionImport[];
4624
+ by: string;
4625
+ at: number;
4626
+ }
4627
+ /**
4628
+ * What a partner contributes back under a Share: Dataset versions of its own, evaluations it ran under the Share, and a note.
4629
+ * It is submitted, and revised while the grantor asks for changes; accepted and rejected are final.
4630
+ */
4631
+ interface ShareContribution {
4632
+ id: string;
4633
+ share: string;
4634
+ datasets: DatasetRef[];
4635
+ evaluations: string[];
4636
+ note: string;
4637
+ status: ShareContributionStatus;
4638
+ review: ShareContributionReview | null;
4639
+ seq: number;
4640
+ createdBy: string;
4641
+ createdAt: number;
4642
+ updatedAt: number;
4643
+ }
4644
+ /** What a partner submits (an omitted field is empty), and each field a revision replaces. */
4645
+ type ShareContributionRequest = Partial<Pick<ShareContribution, "datasets" | "evaluations" | "note">>;
4646
+ /**
4647
+ * The grantor's review. Accepting registers each Dataset in `namespace` ("default" when omitted), under `targets[n]` for the
4648
+ * contribution's nth Dataset, or under the Dataset's own id when that is missing or null.
4649
+ */
4650
+ interface ShareContributionReviewRequest {
4651
+ decision: ShareReviewDecision;
4652
+ note?: string;
4653
+ namespace?: string;
4654
+ targets?: (string | null)[];
4655
+ }
4656
+ /** The contribution fields a request sets, checked: at most 16 Dataset versions, at most 16 evaluation ids, and a note. */
4657
+ declare function shareContributionRequest(value: unknown): ShareContributionRequest;
4658
+ /** A review's decision and note, checked; only an accepting review names a namespace and targets. */
4659
+ declare function shareContributionReview(value: unknown): ShareContributionReviewRequest;
4660
+
4207
4661
  /** RFC 8785-compatible canonical JSON for JSON-safe values. */
4208
4662
  declare function canonicalJson(value: unknown): string;
4209
4663
  declare function sha256Hex(bytes: string | ArrayBuffer | Uint8Array): Promise<string>;
@@ -4893,5 +5347,5 @@ declare function parseLedgerAddress(value: unknown): LedgerAddressParts | null;
4893
5347
  /** Formats ledger address parts; throws when a part breaks its id rule. */
4894
5348
  declare function formatLedgerAddress(parts: LedgerAddressParts): LedgerAddress;
4895
5349
 
4896
- export { AGENT_UI_DEFAULTS, AfterYield, ApiError, CONSTAL_API_CAPABILITY, CONSTAL_API_GET_KINDS, CONSTAL_API_MODEL_TOOL_DESCRIPTIONS, CONSTAL_API_OPERATIONS, CONSTAL_API_OPERATION_SCHEMAS, CONSTAL_API_QUERY_KINDS, CONSTAL_API_VERSION, CommitConflict, CommitGateRejected, CredentialRevoked, CredentialUnavailable, DirectNetworkDenied, EVALUATION_LIMITS, EffectCeilingExceeded, EmptyJoin, GateExhausted, IntegrationRequestNotSent, LeaseLost, MCP_CLIENT_CAPABILITY, MCP_PROTOCOL_VERSION, MEMORY_OPERATION_DECLARATIONS, MODEL_CHECKPOINT_IMPORT_CAPABILITY, MODEL_COMPLETION_CAPABILITY, MODEL_EVALUATION_CAPABILITY, McpClient, NondeterministicReplay, OutcomeUnknown, PolicyConstraintFailed, PolicyDecisionFailed, RESOURCE_CREDENTIAL_BINDING_SCHEMA, RESOURCE_KINDS, ResourceDisabled, ResourceInvalid, ResourceUnbound, RollbackTargetInvalid, SANDBOX_EGRESS_LIMITS, SessionDeleted, SpawnCardinality, SwallowedYield, TRAINING_PROVIDER_CAPABILITY, TerminalIntegrationFailure, ToolUnavailable, UI_ASSET_CONTENT_TYPES, UI_BUNDLE_BOUNDS, UnknownTool, WEB_FETCH_ARGUMENT_SCHEMA, WEB_SEARCH_ARGUMENT_SCHEMA, action, actionPattern, agent, agentLimit, agentResourceBinding, agentSetupMetadata, agentSetupRequirements, agentUiBundleManifest, agentUiDeclaration, all, analyticsEvent, approximateTokens, authProvider, authProviderName, bindingName, bucketFor, canonicalJson, capabilityContractRef, casTool, channel, channelIngressRequest, channelIngressSource, channelSourceEvidence, channelSubscriptionRequest, channelTarget, checkpointArtifactRef, checkpointDeploymentRequest, checkpointImportMetadata, checkpointImportRequest, codeScorerIR, containerImageReference, containerImageSelection, containerImageSource, credentialEvidence, credentialInteractionAction, credentialInteractionEvent, credentialInteractionResult, credentialName, credentialProvider, credentialProviderConfigSchema, credentialProviderName, credentialProviderSetupMetadata, credentialRotationDefaults, credentialSetupState, customerTenantName, cutBatches, cutPartitions, datasetName, evaluateCodeScorer, evaluatePolicyDefinition, evaluationArguments, evaluationProtocolRequest, evaluationProtocolResult, formatLedgerAddress, gateway, gatewayModelOffer, gatewayPackageMetadata, hash, hashValue, immutableContainerImageReference, integrationEgressPolicy, invocationCredentialUses, labelSelector, matchesAction, matchesLabelSelector, matchesResource, mcpToolDescription, mcpToolResult, memoryStoreBinding, modelAdvertisedPricing, modelControls, modelGatewayBinding, modelGatewayEndpoint, modelGenerationOptions, modelLimit, modelMessages, modelPrompt, modelProtocolRequest, modelProtocolResult, murmur3_32, normalizeModelGatewayConfig, normalizeSandboxEgressCredentialRules, normalizeSandboxEgressPolicy, normalizeSandboxLabels, normalizeSandboxNetworkPolicy, normalizeSandboxWorkspacePath, noulDecision, opTool, opTools, parseLedgerAddress, parseResourceName, policy, policyName, race, renderTrainingCompletion, resolveBindingOwner, resolveContainerImageSource, resolveGatewayEgress, resolveResourceDependencyRef, resourceContractRef, resourceCredentialBinding, resourceDependencyRef, resourceLabelMap, resourceName, resourceNeed, resourcePattern, resourceSelector, resourceTools, sandboxControls, sandboxEgressDecision, sandboxEgressHostMatches, sandboxLimit, scopedBindingKey, scopedCredentialRef, scopedResourceRef, scoreLevel, scorerName, select, selectableResourceLabels, setupAwait, setupCredentialReceipt, setupPanelProviderIsCrn, setupScreen, setupScreenView, setupSubmission, sha256Hex, skills, stageOutput, startTrainingRequest, subtask, tableDescribe, tableQuery, trainingProvider, trainingProviderMetadata, trainingRecipe, uiAssetContentType, uiBundle, uiBundleManifest, uiLimit, uiName, validateBatchSpec, validateFoldFn, validateJsonSchema, validateJsonSchemaDefinition, validatePartitionFn, validatePartitionSpec, validateStageOutputSpec, validateTool, validateView, webFetch, webSearch };
4897
- export type { Action, ActionPattern, Actor, AdmissionLimitConstraint, AdmissionLimitInput, AdmissionLimitScope, AdmissionLimitWindow, Agent, AgentCredentialSetupRequirement, AgentDef, AgentDeployPolicy, AgentGovernanceMeter, AgentSetupMetadata, AgentSetupRequirement, AgentSetupWorkflow, AgentUiDeclaration, AnalyticsClient, AnalyticsDimensionValue, AnalyticsEventDefinition, AnalyticsIntent, AnalyticsValues, AuthProvider, AuthProviderCRN, AuthProviderContext, AuthProviderRequest, AuthProviderResult, AwaitOpts, AwaitPresentation, BatchSpec, BindingCRN, BindingOwnerContext, BindingOwnerScope, BoundOperation, BoundResourceCapabilities, BranchRef, CRN, CRNKind, CanonicalEvent, CanonicalEventDraft, CapabilityContractRef, CapabilityGrant, CapabilityRef, CaptureCaseRequest, CaseRow, CatalogTool, Channel, ChannelContext, ChannelDeliveryError, ChannelDeliveryEvent, ChannelDeliveryOutcome, ChannelDeliveryReport, ChannelFailure, ChannelIngressEvent, ChannelIngressSource, ChannelMessage, ChannelProtocol, ChannelReceiveResult, ChannelRequest, ChannelResponse, ChannelSourceEvidence, ChannelSubscriptionRequest, ChannelTarget, CheckpointDeploymentRequest, CheckpointImportMetadata, CheckpointImportRequest, ChoiceAnswer, ChoiceQuestion, CodeScoreResult, CodeScorerIR, CodeScorerRule, CommitOpts, CompareSuitesRequest, Compensation, ConnectionCancelRequest, ConnectionIdentity, ConnectionOperation, ConnectionRecoveryRequest, ConnectionRecoveryResult, ConnectionRequest, ConnectionUsageReport, ConstalApiApplyRequest, ConstalApiChangePlan, ConstalApiChangePlanRef, ConstalApiChangePlanRequest, ConstalApiChangeReceipt, ConstalApiOperationReceipt, ContainerImageReference, ContainerImageSelection, ContainerImageSource, ContainerRegistryRequest, ContainerRegistryResponse, ControlEvent, Cost, CreateSandboxImageOptions, CreateSandboxOptions, CredentialCRN, CredentialDestroyResult, CredentialEvidence, CredentialInteractionAction, CredentialInteractionAdvanceRequest, CredentialInteractionEvent, CredentialInteractionPrimaryAction, CredentialInteractionProof, CredentialInteractionResult, CredentialInteractionStartRequest, CredentialMaterialRequest, CredentialMintRequest, CredentialMintResult, CredentialProviderCRN, CredentialProviderContext, CredentialProviderCredentialSlotSetup, CredentialProviderDefinition, CredentialProviderPackage, CredentialProviderPackageMetadata, CredentialProviderSecretInput, CredentialProviderSetupMetadata, CredentialSetupState, CredentialUninstallRequest, CredentialUninstallResult, CredentialVerifyResult, Ctx, CustomerTenantCRN, DataManifest, DatasetCRN, DatasetDraft, DatasetRef, DelegatedGrant, DelegationCeiling, DeliveryMode, DeliveryReceipt, DispatchResult, EffectClass, EvalComparison, EvalDivergence, EvalMode, EvalSubject, EvalSubjectSource, EvaluationAnswer, EvaluationAnswerFor, EvaluationAnswers, EvaluationEntry, EvaluationInvocationArgs, EvaluationInvocationResult, EvaluationProtocol, EvaluationQuestion, EvaluationQuestions, EvaluationRecord, EvaluationSpec, EventBase, Fact, FactRef, FileEntry, FixedMemoryStoreRef, FixedModelGatewayRef, FoldFn, GateEvidence, GateResult, GateVerdict, GatewayCancelRequest, GatewayConfigEgressBinding, GatewayContext, GatewayCredentialSlotSetup, GatewayDefinition, GatewayDiscoverySetup, GatewayModelOffer, GatewayOperation, GatewayPackage, GatewayPackageMetadata, GatewayRecoveryRequest, GatewayRecoveryResult, GatewayRequest, GovernanceContractRef, Handle, HandleOutcome, Hash, HistoryView, HmacVerification, IgnoredChannelEvent, IngressRequest, IngressTarget, IntegrationArtifactEgressRequest, IntegrationArtifactEgressResponse, IntegrationAttachment, IntegrationContext, IntegrationEgressPolicy, IntegrationEgressRequest, IntegrationEgressResponse, IntegrationEgressRule, IntegrationLifecycle, IntegrationReleaseContext, IntegrationSecret, IntegrationState, InvocationCredentialUse, InvocationHandle, InvokableKind, InvokeOpts, JoinOutcome, JsonScalar, JsonValue, LabelRequest, LabelSelector, LabelSelectorOperator, LabelSelectorRequirement, LedgerAddress, LedgerAddressParts, LedgerEvent, ListSchedulesOptions, LoadedSkill, LocalResourceRef, ManifestIndexPage, MapFact, MapOpts, McpClientOptions, McpClientState, McpMessageTransport, MemoryDeleteArgs, MemoryGetArgs, MemoryRecord, MemoryRememberArgs, MemorySearchArgs, MemorySearchHit, MemoryStoreBinding, Mode, ModelAdvertisedPricing, ModelCacheHint, ModelCompletion, ModelCredentialHeader, ModelGatewayBinding, ModelGatewayConfig, ModelGatewayProtocol, ModelGenerationOptions, ModelGovernanceControls, ModelGovernanceMeter, ModelHistoryMessage, ModelHistoryToolCall, ModelInvocationArgs, ModelInvocationResult, ModelProtocolRequestOptions, ModelTechnicalCapabilities, ModelTool, NormalizedModelGatewayConfig, NoulAnswer, NoulQuestion, Out, Over, PartitionFn, PartitionSpec, Partitioning, PolicyCRN, PolicyConstraint, PolicyContextValue, PolicyDefinition, PolicyInput, PolicyInvocationOrigin, PolicyOutcome, Principal, PrincipalKind, Provenance, RawModelProtocol, Recovery, ReduceFact, ReduceOpts, Ref, RequestLabelRequest, ResourceContractRef, ResourceControlsConstraint, ResourceCredentialBinding, ResourceDependencyRef, ResourceKind, ResourceName, ResourceNameParts, ResourceNeed, ResourcePattern, ResourceSelector, RollbackReport, RunIdentityView, RunInfo, RunReport, RunStatusDetail, RunSuiteRequest, Sandbox, SandboxCommandCollectionError, SandboxCommandExecution, SandboxCommandResult, SandboxEgressCredentialRule, SandboxEgressPolicy, SandboxEgressRule, SandboxExecInput, SandboxFileResult, SandboxGovernanceControls, SandboxGovernanceMeter, SandboxImage, SandboxLabels, SandboxMutationResult, SandboxNetworkMode, SandboxNetworkPolicy, SandboxPool, SandboxProcess, SandboxProcessCredentials, SandboxProcessIoOperation, SandboxProcessOperation, SandboxProcessReadInput, SandboxProcessReadResult, SandboxProcessStatus, SandboxProcessWriteResult, SandboxReadFileOptions, SandboxReadFileResult, SandboxWorkspace, SandboxWriteFileResult, Schedule, ScheduleCancellation, ScheduleDuration, ScheduleMissed, ScheduleOccurrence, ScheduleOccurrencePage, ScheduleOptions, SchedulePage, ScheduleState, ScheduleTarget, ScheduleTiming, ScheduleTrigger, ScheduleWhen, ScopedBindingKey, ScopedCredentialRef, ScopedMemoryStoreRef, ScopedModelGatewayRef, ScopedResourceRef, ScoreAnswer, ScoreQuestion, ScoreRequest, ScorerApplies, ScorerCRN, ScorerDef, ScorerEvaluation, ScorerKind, ScorerRef, ScorerVerdictIntent, SetEvalBaselineRequest, SetupAction, SetupCredentialCandidate, SetupCredentialInteractionPanel, SetupCredentialReceipt, SetupFormPanel, SetupPanel, SetupProgressPanel, SetupReviewPanel, SetupScreen, SetupStepStatus, SetupStepSummary, SetupSubmission, SetupTerminalPanel, SetupWorkflowStatus, Skill, SkillDescription, SkillLibrary, SkillSource, SortField, SpawnAttenuation, SpawnBudget, SpawnHandle, SpawnOpts, SqlFold, StageInfo, StageOutputSpec, StartTrainingRequest, SteerEvent, SuiteFact, TableAggregate, TableDescribeArgs, TableFilter, TableFilterOperation, TableOrder, TableQueryArgs, TableQueryPlan, TableQueryResult, TableScalar, TableSnapshotDescription, Task, Tier, Tool, ToolCallRecord, TrainingJobFact, TrainingJobReference, TrainingJobState, TrainingJobStatus, TrainingMethod, TrainingModelOffer, TrainingProviderDefinition, TrainingProviderMetadata, TrainingProviderPin, TrainingRecipe, TrainingResumePoint, TrainingUsageUnits, TurnDraft, TurnGate, TurnHistoryMessage, TurnRecord, TurnSpec, UiAccess, UiBundle, UiBundleManifest, UiCRN, UiCapability, UiExecution, UiGovernanceMeter, UiHandler, UiResource, UiRuntimeContext, UiSource, UiSqlResult, UiState, UpstreamPayer, Verdict, VerdictSamplingMode, ViewDef, WaitResolvedEvent };
5350
+ export { AGENT_UI_DEFAULTS, AfterYield, ApiError, CHAT_FORMAT_CAPABILITY, CONSTAL_API_CAPABILITY, CONSTAL_API_GET_KINDS, CONSTAL_API_MODEL_TOOL_DESCRIPTIONS, CONSTAL_API_OPERATIONS, CONSTAL_API_OPERATION_SCHEMAS, CONSTAL_API_QUERY_KINDS, CONSTAL_API_VERSION, CommitConflict, CommitGateRejected, CredentialRevoked, CredentialUnavailable, DATA_SHARE_FEE_BPS, DirectNetworkDenied, EVALUATION_LIMITS, EffectCeilingExceeded, EmptyJoin, GateExhausted, IntegrationRequestNotSent, LeaseLost, MCP_CLIENT_CAPABILITY, MCP_PROTOCOL_VERSION, MEMORY_OPERATION_DECLARATIONS, MODEL_CHECKPOINT_IMPORT_CAPABILITY, MODEL_COMPLETION_CAPABILITY, MODEL_EVALUATION_CAPABILITY, McpClient, NondeterministicReplay, NotAppendOnly, OutcomeUnknown, PolicyConstraintFailed, PolicyDecisionFailed, RESOURCE_CREDENTIAL_BINDING_SCHEMA, RESOURCE_KINDS, ResourceDisabled, ResourceInvalid, ResourceUnbound, RollbackTargetInvalid, SANDBOX_EGRESS_LIMITS, SessionDeleted, SpawnCardinality, SwallowedYield, TRAINING_PROVIDER_CAPABILITY, TRAINING_RECIPE_DEFAULTS, TerminalIntegrationFailure, ToolUnavailable, UI_ASSET_CONTENT_TYPES, UI_BUNDLE_BOUNDS, UnknownTool, WEB_FETCH_ARGUMENT_SCHEMA, WEB_SEARCH_ARGUMENT_SCHEMA, action, actionPattern, agent, agentLimit, agentResourceBinding, agentSetupMetadata, agentSetupRequirements, agentUiBundleManifest, agentUiDeclaration, all, analyticsEvent, approximateTokens, authProvider, authProviderName, bindingName, bucketFor, canonicalJson, capabilityContractRef, casTool, channel, channelIngressRequest, channelIngressSource, channelSourceEvidence, channelSubscriptionRequest, channelTarget, chatFormat, chatFormatMetadata, chatFormatPin, chatParseInput, chatParsed, chatRenderInput, chatRenderRequest, chatRendering, checkpointArtifactRef, checkpointDeploymentRequest, checkpointImportMetadata, checkpointImportRequest, codeScorerIR, containerImageReference, containerImageSelection, containerImageSource, credentialEvidence, credentialInteractionAction, credentialInteractionEvent, credentialInteractionResult, credentialName, credentialProvider, credentialProviderConfigSchema, credentialProviderName, credentialProviderSetupMetadata, credentialRotationDefaults, credentialSetupState, customerTenantName, cutBatches, cutPartitions, dataShareEarningMicroUsd, datasetName, evaluateCodeScorer, evaluatePolicyDefinition, evaluationArguments, evaluationProtocolRequest, evaluationProtocolResult, formatLedgerAddress, gateway, gatewayModelOffer, gatewayPackageMetadata, hash, hashValue, immutableContainerImageReference, integrationEgressPolicy, invocationCredentialUses, labelSelector, matchesAction, matchesLabelSelector, matchesResource, mcpToolDescription, mcpToolResult, memoryStoreBinding, modelAdvertisedPricing, modelControls, modelGatewayBinding, modelGatewayEndpoint, modelGenerationOptions, modelLimit, modelMessages, modelPrompt, modelProtocolRequest, modelProtocolResult, murmur3_32, normalizeModelGatewayConfig, normalizeSandboxEgressCredentialRules, normalizeSandboxEgressPolicy, normalizeSandboxLabels, normalizeSandboxNetworkPolicy, normalizeSandboxWorkspacePath, noulDecision, opTool, opTools, parseLedgerAddress, parseResourceName, policy, policyName, race, resolveBindingOwner, resolveContainerImageSource, resolveGatewayEgress, resolveResourceDependencyRef, resourceContractRef, resourceCredentialBinding, resourceDependencyRef, resourceLabelMap, resourceName, resourceNeed, resourcePattern, resourceSelector, resourceTools, runLabels, sandboxControls, sandboxEgressDecision, sandboxEgressHostMatches, sandboxLimit, scopedBindingKey, scopedCredentialRef, scopedResourceRef, scoreLevel, scorerName, select, selectableResourceLabels, setupAwait, setupCredentialReceipt, setupPanelProviderIsCrn, setupScreen, setupScreenView, setupSubmission, sha256Hex, shareContributionRequest, shareContributionReview, shareEvaluation, sharePrices, shareRequest, skills, stageOutput, startTrainingRequest, subtask, tableDescribe, tableQuery, trainingCorrection, trainingProvider, trainingProviderMetadata, trainingRecipe, uiAssetContentType, uiBundle, uiBundleManifest, uiLimit, uiName, validateBatchSpec, validateFoldFn, validateJsonSchema, validateJsonSchemaDefinition, validatePartitionFn, validatePartitionSpec, validateStageOutputSpec, validateTool, validateView, webFetch, webSearch };
5351
+ export type { Action, ActionPattern, Actor, AdmissionLimitConstraint, AdmissionLimitInput, AdmissionLimitScope, AdmissionLimitWindow, Agent, AgentCredentialSetupRequirement, AgentDef, AgentDeployPolicy, AgentGovernanceMeter, AgentSetupMetadata, AgentSetupRequirement, AgentSetupWorkflow, AgentUiDeclaration, AnalyticsClient, AnalyticsDimensionValue, AnalyticsEventDefinition, AnalyticsIntent, AnalyticsValues, AuthProvider, AuthProviderCRN, AuthProviderContext, AuthProviderRequest, AuthProviderResult, AwaitOpts, AwaitPresentation, BatchSpec, BindingCRN, BindingOwnerContext, BindingOwnerScope, BoundOperation, BoundResourceCapabilities, BranchRef, CRN, CRNKind, CanonicalEvent, CanonicalEventDraft, CapabilityContractRef, CapabilityGrant, CapabilityRef, CaptureCaseRequest, CaseRow, CatalogTool, Channel, ChannelContext, ChannelDeliveryError, ChannelDeliveryEvent, ChannelDeliveryOutcome, ChannelDeliveryReport, ChannelFailure, ChannelIngressEvent, ChannelIngressSource, ChannelMessage, ChannelProtocol, ChannelReceiveResult, ChannelRequest, ChannelResponse, ChannelSourceEvidence, ChannelSubscriptionRequest, ChannelTarget, ChatFormatDefinition, ChatFormatMetadata, ChatFormatPin, ChatMessage, ChatParseRequest, ChatParsed, ChatRenderRequest, ChatRendering, ChatSpan, ChatTool, CheckpointDeploymentRequest, CheckpointImportMetadata, CheckpointImportRequest, ChoiceAnswer, ChoiceQuestion, CodeScoreResult, CodeScorerIR, CodeScorerRule, CommitOpts, CompareSuitesRequest, Compensation, ConnectionCancelRequest, ConnectionIdentity, ConnectionOperation, ConnectionRecoveryRequest, ConnectionRecoveryResult, ConnectionRequest, ConnectionUsageReport, ConstalApiApplyRequest, ConstalApiChangePlan, ConstalApiChangePlanRef, ConstalApiChangePlanRequest, ConstalApiChangeReceipt, ConstalApiOperationReceipt, ContainerImageReference, ContainerImageSelection, ContainerImageSource, ContainerRegistryRequest, ContainerRegistryResponse, ControlEvent, Cost, CreateSandboxImageOptions, CreateSandboxOptions, CredentialCRN, CredentialDestroyResult, CredentialEvidence, CredentialInteractionAction, CredentialInteractionAdvanceRequest, CredentialInteractionEvent, CredentialInteractionPrimaryAction, CredentialInteractionProof, CredentialInteractionResult, CredentialInteractionStartRequest, CredentialMaterialRequest, CredentialMintRequest, CredentialMintResult, CredentialProviderCRN, CredentialProviderContext, CredentialProviderCredentialSlotSetup, CredentialProviderDefinition, CredentialProviderPackage, CredentialProviderPackageMetadata, CredentialProviderSecretInput, CredentialProviderSetupMetadata, CredentialSetupState, CredentialUninstallRequest, CredentialUninstallResult, CredentialVerifyResult, Ctx, CustomerTenantCRN, DataManifest, DataSharingScope, DatasetCRN, DatasetDraft, DatasetRef, DelegatedGrant, DelegationCeiling, DeliveryMode, DeliveryReceipt, DispatchResult, EffectClass, EvalComparison, EvalDivergence, EvalMode, EvalSubject, EvalSubjectSource, EvaluationAnswer, EvaluationAnswerFor, EvaluationAnswers, EvaluationEntry, EvaluationInvocationArgs, EvaluationInvocationResult, EvaluationProtocol, EvaluationQuestion, EvaluationQuestions, EvaluationRecord, EvaluationSpec, EventBase, Fact, FactRef, FileEntry, FixedMemoryStoreRef, FixedModelGatewayRef, FoldFn, GateEvidence, GateResult, GateVerdict, GatewayCancelRequest, GatewayConfigEgressBinding, GatewayContext, GatewayCredentialSlotSetup, GatewayDefinition, GatewayDiscoverySetup, GatewayModelOffer, GatewayOperation, GatewayPackage, GatewayPackageMetadata, GatewayRecoveryRequest, GatewayRecoveryResult, GatewayRequest, GovernanceContractRef, Handle, HandleOutcome, Hash, HistoryPage, HistoryView, HmacVerification, IgnoredChannelEvent, IngressRequest, IngressTarget, IntegrationArtifactEgressRequest, IntegrationArtifactEgressResponse, IntegrationAttachment, IntegrationContext, IntegrationEgressPolicy, IntegrationEgressRequest, IntegrationEgressResponse, IntegrationEgressRule, IntegrationLifecycle, IntegrationReleaseContext, IntegrationSecret, IntegrationState, InvocationCredentialUse, InvocationHandle, InvokableKind, InvokeOpts, JoinOutcome, JsonScalar, JsonValue, LabelRequest, LabelSelector, LabelSelectorOperator, LabelSelectorRequirement, LedgerAddress, LedgerAddressParts, LedgerEvent, ListSchedulesOptions, LoadedSkill, LocalResourceRef, ManifestIndexPage, MapFact, MapOpts, McpClientOptions, McpClientState, McpMessageTransport, MemoryDeleteArgs, MemoryGetArgs, MemoryRecord, MemoryRememberArgs, MemorySearchArgs, MemorySearchHit, MemoryStoreBinding, Mode, ModelAdvertisedPricing, ModelCacheHint, ModelCompletion, ModelCredentialHeader, ModelGatewayBinding, ModelGatewayConfig, ModelGatewayProtocol, ModelGenerationOptions, ModelGovernanceControls, ModelGovernanceMeter, ModelHistoryMessage, ModelHistoryToolCall, ModelInvocationArgs, ModelInvocationResult, ModelProtocolRequestOptions, ModelTechnicalCapabilities, ModelTool, NormalizedModelGatewayConfig, NoulAnswer, NoulQuestion, Out, Over, PartitionFn, PartitionSpec, Partitioning, PolicyCRN, PolicyConstraint, PolicyContextValue, PolicyDefinition, PolicyInput, PolicyInvocationOrigin, PolicyOutcome, Principal, PrincipalKind, Provenance, RawModelProtocol, Recovery, ReduceFact, ReduceOpts, Ref, RequestLabelRequest, ResourceContractRef, ResourceControlsConstraint, ResourceCredentialBinding, ResourceDependencyRef, ResourceKind, ResourceName, ResourceNameParts, ResourceNeed, ResourcePattern, ResourceSelector, RollbackReport, RunIdentityView, RunInfo, RunReport, RunStatusDetail, RunSuiteRequest, Sandbox, SandboxCommandCollectionError, SandboxCommandExecution, SandboxCommandResult, SandboxEgressCredentialRule, SandboxEgressPolicy, SandboxEgressRule, SandboxExecInput, SandboxFileResult, SandboxGovernanceControls, SandboxGovernanceMeter, SandboxImage, SandboxLabels, SandboxMutationResult, SandboxNetworkMode, SandboxNetworkPolicy, SandboxPool, SandboxProcess, SandboxProcessCredentials, SandboxProcessIoOperation, SandboxProcessOperation, SandboxProcessReadInput, SandboxProcessReadResult, SandboxProcessStatus, SandboxProcessWriteResult, SandboxReadFileOptions, SandboxReadFileResult, SandboxWorkspace, SandboxWriteFileResult, Schedule, ScheduleCancellation, ScheduleDuration, ScheduleMissed, ScheduleOccurrence, ScheduleOccurrencePage, ScheduleOptions, SchedulePage, ScheduleState, ScheduleTarget, ScheduleTiming, ScheduleTrigger, ScheduleWhen, ScopedBindingKey, ScopedCredentialRef, ScopedMemoryStoreRef, ScopedModelGatewayRef, ScopedResourceRef, ScoreAnswer, ScoreQuestion, ScoreRequest, ScorerApplies, ScorerCRN, ScorerDef, ScorerEvaluation, ScorerKind, ScorerRef, ScorerVerdictIntent, SetEvalBaselineRequest, SetupAction, SetupCredentialCandidate, SetupCredentialInteractionPanel, SetupCredentialReceipt, SetupFormPanel, SetupPanel, SetupProgressPanel, SetupReviewPanel, SetupScreen, SetupStepStatus, SetupStepSummary, SetupSubmission, SetupTerminalPanel, SetupWorkflowStatus, Share, ShareAction, ShareContribution, ShareContributionImport, ShareContributionRequest, ShareContributionReview, ShareContributionReviewRequest, ShareContributionStatus, ShareEvaluation, ShareEvaluationPin, ShareEvaluationRequest, ShareEvaluationVerdict, ShareEvaluationView, ShareHistory, SharePrice, ShareRequest, ShareReviewDecision, Skill, SkillDescription, SkillLibrary, SkillSource, SortField, SpawnAttenuation, SpawnBudget, SpawnHandle, SpawnOpts, SqlFold, StageInfo, StageOutputSpec, StartTrainingRequest, SteerEvent, StepJournal, SuiteFact, TableAggregate, TableDescribeArgs, TableFilter, TableFilterOperation, TableOrder, TableQueryArgs, TableQueryPlan, TableQueryResult, TableScalar, TableSnapshotDescription, Task, Tier, Tool, ToolCallRecord, TrainingCorrection, TrainingJobFact, TrainingJobReference, TrainingJobState, TrainingJobStatus, TrainingMethod, TrainingModelOffer, TrainingPreparation, TrainingProviderDefinition, TrainingProviderMetadata, TrainingProviderPin, TrainingRecipe, TrainingResumePoint, TrainingStep, TrainingUsageUnits, TurnDraft, TurnGate, TurnHistoryMessage, TurnRecord, TurnSpec, UiAccess, UiBundle, UiBundleManifest, UiCRN, UiCapability, UiExecution, UiGovernanceMeter, UiHandler, UiResource, UiRuntimeContext, UiSource, UiSqlResult, UiState, UpstreamPayer, Verdict, VerdictSamplingMode, ViewDef, WaitResolvedEvent };