@constal/sdk 4.3.0 → 4.4.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 +8 -1
- package/publish/index.d.ts +91 -3
- package/publish/index.js +34 -1
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.4.0",
|
|
4
4
|
"exports": [
|
|
5
5
|
"AGENT_UI_DEFAULTS",
|
|
6
6
|
"Action",
|
|
@@ -132,6 +132,8 @@
|
|
|
132
132
|
"CredentialRevoked",
|
|
133
133
|
"CredentialSetupState",
|
|
134
134
|
"CredentialUnavailable",
|
|
135
|
+
"CredentialUninstallRequest",
|
|
136
|
+
"CredentialUninstallResult",
|
|
135
137
|
"CredentialVerifyResult",
|
|
136
138
|
"Ctx",
|
|
137
139
|
"CustomerTenantCRN",
|
|
@@ -224,6 +226,7 @@
|
|
|
224
226
|
"LabelSelectorRequirement",
|
|
225
227
|
"LeaseLost",
|
|
226
228
|
"LedgerAddress",
|
|
229
|
+
"LedgerAddressParts",
|
|
227
230
|
"LedgerEvent",
|
|
228
231
|
"ListSchedulesOptions",
|
|
229
232
|
"LoadedSkill",
|
|
@@ -310,6 +313,7 @@
|
|
|
310
313
|
"RollbackTargetInvalid",
|
|
311
314
|
"RunIdentityView",
|
|
312
315
|
"RunInfo",
|
|
316
|
+
"RunReport",
|
|
313
317
|
"RunStatusDetail",
|
|
314
318
|
"RunSuiteRequest",
|
|
315
319
|
"Sandbox",
|
|
@@ -389,6 +393,7 @@
|
|
|
389
393
|
"SpawnAttenuation",
|
|
390
394
|
"SpawnBudget",
|
|
391
395
|
"SpawnCardinality",
|
|
396
|
+
"SpawnHandle",
|
|
392
397
|
"SpawnOpts",
|
|
393
398
|
"SqlFold",
|
|
394
399
|
"StageInfo",
|
|
@@ -506,6 +511,7 @@
|
|
|
506
511
|
"evaluationArguments",
|
|
507
512
|
"evaluationProtocolRequest",
|
|
508
513
|
"evaluationProtocolResult",
|
|
514
|
+
"formatLedgerAddress",
|
|
509
515
|
"gateway",
|
|
510
516
|
"gatewayModelOffer",
|
|
511
517
|
"gatewayPackageMetadata",
|
|
@@ -538,6 +544,7 @@
|
|
|
538
544
|
"noulDecision",
|
|
539
545
|
"opTool",
|
|
540
546
|
"opTools",
|
|
547
|
+
"parseLedgerAddress",
|
|
541
548
|
"parseResourceName",
|
|
542
549
|
"policy",
|
|
543
550
|
"policyName",
|
package/publish/index.d.ts
CHANGED
|
@@ -2202,6 +2202,10 @@ type LedgerEvent = SteerEvent | ControlEvent | WaitResolvedEvent | (EventBase &
|
|
|
2202
2202
|
itemId: string;
|
|
2203
2203
|
target: LedgerAddress | "export";
|
|
2204
2204
|
fact: FactRef;
|
|
2205
|
+
/** The sending Run. */
|
|
2206
|
+
run?: string;
|
|
2207
|
+
/** The delivery made the sending Run's Session the owner of its target Session. */
|
|
2208
|
+
delegate?: true;
|
|
2205
2209
|
}) | (EventBase & {
|
|
2206
2210
|
kind: "delivery-acknowledged";
|
|
2207
2211
|
itemId: string;
|
|
@@ -2287,7 +2291,9 @@ interface AwaitOpts<T> {
|
|
|
2287
2291
|
schema?: object;
|
|
2288
2292
|
/** Optional caller-selected response size limit, in UTF-8 bytes. */
|
|
2289
2293
|
maxBytes?: number;
|
|
2290
|
-
|
|
2294
|
+
/** "message": the Session's next queued input answers the wait with its value. "delivery": the wait settles when a
|
|
2295
|
+
* delivery steers this Run after the wait opened; it returns no value and the delivery stays in the ledger. */
|
|
2296
|
+
afterRun?: "ignore" | "message" | "delivery";
|
|
2291
2297
|
/** Explicitly public presentation; never include Credential material or private evidence. */
|
|
2292
2298
|
presentation?: AwaitPresentation;
|
|
2293
2299
|
}
|
|
@@ -2305,6 +2311,10 @@ interface Handle<T> extends PromiseLike<T> {
|
|
|
2305
2311
|
interface InvocationHandle<T> extends Handle<T> {
|
|
2306
2312
|
start(): Promise<void>;
|
|
2307
2313
|
}
|
|
2314
|
+
/** A spawn's Handle names the spawned loop's ledger, the same across the spawn's retries. */
|
|
2315
|
+
interface SpawnHandle<T> extends Handle<T> {
|
|
2316
|
+
readonly ledger: LedgerAddress;
|
|
2317
|
+
}
|
|
2308
2318
|
/** A message to an exactly bound Agent creates one distinct target Run. */
|
|
2309
2319
|
type AgentSendOpts = {
|
|
2310
2320
|
session: string;
|
|
@@ -2339,9 +2349,35 @@ interface CommitOpts {
|
|
|
2339
2349
|
};
|
|
2340
2350
|
expectedHead?: FactRef;
|
|
2341
2351
|
deliver?: DeliveryMode;
|
|
2352
|
+
/** Makes this Run's Session the owner of the Session whose main ledger `to` names. */
|
|
2353
|
+
delegate?: boolean;
|
|
2342
2354
|
/** Explicitly public presentation delivered by the originating Channel when this Run was admitted through one. */
|
|
2343
2355
|
presentation?: AwaitPresentation;
|
|
2344
2356
|
}
|
|
2357
|
+
/** A Run's end, hold or refused start, delivered by the platform as the body { text, data } to the Session's owner, to the
|
|
2358
|
+
* refused event's origin, or to the Session itself. */
|
|
2359
|
+
interface RunReport {
|
|
2360
|
+
/** One sentence the platform writes. */
|
|
2361
|
+
text: string;
|
|
2362
|
+
data: {
|
|
2363
|
+
object: "constal.run.report";
|
|
2364
|
+
version: 1;
|
|
2365
|
+
/** The reporting Session. */
|
|
2366
|
+
session: LedgerAddress;
|
|
2367
|
+
/** Null for a refusal. */
|
|
2368
|
+
run: string | null;
|
|
2369
|
+
/** The event that started the Run, or the refused event. */
|
|
2370
|
+
event: string;
|
|
2371
|
+
status: "complete" | "failed" | "stopped" | "held" | "refused";
|
|
2372
|
+
/** The Run's error, its limit, or the refusal's code. */
|
|
2373
|
+
error: string | null;
|
|
2374
|
+
/** A completed Run's result, read through a view of its ledger. */
|
|
2375
|
+
result: {
|
|
2376
|
+
fact: string;
|
|
2377
|
+
ref: string;
|
|
2378
|
+
} | null;
|
|
2379
|
+
};
|
|
2380
|
+
}
|
|
2345
2381
|
interface Cost {
|
|
2346
2382
|
accounting: {
|
|
2347
2383
|
trackedCost: {
|
|
@@ -2668,6 +2704,9 @@ interface RunInfo {
|
|
|
2668
2704
|
crn: CRN;
|
|
2669
2705
|
};
|
|
2670
2706
|
mode: Mode;
|
|
2707
|
+
/** This Run's own ledger address: its Session's main ledger for a root Run, its spawn's for a spawned Run, null for a
|
|
2708
|
+
* Run that nothing addresses (an operator branch, an eval fork, a compensation). */
|
|
2709
|
+
ledger?: LedgerAddress | null;
|
|
2671
2710
|
/** Present for an independently scheduled invocation; input remains unchanged. */
|
|
2672
2711
|
schedule?: ScheduleTrigger;
|
|
2673
2712
|
}
|
|
@@ -2921,6 +2960,9 @@ interface CanonicalEventDraft<T = unknown> {
|
|
|
2921
2960
|
data: T;
|
|
2922
2961
|
occurredAt?: number;
|
|
2923
2962
|
deliver?: DeliveryMode;
|
|
2963
|
+
/** When respond() runs: "receipt" once the event is durably in its Session's inbox; "run-result" once the Run it
|
|
2964
|
+
* starts settles, up to 120 s. Default: "receipt" for queue, "run-result" for live. */
|
|
2965
|
+
completion?: "receipt" | "run-result";
|
|
2924
2966
|
/** Channel-owned reply address pinned at admission; Agent input cannot replace it. */
|
|
2925
2967
|
reply?: {
|
|
2926
2968
|
destination: string;
|
|
@@ -4292,6 +4334,23 @@ interface CredentialVerifyResult {
|
|
|
4292
4334
|
interface CredentialDestroyResult {
|
|
4293
4335
|
destroyed: boolean;
|
|
4294
4336
|
}
|
|
4337
|
+
interface CredentialUninstallRequest extends CredentialMaterialRequest {
|
|
4338
|
+
/**
|
|
4339
|
+
* The external identity the caller owns and expects to remove, such as an installation or workspace id. A provider
|
|
4340
|
+
* that reaches a different one must answer `unable` and remove nothing.
|
|
4341
|
+
*/
|
|
4342
|
+
expectedIdentity: string | null;
|
|
4343
|
+
}
|
|
4344
|
+
/**
|
|
4345
|
+
* `removed`: the provider removed it. `absent`: it was already gone. `unable`: it is still there and this provider could
|
|
4346
|
+
* not remove it, with a short machine-readable reason. A failure that may pass, such as an outage, is thrown instead.
|
|
4347
|
+
*/
|
|
4348
|
+
type CredentialUninstallResult = {
|
|
4349
|
+
outcome: "removed" | "absent";
|
|
4350
|
+
} | {
|
|
4351
|
+
outcome: "unable";
|
|
4352
|
+
reason: string;
|
|
4353
|
+
};
|
|
4295
4354
|
type CredentialProviderSecretInput = "secret" | "multiline" | "file";
|
|
4296
4355
|
interface CredentialProviderCredentialSlotSetup {
|
|
4297
4356
|
/** Human-readable name shown while the provider is configured. */
|
|
@@ -4351,6 +4410,11 @@ interface CredentialProviderDefinition<C = unknown> extends Omit<CredentialProvi
|
|
|
4351
4410
|
mint(request: CredentialMintRequest, context: IntegrationContext): Promise<CredentialMintResult>;
|
|
4352
4411
|
verify?(request: CredentialMaterialRequest, context: IntegrationContext): Promise<CredentialVerifyResult>;
|
|
4353
4412
|
destroy?(request: CredentialMaterialRequest, context: IntegrationContext): Promise<CredentialDestroyResult>;
|
|
4413
|
+
/**
|
|
4414
|
+
* Removes what the Credential stands for at its source, such as an app installation. Destroy ends one version and
|
|
4415
|
+
* runs on every rotation; this ends the grant, and runs only when a deletion of the Credential asks for it.
|
|
4416
|
+
*/
|
|
4417
|
+
uninstall?(request: CredentialUninstallRequest, context: IntegrationContext): Promise<CredentialUninstallResult>;
|
|
4354
4418
|
}
|
|
4355
4419
|
type CredentialProviderContext = IntegrationContext;
|
|
4356
4420
|
/** Validated user-authored Credential Provider package. */
|
|
@@ -4583,5 +4647,29 @@ declare class SessionDeleted extends Error {
|
|
|
4583
4647
|
constructor(session: string);
|
|
4584
4648
|
}
|
|
4585
4649
|
|
|
4586
|
-
|
|
4587
|
-
|
|
4650
|
+
/**
|
|
4651
|
+
* The ledger a LedgerAddress names, within the addressing Run's tenant, namespace and Customer partition.
|
|
4652
|
+
* `session`: `agent:<agent>/session:<session>`, that Session's main ledger.
|
|
4653
|
+
* `spawn`: `agent:<agent>/session:<session>/spawn:<handle>`, a spawned loop's ledger, named by its spawn's Handle id.
|
|
4654
|
+
* `legacy-session`: `session:<session>`, relative to the addressing Run's agent, kept for bundles already deployed.
|
|
4655
|
+
*/
|
|
4656
|
+
type LedgerAddressParts = {
|
|
4657
|
+
kind: "session";
|
|
4658
|
+
agent: string;
|
|
4659
|
+
session: string;
|
|
4660
|
+
} | {
|
|
4661
|
+
kind: "spawn";
|
|
4662
|
+
agent: string;
|
|
4663
|
+
session: string;
|
|
4664
|
+
handle: string;
|
|
4665
|
+
} | {
|
|
4666
|
+
kind: "legacy-session";
|
|
4667
|
+
session: string;
|
|
4668
|
+
};
|
|
4669
|
+
/** Parses a ledger address into its parts; null when the value is not one of the three forms. */
|
|
4670
|
+
declare function parseLedgerAddress(value: unknown): LedgerAddressParts | null;
|
|
4671
|
+
/** Formats ledger address parts; throws when a part breaks its id rule. */
|
|
4672
|
+
declare function formatLedgerAddress(parts: LedgerAddressParts): LedgerAddress;
|
|
4673
|
+
|
|
4674
|
+
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, 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, normalizeSandboxNetworkPolicy, normalizeSandboxWorkspacePath, noulDecision, opTool, opTools, parseLedgerAddress, parseResourceName, policy, policyName, race, renderTrainingCompletion, resolveBindingOwner, resolveContainerImageSource, resolveGatewayEgress, resolveResourceDependencyRef, resourceContractRef, resourceCredentialBinding, resourceDependencyRef, resourceLabelMap, resourceName, resourceNeed, resourcePattern, resourceSelector, resourceTools, sandboxControls, 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 };
|
|
4675
|
+
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, CredentialUninstallRequest, CredentialUninstallResult, CredentialVerifyResult, Ctx, CustomerTenantCRN, DataManifest, DatasetCRN, DatasetDraft, DatasetRef, DelegatedGrant, DelegationCeiling, DeliveryMode, DeliveryReceipt, DispatchResult, EffectClass, EvalComparison, EvalDivergence, EvalMode, EvalSubject, EvalSubjectSource, EvaluationAnswer, EvaluationAnswerFor, EvaluationAnswers, EvaluationEntry, EvaluationInvocationArgs, EvaluationInvocationResult, EvaluationProtocol, EvaluationQuestion, EvaluationQuestions, EvaluationRecord, EvaluationSpec, EventBase, Fact, FactRef, FileEntry, FixedMemoryStoreRef, FixedModelGatewayRef, FoldFn, GateEvidence, GateResult, GateVerdict, GatewayCancelRequest, GatewayConfigEgressBinding, GatewayContext, GatewayCredentialSlotSetup, GatewayDefinition, GatewayDiscoverySetup, GatewayModelOffer, GatewayOperation, GatewayPackage, GatewayPackageMetadata, GatewayRecoveryRequest, GatewayRecoveryResult, GatewayRequest, GovernanceContractRef, Handle, HandleOutcome, Hash, HistoryView, HmacVerification, IgnoredChannelEvent, IngressRequest, IngressTarget, IntegrationArtifactEgressRequest, IntegrationArtifactEgressResponse, IntegrationAttachment, IntegrationContext, IntegrationEgressPolicy, IntegrationEgressRequest, IntegrationEgressResponse, IntegrationEgressRule, IntegrationLifecycle, IntegrationReleaseContext, IntegrationSecret, IntegrationState, InvocationCredentialUse, InvocationHandle, InvokableKind, InvokeOpts, JoinOutcome, JsonScalar, JsonValue, LabelRequest, LabelSelector, LabelSelectorOperator, LabelSelectorRequirement, LedgerAddress, LedgerAddressParts, LedgerEvent, ListSchedulesOptions, LoadedSkill, LocalResourceRef, ManifestIndexPage, MapFact, MapOpts, McpClientOptions, McpClientState, McpMessageTransport, MemoryDeleteArgs, MemoryGetArgs, MemoryRecord, MemoryRememberArgs, MemorySearchArgs, MemorySearchHit, MemoryStoreBinding, Mode, ModelAdvertisedPricing, 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, RunReport, 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, SpawnHandle, SpawnOpts, SqlFold, StageInfo, StageOutputSpec, StartTrainingRequest, SteerEvent, SuiteFact, TableAggregate, TableDescribeArgs, TableFilter, TableFilterOperation, TableOrder, TableQueryArgs, TableQueryPlan, TableQueryResult, TableScalar, TableSnapshotDescription, Task, Tier, Tool, ToolCallRecord, TrainingJobFact, TrainingJobReference, TrainingJobState, TrainingJobStatus, TrainingMethod, TrainingModelOffer, TrainingProviderDefinition, TrainingProviderMetadata, TrainingProviderPin, TrainingRecipe, TrainingResumePoint, TrainingUsageUnits, TurnDraft, TurnGate, 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
|
@@ -3729,7 +3729,7 @@ function credentialProviderSetupMetadata(value, slots) {
|
|
|
3729
3729
|
return value;
|
|
3730
3730
|
}
|
|
3731
3731
|
function credentialProvider(definition) {
|
|
3732
|
-
if (!/^[a-z0-9][a-z0-9._-]{0,127}$/u.test(definition.id) || !/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/u.test(definition.version) || !definition.displayName || !definition.description || typeof definition.mint !== "function" || definition.verify !== void 0 && typeof definition.verify !== "function" || definition.destroy !== void 0 && typeof definition.destroy !== "function") {
|
|
3732
|
+
if (!/^[a-z0-9][a-z0-9._-]{0,127}$/u.test(definition.id) || !/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/u.test(definition.version) || !definition.displayName || !definition.description || typeof definition.mint !== "function" || definition.verify !== void 0 && typeof definition.verify !== "function" || definition.destroy !== void 0 && typeof definition.destroy !== "function" || definition.uninstall !== void 0 && typeof definition.uninstall !== "function") {
|
|
3733
3733
|
throw new TypeError("credential provider metadata is invalid");
|
|
3734
3734
|
}
|
|
3735
3735
|
if (definition.documentationUrl !== void 0) {
|
|
@@ -4408,6 +4408,37 @@ var SessionDeleted = class extends Error {
|
|
|
4408
4408
|
}
|
|
4409
4409
|
session;
|
|
4410
4410
|
};
|
|
4411
|
+
|
|
4412
|
+
// packages/sdk/src/ledger-address.ts
|
|
4413
|
+
var AGENT = /^[a-z0-9][a-z0-9-]{0,62}$/u;
|
|
4414
|
+
var HANDLE = /^[0-9a-f]{64}$/u;
|
|
4415
|
+
function validSession(session) {
|
|
4416
|
+
return session.length > 0 && session.length <= 256 && !/[\u0000-\u001f/]/u.test(session);
|
|
4417
|
+
}
|
|
4418
|
+
function parseLedgerAddress(value) {
|
|
4419
|
+
if (typeof value !== "string") return null;
|
|
4420
|
+
if (value.startsWith("session:")) {
|
|
4421
|
+
const session2 = value.slice("session:".length);
|
|
4422
|
+
return validSession(session2) ? { kind: "legacy-session", session: session2 } : null;
|
|
4423
|
+
}
|
|
4424
|
+
const [agentSegment, sessionSegment, spawnSegment, ...rest] = value.split("/");
|
|
4425
|
+
if (rest.length > 0 || !agentSegment?.startsWith("agent:") || !sessionSegment?.startsWith("session:")) return null;
|
|
4426
|
+
const agent2 = agentSegment.slice("agent:".length);
|
|
4427
|
+
const session = sessionSegment.slice("session:".length);
|
|
4428
|
+
if (!AGENT.test(agent2) || !validSession(session)) return null;
|
|
4429
|
+
if (spawnSegment === void 0) return { kind: "session", agent: agent2, session };
|
|
4430
|
+
if (!spawnSegment.startsWith("spawn:")) return null;
|
|
4431
|
+
const handle = spawnSegment.slice("spawn:".length);
|
|
4432
|
+
return HANDLE.test(handle) ? { kind: "spawn", agent: agent2, session, handle } : null;
|
|
4433
|
+
}
|
|
4434
|
+
function formatLedgerAddress(parts) {
|
|
4435
|
+
if (!validSession(parts.session)) throw new TypeError("ledger address session is invalid");
|
|
4436
|
+
if (parts.kind === "legacy-session") return `session:${parts.session}`;
|
|
4437
|
+
if (!AGENT.test(parts.agent)) throw new TypeError("ledger address agent is invalid");
|
|
4438
|
+
if (parts.kind === "session") return `agent:${parts.agent}/session:${parts.session}`;
|
|
4439
|
+
if (!HANDLE.test(parts.handle)) throw new TypeError("ledger address spawn handle is invalid");
|
|
4440
|
+
return `agent:${parts.agent}/session:${parts.session}/spawn:${parts.handle}`;
|
|
4441
|
+
}
|
|
4411
4442
|
export {
|
|
4412
4443
|
AGENT_UI_DEFAULTS,
|
|
4413
4444
|
AfterYield,
|
|
@@ -4511,6 +4542,7 @@ export {
|
|
|
4511
4542
|
evaluationArguments,
|
|
4512
4543
|
evaluationProtocolRequest,
|
|
4513
4544
|
evaluationProtocolResult,
|
|
4545
|
+
formatLedgerAddress,
|
|
4514
4546
|
gateway,
|
|
4515
4547
|
gatewayModelOffer,
|
|
4516
4548
|
gatewayPackageMetadata,
|
|
@@ -4543,6 +4575,7 @@ export {
|
|
|
4543
4575
|
noulDecision,
|
|
4544
4576
|
opTool,
|
|
4545
4577
|
opTools,
|
|
4578
|
+
parseLedgerAddress,
|
|
4546
4579
|
parseResourceName,
|
|
4547
4580
|
policy,
|
|
4548
4581
|
policyName,
|