@runtypelabs/sdk 7.3.0 → 8.0.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
@@ -463,6 +463,7 @@ function createAgentEventTranslator() {
463
463
  })
464
464
  ];
465
465
  case "execution_error":
466
+ if (data.kind !== "agent") return [];
466
467
  return [
467
468
  compact({
468
469
  type: "agent_complete",
@@ -4614,22 +4615,6 @@ var SkillsNamespace = class {
4614
4615
  const client = this.getClient();
4615
4616
  await client.post(`/skills/${skillId}/versions/${versionId}/publish`);
4616
4617
  }
4617
- /**
4618
- * Statically scan a SKILL.md document for malicious patterns and return a
4619
- * two-tier verdict — `warning` when a skill appears suspicious (low–medium
4620
- * confidence), `error` when high-confidence malicious. Does not persist or
4621
- * gate; use it as a "scan before save" affordance.
4622
- *
4623
- * @example
4624
- * ```typescript
4625
- * const { verdict } = await Runtype.skills.scan(skillMarkdown)
4626
- * if (verdict.tier === 'error') console.warn(verdict.summary)
4627
- * ```
4628
- */
4629
- async scan(markdown) {
4630
- const client = this.getClient();
4631
- return client.post("/skills/scan", { markdown });
4632
- }
4633
4618
  /**
4634
4619
  * Import a single SKILL.md document. The imported skill lands with
4635
4620
  * `trustLevel: 'imported'` and a draft version.
@@ -6264,7 +6249,7 @@ var Runtype = class {
6264
6249
 
6265
6250
  // src/version.ts
6266
6251
  var FALLBACK_VERSION = "0.0.0";
6267
- var SDK_VERSION = "7.3.0".length > 0 ? "7.3.0" : FALLBACK_VERSION;
6252
+ var SDK_VERSION = "8.0.0".length > 0 ? "8.0.0" : FALLBACK_VERSION;
6268
6253
  var RUNTYPE_CLIENT_KIND = "sdk";
6269
6254
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6270
6255
 
@@ -8855,6 +8840,14 @@ var ProviderKeysEndpoint = class {
8855
8840
  async delete(id) {
8856
8841
  return this.client.delete(`/provider-keys/${id}`);
8857
8842
  }
8843
+ /**
8844
+ * Select organization-wide execution custody for a migrated model provider.
8845
+ * Pass a concrete connection ID for BYOK or `platform` for Runtype-managed
8846
+ * custody. This is an audited organization-wide action.
8847
+ */
8848
+ async selectOrganizationProviderCredential(data) {
8849
+ return this.client.put("/provider-keys/organization-policy", data);
8850
+ }
8858
8851
  /**
8859
8852
  * Discover models from an OpenAI-compatible endpoint (calls its `/v1/models`)
8860
8853
  * before a key is saved.
@@ -8863,15 +8856,17 @@ var ProviderKeysEndpoint = class {
8863
8856
  return this.client.post("/provider-keys/discover-models", data);
8864
8857
  }
8865
8858
  /**
8866
- * Discover models from the endpoint of an existing generic-openai provider key.
8859
+ * Discover models from the endpoint of an existing generic-openai provider
8860
+ * key or organization connection.
8867
8861
  */
8868
8862
  async discoverModelsForKey(id) {
8869
8863
  return this.client.post(`/provider-keys/${id}/discover-models`);
8870
8864
  }
8871
8865
  /**
8872
- * Set the discrete model list for a generic-openai provider key. Pass the
8873
- * discovered models, or a hand-authored list when the endpoint has no
8874
- * `/v1/models`. An empty array removes all models for the key.
8866
+ * Set the discrete model list for a generic-openai provider key or
8867
+ * organization connection. Pass the discovered models, or a hand-authored
8868
+ * list when the endpoint has no `/v1/models`. An empty array removes all
8869
+ * models for that credential.
8875
8870
  */
8876
8871
  async syncModels(id, models) {
8877
8872
  return this.client.post(`/provider-keys/${id}/sync-models`, { models });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "7.3.0",
3
+ "version": "8.0.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",