@runtypelabs/sdk 11.4.1 → 11.6.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
@@ -5152,6 +5152,13 @@ var ApiKeyRequestsEndpoint = class {
5152
5152
  async claim(requestId, data) {
5153
5153
  return this.client.post(`/api-keys/requests/${requestId}/claim`, data);
5154
5154
  }
5155
+ /**
5156
+ * Redeem a request filed with `allowUnauthenticatedClaim: true` using only its verifier.
5157
+ * Works on a client with no API key; an unknown id or wrong verifier is a uniform 404.
5158
+ */
5159
+ async claimWithVerifier(requestId, data) {
5160
+ return this.client.post(`/public/api-key-requests/${requestId}/claim`, data);
5161
+ }
5155
5162
  /** Withdraw a pending request you filed. Cannot be undone. */
5156
5163
  async cancel(requestId) {
5157
5164
  return this.client.post(`/api-keys/requests/${requestId}/cancel`);
@@ -12713,6 +12720,69 @@ var QuestionSetsNamespace = class {
12713
12720
  }
12714
12721
  };
12715
12722
  //#endregion
12723
+ //#region src/signals-namespace.ts
12724
+ function pathId(id) {
12725
+ return encodeURIComponent(id);
12726
+ }
12727
+ /**
12728
+ * Trace signals: typed fields read out of every bound agent turn. Configure
12729
+ * sets and bindings here; results arrive as the `signals` block on runs and traces.
12730
+ */
12731
+ var SignalsNamespace = class {
12732
+ constructor(getClient) {
12733
+ this.getClient = getClient;
12734
+ }
12735
+ /** The organization's signal sets, newest first. */
12736
+ async listSets() {
12737
+ return this.getClient().get("/signal-sets");
12738
+ }
12739
+ /** The named starting points `createSet` accepts as `preset`. */
12740
+ async listPresets() {
12741
+ return this.getClient().get("/signal-sets/presets");
12742
+ }
12743
+ /** A set with every immutable version and its current one. */
12744
+ async getSet(id) {
12745
+ return this.getClient().get(`/signal-sets/${pathId(id)}`);
12746
+ }
12747
+ /**
12748
+ * Create a set from a preset or a definition; version 1 is current at once.
12749
+ *
12750
+ * @example
12751
+ * ```typescript
12752
+ * const { signalSet } = await Runtype.signals.createSet({ name: 'Health', preset: 'conversation_health' })
12753
+ * ```
12754
+ */
12755
+ async createSet(input) {
12756
+ return this.getClient().post("/signal-sets", input);
12757
+ }
12758
+ /** Rename or re-describe a set; signals change only through `publishVersion`. */
12759
+ async updateSet(id, input) {
12760
+ return this.getClient().patch(`/signal-sets/${pathId(id)}`, input);
12761
+ }
12762
+ /** Publish a new immutable version and make it current. Existing bindings keep theirs. */
12763
+ async publishVersion(id, definition) {
12764
+ return this.getClient().post(`/signal-sets/${pathId(id)}/versions`, { definition });
12765
+ }
12766
+ /** Dry-run a version over an agent's recent completed traces. Writes no results; model calls are billed. */
12767
+ async preview(id, versionNumber, input) {
12768
+ return this.getClient().post(`/signal-sets/${pathId(id)}/versions/${versionNumber}/preview`, input);
12769
+ }
12770
+ async listBindings(params = {}) {
12771
+ return this.getClient().get("/signal-bindings", params);
12772
+ }
12773
+ /** Bind a set version to an agent. Refusals carry a stable `code` such as `SIGNALS_LOGGING_OFF`. */
12774
+ async bind(input) {
12775
+ return this.getClient().post("/signal-bindings", input);
12776
+ }
12777
+ async unbind(bindingId) {
12778
+ return this.getClient().delete(`/signal-bindings/${pathId(bindingId)}`);
12779
+ }
12780
+ /** Hourly rollups summed over the window. Read `sample: 'uniform'` for live-traffic rates. */
12781
+ async stats(params = {}) {
12782
+ return this.getClient().get("/signals/stats", params);
12783
+ }
12784
+ };
12785
+ //#endregion
12716
12786
  //#region src/products-ensure.ts
12717
12787
  /**
12718
12788
  * `spec` with its stack as a save stores it: without the server-set fields (`detected`, `declared`,
@@ -14079,6 +14149,19 @@ var Runtype = class {
14079
14149
  return new QuestionSetsNamespace(() => this.getClient());
14080
14150
  }
14081
14151
  /**
14152
+ * Signals namespace - trace signal sets, bindings, preview and stats
14153
+ *
14154
+ * @example
14155
+ * ```typescript
14156
+ * const { signalSet } = await Runtype.signals.createSet({ name: 'Health', preset: 'conversation_health' })
14157
+ * await Runtype.signals.preview(signalSet.id, 1, { agentId })
14158
+ * await Runtype.signals.bind({ signalSetId: signalSet.id, target: { kind: 'agent', id: agentId } })
14159
+ * ```
14160
+ */
14161
+ static get signals() {
14162
+ return new SignalsNamespace(() => this.getClient());
14163
+ }
14164
+ /**
14082
14165
  * Products namespace - Product config-as-code (define / ensure / pull)
14083
14166
  *
14084
14167
  * Converges the top-level product record (description, icon, spec). Nested
@@ -14617,7 +14700,7 @@ function transformQueryParams(params) {
14617
14700
  }
14618
14701
  //#endregion
14619
14702
  //#region src/version.ts
14620
- const SDK_VERSION = "11.4.1";
14703
+ const SDK_VERSION = "11.6.0";
14621
14704
  /**
14622
14705
  * Canonical client identity the API uses for attribution
14623
14706
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
@@ -14674,6 +14757,7 @@ var RuntypeClient = class {
14674
14757
  };
14675
14758
  if (config.apiKey) this.headers.Authorization = `Bearer ${config.apiKey}`;
14676
14759
  this.sandboxDeployments = new SandboxDeploymentsNamespace(() => this);
14760
+ this.signals = new SignalsNamespace(() => this);
14677
14761
  this.flows = new FlowsEndpoint(this);
14678
14762
  this.prompts = new PromptsEndpoint(this);
14679
14763
  this.records = new RecordsEndpoint(this);
@@ -16879,5 +16963,5 @@ const STEP_TYPE_TO_METHOD = {
16879
16963
  extract: "extract"
16880
16964
  };
16881
16965
  //#endregion
16882
- 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, SimulationsEndpoint, 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 };
16966
+ 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, SignalsNamespace, SimulationsEndpoint, 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 };
16883
16967
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "11.4.1",
3
+ "version": "11.6.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.91.1",
27
+ "@runtypelabs/shared": "3.93.0",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.0",
30
30
  "typescript": "^6.0.3",
@@ -63,7 +63,7 @@
63
63
  "scripts": {
64
64
  "build": "tsdown",
65
65
  "dev": "tsdown --watch",
66
- "typecheck": "bun check",
66
+ "typecheck": "tsrs --noEmit",
67
67
  "clean": "rm -rf dist",
68
68
  "test": "vitest run",
69
69
  "test:watch": "vitest watch",