@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.cjs +16 -21
- package/dist/index.d.cts +499 -151
- package/dist/index.d.ts +499 -151
- package/dist/index.mjs +16 -21
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -651,6 +651,7 @@ function createAgentEventTranslator() {
|
|
|
651
651
|
})
|
|
652
652
|
];
|
|
653
653
|
case "execution_error":
|
|
654
|
+
if (data.kind !== "agent") return [];
|
|
654
655
|
return [
|
|
655
656
|
compact({
|
|
656
657
|
type: "agent_complete",
|
|
@@ -4802,22 +4803,6 @@ var SkillsNamespace = class {
|
|
|
4802
4803
|
const client = this.getClient();
|
|
4803
4804
|
await client.post(`/skills/${skillId}/versions/${versionId}/publish`);
|
|
4804
4805
|
}
|
|
4805
|
-
/**
|
|
4806
|
-
* Statically scan a SKILL.md document for malicious patterns and return a
|
|
4807
|
-
* two-tier verdict — `warning` when a skill appears suspicious (low–medium
|
|
4808
|
-
* confidence), `error` when high-confidence malicious. Does not persist or
|
|
4809
|
-
* gate; use it as a "scan before save" affordance.
|
|
4810
|
-
*
|
|
4811
|
-
* @example
|
|
4812
|
-
* ```typescript
|
|
4813
|
-
* const { verdict } = await Runtype.skills.scan(skillMarkdown)
|
|
4814
|
-
* if (verdict.tier === 'error') console.warn(verdict.summary)
|
|
4815
|
-
* ```
|
|
4816
|
-
*/
|
|
4817
|
-
async scan(markdown) {
|
|
4818
|
-
const client = this.getClient();
|
|
4819
|
-
return client.post("/skills/scan", { markdown });
|
|
4820
|
-
}
|
|
4821
4806
|
/**
|
|
4822
4807
|
* Import a single SKILL.md document. The imported skill lands with
|
|
4823
4808
|
* `trustLevel: 'imported'` and a draft version.
|
|
@@ -6452,7 +6437,7 @@ var Runtype = class {
|
|
|
6452
6437
|
|
|
6453
6438
|
// src/version.ts
|
|
6454
6439
|
var FALLBACK_VERSION = "0.0.0";
|
|
6455
|
-
var SDK_VERSION = "
|
|
6440
|
+
var SDK_VERSION = "8.0.0".length > 0 ? "8.0.0" : FALLBACK_VERSION;
|
|
6456
6441
|
var RUNTYPE_CLIENT_KIND = "sdk";
|
|
6457
6442
|
var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
6458
6443
|
|
|
@@ -9043,6 +9028,14 @@ var ProviderKeysEndpoint = class {
|
|
|
9043
9028
|
async delete(id) {
|
|
9044
9029
|
return this.client.delete(`/provider-keys/${id}`);
|
|
9045
9030
|
}
|
|
9031
|
+
/**
|
|
9032
|
+
* Select organization-wide execution custody for a migrated model provider.
|
|
9033
|
+
* Pass a concrete connection ID for BYOK or `platform` for Runtype-managed
|
|
9034
|
+
* custody. This is an audited organization-wide action.
|
|
9035
|
+
*/
|
|
9036
|
+
async selectOrganizationProviderCredential(data) {
|
|
9037
|
+
return this.client.put("/provider-keys/organization-policy", data);
|
|
9038
|
+
}
|
|
9046
9039
|
/**
|
|
9047
9040
|
* Discover models from an OpenAI-compatible endpoint (calls its `/v1/models`)
|
|
9048
9041
|
* before a key is saved.
|
|
@@ -9051,15 +9044,17 @@ var ProviderKeysEndpoint = class {
|
|
|
9051
9044
|
return this.client.post("/provider-keys/discover-models", data);
|
|
9052
9045
|
}
|
|
9053
9046
|
/**
|
|
9054
|
-
* Discover models from the endpoint of an existing generic-openai provider
|
|
9047
|
+
* Discover models from the endpoint of an existing generic-openai provider
|
|
9048
|
+
* key or organization connection.
|
|
9055
9049
|
*/
|
|
9056
9050
|
async discoverModelsForKey(id) {
|
|
9057
9051
|
return this.client.post(`/provider-keys/${id}/discover-models`);
|
|
9058
9052
|
}
|
|
9059
9053
|
/**
|
|
9060
|
-
* Set the discrete model list for a generic-openai provider key
|
|
9061
|
-
* discovered models, or a hand-authored
|
|
9062
|
-
* `/v1/models`. An empty array removes all
|
|
9054
|
+
* Set the discrete model list for a generic-openai provider key or
|
|
9055
|
+
* organization connection. Pass the discovered models, or a hand-authored
|
|
9056
|
+
* list when the endpoint has no `/v1/models`. An empty array removes all
|
|
9057
|
+
* models for that credential.
|
|
9063
9058
|
*/
|
|
9064
9059
|
async syncModels(id, models) {
|
|
9065
9060
|
return this.client.post(`/provider-keys/${id}/sync-models`, { models });
|