@constal/sdk 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +4 -0
- package/package.json +7 -1
- package/publish/api.json +51 -2
- package/publish/chat-format.d.ts +172 -0
- package/publish/chat-format.js +5989 -0
- package/publish/index.d.ts +576 -167
- package/publish/index.js +1203 -759
package/publish/index.d.ts
CHANGED
|
@@ -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),
|
|
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
|
};
|
|
@@ -2915,6 +3109,21 @@ interface InvokeOpts {
|
|
|
2915
3109
|
dedupeKey?: string;
|
|
2916
3110
|
/** Invocation-local Credential selections. Material never enters Agent code. */
|
|
2917
3111
|
credentials?: Record<string, InvocationCredentialUse>;
|
|
3112
|
+
/**
|
|
3113
|
+
* How the platform answers the call. `"inline"`: wait for the outcome, up to the operation's own timeout, and answer it
|
|
3114
|
+
* in the same pass, so awaiting the result does not suspend the step. `"async"`: answer once the operation is admitted;
|
|
3115
|
+
* the outcome arrives through the Handle, as for a started or raced Handle.
|
|
3116
|
+
*
|
|
3117
|
+
* Omitted, the runtime decides. A synchronous operation (`invoke`, e.g. `readFile`/`writeFile`) waits inline; with
|
|
3118
|
+
* `"async"` it is answered once admitted, and when it has not finished by then the step suspends and resumes with its
|
|
3119
|
+
* result. An asynchronous one (`invokeAsync`, e.g. `exec`) waits inline when it is awaited
|
|
3120
|
+
* directly or only together with other invocations (`await h`, `Promise.all([h1, h2])`), and async when `start()` is
|
|
3121
|
+
* called before it is awaited or it is raced with a durable wait, spawn, approval or any other Handle.
|
|
3122
|
+
*
|
|
3123
|
+
* A transport hint, not part of the operation: it never changes the operation hash, the Handle id, the journal or the
|
|
3124
|
+
* result, and a platform without the sandbox fast path ignores it. Any other value is a TypeError.
|
|
3125
|
+
*/
|
|
3126
|
+
wait?: "inline" | "async";
|
|
2918
3127
|
}
|
|
2919
3128
|
interface CapabilityGrant {
|
|
2920
3129
|
actions: string[];
|
|
@@ -4204,6 +4413,183 @@ declare function policy(definition: PolicyDefinition): PolicyDefinition;
|
|
|
4204
4413
|
/** Runs and validates one Policy definition without creating a transport envelope. */
|
|
4205
4414
|
declare function evaluatePolicyDefinition(definition: PolicyDefinition, input: Readonly<PolicyInput>): Promise<PolicyOutcome>;
|
|
4206
4415
|
|
|
4416
|
+
/** Data sharing: which of a tenant's Runs may be shared, and the Shares that deliver them to partner organizations. */
|
|
4417
|
+
|
|
4418
|
+
/** A tenant's sharing scope over its Runs' labels: off shares nothing; on with no selector, every Run. */
|
|
4419
|
+
interface DataSharingScope {
|
|
4420
|
+
enabled: boolean;
|
|
4421
|
+
selector: LabelSelector | null;
|
|
4422
|
+
}
|
|
4423
|
+
type ShareAction = "read" | "evaluate" | "contribute";
|
|
4424
|
+
/** A price rule of a Share. Rules are ordered: a trace costs the first one its labels match, and nothing when none does. */
|
|
4425
|
+
interface SharePrice {
|
|
4426
|
+
selector: LabelSelector | null;
|
|
4427
|
+
microUsd: number;
|
|
4428
|
+
}
|
|
4429
|
+
/** A Resource version a Share's evaluation pins, by its id in the evaluation's namespace. */
|
|
4430
|
+
interface ShareEvaluationPin {
|
|
4431
|
+
id: string;
|
|
4432
|
+
version: string;
|
|
4433
|
+
hash: string;
|
|
4434
|
+
}
|
|
4435
|
+
/**
|
|
4436
|
+
* What the recipient's candidates are evaluated with on a Share that evaluates: the grantor's namespace, the Agent that takes
|
|
4437
|
+
* its `model` from a principal-scoped binding, the Dataset version and Scorers, and each evaluation's ceilings.
|
|
4438
|
+
*/
|
|
4439
|
+
interface ShareEvaluation {
|
|
4440
|
+
/** Fixed once set. */
|
|
4441
|
+
namespace: string;
|
|
4442
|
+
agent: string;
|
|
4443
|
+
dataset: ShareEvaluationPin;
|
|
4444
|
+
scorers: ShareEvaluationPin[];
|
|
4445
|
+
concurrency: number;
|
|
4446
|
+
budgetMicroUsd: number;
|
|
4447
|
+
}
|
|
4448
|
+
/**
|
|
4449
|
+
* What a recipient asks to evaluate under a Share: its model endpoint's base URL (the protocol's path is appended) and a key
|
|
4450
|
+
* it issued for it, which is sealed into a Credential on arrival. Budget and concurrency default to the Share's ceilings and
|
|
4451
|
+
* may not exceed them.
|
|
4452
|
+
*/
|
|
4453
|
+
interface ShareEvaluationRequest {
|
|
4454
|
+
id: string;
|
|
4455
|
+
candidate: {
|
|
4456
|
+
baseUrl: string;
|
|
4457
|
+
protocol: "openai" | "anthropic";
|
|
4458
|
+
model: string;
|
|
4459
|
+
key: string;
|
|
4460
|
+
};
|
|
4461
|
+
budgetMicroUsd?: number;
|
|
4462
|
+
concurrency?: number;
|
|
4463
|
+
}
|
|
4464
|
+
/** One case's verdict by one Scorer, as the recipient sees it: never the output, expected value or evidence. */
|
|
4465
|
+
interface ShareEvaluationVerdict {
|
|
4466
|
+
caseId: string;
|
|
4467
|
+
scorer: string;
|
|
4468
|
+
score: number | null;
|
|
4469
|
+
pass: boolean | null;
|
|
4470
|
+
}
|
|
4471
|
+
/**
|
|
4472
|
+
* An evaluation under a Share as either party reads it: its Suite's progress, and once it finished, each Scorer's aggregates
|
|
4473
|
+
* (keyed by Scorer id) and the cost the recipient paid. Budget and concurrency are null before the Suite starts.
|
|
4474
|
+
*/
|
|
4475
|
+
interface ShareEvaluationView {
|
|
4476
|
+
id: string;
|
|
4477
|
+
state: EvalSuiteJobState;
|
|
4478
|
+
total: number;
|
|
4479
|
+
completed: number;
|
|
4480
|
+
errored: number;
|
|
4481
|
+
budgetMicroUsd: number | null;
|
|
4482
|
+
concurrency: number | null;
|
|
4483
|
+
error: {
|
|
4484
|
+
code: string;
|
|
4485
|
+
message: string;
|
|
4486
|
+
} | null;
|
|
4487
|
+
result: {
|
|
4488
|
+
scores: Record<string, {
|
|
4489
|
+
mean: number;
|
|
4490
|
+
p50: number;
|
|
4491
|
+
p10: number;
|
|
4492
|
+
passRate: number | null;
|
|
4493
|
+
n: number;
|
|
4494
|
+
}>;
|
|
4495
|
+
cases: number;
|
|
4496
|
+
completed: number;
|
|
4497
|
+
errored: number;
|
|
4498
|
+
costMicroUsd: number;
|
|
4499
|
+
} | null;
|
|
4500
|
+
createdAt: number;
|
|
4501
|
+
updatedAt: number;
|
|
4502
|
+
/** One evaluation's read adds each case's verdicts once it finished. */
|
|
4503
|
+
verdicts?: ShareEvaluationVerdict[];
|
|
4504
|
+
}
|
|
4505
|
+
/** A grantor's grant of its matching Runs, delivered as cleaned traces into the recipient organization's namespace. */
|
|
4506
|
+
interface Share {
|
|
4507
|
+
id: string;
|
|
4508
|
+
/** The granting tenant, or null for Constal, which grants across every tenant that shares. */
|
|
4509
|
+
grantor: string | null;
|
|
4510
|
+
/** The recipient tenant and its namespace that receives the traces, both set when the invite is accepted. */
|
|
4511
|
+
recipient: string | null;
|
|
4512
|
+
namespace: string | null;
|
|
4513
|
+
displayName: string;
|
|
4514
|
+
/** Narrows each source's sharing scope; null delivers all of it. */
|
|
4515
|
+
selector: LabelSelector | null;
|
|
4516
|
+
actions: ShareAction[];
|
|
4517
|
+
prices: SharePrice[];
|
|
4518
|
+
/** Required when actions include evaluate; null otherwise. */
|
|
4519
|
+
evaluation: ShareEvaluation | null;
|
|
4520
|
+
expiresAt: number | null;
|
|
4521
|
+
status: "invited" | "active" | "revoked" | "expired";
|
|
4522
|
+
authorizationSeq: number;
|
|
4523
|
+
createdBy: string;
|
|
4524
|
+
createdAt: number;
|
|
4525
|
+
acceptedBy: string | null;
|
|
4526
|
+
acceptedAt: number | null;
|
|
4527
|
+
revokedAt: number | null;
|
|
4528
|
+
}
|
|
4529
|
+
/** The terms a grantor sets: all it chooses when creating a Share, those that change when updating one. */
|
|
4530
|
+
type ShareRequest = Partial<Pick<Share, "displayName" | "selector" | "actions" | "prices" | "evaluation" | "expiresAt">>;
|
|
4531
|
+
/** A Share's evaluation spec, checked: Resources named in its namespace, at most 32 Scorers, concurrency 1 to 32, a budget. */
|
|
4532
|
+
declare function shareEvaluation(value: unknown): ShareEvaluation;
|
|
4533
|
+
/** A Share's ordered price rules, at most 32, each a selector (null matches every trace) and a whole microUsd price. */
|
|
4534
|
+
declare function sharePrices(value: unknown): SharePrice[];
|
|
4535
|
+
/** Constal's fee on each priced trace a tenant's Share delivers, in basis points; the grantor earns the rest of the price. */
|
|
4536
|
+
declare const DATA_SHARE_FEE_BPS = 3000;
|
|
4537
|
+
/**
|
|
4538
|
+
* What a tenant grantor earns of a delivered trace's price: the price less Constal's fee, rounded down to the micro-USD, so
|
|
4539
|
+
* Constal keeps the remainder. A Share Constal grants earns no one anything.
|
|
4540
|
+
*/
|
|
4541
|
+
declare function dataShareEarningMicroUsd(priceMicroUsd: number): number;
|
|
4542
|
+
/** The Share terms a request sets, checked and canonical; any other field is refused. */
|
|
4543
|
+
declare function shareRequest(value: unknown): ShareRequest;
|
|
4544
|
+
type ShareContributionStatus = "submitted" | "changes-requested" | "accepted" | "rejected";
|
|
4545
|
+
type ShareReviewDecision = "accept" | "request-changes" | "reject";
|
|
4546
|
+
/** A contributed Dataset version and the version accepting it registered in the grantor's tenant. */
|
|
4547
|
+
interface ShareContributionImport {
|
|
4548
|
+
source: DatasetRef;
|
|
4549
|
+
target: DatasetRef;
|
|
4550
|
+
}
|
|
4551
|
+
/** The grantor's review of a contribution; an acceptance records what it imported, one for each contributed Dataset in order. */
|
|
4552
|
+
interface ShareContributionReview {
|
|
4553
|
+
decision: ShareReviewDecision;
|
|
4554
|
+
note: string;
|
|
4555
|
+
imported?: ShareContributionImport[];
|
|
4556
|
+
by: string;
|
|
4557
|
+
at: number;
|
|
4558
|
+
}
|
|
4559
|
+
/**
|
|
4560
|
+
* What a partner contributes back under a Share: Dataset versions of its own, evaluations it ran under the Share, and a note.
|
|
4561
|
+
* It is submitted, and revised while the grantor asks for changes; accepted and rejected are final.
|
|
4562
|
+
*/
|
|
4563
|
+
interface ShareContribution {
|
|
4564
|
+
id: string;
|
|
4565
|
+
share: string;
|
|
4566
|
+
datasets: DatasetRef[];
|
|
4567
|
+
evaluations: string[];
|
|
4568
|
+
note: string;
|
|
4569
|
+
status: ShareContributionStatus;
|
|
4570
|
+
review: ShareContributionReview | null;
|
|
4571
|
+
seq: number;
|
|
4572
|
+
createdBy: string;
|
|
4573
|
+
createdAt: number;
|
|
4574
|
+
updatedAt: number;
|
|
4575
|
+
}
|
|
4576
|
+
/** What a partner submits (an omitted field is empty), and each field a revision replaces. */
|
|
4577
|
+
type ShareContributionRequest = Partial<Pick<ShareContribution, "datasets" | "evaluations" | "note">>;
|
|
4578
|
+
/**
|
|
4579
|
+
* The grantor's review. Accepting registers each Dataset in `namespace` ("default" when omitted), under `targets[n]` for the
|
|
4580
|
+
* contribution's nth Dataset, or under the Dataset's own id when that is missing or null.
|
|
4581
|
+
*/
|
|
4582
|
+
interface ShareContributionReviewRequest {
|
|
4583
|
+
decision: ShareReviewDecision;
|
|
4584
|
+
note?: string;
|
|
4585
|
+
namespace?: string;
|
|
4586
|
+
targets?: (string | null)[];
|
|
4587
|
+
}
|
|
4588
|
+
/** The contribution fields a request sets, checked: at most 16 Dataset versions, at most 16 evaluation ids, and a note. */
|
|
4589
|
+
declare function shareContributionRequest(value: unknown): ShareContributionRequest;
|
|
4590
|
+
/** A review's decision and note, checked; only an accepting review names a namespace and targets. */
|
|
4591
|
+
declare function shareContributionReview(value: unknown): ShareContributionReviewRequest;
|
|
4592
|
+
|
|
4207
4593
|
/** RFC 8785-compatible canonical JSON for JSON-safe values. */
|
|
4208
4594
|
declare function canonicalJson(value: unknown): string;
|
|
4209
4595
|
declare function sha256Hex(bytes: string | ArrayBuffer | Uint8Array): Promise<string>;
|
|
@@ -4391,22 +4777,45 @@ interface MemoryRememberArgs {
|
|
|
4391
4777
|
id?: string;
|
|
4392
4778
|
content: string;
|
|
4393
4779
|
metadata?: Record<string, unknown>;
|
|
4394
|
-
/**
|
|
4780
|
+
/**
|
|
4781
|
+
* One level of the invocation's authenticated Memory partition. Each level has its own records and ids, and remember,
|
|
4782
|
+
* get, delete and search reach only that level; an omitted scope is the partition's unscoped level, and purge removes
|
|
4783
|
+
* every level. The caller chooses the scope: it subdivides the partition but is not an authority boundary.
|
|
4784
|
+
*/
|
|
4395
4785
|
scope?: string;
|
|
4396
4786
|
}
|
|
4787
|
+
/**
|
|
4788
|
+
* A search reads one level and sees every write to it that returned before the search started. A record whose remember
|
|
4789
|
+
* returned is a candidate, scored on its current content, until it is deleted or expires; it is returned when it ranks
|
|
4790
|
+
* within `limit` and passes the Memory's `minScore`. A record whose delete returned is never returned. No wait is needed.
|
|
4791
|
+
*/
|
|
4397
4792
|
interface MemorySearchArgs {
|
|
4398
4793
|
query: string;
|
|
4399
4794
|
limit?: number;
|
|
4400
|
-
/**
|
|
4795
|
+
/** The level to search; see {@link MemoryRememberArgs.scope}. */
|
|
4401
4796
|
scope?: string;
|
|
4797
|
+
/**
|
|
4798
|
+
* Only the records whose metadata holds each named top-level key with this value and JSON type (`true`, `1` and `"1"`
|
|
4799
|
+
* differ). A key that no record of the level has held a string, number or boolean under matches no record. A level can
|
|
4800
|
+
* filter on the first ten keys that held one; a search filtering on a later key is refused.
|
|
4801
|
+
*/
|
|
4802
|
+
filter?: Record<string, string | number | boolean>;
|
|
4402
4803
|
}
|
|
4403
4804
|
interface MemoryGetArgs {
|
|
4404
4805
|
id: string;
|
|
4806
|
+
/** The level that holds the record; see {@link MemoryRememberArgs.scope}. */
|
|
4807
|
+
scope?: string;
|
|
4405
4808
|
}
|
|
4406
4809
|
interface MemoryDeleteArgs {
|
|
4407
4810
|
id: string;
|
|
4811
|
+
/** The level that holds the record; see {@link MemoryRememberArgs.scope}. */
|
|
4812
|
+
scope?: string;
|
|
4408
4813
|
}
|
|
4409
4814
|
interface MemorySearchHit extends MemoryRecord {
|
|
4815
|
+
/**
|
|
4816
|
+
* In semantic mode, the record's similarity to the query, in [0, 1]. In hybrid mode, its fused rank divided by the
|
|
4817
|
+
* fused rank of a record first in both rankings, in (0, 1].
|
|
4818
|
+
*/
|
|
4410
4819
|
score: number;
|
|
4411
4820
|
}
|
|
4412
4821
|
/** The stable Agent-facing contract shared by logical Memories and Memory Store Connections. */
|
|
@@ -4870,5 +5279,5 @@ declare function parseLedgerAddress(value: unknown): LedgerAddressParts | null;
|
|
|
4870
5279
|
/** Formats ledger address parts; throws when a part breaks its id rule. */
|
|
4871
5280
|
declare function formatLedgerAddress(parts: LedgerAddressParts): LedgerAddress;
|
|
4872
5281
|
|
|
4873
|
-
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,
|
|
4874
|
-
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 };
|
|
5282
|
+
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 };
|
|
5283
|
+
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, 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, SharePrice, ShareRequest, ShareReviewDecision, 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, 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 };
|