@runtypelabs/sdk 11.4.0 → 11.5.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.cjs +79 -1
- package/dist/index.d.cts +1815 -286
- package/dist/index.d.ts +1815 -286
- package/dist/index.mjs +79 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -12713,6 +12713,69 @@ var QuestionSetsNamespace = class {
|
|
|
12713
12713
|
}
|
|
12714
12714
|
};
|
|
12715
12715
|
//#endregion
|
|
12716
|
+
//#region src/signals-namespace.ts
|
|
12717
|
+
function pathId(id) {
|
|
12718
|
+
return encodeURIComponent(id);
|
|
12719
|
+
}
|
|
12720
|
+
/**
|
|
12721
|
+
* Trace signals: typed fields read out of every bound agent turn. Configure
|
|
12722
|
+
* sets and bindings here; results arrive as the `signals` block on runs and traces.
|
|
12723
|
+
*/
|
|
12724
|
+
var SignalsNamespace = class {
|
|
12725
|
+
constructor(getClient) {
|
|
12726
|
+
this.getClient = getClient;
|
|
12727
|
+
}
|
|
12728
|
+
/** The organization's signal sets, newest first. */
|
|
12729
|
+
async listSets() {
|
|
12730
|
+
return this.getClient().get("/signal-sets");
|
|
12731
|
+
}
|
|
12732
|
+
/** The named starting points `createSet` accepts as `preset`. */
|
|
12733
|
+
async listPresets() {
|
|
12734
|
+
return this.getClient().get("/signal-sets/presets");
|
|
12735
|
+
}
|
|
12736
|
+
/** A set with every immutable version and its current one. */
|
|
12737
|
+
async getSet(id) {
|
|
12738
|
+
return this.getClient().get(`/signal-sets/${pathId(id)}`);
|
|
12739
|
+
}
|
|
12740
|
+
/**
|
|
12741
|
+
* Create a set from a preset or a definition; version 1 is current at once.
|
|
12742
|
+
*
|
|
12743
|
+
* @example
|
|
12744
|
+
* ```typescript
|
|
12745
|
+
* const { signalSet } = await Runtype.signals.createSet({ name: 'Health', preset: 'conversation_health' })
|
|
12746
|
+
* ```
|
|
12747
|
+
*/
|
|
12748
|
+
async createSet(input) {
|
|
12749
|
+
return this.getClient().post("/signal-sets", input);
|
|
12750
|
+
}
|
|
12751
|
+
/** Rename or re-describe a set; signals change only through `publishVersion`. */
|
|
12752
|
+
async updateSet(id, input) {
|
|
12753
|
+
return this.getClient().patch(`/signal-sets/${pathId(id)}`, input);
|
|
12754
|
+
}
|
|
12755
|
+
/** Publish a new immutable version and make it current. Existing bindings keep theirs. */
|
|
12756
|
+
async publishVersion(id, definition) {
|
|
12757
|
+
return this.getClient().post(`/signal-sets/${pathId(id)}/versions`, { definition });
|
|
12758
|
+
}
|
|
12759
|
+
/** Dry-run a version over an agent's recent completed traces. Writes no results; model calls are billed. */
|
|
12760
|
+
async preview(id, versionNumber, input) {
|
|
12761
|
+
return this.getClient().post(`/signal-sets/${pathId(id)}/versions/${versionNumber}/preview`, input);
|
|
12762
|
+
}
|
|
12763
|
+
async listBindings(params = {}) {
|
|
12764
|
+
return this.getClient().get("/signal-bindings", params);
|
|
12765
|
+
}
|
|
12766
|
+
/** Bind a set version to an agent. Refusals carry a stable `code` such as `SIGNALS_LOGGING_OFF`. */
|
|
12767
|
+
async bind(input) {
|
|
12768
|
+
return this.getClient().post("/signal-bindings", input);
|
|
12769
|
+
}
|
|
12770
|
+
async unbind(bindingId) {
|
|
12771
|
+
return this.getClient().delete(`/signal-bindings/${pathId(bindingId)}`);
|
|
12772
|
+
}
|
|
12773
|
+
/** Hourly rollups summed over the window. Read `sample: 'uniform'` for live-traffic rates. */
|
|
12774
|
+
async stats(params = {}) {
|
|
12775
|
+
return this.getClient().get("/signals/stats", params);
|
|
12776
|
+
}
|
|
12777
|
+
};
|
|
12778
|
+
//#endregion
|
|
12716
12779
|
//#region src/products-ensure.ts
|
|
12717
12780
|
/**
|
|
12718
12781
|
* `spec` with its stack as a save stores it: without the server-set fields (`detected`, `declared`,
|
|
@@ -14079,6 +14142,19 @@ var Runtype = class {
|
|
|
14079
14142
|
return new QuestionSetsNamespace(() => this.getClient());
|
|
14080
14143
|
}
|
|
14081
14144
|
/**
|
|
14145
|
+
* Signals namespace - trace signal sets, bindings, preview and stats
|
|
14146
|
+
*
|
|
14147
|
+
* @example
|
|
14148
|
+
* ```typescript
|
|
14149
|
+
* const { signalSet } = await Runtype.signals.createSet({ name: 'Health', preset: 'conversation_health' })
|
|
14150
|
+
* await Runtype.signals.preview(signalSet.id, 1, { agentId })
|
|
14151
|
+
* await Runtype.signals.bind({ signalSetId: signalSet.id, target: { kind: 'agent', id: agentId } })
|
|
14152
|
+
* ```
|
|
14153
|
+
*/
|
|
14154
|
+
static get signals() {
|
|
14155
|
+
return new SignalsNamespace(() => this.getClient());
|
|
14156
|
+
}
|
|
14157
|
+
/**
|
|
14082
14158
|
* Products namespace - Product config-as-code (define / ensure / pull)
|
|
14083
14159
|
*
|
|
14084
14160
|
* Converges the top-level product record (description, icon, spec). Nested
|
|
@@ -14617,7 +14693,7 @@ function transformQueryParams(params) {
|
|
|
14617
14693
|
}
|
|
14618
14694
|
//#endregion
|
|
14619
14695
|
//#region src/version.ts
|
|
14620
|
-
const SDK_VERSION = "11.
|
|
14696
|
+
const SDK_VERSION = "11.5.0";
|
|
14621
14697
|
/**
|
|
14622
14698
|
* Canonical client identity the API uses for attribution
|
|
14623
14699
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
|
@@ -14674,6 +14750,7 @@ var RuntypeClient = class {
|
|
|
14674
14750
|
};
|
|
14675
14751
|
if (config.apiKey) this.headers.Authorization = `Bearer ${config.apiKey}`;
|
|
14676
14752
|
this.sandboxDeployments = new SandboxDeploymentsNamespace(() => this);
|
|
14753
|
+
this.signals = new SignalsNamespace(() => this);
|
|
14677
14754
|
this.flows = new FlowsEndpoint(this);
|
|
14678
14755
|
this.prompts = new PromptsEndpoint(this);
|
|
14679
14756
|
this.records = new RecordsEndpoint(this);
|
|
@@ -16879,5 +16956,5 @@ const STEP_TYPE_TO_METHOD = {
|
|
|
16879
16956
|
extract: "extract"
|
|
16880
16957
|
};
|
|
16881
16958
|
//#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 };
|
|
16959
|
+
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
16960
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/sdk",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.5.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.
|
|
27
|
+
"@runtypelabs/shared": "3.92.0",
|
|
28
28
|
"openapi-typescript": "^7.13.0",
|
|
29
29
|
"tsdown": "^0.23.0",
|
|
30
30
|
"typescript": "^6.0.3",
|