@constal/sdk 4.2.0 → 4.3.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 +3 -1
- package/publish/index.d.ts +11 -7
- package/publish/index.js +16 -2
package/package.json
CHANGED
package/publish/api.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@constal/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"exports": [
|
|
5
5
|
"AGENT_UI_DEFAULTS",
|
|
6
6
|
"Action",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"AgentDef",
|
|
17
17
|
"AgentDeliveryReceipt",
|
|
18
18
|
"AgentDeployPolicy",
|
|
19
|
+
"AgentGovernanceMeter",
|
|
19
20
|
"AgentResultDelivery",
|
|
20
21
|
"AgentSendOpts",
|
|
21
22
|
"AgentSetupMetadata",
|
|
@@ -455,6 +456,7 @@
|
|
|
455
456
|
"action",
|
|
456
457
|
"actionPattern",
|
|
457
458
|
"agent",
|
|
459
|
+
"agentLimit",
|
|
458
460
|
"agentResourceBinding",
|
|
459
461
|
"agentSetupMetadata",
|
|
460
462
|
"agentSetupRequirements",
|
package/publish/index.d.ts
CHANGED
|
@@ -1379,6 +1379,8 @@ interface AdmissionLimitConstraint {
|
|
|
1379
1379
|
window: AdmissionLimitWindow;
|
|
1380
1380
|
maximum: number;
|
|
1381
1381
|
continuity: "target" | "target-version";
|
|
1382
|
+
/** Absent rejects. "queue" makes a Run start wait for a slot. */
|
|
1383
|
+
overLimit?: "reject" | "queue";
|
|
1382
1384
|
}
|
|
1383
1385
|
type AdmissionLimitInput<M extends string = string> = Omit<AdmissionLimitConstraint, "kind" | "contract" | "meter"> & {
|
|
1384
1386
|
meter: M;
|
|
@@ -1390,11 +1392,13 @@ interface ModelGovernanceControls {
|
|
|
1390
1392
|
}
|
|
1391
1393
|
type ModelGovernanceMeter = "cached_input_tokens" | "input_tokens" | "output_tokens" | "requests";
|
|
1392
1394
|
type UiGovernanceMeter = "requests";
|
|
1395
|
+
type AgentGovernanceMeter = "runs";
|
|
1393
1396
|
declare function sandboxControls(values: Partial<SandboxGovernanceControls>): ResourceControlsConstraint;
|
|
1394
1397
|
declare function sandboxLimit(input: AdmissionLimitInput<SandboxGovernanceMeter>): AdmissionLimitConstraint;
|
|
1395
1398
|
declare function modelControls(values: Partial<ModelGovernanceControls>, contract?: GovernanceContractRef): ResourceControlsConstraint;
|
|
1396
1399
|
declare function modelLimit(input: AdmissionLimitInput<ModelGovernanceMeter>, contract?: GovernanceContractRef): AdmissionLimitConstraint;
|
|
1397
1400
|
declare function uiLimit(input: AdmissionLimitInput<UiGovernanceMeter>): AdmissionLimitConstraint;
|
|
1401
|
+
declare function agentLimit(input: AdmissionLimitInput<AgentGovernanceMeter>): AdmissionLimitConstraint;
|
|
1398
1402
|
|
|
1399
1403
|
type PrincipalKind = "user" | "service" | "channel" | "agent" | "anonymous";
|
|
1400
1404
|
interface CustomerPrincipalContext {
|
|
@@ -3452,8 +3456,8 @@ interface ConstalApiError {
|
|
|
3452
3456
|
* management Resource. Keep authorization-only CRN families such as ledger,
|
|
3453
3457
|
* table, and artifact out of this model-facing inventory contract.
|
|
3454
3458
|
*/
|
|
3455
|
-
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"];
|
|
3456
|
-
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"];
|
|
3459
|
+
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"];
|
|
3460
|
+
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"];
|
|
3457
3461
|
declare const CONSTAL_API_MODEL_TOOL_DESCRIPTIONS: {
|
|
3458
3462
|
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.";
|
|
3459
3463
|
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.";
|
|
@@ -3509,7 +3513,7 @@ declare const CONSTAL_API_OPERATION_SCHEMAS: {
|
|
|
3509
3513
|
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.";
|
|
3510
3514
|
readonly properties: {
|
|
3511
3515
|
readonly kind: {
|
|
3512
|
-
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"];
|
|
3516
|
+
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"];
|
|
3513
3517
|
readonly description: "Exact queryable kind. Never guess a kind or change its casing.";
|
|
3514
3518
|
};
|
|
3515
3519
|
readonly scope: {
|
|
@@ -3614,7 +3618,7 @@ declare const CONSTAL_API_OPERATION_SCHEMAS: {
|
|
|
3614
3618
|
readonly additionalProperties: false;
|
|
3615
3619
|
readonly properties: {
|
|
3616
3620
|
readonly kind: {
|
|
3617
|
-
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"];
|
|
3621
|
+
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"];
|
|
3618
3622
|
readonly description: "Exact lower-case object kind returned by a governed platform result.";
|
|
3619
3623
|
};
|
|
3620
3624
|
readonly id: {
|
|
@@ -3698,7 +3702,7 @@ declare const CONSTAL_API_OPERATION_SCHEMAS: {
|
|
|
3698
3702
|
readonly additionalProperties: false;
|
|
3699
3703
|
readonly properties: {
|
|
3700
3704
|
readonly kind: {
|
|
3701
|
-
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"];
|
|
3705
|
+
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"];
|
|
3702
3706
|
readonly description: "Exact lower-case object kind returned by a governed platform result.";
|
|
3703
3707
|
};
|
|
3704
3708
|
readonly id: {
|
|
@@ -4579,5 +4583,5 @@ declare class SessionDeleted extends Error {
|
|
|
4579
4583
|
constructor(session: string);
|
|
4580
4584
|
}
|
|
4581
4585
|
|
|
4582
|
-
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, 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, 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, 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, normalizeSandboxNetworkPolicy, normalizeSandboxWorkspacePath, noulDecision, opTool, opTools, parseResourceName, policy, policyName, race, renderTrainingCompletion, resolveBindingOwner, resolveContainerImageSource, resolveGatewayEgress, resolveResourceDependencyRef, resourceContractRef, resourceCredentialBinding, resourceDependencyRef, resourceLabelMap, resourceName, resourceNeed, resourcePattern, resourceSelector, resourceTools, sandboxControls, sandboxLimit, scopedBindingKey, scopedCredentialRef, scopedResourceRef, scoreLevel, scorerName, select, selectableResourceLabels, setupAwait, setupCredentialReceipt, setupPanelProviderIsCrn, setupScreen, setupScreenView, setupSubmission, sha256Hex, skills, stageOutput, startTrainingRequest, subtask, tableDescribe, tableQuery, trainingProvider, trainingProviderMetadata, trainingRecipe, uiAssetContentType, uiBundle, uiBundleManifest, uiLimit, uiName, validateBatchSpec, validateFoldFn, validateJsonSchema, validateJsonSchemaDefinition, validatePartitionFn, validatePartitionSpec, validateStageOutputSpec, validateTool, validateView, webFetch, webSearch };
|
|
4583
|
-
export type { Action, ActionPattern, Actor, AdmissionLimitConstraint, AdmissionLimitInput, AdmissionLimitScope, AdmissionLimitWindow, Agent, AgentCredentialSetupRequirement, AgentDef, AgentDeliveryReceipt, AgentDeployPolicy, AgentResultDelivery, AgentSendOpts, 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, 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, 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, LedgerEvent, ListSchedulesOptions, LoadedSkill, LocalResourceRef, ManifestIndexPage, MapFact, MapOpts, McpClientOptions, McpClientState, McpMessageTransport, MemoryDeleteArgs, MemoryGetArgs, MemoryRecord, MemoryRememberArgs, MemorySearchArgs, MemorySearchHit, MemoryStoreBinding, Mode, ModelAdvertisedPricing, ModelCompletion, ModelCredentialHeader, ModelGatewayBinding, ModelGatewayConfig, ModelGatewayProtocol, ModelGenerationOptions, ModelGovernanceControls, ModelGovernanceMeter, ModelHistoryMessage, ModelInvocationArgs, ModelInvocationResult, 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, RunStatusDetail, RunSuiteRequest, Sandbox, SandboxCommandCollectionError, SandboxCommandExecution, SandboxCommandResult, SandboxExecInput, SandboxFileResult, SandboxGovernanceControls, SandboxGovernanceMeter, SandboxImage, 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, 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, TurnRecord, TurnSpec, UiAccess, UiBundle, UiBundleManifest, UiCRN, UiCapability, UiExecution, UiGovernanceMeter, UiHandler, UiResource, UiRuntimeContext, UiSource, UiSqlResult, UiState, UpstreamPayer, Verdict, VerdictSamplingMode, ViewDef, WaitResolvedEvent };
|
|
4586
|
+
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, 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, 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, normalizeSandboxNetworkPolicy, normalizeSandboxWorkspacePath, noulDecision, opTool, opTools, parseResourceName, policy, policyName, race, renderTrainingCompletion, resolveBindingOwner, resolveContainerImageSource, resolveGatewayEgress, resolveResourceDependencyRef, resourceContractRef, resourceCredentialBinding, resourceDependencyRef, resourceLabelMap, resourceName, resourceNeed, resourcePattern, resourceSelector, resourceTools, sandboxControls, sandboxLimit, scopedBindingKey, scopedCredentialRef, scopedResourceRef, scoreLevel, scorerName, select, selectableResourceLabels, setupAwait, setupCredentialReceipt, setupPanelProviderIsCrn, setupScreen, setupScreenView, setupSubmission, sha256Hex, skills, stageOutput, startTrainingRequest, subtask, tableDescribe, tableQuery, trainingProvider, trainingProviderMetadata, trainingRecipe, uiAssetContentType, uiBundle, uiBundleManifest, uiLimit, uiName, validateBatchSpec, validateFoldFn, validateJsonSchema, validateJsonSchemaDefinition, validatePartitionFn, validatePartitionSpec, validateStageOutputSpec, validateTool, validateView, webFetch, webSearch };
|
|
4587
|
+
export type { Action, ActionPattern, Actor, AdmissionLimitConstraint, AdmissionLimitInput, AdmissionLimitScope, AdmissionLimitWindow, Agent, AgentCredentialSetupRequirement, AgentDef, AgentDeliveryReceipt, AgentDeployPolicy, AgentGovernanceMeter, AgentResultDelivery, AgentSendOpts, 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, 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, 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, LedgerEvent, ListSchedulesOptions, LoadedSkill, LocalResourceRef, ManifestIndexPage, MapFact, MapOpts, McpClientOptions, McpClientState, McpMessageTransport, MemoryDeleteArgs, MemoryGetArgs, MemoryRecord, MemoryRememberArgs, MemorySearchArgs, MemorySearchHit, MemoryStoreBinding, Mode, ModelAdvertisedPricing, ModelCompletion, ModelCredentialHeader, ModelGatewayBinding, ModelGatewayConfig, ModelGatewayProtocol, ModelGenerationOptions, ModelGovernanceControls, ModelGovernanceMeter, ModelHistoryMessage, ModelInvocationArgs, ModelInvocationResult, 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, RunStatusDetail, RunSuiteRequest, Sandbox, SandboxCommandCollectionError, SandboxCommandExecution, SandboxCommandResult, SandboxExecInput, SandboxFileResult, SandboxGovernanceControls, SandboxGovernanceMeter, SandboxImage, 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, 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, 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
|
@@ -1888,7 +1888,8 @@ var CONSTAL_API_QUERY_KINDS = [
|
|
|
1888
1888
|
"credential-event",
|
|
1889
1889
|
"gateway-package",
|
|
1890
1890
|
"rollout",
|
|
1891
|
-
"wait"
|
|
1891
|
+
"wait",
|
|
1892
|
+
"run-queue-item"
|
|
1892
1893
|
];
|
|
1893
1894
|
var CONSTAL_API_GET_KINDS = CONSTAL_API_QUERY_KINDS;
|
|
1894
1895
|
var CONSTAL_API_MODEL_TOOL_DESCRIPTIONS = {
|
|
@@ -2136,6 +2137,11 @@ var UI_CONTRACT = {
|
|
|
2136
2137
|
version: "1",
|
|
2137
2138
|
hash: "133f0ab76ca2f1435dfbaa151652cfc79926ea5237c0892d0c4d3b96d7bb6f48"
|
|
2138
2139
|
};
|
|
2140
|
+
var AGENT_CONTRACT = {
|
|
2141
|
+
id: "constal.agent",
|
|
2142
|
+
version: "1",
|
|
2143
|
+
hash: "5c07310dba13e0a3982ee8c370f25f9411979bcf6fd105af27a245b04ed38ad1"
|
|
2144
|
+
};
|
|
2139
2145
|
var sandboxSchema = SANDBOX_CONTROLS_SCHEMA;
|
|
2140
2146
|
var modelSchema = MODEL_CONTROLS_SCHEMA;
|
|
2141
2147
|
function controls(contract, values, schema) {
|
|
@@ -2144,7 +2150,10 @@ function controls(contract, values, schema) {
|
|
|
2144
2150
|
return { kind: "resource-controls", contract, values };
|
|
2145
2151
|
}
|
|
2146
2152
|
function limit(contract, meters, input) {
|
|
2147
|
-
if (!input || typeof input !== "object" || !/^[a-z][a-z0-9._-]{0,127}$/u.test(input.id) || !meters.includes(input.meter) || !["run", "session", "subject", "customer", "tenant", "binding", "resource"].includes(input.scope) || !input.window || !["concurrency", "fixed", "lifetime"].includes(input.window.kind) || input.window.kind === "fixed" && (!Number.isSafeInteger(input.window.milliseconds) || input.window.milliseconds < 1) || !Number.isFinite(input.maximum) || input.maximum < 0 || !["target", "target-version"].includes(input.continuity)) throw new TypeError("governance limit is invalid");
|
|
2153
|
+
if (!input || typeof input !== "object" || !/^[a-z][a-z0-9._-]{0,127}$/u.test(input.id) || !meters.includes(input.meter) || !["run", "session", "subject", "customer", "tenant", "binding", "resource"].includes(input.scope) || !input.window || !["concurrency", "fixed", "lifetime"].includes(input.window.kind) || input.window.kind === "fixed" && (!Number.isSafeInteger(input.window.milliseconds) || input.window.milliseconds < 1) || !Number.isFinite(input.maximum) || input.maximum < 0 || !["target", "target-version"].includes(input.continuity) || Object.hasOwn(input, "overLimit") && input.overLimit !== "reject" && input.overLimit !== "queue") throw new TypeError("governance limit is invalid");
|
|
2154
|
+
if (input.overLimit === "queue" && (contract?.id !== "constal.agent" || input.window.kind !== "concurrency" || input.continuity !== "target")) {
|
|
2155
|
+
throw new TypeError("admission limit overLimit queue requires the constal.agent contract, a concurrency window and target continuity");
|
|
2156
|
+
}
|
|
2148
2157
|
return { kind: "admission-limit", contract, ...input };
|
|
2149
2158
|
}
|
|
2150
2159
|
function sandboxControls(values) {
|
|
@@ -2162,6 +2171,10 @@ function modelLimit(input, contract = MODEL_CONTRACT) {
|
|
|
2162
2171
|
function uiLimit(input) {
|
|
2163
2172
|
return limit(UI_CONTRACT, ["requests"], input);
|
|
2164
2173
|
}
|
|
2174
|
+
function agentLimit(input) {
|
|
2175
|
+
if (input?.window?.kind !== "concurrency") throw new TypeError("agent limits count concurrent Runs; window must be concurrency");
|
|
2176
|
+
return limit(AGENT_CONTRACT, ["runs"], input);
|
|
2177
|
+
}
|
|
2165
2178
|
function validatePolicyGovernanceConstraint(value) {
|
|
2166
2179
|
if (value.kind === "resource-controls") {
|
|
2167
2180
|
if (!value.contract || typeof value.contract.id !== "string" || typeof value.contract.version !== "string" || !/^[a-f0-9]{64}$/u.test(value.contract.hash) || !value.values || typeof value.values !== "object" || Array.isArray(value.values)) {
|
|
@@ -4448,6 +4461,7 @@ export {
|
|
|
4448
4461
|
action,
|
|
4449
4462
|
actionPattern,
|
|
4450
4463
|
agent,
|
|
4464
|
+
agentLimit,
|
|
4451
4465
|
agentResourceBinding,
|
|
4452
4466
|
agentSetupMetadata,
|
|
4453
4467
|
agentSetupRequirements,
|