@runtypelabs/sdk 11.0.0 → 11.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/dist/index.mjs CHANGED
@@ -1,3 +1,28 @@
1
+ //#region src/sandbox-deployments-namespace.ts
2
+ /** Managed deployment authoring; acceptance records intent before the deployment becomes ready. */
3
+ var SandboxDeploymentsNamespace = class {
4
+ constructor(getClient) {
5
+ this.getClient = getClient;
6
+ }
7
+ runtimeProfiles() {
8
+ return this.getClient().get("/sandbox-deployments/runtime-profiles");
9
+ }
10
+ definition(id) {
11
+ return this.getClient().get(`/sandbox-deployments/${encodeURIComponent(id)}/definition`);
12
+ }
13
+ /** Use retained runtime and uploaded source IDs; the API resolves pins and authoring defaults. */
14
+ create(data, options) {
15
+ return this.getClient().post("/sandbox-deployments", data, { "Idempotency-Key": options.idempotencyKey });
16
+ }
17
+ /** Replace the complete config or spec without renewing retention. */
18
+ update(id, data, options) {
19
+ return this.getClient().put(`/sandbox-deployments/${encodeURIComponent(id)}`, data, {
20
+ "Idempotency-Key": options.idempotencyKey,
21
+ "If-Match": String(options.ifMatch)
22
+ });
23
+ }
24
+ };
25
+ //#endregion
1
26
  //#region src/unified-stream-adapter.ts
2
27
  /**
3
28
  * @deprecated Unified events are now the only public execution-stream format.
@@ -1303,6 +1328,7 @@ var FlowBuilder = class {
1303
1328
  recordFilter: config.recordFilter,
1304
1329
  limit: config.limit,
1305
1330
  onEmpty: config.onEmpty,
1331
+ errorHandling: config.errorHandling,
1306
1332
  fieldsToInclude: config.fieldsToInclude,
1307
1333
  fieldsToExclude: config.fieldsToExclude,
1308
1334
  availableFields: config.availableFields,
@@ -10466,6 +10492,7 @@ var RuntypeFlowBuilder = class {
10466
10492
  recordFilter: config.recordFilter,
10467
10493
  limit: config.limit,
10468
10494
  onEmpty: config.onEmpty,
10495
+ errorHandling: config.errorHandling,
10469
10496
  fieldsToInclude: config.fieldsToInclude,
10470
10497
  fieldsToExclude: config.fieldsToExclude,
10471
10498
  availableFields: config.availableFields,
@@ -14103,6 +14130,9 @@ var Runtype = class {
14103
14130
  static get surfaces() {
14104
14131
  return new SurfacesNamespace(() => this.getClient());
14105
14132
  }
14133
+ static get sandboxDeployments() {
14134
+ return new SandboxDeploymentsNamespace(() => this.getClient());
14135
+ }
14106
14136
  /**
14107
14137
  * Client tokens — publishable credentials for widgets. `ensure` finds a token
14108
14138
  * by name, creates it when missing, and converges its agents, flows, origins,
@@ -14500,7 +14530,7 @@ function transformQueryParams(params) {
14500
14530
  }
14501
14531
  //#endregion
14502
14532
  //#region src/version.ts
14503
- const SDK_VERSION = "11.0.0";
14533
+ const SDK_VERSION = "11.2.0";
14504
14534
  /**
14505
14535
  * Canonical client identity the API uses for attribution
14506
14536
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
@@ -14552,6 +14582,7 @@ var RuntypeClient = class {
14552
14582
  ...config.headers || {}
14553
14583
  };
14554
14584
  if (config.apiKey) this.headers.Authorization = `Bearer ${config.apiKey}`;
14585
+ this.sandboxDeployments = new SandboxDeploymentsNamespace(() => this);
14555
14586
  this.flows = new FlowsEndpoint(this);
14556
14587
  this.prompts = new PromptsEndpoint(this);
14557
14588
  this.records = new RecordsEndpoint(this);
@@ -15929,6 +15960,10 @@ const STEP_FIELD_REGISTRY = {
15929
15960
  format: "json",
15930
15961
  skipDefault: "succeed"
15931
15962
  },
15963
+ {
15964
+ key: "errorHandling",
15965
+ format: "value"
15966
+ },
15932
15967
  {
15933
15968
  key: "fieldsToInclude",
15934
15969
  format: "json"
@@ -16712,5 +16747,5 @@ const STEP_TYPE_TO_METHOD = {
16712
16747
  "memory-summary": "memorySummary"
16713
16748
  };
16714
16749
  //#endregion
16715
- export { AgentAliasDependencyError, AgentAliasNotFoundError, AgentAliasRevisionMismatchError, AgentAliasRevisionRequiredError, AgentAliasesNamespace, AgentDeploymentsNamespace, AgentDriftError, AgentEnsureConflictError, AgentPromotionError, AgentVersionsEndpoint, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, ApiKeyRequestsEndpoint, ApiKeysEndpoint, BatchBuilder, BatchesNamespace, BillingEndpoint, ChatEndpoint, ClientBatchBuilder, ClientEvalBuilder, ClientFlowBuilder, ClientTokenDriftError, ClientTokenEnsureError, ClientTokensEndpoint, ClientTokensNamespace, CollectionDriftError, CollectionEnsureConflictError, CollectionsEndpoint, ContextTemplatesEndpoint, ConversationsEndpoint, DEFAULT_MAX_DETACHED_RECONNECTS, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, DispatchEndpoint, ENSURE_RELEASE_DEPLOY_CONFLICT_MESSAGE, EvalBuilder, EvalDriftError, EvalEndpoint, EvalEnsureConflictError, EvalRunner, EvalSuitesNamespace, EvalsNamespace, ExecutionsEndpoint, ExecutionsNamespace, FlowBuilder, FlowDriftError, FlowEnsureConflictError, FlowResult, FlowStepsEndpoint, FlowVersionsEndpoint, FlowsEndpoint, FlowsNamespace, FpoDriftError, IntegrationsEndpoint, LEDGER_ARTIFACT_LINE_PREFIX, LIVE_AGENT_ALIAS, LogsEndpoint, ModelConfigsEndpoint, ProductDriftError, ProductEnsureConflictError, ProductsNamespace, PromptsEndpoint, PromptsNamespace, ProviderKeysEndpoint, QuestionSetDriftError, QuestionSetEnsureConflictError, QuestionSetsNamespace, RUNTYPE_CLIENT_KIND, RecordsEndpoint, RunsNamespace, Runtype, RuntypeApiError, RuntypeClient, RuntypeFlowBuilder, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, ScheduleDriftError, ScheduleEnsureConflictError, SchedulesEndpoint, SecretsEndpoint, SkillDriftError, SkillEnsureConflictError, SkillProposalsNamespace, SkillsNamespace, SurfaceDriftError, SurfaceEnsureConflictError, SurfacesEndpoint, SurfacesNamespace, ToolApprovalGrantsEndpoint, ToolDriftError, ToolEnsureConflictError, ToolsEndpoint, ToolsNamespace, TypedRecordsScope, UNIFIED_EVENTS_QUERY, UsersEndpoint, activateAgentPromotion, agentAliasErrorCode, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildAgentAdmissionHeaders, buildEmptySessionNudge, buildExecutionEventsPath, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildObservationMaskMarker, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, combineAbortSignals, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeQuestionSetContentHash, computeRecordCollectionContentHash, computeScheduleContentHash, computeScheduleDefinitionHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createA2AHandler, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineQuestionSet, defineSchedule, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, ensureSchedule, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, fpoPlanHasDrift, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isBuiltinToolExecuteResponse, isCatalogClientToolRef, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeQuestionSetDefinition, normalizeRecordCollectionDefinition, normalizeScheduleContent, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, prepareAgentPromotion, processStream, promoteAgent, promotionIdempotencyKey, pullEval, pullFpo, pullSchedule, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, validateAgentPromotion, withDetachedReconnect, withUnifiedEvents };
16750
+ export { AgentAliasDependencyError, AgentAliasNotFoundError, AgentAliasRevisionMismatchError, AgentAliasRevisionRequiredError, AgentAliasesNamespace, AgentDeploymentsNamespace, AgentDriftError, AgentEnsureConflictError, AgentPromotionError, AgentVersionsEndpoint, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, ApiKeyRequestsEndpoint, ApiKeysEndpoint, BatchBuilder, BatchesNamespace, BillingEndpoint, ChatEndpoint, ClientBatchBuilder, ClientEvalBuilder, ClientFlowBuilder, ClientTokenDriftError, ClientTokenEnsureError, ClientTokensEndpoint, ClientTokensNamespace, CollectionDriftError, CollectionEnsureConflictError, CollectionsEndpoint, ContextTemplatesEndpoint, ConversationsEndpoint, DEFAULT_MAX_DETACHED_RECONNECTS, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, DispatchEndpoint, ENSURE_RELEASE_DEPLOY_CONFLICT_MESSAGE, EvalBuilder, EvalDriftError, EvalEndpoint, EvalEnsureConflictError, EvalRunner, EvalSuitesNamespace, EvalsNamespace, ExecutionsEndpoint, ExecutionsNamespace, FlowBuilder, FlowDriftError, FlowEnsureConflictError, FlowResult, FlowStepsEndpoint, FlowVersionsEndpoint, FlowsEndpoint, FlowsNamespace, FpoDriftError, IntegrationsEndpoint, LEDGER_ARTIFACT_LINE_PREFIX, LIVE_AGENT_ALIAS, LogsEndpoint, ModelConfigsEndpoint, ProductDriftError, ProductEnsureConflictError, ProductsNamespace, PromptsEndpoint, PromptsNamespace, ProviderKeysEndpoint, QuestionSetDriftError, QuestionSetEnsureConflictError, QuestionSetsNamespace, RUNTYPE_CLIENT_KIND, RecordsEndpoint, RunsNamespace, Runtype, RuntypeApiError, RuntypeClient, RuntypeFlowBuilder, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, SandboxDeploymentsNamespace, ScheduleDriftError, ScheduleEnsureConflictError, SchedulesEndpoint, SecretsEndpoint, SkillDriftError, SkillEnsureConflictError, SkillProposalsNamespace, SkillsNamespace, SurfaceDriftError, SurfaceEnsureConflictError, SurfacesEndpoint, SurfacesNamespace, ToolApprovalGrantsEndpoint, ToolDriftError, ToolEnsureConflictError, ToolsEndpoint, ToolsNamespace, TypedRecordsScope, UNIFIED_EVENTS_QUERY, UsersEndpoint, activateAgentPromotion, agentAliasErrorCode, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildAgentAdmissionHeaders, buildEmptySessionNudge, buildExecutionEventsPath, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildObservationMaskMarker, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, combineAbortSignals, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeQuestionSetContentHash, computeRecordCollectionContentHash, computeScheduleContentHash, computeScheduleDefinitionHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createA2AHandler, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineQuestionSet, defineSchedule, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, ensureSchedule, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, fpoPlanHasDrift, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isBuiltinToolExecuteResponse, isCatalogClientToolRef, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeQuestionSetDefinition, normalizeRecordCollectionDefinition, normalizeScheduleContent, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, prepareAgentPromotion, processStream, promoteAgent, promotionIdempotencyKey, pullEval, pullFpo, pullSchedule, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, validateAgentPromotion, withDetachedReconnect, withUnifiedEvents };
16716
16751
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "11.0.0",
3
+ "version": "11.2.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {},
26
26
  "devDependencies": {
27
- "@runtypelabs/shared": "3.85.0",
27
+ "@runtypelabs/shared": "3.88.0",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.0",
30
30
  "typescript": "^6.0.3",