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