@constal/sdk 6.1.0 → 6.2.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/package.json +1 -1
- package/publish/api.json +10 -1
- package/publish/index.d.ts +93 -11
- package/publish/index.js +84 -18
package/package.json
CHANGED
package/publish/api.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@constal/sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"exports": [
|
|
5
5
|
"AGENT_UI_DEFAULTS",
|
|
6
6
|
"Action",
|
|
@@ -170,6 +170,11 @@
|
|
|
170
170
|
"EvalMode",
|
|
171
171
|
"EvalSubject",
|
|
172
172
|
"EvalSubjectSource",
|
|
173
|
+
"EvalSuiteCase",
|
|
174
|
+
"EvalSuiteCasePage",
|
|
175
|
+
"EvalSuiteCaseScore",
|
|
176
|
+
"EvalSuiteCaseState",
|
|
177
|
+
"EvalSuiteScoreState",
|
|
173
178
|
"EvaluationAnswer",
|
|
174
179
|
"EvaluationAnswerFor",
|
|
175
180
|
"EvaluationAnswers",
|
|
@@ -235,6 +240,7 @@
|
|
|
235
240
|
"JoinOutcome",
|
|
236
241
|
"JsonScalar",
|
|
237
242
|
"JsonValue",
|
|
243
|
+
"JudgeRubric",
|
|
238
244
|
"LabelRequest",
|
|
239
245
|
"LabelSelector",
|
|
240
246
|
"LabelSelectorOperator",
|
|
@@ -389,6 +395,7 @@
|
|
|
389
395
|
"ScorerApplies",
|
|
390
396
|
"ScorerCRN",
|
|
391
397
|
"ScorerDef",
|
|
398
|
+
"ScorerDraft",
|
|
392
399
|
"ScorerEvaluation",
|
|
393
400
|
"ScorerKind",
|
|
394
401
|
"ScorerRef",
|
|
@@ -576,6 +583,7 @@
|
|
|
576
583
|
"immutableContainerImageReference",
|
|
577
584
|
"integrationEgressPolicy",
|
|
578
585
|
"invocationCredentialUses",
|
|
586
|
+
"judgeAgent",
|
|
579
587
|
"labelSelector",
|
|
580
588
|
"matchesAction",
|
|
581
589
|
"matchesLabelSelector",
|
|
@@ -630,6 +638,7 @@
|
|
|
630
638
|
"scopedCredentialRef",
|
|
631
639
|
"scopedResourceRef",
|
|
632
640
|
"scoreLevel",
|
|
641
|
+
"scorerDraftHash",
|
|
633
642
|
"scorerName",
|
|
634
643
|
"select",
|
|
635
644
|
"selectableResourceLabels",
|
package/publish/index.d.ts
CHANGED
|
@@ -405,7 +405,8 @@ declare function integrationEgressPolicy(value: unknown): IntegrationEgressPolic
|
|
|
405
405
|
|
|
406
406
|
type ScorerKind = "code" | "judge" | "human";
|
|
407
407
|
type ScorerApplies = "turn" | "reply" | "fact" | "trajectory" | "case";
|
|
408
|
-
|
|
408
|
+
/** `recorded` judges each case's captured Run as it ran, without running the Agent. */
|
|
409
|
+
type EvalMode = "fresh" | "replay" | "shadow" | "recorded";
|
|
409
410
|
type VerdictSamplingMode = "gate" | "sample" | "suite" | "label";
|
|
410
411
|
interface ScorerRef {
|
|
411
412
|
crn: ScorerCRN;
|
|
@@ -473,9 +474,10 @@ interface JudgeScorerDefinition {
|
|
|
473
474
|
}
|
|
474
475
|
interface HumanScorerDefinition {
|
|
475
476
|
kind: "human";
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
/** The Channel that also sends each labeling request; null for a Scorer labeled only in the Console Inbox. */
|
|
478
|
+
channel: CRN | null;
|
|
479
|
+
/** Immutable Channel Resource version used to route the labeling wait; null exactly when `channel` is. */
|
|
480
|
+
channelResourceHash: Hash | null;
|
|
479
481
|
schema: object;
|
|
480
482
|
instructionsRef: Ref;
|
|
481
483
|
}
|
|
@@ -488,6 +490,21 @@ interface ScorerDef {
|
|
|
488
490
|
judge?: Omit<JudgeScorerDefinition, "kind">;
|
|
489
491
|
human?: Omit<HumanScorerDefinition, "kind">;
|
|
490
492
|
}
|
|
493
|
+
/** An unsaved code or Judge Scorer: a Scorer definition without its id and version, tested by a recorded Suite. */
|
|
494
|
+
type ScorerDraft = {
|
|
495
|
+
kind: "code";
|
|
496
|
+
applies: ScorerApplies;
|
|
497
|
+
code: Omit<CodeScorerDefinition, "kind">;
|
|
498
|
+
} | {
|
|
499
|
+
kind: "judge";
|
|
500
|
+
applies: ScorerApplies;
|
|
501
|
+
judge: Omit<JudgeScorerDefinition, "kind">;
|
|
502
|
+
};
|
|
503
|
+
/**
|
|
504
|
+
* The hash of what a Scorer judges with: its definition without its id and version. A draft's hash equals the hash of the
|
|
505
|
+
* Scorer saved from it, so a saved Scorer can be shown to be the draft that was tested.
|
|
506
|
+
*/
|
|
507
|
+
declare function scorerDraftHash(definition: ScorerDraft | ScorerDef): Promise<Hash>;
|
|
491
508
|
interface CaseRow {
|
|
492
509
|
caseId: string;
|
|
493
510
|
input: unknown;
|
|
@@ -565,6 +582,8 @@ interface LabelRequest {
|
|
|
565
582
|
subject: EvalSubject;
|
|
566
583
|
scorer: ScorerRef;
|
|
567
584
|
value: unknown;
|
|
585
|
+
/** The answer the labeling form started from, recorded with the label: its evidence is then `{ answer, suggested }`. */
|
|
586
|
+
suggested?: unknown;
|
|
568
587
|
}
|
|
569
588
|
interface RequestLabelRequest {
|
|
570
589
|
/** Caller-stable identity used for the durable wait and idempotent verdict. */
|
|
@@ -572,6 +591,8 @@ interface RequestLabelRequest {
|
|
|
572
591
|
source: EvalSubjectSource;
|
|
573
592
|
subject: EvalSubject;
|
|
574
593
|
scorer: ScorerRef;
|
|
594
|
+
/** A schema-valid answer the labeling form starts from, for example a Judge's `{ score, pass }`. */
|
|
595
|
+
suggested?: unknown;
|
|
575
596
|
timeoutMs?: number;
|
|
576
597
|
}
|
|
577
598
|
interface SuiteFact {
|
|
@@ -649,6 +670,43 @@ interface RunSuiteRequest {
|
|
|
649
670
|
judge: ScorerRef;
|
|
650
671
|
tolerance: number;
|
|
651
672
|
};
|
|
673
|
+
/** Recorded-only: an unsaved Scorer judged with the Suite's Scorers and never recorded; not combined with `calibration`. */
|
|
674
|
+
draft?: ScorerDraft;
|
|
675
|
+
}
|
|
676
|
+
type EvalSuiteCaseState = "pending" | "running" | "scoring" | "completed" | "failed";
|
|
677
|
+
type EvalSuiteScoreState = "pending" | "running" | "completed" | "failed";
|
|
678
|
+
/** One Scorer's result on one judged subject of a Suite. */
|
|
679
|
+
interface EvalSuiteCaseScore {
|
|
680
|
+
/** The saved Scorer's CRN, or `draft:<scorerDraftHash>` for the Suite's draft. */
|
|
681
|
+
scorer: ScorerCRN | `draft:${Hash}`;
|
|
682
|
+
status: EvalSuiteScoreState;
|
|
683
|
+
evaluation: ScorerEvaluation | null;
|
|
684
|
+
error: {
|
|
685
|
+
code: string;
|
|
686
|
+
message: string;
|
|
687
|
+
} | null;
|
|
688
|
+
}
|
|
689
|
+
/** One judged subject of a Suite: a case, or one turn of a recorded Suite's case, and each Scorer's result on it. */
|
|
690
|
+
interface EvalSuiteCase {
|
|
691
|
+
/** The case id, or `<caseId>/<turnPos>` for one turn of a recorded case. */
|
|
692
|
+
case: string;
|
|
693
|
+
/** The Run judged: the Suite's own Run of the case, or the captured Run of a recorded case; null before one exists. */
|
|
694
|
+
source: {
|
|
695
|
+
session: string;
|
|
696
|
+
run: string;
|
|
697
|
+
turn: Hash | null;
|
|
698
|
+
} | null;
|
|
699
|
+
status: EvalSuiteCaseState;
|
|
700
|
+
error: {
|
|
701
|
+
code: string;
|
|
702
|
+
message: string;
|
|
703
|
+
} | null;
|
|
704
|
+
scores: EvalSuiteCaseScore[];
|
|
705
|
+
}
|
|
706
|
+
/** A page of a Suite's judged subjects in case order; `next` continues it. */
|
|
707
|
+
interface EvalSuiteCasePage {
|
|
708
|
+
data: EvalSuiteCase[];
|
|
709
|
+
next: string | null;
|
|
652
710
|
}
|
|
653
711
|
interface JudgeCalibration {
|
|
654
712
|
judge: ScorerRef;
|
|
@@ -3935,8 +3993,8 @@ interface ConstalApiError {
|
|
|
3935
3993
|
* management Resource. Keep authorization-only CRN families such as ledger,
|
|
3936
3994
|
* table, and artifact out of this model-facing inventory contract.
|
|
3937
3995
|
*/
|
|
3938
|
-
declare const CONSTAL_API_QUERY_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", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
3939
|
-
declare const CONSTAL_API_GET_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", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
3996
|
+
declare const CONSTAL_API_QUERY_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", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "failure-group", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
3997
|
+
declare const CONSTAL_API_GET_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", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "failure-group", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
3940
3998
|
declare const CONSTAL_API_MODEL_TOOL_DESCRIPTIONS: {
|
|
3941
3999
|
readonly query: "Query authorized Constal objects with bounded pagination and evidence. Select the exact lower-case singular kind from the schema enum; never pluralize, recase, or substitute an abstract kind. If context supplies platformToolContract.queryScope, copy it unchanged. Otherwise use only an exact namespace allowed by the delegated Run authority, and tenant scope only for an explicitly tenant-wide request. Use catalog-advertised fields and filters; constrained kinds require their advertised filter. Preserve next and evidence completeness.";
|
|
3942
4000
|
readonly get: "Retrieve one exact authorized Constal object or immutable revision. Pass a complete ref unchanged from query, relations, runtime inspection, or a governed receipt; never construct a kind, id, namespace, CRN, hash, or cursor from display text. The schema enum contains every supported addressable kind. For a Run, omit fields for complete diagnosis or request only documented top-level fields, and follow only the returned page cursor.";
|
|
@@ -3992,7 +4050,7 @@ declare const CONSTAL_API_OPERATION_SCHEMAS: {
|
|
|
3992
4050
|
readonly description: "Query one exact catalog kind. Kind ids are lower-case, singular, and must be selected from the enum; abstract names and pluralizations are invalid.";
|
|
3993
4051
|
readonly properties: {
|
|
3994
4052
|
readonly kind: {
|
|
3995
|
-
readonly enum: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
4053
|
+
readonly enum: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "failure-group", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
3996
4054
|
readonly description: "Exact queryable kind. Never guess a kind or change its casing.";
|
|
3997
4055
|
};
|
|
3998
4056
|
readonly scope: {
|
|
@@ -4097,7 +4155,7 @@ declare const CONSTAL_API_OPERATION_SCHEMAS: {
|
|
|
4097
4155
|
readonly additionalProperties: false;
|
|
4098
4156
|
readonly properties: {
|
|
4099
4157
|
readonly kind: {
|
|
4100
|
-
readonly enum: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
4158
|
+
readonly enum: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "failure-group", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
4101
4159
|
readonly description: "Exact lower-case object kind returned by a governed platform result.";
|
|
4102
4160
|
};
|
|
4103
4161
|
readonly id: {
|
|
@@ -4181,7 +4239,7 @@ declare const CONSTAL_API_OPERATION_SCHEMAS: {
|
|
|
4181
4239
|
readonly additionalProperties: false;
|
|
4182
4240
|
readonly properties: {
|
|
4183
4241
|
readonly kind: {
|
|
4184
|
-
readonly enum: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
4242
|
+
readonly enum: readonly ["agent", "channel", "ui", "auth-provider", "policy", "credential-provider", "credential", "tool", "scorer", "dataset", "model", "memory", "cas", "web", "service", "mcp", "db", "browser", "sandbox-pool", "vault", "analytics", "customer", "binding", "session", "run", "deployment", "documentation", "analytics-event", "namespace", "team-member", "team-invite", "api-key", "billing-account", "invoice", "subscription", "resource-contract", "dataset-draft", "dataset-case", "eval-score", "eval-sample", "eval-policy", "eval-suite", "eval-baseline", "eval-schedule", "failure-group", "training-job", "checkpoint", "training-provider", "training-model", "checkpoint-gateway", "credential-provider-package", "credential-consumer", "credential-use", "credential-event", "gateway-package", "rollout", "wait", "run-queue-item"];
|
|
4185
4243
|
readonly description: "Exact lower-case object kind returned by a governed platform result.";
|
|
4186
4244
|
};
|
|
4187
4245
|
readonly id: {
|
|
@@ -5211,6 +5269,30 @@ interface CodeScoreResult {
|
|
|
5211
5269
|
declare function codeScorerIR(value: unknown): CodeScorerIR;
|
|
5212
5270
|
declare function evaluateCodeScorer(raw: CodeScorerIR | unknown, subject: unknown): CodeScoreResult;
|
|
5213
5271
|
|
|
5272
|
+
/**
|
|
5273
|
+
* How a Judge judges a value. `instructions` says what a good value is. With `levels`, at least two and ordered from worst to
|
|
5274
|
+
* best, the Judge places the value on them; without levels it answers how likely the value meets the instructions. Each
|
|
5275
|
+
* dimension is judged the same way, on its own.
|
|
5276
|
+
*/
|
|
5277
|
+
interface JudgeRubric {
|
|
5278
|
+
instructions: EvaluationEntry;
|
|
5279
|
+
levels?: EvaluationEntry[];
|
|
5280
|
+
dimensions?: Record<string, {
|
|
5281
|
+
instructions: EvaluationEntry;
|
|
5282
|
+
levels?: EvaluationEntry[];
|
|
5283
|
+
}>;
|
|
5284
|
+
}
|
|
5285
|
+
/**
|
|
5286
|
+
* An Agent that judges with an evaluation Model, for a Judge Scorer whose rubric is a JudgeRubric. Bind its `model` to an
|
|
5287
|
+
* evaluation Model, such as `crn:constal:production:platform:default:model/jev`. Each Run evaluates the judged value against
|
|
5288
|
+
* the rubric and returns `{ score, dimensions, evidence }`: the score and each dimension on the Scorer's scale, and the
|
|
5289
|
+
* evaluation's answers as evidence. The Scorer's threshold decides its pass.
|
|
5290
|
+
*/
|
|
5291
|
+
declare function judgeAgent(input: {
|
|
5292
|
+
id: string;
|
|
5293
|
+
version: string;
|
|
5294
|
+
}): AgentDef;
|
|
5295
|
+
|
|
5214
5296
|
declare function validateJsonSchemaDefinition(schema: unknown, path?: string, depth?: number): string | null;
|
|
5215
5297
|
declare function validateJsonSchema(value: unknown, schema: unknown, path?: string): string | null;
|
|
5216
5298
|
|
|
@@ -5347,5 +5429,5 @@ declare function parseLedgerAddress(value: unknown): LedgerAddressParts | null;
|
|
|
5347
5429
|
/** Formats ledger address parts; throws when a part breaks its id rule. */
|
|
5348
5430
|
declare function formatLedgerAddress(parts: LedgerAddressParts): LedgerAddress;
|
|
5349
5431
|
|
|
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 };
|
|
5432
|
+
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, judgeAgent, 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, scorerDraftHash, 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 };
|
|
5433
|
+
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, EvalSuiteCase, EvalSuiteCasePage, EvalSuiteCaseScore, EvalSuiteCaseState, EvalSuiteScoreState, 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, JudgeRubric, 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, ScorerDraft, 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 };
|
package/publish/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function canonicalJson(value) {
|
|
|
81
81
|
if (typeof value === "string") return JSON.stringify(value);
|
|
82
82
|
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
|
83
83
|
if (typeof value === "object") {
|
|
84
|
-
const
|
|
85
|
-
return `{${Object.keys(
|
|
84
|
+
const record14 = value;
|
|
85
|
+
return `{${Object.keys(record14).sort().filter((key) => record14[key] !== void 0).map((key) => `${JSON.stringify(key)}:${canonicalJson(record14[key])}`).join(",")}}`;
|
|
86
86
|
}
|
|
87
87
|
throw new TypeError(`canonical JSON does not support ${typeof value}`);
|
|
88
88
|
}
|
|
@@ -408,21 +408,21 @@ function validateJsonSchema(value, schema, path = "$") {
|
|
|
408
408
|
if (typeof rule.multipleOf === "number" && Math.abs(value / rule.multipleOf - Math.round(value / rule.multipleOf)) > Number.EPSILON * 8) return `${path} is not a multiple`;
|
|
409
409
|
}
|
|
410
410
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
411
|
-
const
|
|
412
|
-
for (const key of Array.isArray(rule.required) ? rule.required : []) if (typeof key === "string" && !(key in
|
|
411
|
+
const record14 = value;
|
|
412
|
+
for (const key of Array.isArray(rule.required) ? rule.required : []) if (typeof key === "string" && !(key in record14)) return `${path}.${key} is required`;
|
|
413
413
|
const properties = rule.properties && typeof rule.properties === "object" && !Array.isArray(rule.properties) ? rule.properties : {};
|
|
414
|
-
if (typeof rule.minProperties === "number" && Object.keys(
|
|
415
|
-
if (typeof rule.maxProperties === "number" && Object.keys(
|
|
414
|
+
if (typeof rule.minProperties === "number" && Object.keys(record14).length < rule.minProperties) return `${path} has too few properties`;
|
|
415
|
+
if (typeof rule.maxProperties === "number" && Object.keys(record14).length > rule.maxProperties) return `${path} has too many properties`;
|
|
416
416
|
if (rule.additionalProperties === false) {
|
|
417
|
-
const extra = Object.keys(
|
|
417
|
+
const extra = Object.keys(record14).find((key) => !(key in properties));
|
|
418
418
|
if (extra) return `${path}.${extra} is not allowed`;
|
|
419
419
|
}
|
|
420
|
-
for (const [key, child] of Object.entries(properties)) if (key in
|
|
421
|
-
const error = validateJsonSchema(
|
|
420
|
+
for (const [key, child] of Object.entries(properties)) if (key in record14) {
|
|
421
|
+
const error = validateJsonSchema(record14[key], child, `${path}.${key}`);
|
|
422
422
|
if (error) return error;
|
|
423
423
|
}
|
|
424
|
-
if (rule.additionalProperties && typeof rule.additionalProperties === "object") for (const key of Object.keys(
|
|
425
|
-
const error = validateJsonSchema(
|
|
424
|
+
if (rule.additionalProperties && typeof rule.additionalProperties === "object") for (const key of Object.keys(record14).filter((candidate) => !(candidate in properties))) {
|
|
425
|
+
const error = validateJsonSchema(record14[key], rule.additionalProperties, `${path}.${key}`);
|
|
426
426
|
if (error) return error;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
@@ -1892,6 +1892,7 @@ var CONSTAL_API_QUERY_KINDS = [
|
|
|
1892
1892
|
"eval-suite",
|
|
1893
1893
|
"eval-baseline",
|
|
1894
1894
|
"eval-schedule",
|
|
1895
|
+
"failure-group",
|
|
1895
1896
|
"training-job",
|
|
1896
1897
|
"checkpoint",
|
|
1897
1898
|
"training-provider",
|
|
@@ -3031,9 +3032,9 @@ function modelHistoryMessages(value) {
|
|
|
3031
3032
|
if (!open2.done) throw new TypeError(`model history Tool call ${open2.value} has no tool message answering it before message ${index}`);
|
|
3032
3033
|
if (source.role === "user" || source.toolCalls === void 0) return { role: source.role, content: source.content };
|
|
3033
3034
|
if (!Array.isArray(source.toolCalls)) throw new TypeError(`${at} toolCalls must be an array`);
|
|
3034
|
-
const toolCalls = source.toolCalls.map((call,
|
|
3035
|
+
const toolCalls = source.toolCalls.map((call, position2) => {
|
|
3035
3036
|
const entry2 = record7(call);
|
|
3036
|
-
if (!entry2 || !nonempty(entry2.id) || !nonempty(entry2.name)) throw new TypeError(`${at} Tool call ${
|
|
3037
|
+
if (!entry2 || !nonempty(entry2.id) || !nonempty(entry2.name)) throw new TypeError(`${at} Tool call ${position2} needs an id and a name`);
|
|
3037
3038
|
if (ids.has(entry2.id)) throw new TypeError(`${at} repeats Tool call id ${entry2.id}`);
|
|
3038
3039
|
try {
|
|
3039
3040
|
canonicalJson(entry2.args);
|
|
@@ -3337,7 +3338,7 @@ function chatMessage(value, index) {
|
|
|
3337
3338
|
if (source.role === "user" && exactKeys3(source, ["role", "content"])) return source;
|
|
3338
3339
|
if (source.role === "tool" && typeof source.toolCallId === "string" && source.toolCallId && (source.isError === void 0 || typeof source.isError === "boolean") && exactKeys3(source, ["role", "toolCallId", "content"], ["isError"])) return source;
|
|
3339
3340
|
if (source.role === "assistant" && exactKeys3(source, ["role", "content"], ["toolCalls", "reasoning"]) && (source.reasoning === void 0 || typeof source.reasoning === "string") && (source.toolCalls === void 0 || Array.isArray(source.toolCalls))) {
|
|
3340
|
-
source.toolCalls?.forEach((call,
|
|
3341
|
+
source.toolCalls?.forEach((call, position2) => toolCall(call, `${field2} Tool call ${position2}`));
|
|
3341
3342
|
return source;
|
|
3342
3343
|
}
|
|
3343
3344
|
throw new TypeError(`${field2} is invalid`);
|
|
@@ -3353,8 +3354,8 @@ function chatRenderInput(value) {
|
|
|
3353
3354
|
if (!tool || typeof tool.name !== "string" || !tool.name || typeof tool.description !== "string" || !record8(tool.schema) || !jsonValue(tool.schema) || !exactKeys3(tool, ["name", "description", "schema"])) throw new TypeError(`chat Tool ${index} is invalid`);
|
|
3354
3355
|
});
|
|
3355
3356
|
if (source.toolChoice === "required" && source.tools.length === 0) throw new TypeError("required Tool choice needs at least one offered Tool");
|
|
3356
|
-
source.train.forEach((index,
|
|
3357
|
-
if (!Number.isSafeInteger(index) || index < 0 || index >= messages.length || messages[index].role !== "assistant" ||
|
|
3357
|
+
source.train.forEach((index, position2) => {
|
|
3358
|
+
if (!Number.isSafeInteger(index) || index < 0 || index >= messages.length || messages[index].role !== "assistant" || position2 > 0 && index <= source.train[position2 - 1]) {
|
|
3358
3359
|
throw new TypeError("chat render request trains only assistant messages, in ascending order");
|
|
3359
3360
|
}
|
|
3360
3361
|
});
|
|
@@ -4883,11 +4884,74 @@ function evaluateCodeScorer(raw, subject) {
|
|
|
4883
4884
|
};
|
|
4884
4885
|
}
|
|
4885
4886
|
|
|
4887
|
+
// packages/sdk/src/evals.ts
|
|
4888
|
+
async function scorerDraftHash(definition) {
|
|
4889
|
+
const { id: _id, version: _version, ...draft } = definition;
|
|
4890
|
+
return hash("constal/scorer-draft/v1", draft);
|
|
4891
|
+
}
|
|
4892
|
+
|
|
4893
|
+
// packages/sdk/src/judge.ts
|
|
4894
|
+
function record13(value) {
|
|
4895
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
4896
|
+
}
|
|
4897
|
+
function question2(criterion, field2) {
|
|
4898
|
+
const source = record13(criterion);
|
|
4899
|
+
if (!source || source.instructions === void 0 || Object.keys(source).some((key) => key !== "instructions" && key !== "levels") || source.levels !== void 0 && (!Array.isArray(source.levels) || source.levels.length < 2)) {
|
|
4900
|
+
throw new TypeError(`${field2} is { instructions, levels? } with at least two levels`);
|
|
4901
|
+
}
|
|
4902
|
+
const instructions = source.instructions;
|
|
4903
|
+
return source.levels === void 0 ? { type: "noul", instructions } : { type: "score", instructions, criteria: source.levels };
|
|
4904
|
+
}
|
|
4905
|
+
function position(answer2, asked) {
|
|
4906
|
+
if (answer2.type === "noul") return answer2.noul;
|
|
4907
|
+
if (answer2.type === "score" && asked.type === "score") return answer2.score / (asked.criteria.length - 1);
|
|
4908
|
+
throw new TypeError("evaluation answer does not match its rubric question");
|
|
4909
|
+
}
|
|
4910
|
+
function judged(message2) {
|
|
4911
|
+
const body = record13(message2);
|
|
4912
|
+
const state = body?.kind === "eval-judge" ? body.value : body?.task === "evaluate" ? { case: body.case, output: body.output } : void 0;
|
|
4913
|
+
const scale = record13(body?.scale);
|
|
4914
|
+
if (!body || state === void 0 || typeof scale?.min !== "number" || typeof scale.max !== "number" || !Number.isFinite(scale.min) || !Number.isFinite(scale.max) || scale.min >= scale.max) {
|
|
4915
|
+
throw new TypeError('a Judge is given { kind: "eval-judge", rubric, scale, value } or { task: "evaluate", rubric, scale, case, output }');
|
|
4916
|
+
}
|
|
4917
|
+
return { rubric: body.rubric, scale: { min: scale.min, max: scale.max }, state };
|
|
4918
|
+
}
|
|
4919
|
+
function judgeAgent(input) {
|
|
4920
|
+
return agent({
|
|
4921
|
+
id: input.id,
|
|
4922
|
+
version: input.version,
|
|
4923
|
+
async onMessage(message2, ctx) {
|
|
4924
|
+
const { rubric, scale, state } = judged(message2);
|
|
4925
|
+
const source = record13(rubric);
|
|
4926
|
+
const dimensions = source?.dimensions === void 0 ? {} : record13(source.dimensions);
|
|
4927
|
+
if (!source || !dimensions || Object.keys(source).some((key) => !["instructions", "levels", "dimensions"].includes(key))) {
|
|
4928
|
+
throw new TypeError("a Judge rubric is { instructions, levels?, dimensions? }");
|
|
4929
|
+
}
|
|
4930
|
+
const questions = { score: question2({
|
|
4931
|
+
instructions: source.instructions,
|
|
4932
|
+
...source.levels === void 0 ? {} : { levels: source.levels }
|
|
4933
|
+
}, "the rubric") };
|
|
4934
|
+
for (const [name, criterion] of Object.entries(dimensions)) questions[`dimension:${name}`] = question2(criterion, `rubric dimension ${name}`);
|
|
4935
|
+
const { answers, model } = await ctx.evaluate({ state, questions });
|
|
4936
|
+
const onScale = (id2) => Math.min(scale.max, Math.max(
|
|
4937
|
+
scale.min,
|
|
4938
|
+
scale.min + position(answers[id2], questions[id2]) * (scale.max - scale.min)
|
|
4939
|
+
));
|
|
4940
|
+
const names = Object.keys(dimensions);
|
|
4941
|
+
return {
|
|
4942
|
+
score: onScale("score"),
|
|
4943
|
+
dimensions: names.length === 0 ? null : Object.fromEntries(names.map((name) => [name, onScale(`dimension:${name}`)])),
|
|
4944
|
+
evidence: { model, answers }
|
|
4945
|
+
};
|
|
4946
|
+
}
|
|
4947
|
+
});
|
|
4948
|
+
}
|
|
4949
|
+
|
|
4886
4950
|
// packages/sdk/src/errors.ts
|
|
4887
4951
|
var GateExhausted = class extends Error {
|
|
4888
|
-
constructor(
|
|
4952
|
+
constructor(record14) {
|
|
4889
4953
|
super("turn gate exhausted");
|
|
4890
|
-
this.record =
|
|
4954
|
+
this.record = record14;
|
|
4891
4955
|
this.name = "GateExhausted";
|
|
4892
4956
|
}
|
|
4893
4957
|
record;
|
|
@@ -5220,6 +5284,7 @@ export {
|
|
|
5220
5284
|
immutableContainerImageReference,
|
|
5221
5285
|
integrationEgressPolicy,
|
|
5222
5286
|
invocationCredentialUses,
|
|
5287
|
+
judgeAgent,
|
|
5223
5288
|
labelSelector,
|
|
5224
5289
|
matchesAction,
|
|
5225
5290
|
matchesLabelSelector,
|
|
@@ -5274,6 +5339,7 @@ export {
|
|
|
5274
5339
|
scopedCredentialRef,
|
|
5275
5340
|
scopedResourceRef,
|
|
5276
5341
|
scoreLevel,
|
|
5342
|
+
scorerDraftHash,
|
|
5277
5343
|
scorerName,
|
|
5278
5344
|
select,
|
|
5279
5345
|
selectableResourceLabels,
|